pydft_qmmm.interfaces.psi4 package¶
Submodules¶
pydft_qmmm.interfaces.psi4.psi4_interface module¶
The basic Psi4 software interface.
- class pydft_qmmm.interfaces.psi4.psi4_interface.Psi4Interface(settings, options, functional, context)[source]¶
Bases:
QMInterface
A software interface wrapping Psi4 functionality.
- Parameters:
settings (QMSettings) – The settings used to build the Psi4 interface.
options (Psi4Options) – The Psi4 global options derived from the settings.
functional (str) – The name of the functional to use for exchange-correlation calculations.
context (Psi4Context) – An object which holds system information to feed into Psi4.
- compute_components()[source]¶
Compute the components of energy using OpenMM.
- Returns:
The components of the energy (\(\mathrm{kJ\;mol^{-1}}\)) of the system.
- Return type:
dict[str, float]
- compute_energy()[source]¶
Compute the energy of the system using Psi4.
- Returns:
The energy (\(\mathrm{kJ\;mol^{-1}}\)) of the system.
- Return type:
float
- compute_forces()[source]¶
Compute the forces on the system using Psi4.
- Returns:
The forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)) acting on atoms in the system.
- Return type:
ndarray[Any, dtype[float64]]
- update_charges(charges)[source]¶
Set the atomic partial charges used by Psi4 for embedding.
- Parameters:
charges (ndarray[Any, dtype[float64]]) – The partial charges (\(e\)) of the atoms.
- Return type:
None
- update_memory(memory)[source]¶
Set the amount of memory used by Psi4.
- Parameters:
memory (str) – The amount of memory to utilize.
- Return type:
None
- update_positions(positions)[source]¶
Set the atomic positions used by Psi4.
- Parameters:
positions (ndarray[Any, dtype[float64]]) – The positions (\(\mathrm{\mathring{A}}\)) of the atoms within the system.
- Return type:
None
pydft_qmmm.interfaces.psi4.psi4_utils module¶
Functionality for building the Psi4 interface and some helper classes.
- class pydft_qmmm.interfaces.psi4.psi4_utils.Psi4Context(atoms, embedding, elements, positions, charges, charge, spin)[source]¶
Bases:
object
A wrapper class for managing Psi4 Geometry object generation.
- Parameters:
atoms (set[int]) – The indices of atoms that are treated at the QM level of theory.
embedding (set[int]) – The indices of atoms that are electrostatically embedded.
elements (list[str]) – The element symbols of the atoms in the system.
positions (NDArray[np.float64]) – The positions (\(\mathrm{\mathring{A}}\)) of the atoms within the system.
charges (NDArray[np.float64]) – The partial charges (\(e\)) of the atoms in the system.
charge (int) – The net charge (\(e\)) of the system represented at the QM level of theory.
spin (int) – The net spin of the system represented by the QM level of theory.
- generate_external_potential()[source]¶
Create the data structures read by Psi4 to perform embedding.
- Returns:
The list of coordinates (\(\mathrm{a.u.}\)) and charges (\(e\)) that will be read by Psi4 during calculations and electrostatically embedded.
- Return type:
list[list[int | list[int]]] | None
- generate_molecule()[source]¶
Create the Geometry object for Psi4 calculations.
- Returns:
The Psi4 Geometry object, which contains the positions, net charge, and net spin of atoms treated at the QM level of theory.
- Return type:
Molecule
- update_charges(charges)[source]¶
Set the atomic partial charges used by Psi4 for embedding.
- Parameters:
charges (ndarray[Any, dtype[float64]]) – The partial charges (\(e\)) of the atoms.
- Return type:
None
- class pydft_qmmm.interfaces.psi4.psi4_utils.Psi4Options(basis, dft_spherical_points, dft_radial_points, scf_type, scf__reference, scf__guess)[source]¶
Bases:
object
An immutable wrapper class for storing Psi4 global options.
- Parameters:
basis (str) – The name of the basis set to be used by Psi4.
dft_spherical_points (int) – The number of spherical Lebedev points to use in the DFT quadrature.
dft_radial_points (int) – The number of radial points to use in the DFT quadrature.
scf_type (str) – The name of the type of SCF to perform, as in the JK build algorithms as in Psi4.
scf__reference (str) – The name of the reference to use, including restricted Kohn-Sham or unrestricted Kohn-Sham.
scf__guess (str) – The name of the algorithm used to generate the initial guess at the start of an SCF procedure.
- basis: str¶
- dft_radial_points: int¶
- dft_spherical_points: int¶
- scf__guess: str¶
- scf__reference: str¶
- scf_type: str¶
- pydft_qmmm.interfaces.psi4.psi4_utils.psi4_interface_factory(settings)[source]¶
Build the interface to Psi4 given the settings.
- Parameters:
settings (QMSettings) – The settings used to build the Psi4 interface.
- Returns:
The Psi4 interface.
- Return type:
Module contents¶
A sub-package for interfacing with Psi4.