pydft_qmmm.plugins.pme package

Submodules

pydft_qmmm.plugins.pme.pme module

A plugin organizing the QM/MM/PME algorithm for calculations.

class pydft_qmmm.plugins.pme.pme.PME[source]

Bases: CompositeCalculatorPlugin

Perform the QM/MM/PME algorithm during calculations.

modify(calculator)[source]

Modify the functionality of a calculator.

Parameters:

calculator (CompositeCalculator) – The calculator whose functionality will be modified by the plugin.

Return type:

None

pydft_qmmm.plugins.pme.pme_utils module

Core functionality for the QM/MM/PME algorithm.

pydft_qmmm.plugins.pme.pme_utils.pme_components(system, quadrature, pme_potential, pme_gridnumber, pme_alpha)[source]

Compute relevant components of the PME potential.

Parameters:
  • system (System) – The system from which the PME potential is derived.

  • quadrature (NDArray[np.float64]) – The quadrature grid positions (\(\mathrm{a.u.}\)) of the DFT calculation.

  • pme_potential (NDArray[np.float64]) – The PME potential at gridpoints defined in the MM interface.

  • pme_gridnumber (int) – The number of grid points to include along each lattice edge in PME summation.

  • pme_alpha (float | int) – The Gaussian width parameter in Ewald summation (\(\mathrm{nm^{-1}}\)).

Returns:

The reciprocal-space correction energy, the PME potential at quadrature grid coordinates, the PME potential at nuclear coordinates, and the derivative of the PME potential at nuclear coordinates.

Return type:

tuple[Any, …]

pydft_qmmm.plugins.pme.pme_utils.project_to_grid(inverse_box, pme_gridnumber, points)[source]

Project points into fractional PME grid coordinates.

This algorithm is identical to that used in method ‘pme_update_grid_index_and_fraction’ in OpenMM source code, ReferencePME.cpp.

Parameters:
  • inverse_box (NDArray[np.float64]) – The inverse lattice vectors (\(\mathrm{a.u.^{-1}}\)) of the box containing the system.

  • pme_gridnumber (int) – The number of grid points to include along each lattice edge in PME summation.

  • points (NDArray[np.float64]) – The coordinates (\(\mathrm{a.u.}\)) which will be projected into the fractional PME grid coordinate space.

Returns:

The projected points in the fractional grid coordinate space.

Return type:

NDArray[np.float64]

Module contents

A sub-package applying the QM/MM/PME algorithm to calculations.