Skip to content

Action: TD_MULTITHERMAL_MULTIBARIC

Module ves
Description Usage
Multithermal-multibaric target distribution (dynamic). used in 0 tutorialsused in 1 eggs

Details and examples

Multithermal-multibaric target distribution (dynamic).

Use the target distribution to sample the multithermal-multibaric ensemble (see first paper cited below). In this way, in a single molecular dynamics simulation one can obtain information about the simulated system in a range of temperatures and pressures. This range is determined through the keywords MIN_TEMP, MAX_TEMP, MIN_PRESSURE, and MAX_PRESSURE. One should also specified the target pressure of the barostat with the keyword PRESSURE.

The collective variables (CVs) used to construct the bias potential must be: 1. the potential energy and the volume or, 2. the potential energy, the volume, and an order parameter.

Other choices of CVs or a different order of the above mentioned CVs are nonsensical. The third CV, the order parameter, must be used when the region of the phase diagram under study is crossed by a first order phase transition (for details see the first paper cited below).

The algorithm will explore the free energy at each temperature and pressure up to a predefined free energy threshold specified through the keyword THRESHOLD (in kT units). If only the energy and the volume are being biased, i.e. no phase transition is considered, then THRESHOLD can be set to around 5. If also an order parameter is used then the THRESHOLD should be greater than the barrier for the transformation in kT. For small systems undergoing a freezing transition THRESHOLD is typically between 20 and 50.

It is also important to specify the number of intermediate temperatures and pressures to consider. This is done through the keywords STEPS_TEMP and STEPS_PRESSURE. If the number of intermediate temperature and pressures is too small, then holes might appear in the target distribution. If it is too large, the performance will deteriorate with no additional advantage.

We now describe the algorithm more rigorously. The target distribution is given by

with the free energy as a function of energy and volume (and optionally the order parameter ) at temperature and pressure , is a normalization constant, and is the THRESHOLD. In practice the condition is checked in equally spaced points in each dimension and . The number of points is determined with the keywords STEPS_TEMP and STEPS_PRESSURE. In practice the target distribution is never set to zero but rather to a small value controlled by the keyword EPSILON. The small value is e^-EPSILON.

Much like in the Wang-Landau algorithm that is introduced in the second to last paper cited below or in the multicanonical ensemble that is discussed in the last paper cited below, a flat histogram is targeted. The idea behind this choice of target distribution is that all regions of potential energy and volume (and optionally order parameter) that are relevant at all temperatures and pressure are included in the distribution.

The free energy at temperature and pressure is calculated from the free energy at and using:

with such that with the position of the free energy minimum. is not know from the start and is instead found during the simulation. Therefore is determined iteratively as done in the well tempered target distribution in the second paper cited below.

The output of these simulations can be reweighted in order to obtain information at all temperatures and pressures in the targeted region of Temperature-Pressure plane. The reweighting can be performed using the action REWEIGHT_TEMP_PRESS.

The multicanonical ensemble (fixed volume) can be targeted using TD_MULTICANONICAL.

Examples

The following input can be used to run a simulation in the multithermal-multibaric ensemble. The region of the temperature-pressure plane that will be explored is 260-350 K and 1 bar- 300 MPa. The energy and the volume are used as collective variables. Legendre polynomials are used to construct the two dimensional bias potential. The averaged stochastic gradient descent algorithm is chosen to optimize the VES functional. The target distribution is updated every 100 optimization steps (200 ps here) using the last estimation of the free energy.

Click on the labels of the actions for more information on what each action computes
tested on2.11
# Use energy and volume as CVs
energy: ENERGYCalculate the total potential energy of the simulation box. More details
vol: VOLUMECalculate the volume the simulation box. More details

