NVT ensemble

Overview

Nose Hoover thermostat

NoseHooverNVT

Berendsen thermostat

BerendsenNVT

Andersen thermostat

AndersenNVT

Langevin dynamic thermostat

LangevinNVT

NVT for rigid body

NVTRigid

Langevin dynamic for rigid body

LangevinNVTRigid

Nose Hoover thermostat

class NoseHooverNVT(all_info, group, comp_info, T, tauT)

The constructor of a NVT NoseHoover thermostat object for a group of particles.

Parameters:
  • all_info (AllInfo) – The system information.

  • group (ParticleSet) – The group of particles.

  • comp_info (ComputeInfo) – The object of calculation of collective information.

  • T (float) – The temperature.

  • tauT (float) – The thermostat coupling.

setT(float T)

specifies the temperature with a constant value.

setT(Variant vT)

specifies the temperature with a defined varying value by time step.

Example:

group = gala.ParticleSet(all_info, 'all')
comp_info = gala.ComputeInfo(all_info, group)
nh = gala.NoseHooverNVT(all_info, group, comp_info, 1.0, 0.5)
app.add(nh)

Berendsen thermostat

class BerendsenNVT(all_info, group, comp_info, T, tauT)

The constructor of a NVT Berendsen thermostat object for a group of particles.

Parameters:
  • all_info (AllInfo) – The system information.

  • group (ParticleSet) – The group of particles.

  • comp_info (ComputeInfo) – The object of calculation of collective information.

  • T (float) – The temperature.

  • tauT (float) – The thermostat coupling parameter.

setT(float T)

specifies the temperature with a constant value.

setT(Variant vT)

specifies the temperature with a varying value by time steps.

Andersen thermostat

class AndersenNVT(all_info, group, T, gamma, seed)

The constructor of a NVT Andersen thermostat object for a group of particles.

Parameters:
  • all_info (AllInfo) – The system information.

  • group (ParticleSet) – The group of particles.

  • T (float) – The temperature.

  • gamma (float) – The collision frequency.

  • seed (int) – The seed of random number generator.

setT(float T)

specifies the temperature with a constant value.

setT(Variant vT)

specifies the temperature with a varying value by time steps.

Example:

an = gala.AndersenNVT(all_info,group,1.0,10.0, 12345)
app.add(an)

Langevin dynamic thermostat

Description:

The particles are integrated forward in time according to the Langevin equations of motion:

\[ \begin{align}\begin{aligned}m \frac{d\vec{v}}{dt} = \vec{F}_\mathrm{C} - \gamma \cdot \vec{v} + \vec{F}_\mathrm{R}\\\langle \vec{F}_\mathrm{R} \rangle = 0\\\langle |\vec{F}_\mathrm{R}|^2 \rangle = 2 d kT \gamma / \delta t\end{aligned}\end{align} \]
  • \(\gamma\) - gamma (unitless) - optional: defaults to 1.0

where \(\vec{F}_\mathrm{C}\) is the force on the particle from all potentials and constraint forces, \(\gamma\) is the drag coefficient, \(\vec{v}\) is the particle’s velocity, \(\vec{F}_\mathrm{R}\) is a uniform random force, and \(d\) is the dimensionality of the system (2 or 3). The magnitude of the random force is chosen via the fluctuation-dissipation theorem to be consistent with the specified drag and temperature, \(T\). When \(kT=0\), the random force \(\vec{F}_\mathrm{R}=0\).

class LangevinNVT(all_info, group, T, seed)

The constructor of a Langevin NVT thermostat object for a group of particles.

Parameters:
  • all_info (AllInfo) – The system information.

  • group (ParticleSet) – The group of particles.

  • T (float) – The temperature.

  • seed (int) – The seed of random number generator.

setGamma(float gamma)

specifies the gamma with a constant value.

setGamma(string type, float gamma)

specifies the gamma of a particle type.

setT(float T)

specifies the temperature with a constant value.

setT(Variant vT)

specifies the temperature with a varying value by time step.

Example:

group = gala.ParticleSet(all_info, 'all')
lnvt = gala.LangevinNVT(all_info, group, 1.0, 123)
app.add(lnvt)

NVT for rigid body

class NVTRigid(AllInfo all_info, ParticleSet group, float T, float tauT)

The constructor of a NVT thermostat object for rigid bodies.

Parameters:
  • all_info (AllInfo) – The system information.

  • group (ParticleSet) – The group of particles.

  • T (float) – The temperature.

  • tauT (float) – The thermostat coupling parameter.

setT(float T)

specifies the temperature with a fixed value.

setT(Variant vT)

pecifies the temperature with a varying value by time step.

Example:

bgroup = gala.ParticleSet(all_info, 'body')
rigidnvt = gala.NVTRigid(all_info, bgroup, 1.0, 10.0)
app.add(rigidnvt)

Langevin dynamic for rigid body

Please see Langevin dynamic thermostat for the theory.

class LangevinNVTRigid(all_info, group, T, seed)

The constructor of a Langevin NVT thermostat object for rigid bodies.

Parameters:
  • all_info (AllInfo) – The system information.

  • group (ParticleSet) – The group of particles.

  • T (float) – The temperature.

  • seed (int) – The seed of random number generator.

setGamma(float gamma)

specifies the gamma of Langevin method with a constant value.

setGamma(const std::string & type, float gamma)

specifies the gamma of Langevin method of a particle type.

setT(float T)

specifies the temperature with a constant value.

setT(Variant vT)

specifies the temperature with a varying value by time step.

Example:

bgroup = gala.ParticleSet(all_info, 'body')
lrigidnvt = gala.LangevinNVTRigid(all_info, bgroup, 1.0, 123)
app.add(lrigidnvt)