pydft_qmmm.integrators package

Submodules

pydft_qmmm.integrators.integrator module

The integrator base class.

class pydft_qmmm.integrators.integrator.Integrator[source]

Bases: ABC

The abstract integrator base class.

_plugins

(class attribute) The list of plugin names that have been registered to the integrator.

Type:

list[str]

timestep

(class attribute) The timestep (\(\mathrm{fs}\)) used to perform integrations.

Type:

float | int

active_plugins()[source]

Get the current list of active plugins.

Returns:

A list of the active plugins registered by the integrator.

Return type:

list[str]

compute_kinetic_energy(system)[source]

Calculate kinetic energy via leapfrog algorithm.

Parameters:

system (System) – The system whose forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)) and existing velocities (\(\mathrm{\mathring{A}\;fs^{-1}}\)) will be used to calculate the kinetic energy of the system.

Returns:

The kinetic energy (\(\mathrm{kJ\;mol^{-1}}\)) of the system.

Return type:

float

Note

Based on the implementation of the kinetic energy kernels from OpenMM.

abstract integrate(system)[source]

Integrate forces into new positions and velocities.

Parameters:

system (System) – The system whose forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)) and existing positions (\(\mathrm{\mathring{A}}\)) and velocities (\(\mathrm{\mathring{A}\;fs^{-1}}\)) will be used to determine new positions and velocities.

Returns:

New positions (\(\mathrm{\mathring{A}}\)) and velocities (\(\mathrm{\mathring{A}\;fs^{-1}}\)) integrated from the forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)) and existing positions and velocities of the system.

Return type:

Returns

register_plugin(plugin)[source]

Record plugin name and apply the plugin to the integrator.

Parameters:

plugin (IntegratorPlugin) – A plugin that will modify the behavior of one or more integrator routines.

Return type:

None

timestep: float | int

pydft_qmmm.integrators.langevin_integrator module

An integrator implementing the Langevin algorithm.

class pydft_qmmm.integrators.langevin_integrator.LangevinIntegrator(timestep, temperature, friction)[source]

Bases: Integrator

An integrator implementing the Leapfrog Verlet algorithm.

Parameters:
  • timestep (float | int) – The timestep (\(\mathrm{fs}\)) used to perform integrations.

  • temperature (int | float) – The temperature (\(\mathrm{K}\)) of the bath used to couple to the system.

  • friction (int | float) – The friction (\(\mathrm{fs^{-1}}\)) experienced by particles in the system.

friction: int | float
integrate(system)[source]

Integrate forces into new positions and velocities.

Parameters:

system (System) – The system whose forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)) and existing positions (\(\mathrm{\mathring{A}}\)) and velocities (\(\mathrm{\mathring{A}\;fs^{-1}}\)) will be used to determine new positions and velocities.

Returns:

New positions (\(\mathrm{\mathring{A}}\)) and velocities (\(\mathrm{\mathring{A}\;fs^{-1}}\)) integrated from the forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)) and existing positions and velocities of the system.

Return type:

Returns

Note

Based on the implementation of the integrator kernels from OpenMM.

temperature: int | float
timestep: float | int

pydft_qmmm.integrators.verlet_integrator module

An integrator implementing the Leapfrog Verlet algorithm.

class pydft_qmmm.integrators.verlet_integrator.VerletIntegrator(timestep)[source]

Bases: Integrator

An integrator implementing the Leapfrog Verlet algorithm.

Parameters:

timestep (float | int) – The timestep (\(\mathrm{fs}\)) used to perform integrations.

integrate(system)[source]

Integrate forces into new positions and velocities.

Parameters:

system (System) – The system whose forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)) and existing positions (\(\mathrm{\mathring{A}}\)) and velocities (\(\mathrm{\mathring{A}\;fs^{-1}}\)) will be used to determine new positions and velocities.

Returns:

New positions (\(\mathrm{\mathring{A}}\)) and velocities (\(\mathrm{\mathring{A}\;fs^{-1}}\)) integrated from the forces (\(\mathrm{kJ\;mol^{-1}\;\mathring{A}^{-1}}\)) and existing positions and velocities of the system.

Return type:

Returns

Note

Based on the implementation of the integrator kernels from OpenMM.

timestep: float | int

Module contents

A sub-package to define integrators of the simulation engine.