# Basis functions bf1: BF_LEGENDRELegendre polynomials basis functions. More details ORDERThe order of the basis function expansion=10 MINIMUMThe minimum of the interval on which the basis functions are defined=-14750 MAXIMUMThe maximum of the interval on which the basis functions are defined=-12250 bf2: BF_LEGENDRELegendre polynomials basis functions. More details ORDERThe order of the basis function expansion=10 MINIMUMThe minimum of the interval on which the basis functions are defined=6.5 MAXIMUMThe maximum of the interval on which the basis functions are defined=8.25 # Target distribution - 1 bar = 0.06022140857 and 300 MPa = 180.66422571 TD_MULTITHERMAL_MULTIBARICMultithermal-multibaric target distribution (dynamic). More details ... MIN_TEMPMinimum energy=260 MAX_TEMPMaximum energy=350 MAX_PRESSUREMaximum pressure=180.66422571 MIN_PRESSUREMinimum pressure=0.06022140857 PRESSURETarget pressure of the barostat used in the MD engine=0.06022140857 LABELa label for the action so that its output can be referenced in the input to other actions=td_multi ... TD_MULTITHERMAL_MULTIBARIC
# Bias expansion VES_LINEAR_EXPANSIONLinear basis set expansion bias. This action has hidden defaults. More details ... ARGthe labels of the scalars on which the bias will act=energy,vol BASIS_FUNCTIONSthe label of the one dimensional basis functions that should be used=bf1,bf2 TEMPthe system temperature - this is needed if the MD code does not pass the temperature to PLUMED=300.0 GRID_BINSthe number of bins used for the grid=200,200 TARGET_DISTRIBUTIONthe label of the target distribution to be used=td_multi LABELa label for the action so that its output can be referenced in the input to other actions=b1 ... VES_LINEAR_EXPANSION
# Optimization algorithm OPT_AVERAGED_SGDAveraged stochastic gradient decent with fixed step size. This action has hidden defaults. More details ... BIASthe label of the VES bias to be optimized=b1 STRIDEthe frequency of updating the coefficients given in the number of MD steps=500 LABELa label for the action so that its output can be referenced in the input to other actions=o1 STEPSIZEthe step size used for the optimization=1.0 FES_OUTPUThow often the FES(s) should be written out to file=500 BIAS_OUTPUThow often the bias(es) should be written out to file=500 TARGETDIST_OUTPUThow often the dynamic target distribution(s) should be written out to file=500 COEFFS_OUTPUT how often the coefficients should be written to file=100 TARGETDIST_STRIDEstride for updating a target distribution that is iteratively updated during the optimization=100 ... OPT_AVERAGED_SGD

The multithermal-multibaric target distribution can also be used to explore regions of the phase diagram crossed by first order phase transitions. Consider a system of 250 atoms that crystallizes in the FCC crystal structure. The region of the temperature-pressure plane that will be explored is 350-450 K and 1bar-1GPa. We assume that inside this region we can find the liquid-FCC coexistence line that we would like to obtain. In this case in addition to the energy and volume, an order parameter must also be biased. The energy, volume, and an order parameter are used as collective variables to construct the bias potential. We choose as order parameter the FCCUBIC. Legendre polynomials are used to construct the three dimensional bias potential. The averaged stochastic gradient descent algorithm is chosen to optimize the VES functional. The target distribution is updated every 100 optimization steps (200 ps here) using the last estimation of the free energy.

Click on the labels of the actions for more information on what each action computes
tested on2.11
# Use energy, volume and FCCUBIC as CVs
energy: ENERGYCalculate the total potential energy of the simulation box. More details
vol: VOLUMECalculate the volume the simulation box. More details
fcc: FCCUBICMeasure how similar the environment around atoms is to that found in a FCC structure. This action is a shortcut and it has hidden defaults. More details SPECIESthe list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments=1-256 SWITCHthe switching function that it used in the construction of the contact matrix. Options for this keyword are explained in the documentation for LESS_THAN.={CUBIC D_0=0.4 D_MAX=0.5} MORE_THANcalculate the number of variables that are more than a certain target value. Options for this keyword are explained in the documentation for MORE_THAN.={RATIONAL R_0=0.45 NN=12 MM=24}

