qmmm_pme.calculators package¶
Submodules¶
qmmm_pme.calculators.calculator module¶
A module defining the Calculator base class and derived
non-multiscale classes.
- class qmmm_pme.calculators.calculator.CalculatorType(value)[source]¶
Bases:
EnumEnumeration of types of non-multiscale calculators.
- ME = 'An ME Calculator.'¶
- MM = 'An MM Calculator.'¶
- QM = 'A QM Calculator.'¶
- class qmmm_pme.calculators.calculator.ModifiableCalculator[source]¶
Bases:
ABCAn abstract
Calculatorbase class for interfacing with plugins.- active_plugins()[source]¶
Get the current list of active plugins.
- Returns:
A list of the active plugins being employed by the
Calculator.- Return type:
list[str]
- abstract calculate(return_forces=True, return_components=True)[source]¶
Calculate energies and forces for the
Systemwith theCalculator.- Parameters:
return_forces (bool | None) – Whether or not to return forces.
return_components (bool | None) – Whether or not to return the components of the energy.
- Returns:
The energy, forces, and energy components of the calculation.
- Return type:
tuple[Any, …]
- register_plugin(plugin)[source]¶
Register a
Pluginmodifying aCalculatorroutine.- Parameters:
plugin (CalculatorPlugin) – An
CalculatorPluginobject.- Return type:
None
- class qmmm_pme.calculators.calculator.Results(energy=0, forces=array([], dtype=float64), components=<factory>)[source]¶
Bases:
objectA wrapper class for storing the results of a calculation.
- Parameters:
energy (float) – The energy calculated for the system.
forces (NDArray[np.float64]) – The forces calculated for the system.
components (dict[str, float]) –
- Components:
The components of the energy calculated for the system.
- components: dict[str, float]¶
- energy: float = 0¶
- forces: NDArray[np.float64] = array([], dtype=float64)¶
- class qmmm_pme.calculators.calculator.StandaloneCalculator(system, interface, options=<factory>)[source]¶
Bases:
ModifiableCalculatorA
Calculatorclass, defining the procedure for standalone QM or MM calculations.- Parameters:
system (System) – The
Systemobject to perform calculations on.interface (SoftwareInterface) – The
SoftwareInterfaceobject to perform calculations with.options (dict[str, Any]) – Options to provide to the
SoftwareInterface.
- calculate(return_forces=True, return_components=True)[source]¶
Calculate energies and forces for the
Systemwith theCalculator.- Parameters:
return_forces (bool | None) – Whether or not to return forces.
return_components (bool | None) – Whether or not to return the components of the energy.
- Returns:
The energy, forces, and energy components of the calculation.
- Return type:
tuple[Any, …]
- interface: SoftwareInterface¶
- options: dict[str, Any]¶
qmmm_pme.calculators.qmmm_calculator module¶
A module to define the QMMMCalculator class.
- class qmmm_pme.calculators.qmmm_calculator.QMMMCalculator(system, calculators, embedding_cutoff, options=<factory>)[source]¶
Bases:
ModifiableCalculatorA
Calculatorclass for performing QM/MM calculations for an entire system.- Parameters:
system (System) – The
Systemobject to perform calculations on.calculators (dict[CalculatorType, StandaloneCalculator]) – The subsystem
Calculatorsto perform calculations with.embedding_cutoff (float | int) – The electrostatic QM/MM embedding cutoff, in Angstroms.
options (dict[str, Any]) – Options to provide to either of the
SoftwareInterfaceobjects.
- calculate(return_forces=True, return_components=True)[source]¶
Calculate energies and forces for the
Systemwith theCalculator.- Parameters:
return_forces (bool | None) – Whether or not to return forces.
return_components (bool | None) – Whether or not to return the components of the energy.
- Returns:
The energy, forces, and energy components of the calculation.
- Return type:
tuple[Any, …]
- calculators: dict[CalculatorType, StandaloneCalculator]¶
- compute_embedding()[source]¶
Create the embedding list for the current
System, as well as the corrective Coulomb potential and forces.The distances from the QM atoms are computed using the centroid of the non-QM molecule from the centroid of the QM atoms.
- Returns:
The corrective Coulomb energy and forces for the embedded point charges, and the charge field for the QM calculation.
- Return type:
tuple[Any, …]
- embedding_cutoff: float | int¶
- options: dict[str, Any]¶
Module contents¶
A sub-package containing the calculators of the simulation engine.