NbedDriver#
The NbedDriver controls all the main functionality of the package.
Module containg the NbedDriver Class.
- class nbed.driver.NbedDriver(config: NbedConfig)[source]#
Bases:
objectFunction to return the embedding Qubit Hamiltonian.
- Parameters:
config (NbedConfig) – A validated config model.
- config#
Input configuration.
- Type:
- localized_system#
A dataclass describing the localized C matrix and occupancy.
- Type:
- mu#
Results for the $mu$-shift projector.
- Type:
dict[str, Any]
- huzinaga#
Results for the Huzinaga projector.
- Type:
dict[str, Any]
- two_e_cross#
two electron energy from cross terms (includes exchange correlation and Coulomb contribution) of subsystem DFT calculation
- Type:
float
- classical_energy#
environment correction energy to obtain total energy (for mu shift method)
- Type:
float
- embed(init_huzinaga_rhf_with_mu: bool = False, n_mo_overwrite: tuple[int | None, int | None] = (None, None)) None[source]#
Run embedded scf calculation.
- Parameters:
init_huzinaga_rhf_with_mu (bool) – Will run mu-shift projector even when input projector=’huzinaga’.
n_mo_overwrite (tuple[int, int]) – Enforces a specific number of MOs are included in the active region. Used for ACE-of-SPADE reaction path localization.
- post_embed(embedded_scf: SCF, v_emb: ndarray[tuple[Any, ...], dtype[_ScalarT]], projector: ProjectorTypes) dict[source]#
Projector-dependent components of the embedding procedure.
- Parameters:
embedded_scf (scf.hf.SCF) – An embedded pyscf scf object.
v_emb (NDArray) – Embedding Potential
projector (ProjectorTypes) – Which projector the result should use.
- Returns:
A dict of results.
- Return type:
dict
- nbed.driver.dft_in_dft(driver: NbedDriver, projection_method: ProjectorTypes) dict[source]#
Return energy of DFT in DFT embedding.
Note run_mu_shift (bool) and run_huzinaga (bool) flags define which method to use (can be both) This is done when object is initialized.
- Parameters:
driver (NbedDriver) – A driver object.
projection_method (callable) – Embedding method to use (mu or huzinaga).
- Returns:
DFT-in-DFT embedding results.
- Return type:
dict
- nbed.driver.run_emb_ccsd(emb_pyscf_scf_rhf: SCF, frozen: list | None = None, convergence: float = 1e-06, max_ram_memory: int = 4000) tuple[CCSDBase, float][source]#
Function run CCSD on embedded restricted Hartree Fock object.
Note emb_pyscf_scf_rhf is ROHF object for the active embedded subsystem (defined in localized basis) (see get_embedded_rhf method)
- Parameters:
emb_pyscf_scf_rhf (scf.ROHF) – PySCF restricted Hartree Fock object of active embedded subsystem
frozen (List) – A path to an .xyz file describing molecular geometry.
convergence (float) – Convergence threshold.
max_ram_memory (int) – Maximum ram to use in solving.
- Returns:
PySCF CCSD object e_ccsd_corr (float): electron correlation CCSD energy
- Return type:
ccsd (cc.CCSD)
- nbed.driver.run_emb_fci(emb_pyscf_scf_rhf: SCF, frozen: list | None = None, convergence: float | None = 1e-06, max_ram_memory: int | None = 4000) SCF | FCISolver | CASBase[source]#
Function run FCI on embedded restricted Hartree Fock object.
Note emb_pyscf_scf_rhf is ROHF object for the active embedded subsystem (defined in localized basis) (see get_embedded_rhf method)
- Parameters:
emb_pyscf_scf_rhf (scf.ROHF) – PySCF restricted Hartree Fock object of active embedded subsystem
frozen (List) – A path to an .xyz file describing moleclar geometry.
convergence (float) – convergence tolerance.
max_ram_memory (int) – Maximum memory allocation for FCI.
- Returns:
PySCF FCI object
- Return type:
fci_scf (fci.FCI)