qmmm_pme.hamiltonians package¶
Submodules¶
qmmm_pme.hamiltonians.hamiltonian module¶
A module defining the base Hamiltonian class and derived
interface classes.
- class qmmm_pme.hamiltonians.hamiltonian.Hamiltonian[source]¶
Bases:
ABCAn abstract
Hamiltonianbase class for creating the Hamiltonian API.- atoms: list[int | slice] = []¶
- abstract build_calculator(system)[source]¶
Build the
Calculatorcorresponding to theHamiltonianobject.- Parameters:
system (System) – The
Systemobject to calculate energy and forces for.- Returns:
The
Calculatorobject.- Return type:
- parse_atoms(system)[source]¶
Parse the indices provided to the
Hamiltonianobject to create the list of residue-grouped atom indices.- Parameters:
system (System) – The
Systemobject to calculate energy and forces for.- Returns:
…
- Return type:
list[list[int]]
- system_type: SystemTypes = 'A System.'¶
- class qmmm_pme.hamiltonians.hamiltonian.MMHamiltonianInterface[source]¶
Bases:
HamiltonianAn interface for the
MMHamiltonian.
- class qmmm_pme.hamiltonians.hamiltonian.QMHamiltonianInterface[source]¶
Bases:
HamiltonianAn interface for the
QMHamiltonian.
- class qmmm_pme.hamiltonians.hamiltonian.QMMMHamiltonianInterface[source]¶
Bases:
HamiltonianAn interface for the
QMMMHamiltonian.
qmmm_pme.hamiltonians.mm_hamiltonian module¶
A module defining the MMHamiltonian class.
- class qmmm_pme.hamiltonians.mm_hamiltonian.MMHamiltonian(nonbonded_method='PME', nonbonded_cutoff=14.0, pme_gridnumber=60, pme_alpha=5.0)[source]¶
Bases:
MMHamiltonianInterfaceA wrapper class to store settings for MM calculations.
- Parameters:
nonbonded_method (str) – The MM nonbonded method.
nonbonded_cutoff (float | int) – The MM nonbonded cutoff.
pme_gridnumber (int) – The number of PME gridpoints to use along each box vector.
pme_alpha (float | int) – The PME alpha parameter for Gaussian widths, in inverse nanometers.
- build_calculator(system)[source]¶
Build the
Calculatorcorresponding to theHamiltonianobject.- Parameters:
system (System) – The
Systemobject to calculate energy and forces for.- Returns:
The
Calculatorobject.- Return type:
- nonbonded_cutoff: float | int = 14.0¶
- nonbonded_method: str = 'PME'¶
- pme_alpha: float | int = 5.0¶
- pme_gridnumber: int = 60¶
qmmm_pme.hamiltonians.qm_hamiltonian module¶
A module defining the QMHamiltonian class.
- class qmmm_pme.hamiltonians.qm_hamiltonian.QMHamiltonian(basis_set, functional, charge, spin, quadrature_spherical=302, quadrature_radial=75, scf_type='df', read_guess=True, reference_energy=None)[source]¶
Bases:
QMHamiltonianInterfaceA wrapper class to store settings for QM calculations.
- Parameters:
basis_set (str) – The basis set to use for QM calculations.
functional (str) – The DFT functional to use for the QM calculations.
charge (int) – The net charge of the QM atoms.
spin (int) – The net spin of the QM atoms.
quadrature_spherical (int) – The number of spherical (angular and azimuthal) points to use in the Lebedev quadrature.
quadrature_radial (int) – The number of radial points to use in the Lebedev quadrature.
scf_type (str) – The type of SCF procedure to perform for QM calculations.
read_guess (bool) – Whether or not read in wavefunction from previous a calculation. This speeds up calculations.
reference_energy (float | int | None) – The base potential energy for QM energies, in Hartree. This is subtracted from all QM energies.
- basis_set: str¶
- build_calculator(system)[source]¶
Build the
Calculatorcorresponding to theHamiltonianobject.- Parameters:
system (System) – The
Systemobject to calculate energy and forces for.- Returns:
The
Calculatorobject.- Return type:
- charge: int¶
- functional: str¶
- quadrature_radial: int = 75¶
- quadrature_spherical: int = 302¶
- read_guess: bool = True¶
- reference_energy: float | int | None = None¶
- scf_type: str = 'df'¶
- spin: int¶
qmmm_pme.hamiltonians.qmmm_hamiltonian module¶
A module defining the QMMMHamiltonian class.
- class qmmm_pme.hamiltonians.qmmm_hamiltonian.QMMMHamiltonian(qm_hamiltonian, mm_hamiltonian, embedding_cutoff=14.0)[source]¶
Bases:
QMMMHamiltonianInterfaceA wrapper class storing settings for QMMM calculations.
- Parameters:
qm_hamiltonian (QMHamiltonian) – The
Hamiltonianobject for calculations on the QM subsystem.mm_hamiltonian (MMHamiltonian) – The
Hamiltonianobject for calculations on the MM subsystem.embedding_cutoff (float | int) – The electrostatic QM/MM embedding cutoff, in Angstroms.
- build_calculator(system)[source]¶
Build the
Calculatorcorresponding to theHamiltonianobject.- Parameters:
system (System) – The
Systemobject to calculate energy and forces for.- Returns:
The
Calculatorobject.- Return type:
- embedding_cutoff: float | int = 14.0¶
- mm_hamiltonian: MMHamiltonian¶
- qm_hamiltonian: QMHamiltonian¶
Module contents¶
A module to define the Hamiltonian API.