pydft_qmmm.plugins.settle package

Submodules

pydft_qmmm.plugins.settle.settle module

Plugin for applying SETTLE to select residues after integration.

class pydft_qmmm.plugins.settle.settle.SETTLE(query='resname HOH', oh_distance=1.0, hh_distance=1.632981)[source]

Bases: IntegratorPlugin

Apply the SETTLE algorithm to water residues after integration.

Parameters:
  • query (str) – The VMD-like selection query which should correspond to water residues.

  • oh_distance (float | int) – The distance between the oxygen and hydrogens (\(\mathrm{\mathring{A}}\)).

  • hh_distance (float | int) – The distance between the hydrogens (\(\mathrm{\mathring{A}}\)).

constrain_velocities(system)[source]

Apply the SETTLE algorithm to system velocities.

Parameters:

system (System) – The system whose velocities will be SETTLEd.

Returns:

New velocities which result from the application of the SETTLE algorithm to system velocities.

Return type:

NDArray[np.float64]

modify(integrator)[source]

Modify the functionality of an integrator.

Parameters:

integrator (Integrator) – The integrator whose functionality will be modified by the plugin.

Return type:

None

pydft_qmmm.plugins.settle.settle_utils module

Core functionality for SETTLE algorithm application.

pydft_qmmm.plugins.settle.settle_utils.settle_positions(residues, positions_i, positions_f, masses, oh_distance=1.0, hh_distance=1.632981)[source]

A utility to perform the SETTLE algorithm on a set of positions.

Parameters:
  • residues (list[list[int]]) – The list of list of atom indices corresponding to the list of water residues in a system.

  • positions_i (ndarray[Any, dtype[float64]]) – The initial positions (\(\mathrm{\mathring{A}}\)) of the system.

  • positions_f (ndarray[Any, dtype[float64]]) – The final positions (\(\mathrm{\mathring{A}}\)) of the system.

  • masses (ndarray[Any, dtype[float64]]) – The masses (\(\mathrm{AMU}\)) of atoms in the system.

  • oh_distance (int | float) – The distance between the oxygen and hydrogens (\(\mathrm{\mathring{A}}\)).

  • hh_distance (int | float) – The distance between the hydrogens (\(\mathrm{\mathring{A}}\)).

Returns:

The new positions with SETTLE applied to the positions of water residues.

Return type:

ndarray[Any, dtype[float64]]

Note

Based on the SETTLE kernel in OpenMM.

pydft_qmmm.plugins.settle.settle_utils.settle_velocities(residues, positions_i, velocities_i, masses)[source]

A utility to perform the SETTLE algorithm on a set of velocities.

Parameters:
  • residues (list[list[int]]) – The list of list of atom indices corresponding to the list of water residues in a system.

  • positions_i (ndarray[Any, dtype[float64]]) – The initial positions (\(\mathrm{\mathring{A}}\)) of the system.

  • velocities_i (ndarray[Any, dtype[float64]]) – The initial velocities (\(\mathrm{\mathring{A}\;fs^{-1}}\)) of the system.

  • masses (ndarray[Any, dtype[float64]]) – The masses (\(\mathrm{AMU}\)) of atoms in the system.

Returns:

The new velocities with SETTLE applied to the velocities of water residues.

Return type:

ndarray[Any, dtype[float64]]

Note

Based on the SETTLE kernel in OpenMM.

Module contents

A sub-package for using SETTLE constraints during integration.