Action: EXTERNAL

Module bias
Description Usage
Calculate a restraint that is defined on a grid that is read during start up used in 0 tutorialsused in 8 eggs

Input

The arguments that serve as the input for this action are specified using one or more of the keywords in the following table.

Keyword Type Description
ARG scalar the labels of the scalars on which the bias will act

Further details and examples

Calculate a restraint that is defined on a grid that is read during start up

In this action you define an external potential that you would like to use as a bias in a file. This file contains the value of your bias potential on a grid of points. The instantaneous value of the bias potential is then computed via interpolation.

The following input illustrates how this works in practice. Here the external potential is defined in the file extras/1d_bias.dat. This potential acts on the distance between atoms 3 and 5.

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=extras/1d_bias.grid
d1: DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=3,5
m: EXTERNALCalculate a restraint that is defined on a grid that is read during start up This action has hidden defaults. More details ARGthe labels of the scalars on which the bias will act=d1 FILEthe name of the file containing the external potential=
extras/1d_bias.grid
Click here to see an extract from this file.
×

FILE: extras/1d_bias.grid

#! FIELDS d1 m.bias der_d1
#! SET min_d1 1.14
#! SET max_d1 1.32
#! SET nbins_d1 6
#! SET periodic_d1 false
   1.1400   0.0031   0.1101
   1.1700   0.0086   0.2842
   1.2000   0.0222   0.6648
   1.2300   0.0521   1.4068
   1.2600   0.1120   2.6873
   1.2900   0.2199   4.6183
   1.3200   0.3948   7.1055

As you can see from the example above, the file that is input to the EXTERNAL command contains the value of the function and its derivative on a grid of points. This file has the grid format that is discussed in the documentation for DUMPGRID.

You can also include grids that are a function of more than one collective variable. For instance the following would be the input for an external potential acting on two torsional angles:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=extras/2d_bias.grid
t1: TORSIONCalculate one or multiple torsional angles. More details ATOMSthe four atoms involved in the torsional angle=4,5,6,7
t2: TORSIONCalculate one or multiple torsional angles. More details ATOMSthe four atoms involved in the torsional angle=6,7,8,9
ext: EXTERNALCalculate a restraint that is defined on a grid that is read during start up This action has hidden defaults. More details ARGthe labels of the scalars on which the bias will act=t1,t2 FILEthe name of the file containing the external potential=
extras/2d_bias.grid
Click here to see an extract from this file.
×

FILE: extras/2d_bias.grid

#! FIELDS t1 t2 ext.bias der_t1 der_t2
#! SET min_t1 -pi
#! SET max_t1 pi
#! SET nbins_t1 3
#! SET periodic_t1 true
#! SET min_t2 -pi
#! SET max_t2 pi
#! SET nbins_t2 3
#! SET periodic_t2 true
 -3.141593 -3.141593 0.000000 -0.000000 -0.000000
 -1.047198 -3.141593 0.000000 0.000000 -0.000000
 1.047198 -3.141593 0.000000 -0.000000 -0.000000

 -3.141593 -1.047198 0.000000 -0.000000 0.000000
 -1.047198 -1.047198 0.007922 0.033185 0.033185
 1.047198 -1.047198 0.007922 -0.033185 0.033185

 -3.141593 1.047198 0.000000 -0.000000 -0.000000
 -1.047198 1.047198 0.007922 0.033185 -0.033185
 1.047198 1.047198 0.007922 -0.033185 -0.033185

Please note the order that the order of arguments in the plumed.dat file must be the same as the order of arguments in the header of the grid file.

Syntax

The following table describes the keywords and options that can be used with this action

Keyword Type Default Description
ARG input none the labels of the scalars on which the bias will act
FILE compulsory none the name of the file containing the external potential
SCALE compulsory 1.0 a factor that multiplies the external potential, useful to invert free energies
NUMERICAL_DERIVATIVES optional false calculate the derivatives for these quantities numerically
NOSPLINE optional false specifies that no spline interpolation is to be used when calculating the energy and forces due to the external potential
SPARSE optional false specifies that the external potential uses a sparse grid