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: ABC

An abstract Hamiltonian base class for creating the Hamiltonian API.

atoms: list[int | slice] = []
abstract build_calculator(system)[source]

Build the Calculator corresponding to the Hamiltonian object.

Parameters:

system (System) – The System object to calculate energy and forces for.

Returns:

The Calculator object.

Return type:

ModifiableCalculator

parse_atoms(system)[source]

Parse the indices provided to the Hamiltonian object to create the list of residue-grouped atom indices.

Parameters:

system (System) – The System object 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: Hamiltonian

An interface for the MMHamiltonian.

class qmmm_pme.hamiltonians.hamiltonian.QMHamiltonianInterface[source]

Bases: Hamiltonian

An interface for the QMHamiltonian.

class qmmm_pme.hamiltonians.hamiltonian.QMMMHamiltonianInterface[source]

Bases: Hamiltonian

An 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: MMHamiltonianInterface

A 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 Calculator corresponding to the Hamiltonian object.

Parameters:

system (System) – The System object to calculate energy and forces for.

Returns:

The Calculator object.

Return type:

StandaloneCalculator

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: QMHamiltonianInterface

A 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 Calculator corresponding to the Hamiltonian object.

Parameters:

system (System) – The System object to calculate energy and forces for.

Returns:

The Calculator object.

Return type:

StandaloneCalculator

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: QMMMHamiltonianInterface

A wrapper class storing settings for QMMM calculations.

Parameters:
  • qm_hamiltonian (QMHamiltonian) – The Hamiltonian object for calculations on the QM subsystem.

  • mm_hamiltonian (MMHamiltonian) – The Hamiltonian object for calculations on the MM subsystem.

  • embedding_cutoff (float | int) – The electrostatic QM/MM embedding cutoff, in Angstroms.

build_calculator(system)[source]

Build the Calculator corresponding to the Hamiltonian object.

Parameters:

system (System) – The System object to calculate energy and forces for.

Returns:

The Calculator object.

Return type:

QMMMCalculator

embedding_cutoff: float | int = 14.0
mm_hamiltonian: MMHamiltonian
qm_hamiltonian: QMHamiltonian

Module contents

A module to define the Hamiltonian API.