# Basis functions bf1: BF_LEGENDRELegendre polynomials basis functions. More details ORDERThe order of the basis function expansion=8 MINIMUMThe minimum of the interval on which the basis functions are defined=-26500 MAXIMUMThe maximum of the interval on which the basis functions are defined=-23500 bf2: BF_LEGENDRELegendre polynomials basis functions. More details ORDERThe order of the basis function expansion=8 MINIMUMThe minimum of the interval on which the basis functions are defined=8.0 MAXIMUMThe maximum of the interval on which the basis functions are defined=11.5 bf3: BF_LEGENDRELegendre polynomials basis functions. More details ORDERThe order of the basis function expansion=8 MINIMUMThe minimum of the interval on which the basis functions are defined=0.0 MAXIMUMThe maximum of the interval on which the basis functions are defined=256.0 # Target distribution TD_MULTITHERMAL_MULTIBARICMultithermal-multibaric target distribution (dynamic). More details ... LABELa label for the action so that its output can be referenced in the input to other actions=td_multitp MIN_TEMPMinimum energy=350.0 MAX_TEMPMaximum energy=450.0 MIN_PRESSUREMinimum pressure=0.06022140857 MAX_PRESSUREMaximum pressure=602.2140857 PRESSURETarget pressure of the barostat used in the MD engine=301.10704285 SIGMAThe standard deviation parameters of the Gaussian kernels used for smoothing the target distribution=250.0,0.1,10.0 THRESHOLD Maximum exploration free energy in kT=15 STEPS_TEMP Number of temperature steps=20 STEPS_PRESSURE Number of pressure steps=20 ... TD_MULTITHERMAL_MULTIBARIC
# Expansion VES_LINEAR_EXPANSIONLinear basis set expansion bias. This action has hidden defaults. More details ... ARGthe labels of the scalars on which the bias will act=energy,vol,fcc.morethan BASIS_FUNCTIONSthe label of the one dimensional basis functions that should be used=bf1,bf2,bf3 TEMPthe system temperature - this is needed if the MD code does not pass the temperature to PLUMED=400.0 GRID_BINSthe number of bins used for the grid=40,40,40 TARGET_DISTRIBUTIONthe label of the target distribution to be used=td_multitp LABELa label for the action so that its output can be referenced in the input to other actions=b1 ... VES_LINEAR_EXPANSION
# Optimization algorithm OPT_AVERAGED_SGDAveraged stochastic gradient decent with fixed step size. This action has hidden defaults. More details ... BIASthe label of the VES bias to be optimized=b1 STRIDEthe frequency of updating the coefficients given in the number of MD steps=500 LABELa label for the action so that its output can be referenced in the input to other actions=o1 STEPSIZEthe step size used for the optimization=1.0 FES_OUTPUThow often the FES(s) should be written out to file=500 BIAS_OUTPUThow often the bias(es) should be written out to file=500 TARGETDIST_OUTPUThow often the dynamic target distribution(s) should be written out to file=500 COEFFS_OUTPUT how often the coefficients should be written to file=100 TARGETDIST_STRIDEstride for updating a target distribution that is iteratively updated during the optimization=500 ... OPT_AVERAGED_SGD

Full list of keywords

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

Keyword Type Default Description
THRESHOLD compulsory 5 Maximum exploration free energy in kT
EPSILONThis keyword do not have examples compulsory 10 The zeros of the target distribution are changed to e^-EPSILON
MIN_TEMP compulsory none Minimum energy
MAX_TEMP compulsory none Maximum energy
MIN_PRESSURE compulsory none Minimum pressure
MAX_PRESSURE compulsory none Maximum pressure
PRESSURE compulsory none Target pressure of the barostat used in the MD engine
STEPS_TEMP compulsory 20 Number of temperature steps
STEPS_PRESSURE compulsory 20 Number of pressure steps
SIGMA optional not used The standard deviation parameters of the Gaussian kernels used for smoothing the target distribution

References

More information about how this action can be used is available in the following articles: