pydft_qmmm.calculators package¶
Submodules¶
pydft_qmmm.calculators.calculator module¶
The calculator base class.
- class pydft_qmmm.calculators.calculator.Calculator[source]¶
Bases:
ABC
The abstract calculator base class.
- system¶
(class attribute) The system whose atom positions, atom identities, and geometry will be used to calculate energies and forces.
- Type:
- name¶
(class attribute) The name of the calculator.
- Type:
str
- _plugins¶
(class attribute) The list of plugin names that have been registered to the calculator.
- Type:
list[str]
- active_plugins()[source]¶
Get the current list of active plugins.
- Returns:
A list of the active plugins registered by the calculator.
- Return type:
list[str]
- abstract calculate(return_forces=True, return_components=True)[source]¶
Calculate energies and forces.
- 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 (\(\mathrm{kJ\;mol^{-1}}\)), forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)), and energy components (\(\mathrm{kJ\;mol^{-1}}\)) of the calculation.
- Return type:
- name: str = ''¶
- register_plugin(plugin)[source]¶
Record plugin name and apply the plugin to the calculator.
- Parameters:
plugin (CalculatorPlugin) – A plugin that will modify the behavior of one or more calculator routines.
- Return type:
None
pydft_qmmm.calculators.composite_calculator module¶
A calculator that performs and collates sub-calculations.
- class pydft_qmmm.calculators.composite_calculator.CompositeCalculator(system, calculators, cutoff=0.0)[source]¶
Bases:
Calculator
A calculator that performs and collates sub-calculations.
- Parameters:
system (System) – The system whose atom positions, atom identities, and geometry will be used to calculate energies and forces.
calculators (list[Calculator]) – The calculators that will perform sub-calculations.
cutoff (float | int) – The cutoff between regions treated with different levels of theory, comprising the embedding region.
- calculate(return_forces=True, return_components=True)[source]¶
Calculate energies and forces.
- 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 (\(\mathrm{kJ\;mol^{-1}}\)), forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)), and energy components (\(\mathrm{kJ\;mol^{-1}}\)) of the calculation.
- Return type:
- calculators: list[Calculator]¶
- cutoff: float | int = 0.0¶
- register_plugin(plugin)[source]¶
Record plugin name and apply the plugin to the calculator.
- Parameters:
plugin (CalculatorPlugin | CompositeCalculatorPlugin) – A plugin that will modify the behavior of one or more calculator routines.
- Return type:
None
pydft_qmmm.calculators.interface_calculator module¶
A calculator utilizing external software.
- class pydft_qmmm.calculators.interface_calculator.InterfaceCalculator(system, interface)[source]¶
Bases:
Calculator
A calculator utilizing external software.
- Parameters:
system (System) – The system whose atom positions, atom identities, and geometry will be used to calculate energies and forces.
interface (SoftwareInterface) – The interface to an external software that will be used to calculate energies and forces.
- calculate(return_forces=True, return_components=True)[source]¶
Calculate energies and forces.
- 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 (\(\mathrm{kJ\;mol^{-1}}\)), forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)), and energy components (\(\mathrm{kJ\;mol^{-1}}\)) of the calculation.
- Return type:
- interface: SoftwareInterface¶
Module contents¶
A sub-package containing the calculators of the simulation engine.