   MAXENT
 This is part of the bias module

Add a linear biasing potential on one or more variables $$f_{i}\left(\boldsymbol{x}\right)$$ satisfying the maximum entropy principle as proposed in Ref.  .

Warning
Notice that syntax is still under revision and might change

The resulting biasing potential is given by:

$V_{BIAS}(\boldsymbol{x},t)=K_{B}T\sum_{i=1}^{\#arguments}f_{i}(\boldsymbol{x},t)\lambda_{i}(t)$

Lagrangian multipliers $$\lambda_{i}$$ are updated, every PACE steps, according to the following update rule:

$\lambda_{i}=\lambda_{i}+\frac{k_{i}}{1+\frac{t}{\tau_{i}}}\left(f_{exp,i}+\xi_{i}\lambda_{i}-f_{i}(\boldsymbol{x})\right)$

$$k$$ set the initial value of the learning rate and its units are $$[observable]^{-2}ps^{-1}$$. This can be set with the keyword KAPPA. The number of components for any KAPPA vector must be equal to the number of arguments of the action.

Variable $$\xi_{i}(\lambda)$$ is related to the chosen prior to model experimental errors. If a GAUSSIAN prior is used then:

$\xi_{i}(\lambda)=-\lambda_{i}\sigma^{2}$

where $$\sigma$$ is the typical expected error on the observable $$f_i$$. For a LAPLACE prior:

$\xi_{i}(\lambda)=-\frac{\lambda_{i}\sigma^{2}}{1-\frac{\lambda^{2}\sigma^{2}}{2}}$

The value of $$\xi(\lambda,t)$$ is written in output as a component named: argument name followed by the string _error. Setting $$\sigma =0$$ is equivalent to enforce a pure Maximum Entropy restraint without any noise modelling. This method can be also used to enforce inequality restraint as shown in following examples.

Notice that a similar method is available as EDS, although with different features and using a different optimization algorithm.

Examples

The following input tells plumed to restrain the distance between atoms 7 and 15 and the distance between atoms 2 and 19, at different equilibrium values, and to print the energy of the restraint. Lagrangian multiplier will be printed on a file called restraint.LAGMULT with a stride set by the variable PACE to 200ps. Moreover plumed will compute the average of each Lagrangian multiplier in the window [TSTART,TEND] and use that to continue the simulations with fixed Lagrangian multipliers.

Click on the labels of the actions for more information on what each action computes d1: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =7,15
d2: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =2,19
restraint: MAXENT ...
ARGthe input for this action is the scalar output from one or more other actions. =d1,d2
TYPEcompulsory keyword
specify the restraint type. =EQUAL
ATcompulsory keyword
the position of the restraint =0.2,0.5
KAPPAcompulsory keyword ( default=0.0 )
specifies the initial value for the learning rate =35000.0,35000.0
TAUcompulsory keyword
Specify the dumping time for the learning rate. =0.02,0.02
PACEthe frequency for Lagrangian multipliers update =200
TSTARTtime from where to start averaging the Lagrangian multiplier. =100
TENDtime in ps where to stop to compute the average of Lagrangian multiplier. =500

...
PRINT ARGthe input for this action is the scalar output from one or more other actions. =restraint.bias


Lagrangian multipliers will be printed on a file called restraint.bias The following input tells plumed to restrain the distance between atoms 7 and 15 to be greater than 0.2 and to print the energy of the restraint

Click on the labels of the actions for more information on what each action computes d: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =7,15
restraint: MAXENT ARGthe input for this action is the scalar output from one or more other actions. =d TYPEcompulsory keyword
specify the restraint type. =INEQUAL> ATcompulsory keyword
the position of the restraint =0.02 KAPPAcompulsory keyword ( default=0.0 )
specifies the initial value for the learning rate =35000.0 TAUcompulsory keyword
Specify the dumping time for the learning rate. =3
PRINT ARGthe input for this action is the scalar output from one or more other actions. =restraint.bias