IMLCV.implementations.bias#

Module Contents#

Classes#

MinBias

Class that combines several biases in one single bias.

HarmonicBias

Harmonic bias potential centered arround q0 with force constant k.

BiasMTD

A sum of Gaussian hills, for instance used in metadynamics:

RbfBias

Bias interpolated from lookup table on uniform grid.

GridBias

Bias interpolated from lookup table on uniform grid.

PlumedBias

base class for biased MD runs.

class IMLCV.implementations.bias.MinBias(biases: collections.abc.Iterable[IMLCV.base.bias.Bias])[source]#

Bases: IMLCV.base.bias.CompositeBias

Class that combines several biases in one single bias.

class IMLCV.implementations.bias.HarmonicBias(cvs: IMLCV.base.CV.CollectiveVariable, q0: IMLCV.base.CV.CV, k, k_max: Array | float | None = None)[source]#

Bases: IMLCV.base.bias.Bias

Harmonic bias potential centered arround q0 with force constant k.

_compute(cvs: IMLCV.base.CV.CV, *args)[source]#

function that calculates the bias potential. CVs live in mapped space

get_args()[source]#

function that return dictionary with kwargs of _compute.

class IMLCV.implementations.bias.BiasMTD(cvs: IMLCV.base.CV.CollectiveVariable, K, sigmas, tempering=0.0, start=None, step=None)[source]#

Bases: IMLCV.base.bias.Bias

A sum of Gaussian hills, for instance used in metadynamics: Adapted from Yaff.

V = sum_{\alpha} K_{\alpha}} exp{-sum_{i} \frac{(q_i-q_{i,\alpha}^0)^2}{2sigma^2}}

where \alpha loops over deposited hills and i loops over collective variables.

update_bias(md: IMLCV.base.MdEngine.MDEngine)[source]#

update the bias.

Can only change the properties from _get_args

_compute(cvs, q0s, Ks)[source]#

Computes sum of hills.

get_args()[source]#

function that return dictionary with kwargs of _compute.

class IMLCV.implementations.bias.RbfBias(cvs: IMLCV.base.CV.CollectiveVariable, vals: jax.Array, cv: IMLCV.base.CV.CV, start=None, step=None, kernel='linear', epsilon=None, smoothing=0.0, degree=None)[source]#

Bases: IMLCV.base.bias.Bias

Bias interpolated from lookup table on uniform grid.

values are caluclated in bin centers

_compute(cvs: IMLCV.base.CV.CV, *args)[source]#

function that calculates the bias potential. CVs live in mapped space

get_args()[source]#

function that return dictionary with kwargs of _compute.

class IMLCV.implementations.bias.GridBias(cvs: IMLCV.base.CV.CollectiveVariable, vals, bounds, start=None, step=None, centers=True)[source]#

Bases: IMLCV.base.bias.Bias

Bias interpolated from lookup table on uniform grid.

values are caluclated in bin centers

_compute(cvs: IMLCV.base.CV.CV, *args)[source]#

function that calculates the bias potential. CVs live in mapped space

get_args()[source]#

function that return dictionary with kwargs of _compute.

class IMLCV.implementations.bias.PlumedBias(collective_variable: IMLCV.base.CV.CollectiveVariable, timestep, kernel=None, fn='plumed.dat', fn_log='plumed.log')[source]#

Bases: IMLCV.base.bias.Bias

base class for biased MD runs.

setup_plumed(timestep, restart)[source]#

Send commands to PLUMED to make it computation-ready.

Arguments:

timestep

The timestep (in au) of the integrator

restart

Set to an integer value different from 0 to let PLUMED know that this is a restarted run

update_bias(md: IMLCV.base.MdEngine.MDEngine)[source]#

When this point is reached, a complete time integration step was finished and PLUMED should be notified about this.

_internal_compute(gpos, vtens)[source]#