Misc. functionalities
- molbe.misc.libint2pyscf(xyzfile, hcore, basis, hcore_skiprows=1, use_df=False, unrestricted=False, spin=0, charge=0)
Build a pyscf Mole and RHF/UHF object using the given xyz file and core Hamiltonian (in libint standard format) c.f. In libint standard format, the basis sets appear in the order atom# n l m 0 1 0 0 1s 0 2 0 0 2s 0 2 1 -1 2py 0 2 1 0 2pz 0 2 1 1 2px … In pyscf, the basis sets appear in the order atom # n l m 0 1 0 0 1s 0 2 0 0 2s 0 2 1 1 2px 0 2 1 -1 2py 0 2 1 0 2pz … For higher angular momentum, both use [-l, -l+1, …, l-1, l] ordering.
- Parameters:
xyzfile (string) – Path to the xyz file
hcore (string) – Path to the core Hamiltonian
basis (string) – Name of the basis set
hcore_skiprows (int, optional) – # of first rows to skip from the core Hamiltonian file, by default 1
use_df (bool, optional) – If true, use density-fitting to evaluate the two-electron integrals
unrestricted (bool, optional) – If true, use UHF bath
spin (int, optional) – 2S, Difference between the number of alpha and beta electrons
charge (int, optional) – Total charge of the system
- Return type:
(pyscf.gto.Mole, pyscf.scf.RHF or pyscf.scf.UHF)
- molbe.misc.be2fcidump(be_obj, fcidump_prefix, basis)
Construct FCIDUMP file for each fragment in a given BE object Assumes molecular, restricted BE calculation
- Parameters:
be_obj (molbe.mbe.BE) – BE object
fcidump_prefix (string) – Prefix for path & filename to the output fcidump files Each file is named [fcidump_prefix]_f0, …
basis (string) – ‘embedding’ to get the integrals in the embedding basis ‘fragment_mo’ to get the integrals in the fragment MO basis
- molbe.misc.ube2fcidump(be_obj, fcidump_prefix, basis)
Construct FCIDUMP file for each fragment in a given BE object Assumes molecular, restricted BE calculation
- Parameters:
be_obj (molbe.mbe.BE) – BE object
fcidump_prefix (string) – Prefix for path & filename to the output fcidump files Each file is named [fcidump_prefix]_f0, …
basis (string) – ‘embedding’ to get the integrals in the embedding basis ‘fragment_mo’ to get the integrals in the fragment MO basis
- molbe.misc.be2puffin(xyzfile, basis, hcore=None, libint_inp=False, pts_and_charges=None, jk=None, use_df=False, charge=0, spin=0, nproc=1, ompnum=1, be_type='be1', df_aux_basis=None, frozen_core=True, localization_method='lowdin', localization_basis=None, unrestricted=False, from_chk=False, checkfile=None, ecp=None)
Front-facing API bridge tailored for SCINE Puffin Returns the CCSD oneshot energies - QM/MM notes: Using QM/MM alongside big basis sets, especially with a frozen core, can cause localization and numerical stability problems. Use with caution. Additional work to this end on localization, frozen core, ECPs, and QM/MM in this capacity is ongoing. - If running unrestricted QM/MM calculations, with ECPs, in a large basis set, do not freeze the core. Using an ECP for heavy atoms improves the localization numerics, but this is not yet compatible with frozen core on the rest of the atoms.
- Parameters:
xyzfile (string) – Path to the xyz file
basis (string) – Name of the basis set
hcore (numpy.array) – Two-dimensional array of the core Hamiltonian
libint_inp (bool) – True for hcore provided in Libint format. Else, hcore input is in PySCF format Default is False, i.e., hcore input is in PySCF format
pts_and_charges (tuple of numpy.array) – QM/MM (points, charges). Use pyscf’s QM/MM instead of starting Hamiltonian
jk (numpy.array) – Coulomb and Exchange matrices (pyscf will calculate this if not given)
use_df (bool, optional) – If true, use density-fitting to evaluate the two-electron integrals
charge (int, optional) – Total charge of the system
spin (int, optional) – Total spin of the system, pyscf definition
nproc (int, optional) –
ompnum (int, optional) – Set number of processors and ompnum for the jobs
frozen_core (bool, optional) – Whether frozen core approximation is used or not, by default True
localization_method (string, optional) – For now, lowdin is best supported for all cases. IAOs to be expanded By default ‘lowdin’
localization_basis (string, optional) – IAO minimal-like basis, only nead specification with IAO localization By default None
unrestricted (bool, optional) – Unrestricted vs restricted HF and CCSD, by default False
from_chk (bool, optional) – Run calculation from converged RHF/UHF checkpoint. By default False
checkfile (string, optional) – if not None: - if from_chk: specify the checkfile to run the embedding calculation - if not from_chk: specify where to save the checkfile By default None
ecp (string, optional) – specify the ECP for any atoms, accompanying the basis set syntax: {‘Atom_X’: ‘ECP_for_X’; ‘Atom_Y’: ‘ECP_for_Y’} By default None