This is part of the bias module
Calculate weights for ensemble averages that negate the effect the bias has on the region of phase space explored
If a static or pseudo-static bias \(V(x,t')\) is acting on the system we can remove the bias and get the unbiased probability distribution using:
\[ \langle P(s',t) \rangle = \frac{ \sum_{t'}^t \delta( s(x) - s' ) \exp\left( +\frac{V(x,t')}{k_B T} \right) }{ \sum_t'^t \exp\left( +\frac{V(x,t')}{k_B T} \right) } \]
The weights calculated by this action are equal to \(\exp\left( +\frac{V(x,t')}{k_B T} \right)\) these weights can then be used in any action that computes ensemble averages. For example this action can be used in tandem with HISTOGRAM or AVERAGE .
Examples
In the following example there is a fixed restraint on the distance between atoms 1 and 2. Clearly, this restraint will have an effect on the region of phase space that will be sampled when an MD simulation is run using this variable. Consequently, when the histogram as a function of the distance, \(x\), is accumulated, we use reweighting into order to discount the effect of the bias from our final histogram.
Click on the labels of the actions for more information on what each action computes
contract shortcuts
x: DISTANCE =1,2 The DISTANCE action with label x calculates a single scalar value
RESTRAINT =x =1.0 =0.0 The RESTRAINT action with label
bias: REWEIGHT_BIAS =300 The REWEIGHT_BIAS action with label bias calculates a single scalar value
hB: HISTOGRAM ...
=x
=0.0
=3.0
=100
=0.1
=bias
...The HISTOGRAM action with label hB calculates a single scalar value
DUMPGRID =hB =histoB =1 =%8.4f The DUMPGRID action with label
x: DISTANCE =1,2 The DISTANCE action with label x calculates a single scalar value
@2: RESTRAINT_SCALAR =x =1.0 =0.0 The RESTRAINT_SCALAR action with label @2 calculates the following quantities:
Quantity Description
@2.bias the instantaneous value of the bias potential
@2.force2 the instantaneous value of the squared force due to this bias potential
bias: REWEIGHT_BIAS =300 The REWEIGHT_BIAS action with label bias calculates a single scalar value
hB_weight: ONES =1 The ONES action with label hB_weight calculates a single scalar value
hB_kde: KDE =x =0.0 =3.0 =100 =0.1 The KDE action with label hB_kde calculates a single scalar value
hB_kdep: CUSTOM =hB_kde ,hB_weight =x*y =NO The CUSTOM action with label hB_kdep calculates a single scalar value
hB_u: ACCUMULATE =hB_kdep =1 =0 The ACCUMULATE action with label hB_u calculates a single scalar value
hB_nsum: ACCUMULATE =hB_weight =1 =0 The ACCUMULATE action with label hB_nsum calculates a single scalar value
hB: CUSTOM =hB_u ,hB_nsum =x/y =NO The CUSTOM action with label hB calculates a single scalar value
DUMPGRID =hB =histoB =1 =%8.4f The DUMPGRID action with label
Glossary of keywords and components
Compulsory keywords
ARG ( default=*.bias ) the biases that must be taken into account when reweighting
Options
TEMP the system temperature. This is not required if your MD code passes this quantity to PLUMED