qrunch.chemistry.molecule.molecular_configuration
Module with the definition of a molecular configuration.
Classes
Describes a molecular configuration of a molecule. |
- class MolecularConfiguration
Bases:
objectDescribes a molecular configuration of a molecule.
- __init__(molecule: Molecule, basis_set: BasisSet | dict[Atom, BasisSet], charge: int = 0, spin_difference: int = 0, embedded_atoms: Sequence[int] | None = None, solvent: Solvent | None = None, aux_basis_set: BasisSet | dict[Atom, BasisSet] | None = None) None
Initialize a molecular configuration.
- Parameters:
molecule (Molecule) – Molecule to specify configuration for.
basis_set (BasisSet | dict[Atom, BasisSet]) – Basis set to use for the atoms types in the molecule. Either a single basis set to use for all atoms, or a dictionary specifying specific basis sets for each chemical element in the molecule.
charge (int) – Overall charge of the molecule.
spin_difference (int) – Difference between the number of spin up and spin down electrons (default: 0).
embedded_atoms (Sequence[int] | None) – Optional field describing which atoms are embedded.
solvent (Solvent | None) – Solvent for the molecular configuration to be embedded in.
aux_basis_set (BasisSet | dict[Atom, BasisSet] | None) – Auxiliary basis set, used for density fitting, to use for the atoms types in the molecule. Either a single basis set to use for all atoms, or a dictionary specifying specific basis sets for each chemical element in the molecule.
- Return type:
None
- atom_to_atomic_orbital_indices_map() dict[int, tuple[int, int]]
Return a map from the atom index to the start and end atomic orbital index.
- Return type:
dict[int, tuple[int, int]]
- property charge: int
Charge of the configuration.
- core_hamiltonian() ndarray[Any, dtype[float64]]
Return core hamiltonian in atomic basis.
- Return type:
ndarray[Any, dtype[float64]]
- embedded_atoms_string() str
Provide a human-readable string representation for the embedded atoms.
- Return type:
str
- nuclear_repulsion_energy() float
Calculate the nuclear repulsion energy of the atoms in the molecule.
- Return type:
float
- number_of_alpha_electrons() int
Calculate number of alpha electrons.
- Return type:
int
- number_of_atomic_orbitals() int
Return the number of atomic orbitals.
- Return type:
int
- number_of_beta_electrons() int
Calculate number of beta electrons.
- Return type:
int
- number_of_electrons() int
Calculate the total number of electrons on the molecule.
- Return type:
int
- number_of_spatial_orbitals() int
Calculate the number of spatial orbitals.
- Return type:
int
- overlap_matrix() ndarray[Any, dtype[float64]]
Return the atomic orbital overlap matrix.
- Return type:
ndarray[Any, dtype[float64]]
- property pyscf_molecule: Mole
Get the PySCF molecule.
- property spin_difference: int
Spin of the configuration.
- update_spin_and_charge(new_spin_difference: int, new_charge: int) None
Update both spin_difference and charge at the same time.
If both spin_difference and charge are changed separately, the intermediate molecule might fail validation. To avoid this, this method can be used instead.
- Parameters:
new_spin_difference (int) – new spin_difference to be set on the molecule.
new_charge (int) – new charge to be set on the molecule.
- Return type:
None