nvt

Contents

nvt#

Thermostats

Classes#

AndersenThermostat

Specialized Verlet hook.

BerendsenThermostat

Specialized Verlet hook.

LangevinThermostat

Specialized Verlet hook.

CSVRThermostat

Specialized Verlet hook.

GLEThermostat

Specialized Verlet hook.

NHChain

Base class for dataclasses that should act like a JAX pytree node.

NHCThermostat

Specialized Verlet hook.

NHCAttributeStateItem

Base class for dataclasses that should act like a JAX pytree node.

Module Contents#

class nvt.AndersenThermostat(*args, **kwargs)#

Bases: IMLCV.new_yaff.verlet.ThermostatHook

Specialized Verlet hook.

This is mainly used for the implementation of thermostats and barostats.

name: str#
kind: str#
method: str#
select: jax.Array | None = None#
annealing: jax.Array#

This is an implementation of the Andersen thermostat. The method is described in:

Andersen, H. C. J. Chem. Phys. 1980, 72, 2384-2393.

Arguments:

temp

The average temperature of the NVT ensemble

Optional arguments:

start

The first iteration at which this hook is called

step

The number of iterations between two subsequent calls to this hook.

select

An array of atom indexes to indicate which atoms controlled by the thermostat.

annealing

After every call to this hook, the temperature is multiplied with this annealing factor. This effectively cools down the system.

init(iterative: IMLCV.new_yaff.verlet.VerletIntegrator)#
pre(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
post(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
class nvt.BerendsenThermostat(*args, **kwargs)#

Bases: IMLCV.new_yaff.verlet.ThermostatHook

Specialized Verlet hook.

This is mainly used for the implementation of thermostats and barostats.

name: str#
kind: str#
method: str#
timecon: jax.Array#

This is an implementation of the Berendsen thermostat. The algorithm is described in:

Berendsen, H. J. C.; Postma, J. P. M.; van Gunsteren, W. F.; Dinola, A.; Haak, J. R. J. Chem. Phys. 1984, 81, 3684-3690

Arguments:

temp

The temperature of thermostat.

Optional arguments:

start

The step at which the thermostat becomes active.

timecon

The time constant of the Berendsen thermostat.

init(iterative: IMLCV.new_yaff.verlet.VerletIntegrator)#
pre(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
post(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
class nvt.LangevinThermostat(*args, **kwargs)#

Bases: IMLCV.new_yaff.verlet.ThermostatHook

Specialized Verlet hook.

This is mainly used for the implementation of thermostats and barostats.

name: str#
kind: str#
method: str#
key: jax.Array#
timecon: jax.Array#
init(iterative: IMLCV.new_yaff.verlet.VerletIntegrator)#
pre(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
post(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
thermo(iterative: IMLCV.new_yaff.verlet.VerletIntegrator)#
class nvt.CSVRThermostat(*args, **kwargs)#

Bases: IMLCV.new_yaff.verlet.ThermostatHook

Specialized Verlet hook.

This is mainly used for the implementation of thermostats and barostats.

name: str#
kind: str#
method: str#
timecon: jax.Array#
kin: jax.Array | None = None#
key: jax.Array#
This is an implementation of the CSVR thermostat. The equations are

derived in:

Bussi, G.; Donadio, D.; Parrinello, M. J. Chem. Phys. 2007, 126, 014101

The implementation (used here) is derived in

Bussi, G.; Parrinello, M. Comput. Phys. Commun. 2008, 179, 26-29

Arguments:

temp

The temperature of thermostat.

Optional arguments:

start

The step at which the thermostat becomes active.

timecon

The time constant of the CSVR thermostat.

init(iterative: IMLCV.new_yaff.verlet.VerletIntegrator)#
pre(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
post(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
class nvt.GLEThermostat(*args, **kwargs)#

Bases: IMLCV.new_yaff.verlet.ThermostatHook

Specialized Verlet hook.

This is mainly used for the implementation of thermostats and barostats.

name: str#
kind: str#
method: str#
timecon: jax.Array#
kin: jax.Array | None = None#
a_p: jax.Array#
c_p: jax.Array | None = None#
ns: int | None = None#
key: jax.Array#
t: jax.Array | None = None#
S: jax.Array | None = None#
n_atoms: int | None = None#

This hook implements the coloured noise thermostat. The equations are derived in:

Ceriotti, M.; Bussi, G.; Parrinello, M J. Chem. Theory Comput. 2010, 6, 1170-1180.

Arguments:

temp

The temperature of thermostat.

a_p

Square drift matrix, with elements fitted to the specific problem.

Optional arguments:

c_p

Square static covariance matrix. In equilibrium, its elements are fixed. For non-equilibrium dynamics, its elements should be fitted.

start

The step at which the thermostat becomes active.

init(iterative: IMLCV.new_yaff.verlet.VerletIntegrator)#
pre(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
post(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
thermo(iterative: IMLCV.new_yaff.verlet.VerletIntegrator)#
class nvt.NHChain(*args, **kwargs)#

Bases: IMLCV.base.datastructures.MyPyTreeNode

Base class for dataclasses that should act like a JAX pytree node.

length: int = 3#
timestep: jax.Array#
temp: jax.Array#
timecon: jax.Array#
restart_pos: bool = False#
restart_vel: bool = False#
pos0: jax.Array | None = None#
vel0: jax.Array | None = None#
pos: jax.Array | None = None#
vel: jax.Array | None = None#
masses: jax.Array | None = None#
ndof: int = 0#
key: jax.Array#
__post_init__()#
set_ndof(ndof: int) NHChain#
get_random_vel_therm() tuple[jax.Array, NHChain]#
update(ekin, vel, G1_add) tuple[jax.Array, jax.Array, NHChain]#
get_econs_correction()#
class nvt.NHCThermostat(*args, **kwargs)#

Bases: IMLCV.new_yaff.verlet.ThermostatHook

Specialized Verlet hook.

This is mainly used for the implementation of thermostats and barostats.

name: str#
kind: str#
method: str#
chain: NHChain#

This hook implements the Nose-Hoover chain thermostat. The equations are derived in:

Martyna, G. J.; Klein, M. L.; Tuckerman, M. J. Chem. Phys. 1992, 97, 2635-2643.

The implementation (used here) of a symplectic integrator of the Nose-Hoover chain thermostat is discussed in:

Martyna, G. J.; Tuckerman, M. E.; Tobias, D. J.; Klein, M. L. Mol. Phys. 1996, 87, 1117-1157.

Arguments:

temp

The temperature of thermostat.

Optional arguments:

start

The step at which the thermostat becomes active.

timecon

The time constant of the Nose-Hoover thermostat.

chainlength

The number of beads in the Nose-Hoover chain.

chain_pos0

The initial thermostat chain positions

chain_vel0

The initial thermostat chain velocities

restart

Indicates whether the initalisation should be carried out

init(iterative: IMLCV.new_yaff.verlet.VerletIntegrator)#
pre(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
post(iterative: IMLCV.new_yaff.verlet.VerletIntegrator, G1_add=None)#
class nvt.NHCAttributeStateItem(*args, **kwargs)#

Bases: IMLCV.new_yaff.iterative.StateItem

Base class for dataclasses that should act like a JAX pytree node.

attr: str#
get_value(iterative: IMLCV.new_yaff.verlet.VerletIntegrator)#