2015-07-30 22:38:28 +08:00
|
|
|
<HTML>
|
|
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
|
|
</CENTER>
|
2014-05-10 00:16:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<HR>
|
2014-05-10 00:16:02 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<H3>compute fep command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>compute ID group-ID fep temp attribute args ... keyword value ...
|
|
|
|
</PRE>
|
|
|
|
<UL><LI>ID, group-ID are documented in the <A HREF = "compute.html">compute</A> command
|
2014-05-10 00:16:02 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<LI>fep = name of this compute command
|
2014-05-10 00:16:02 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<LI>temp = external temperature (as specified for constant-temperature run)
|
2014-05-10 00:16:02 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<LI>one or more attributes with args may be appended
|
2014-05-10 00:16:02 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<LI>attribute = <I>pair</I> or <I>atom</I>
|
2014-05-10 00:16:02 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<PRE> <I>pair</I> args = pstyle pparam I J v_delta
|
2014-05-10 00:16:02 +08:00
|
|
|
pstyle = pair style name, e.g. lj/cut
|
|
|
|
pparam = parameter to perturb
|
|
|
|
I,J = type pair(s) to set parameter for
|
|
|
|
v_delta = variable with perturbation to apply (in the units of the parameter)
|
2015-07-30 22:38:28 +08:00
|
|
|
<I>atom</I> args = aparam I v_delta
|
2015-05-16 00:32:34 +08:00
|
|
|
aparam = parameter to perturb
|
2014-05-10 00:16:02 +08:00
|
|
|
I = type to set parameter for
|
2015-07-30 22:38:28 +08:00
|
|
|
v_delta = variable with perturbation to apply (in the units of the parameter)
|
|
|
|
</PRE>
|
|
|
|
<LI>zero or more keyword/value pairs may be appended
|
|
|
|
|
|
|
|
<LI>keyword = <I>tail</I> or <I>volume</I>
|
|
|
|
|
|
|
|
<PRE> <I>tail</I> value = <I>no</I> or <I>yes</I>
|
|
|
|
<I>no</I> = ignore tail correction to pair energies (usually small in fep)
|
|
|
|
<I>yes</I> = include tail correction to pair energies
|
|
|
|
<I>volume</I> value = <I>no</I> or <I>yes</I>
|
|
|
|
<I>no</I> = ignore volume changes (e.g. in <I>NVE</I> or <I>NVT</I> trajectories)
|
|
|
|
<I>yes</I> = include volume changes (e.g. in <I>NpT</I> trajectories)
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>compute 1 all fep 298 pair lj/cut epsilon 1 * v_delta pair lj/cut sigma 1 * v_delta volume yes
|
|
|
|
compute 1 all fep 300 atom charge 2 v_delta
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>Apply a perturbation to parameters of the interaction potential and
|
2014-05-10 00:16:02 +08:00
|
|
|
recalculate the pair potential energy without changing the atomic
|
|
|
|
coordinates from those of the reference, unperturbed system. This
|
|
|
|
compute can be used to calculate free energy differences using several
|
|
|
|
methods, such as free-energy perturbation (FEP), finite-difference
|
2015-07-30 22:38:28 +08:00
|
|
|
thermodynamic integration (FDTI) or Bennet's acceptance ratio method
|
|
|
|
(BAR).
|
|
|
|
</P>
|
|
|
|
<P>The potential energy of the system is decomposed in three terms: a
|
2014-05-10 00:16:02 +08:00
|
|
|
background term corresponding to interaction sites whose parameters
|
2015-07-30 22:38:28 +08:00
|
|
|
remain constant, a reference term <I>U</I><sub>0</sub> corresponding to the
|
2014-05-10 00:16:02 +08:00
|
|
|
initial interactions of the atoms that will undergo perturbation, and
|
2015-07-30 22:38:28 +08:00
|
|
|
a term <I>U</I><sub>1</sub> corresponding to the final interactions of
|
|
|
|
these atoms:
|
|
|
|
</P>
|
|
|
|
<CENTER><IMG SRC = "Eqs/compute_fep_u.jpg">
|
|
|
|
</CENTER>
|
|
|
|
<P>A coupling parameter λ varying from 0 to 1 connects the
|
|
|
|
reference and perturbed systems:
|
|
|
|
</P>
|
|
|
|
<CENTER><IMG SRC = "Eqs/compute_fep_lambda.jpg">
|
|
|
|
</CENTER>
|
|
|
|
<P>It is possible but not necessary that the coupling parameter (or a
|
2014-05-10 00:16:02 +08:00
|
|
|
function thereof) appears as a multiplication factor of the potential
|
|
|
|
energy. Therefore, this compute can apply perturbations to interaction
|
|
|
|
parameters that are not directly proportional to the potential energy
|
2015-07-30 22:38:28 +08:00
|
|
|
(e.g. σ in Lennard-Jones potentials).
|
|
|
|
</P>
|
|
|
|
<P>This command can be combined with <A HREF = "fix_adapt.html">fix adapt</A> to
|
2015-01-15 00:34:13 +08:00
|
|
|
perform multistage free-energy perturbation calculations along
|
2015-07-30 22:38:28 +08:00
|
|
|
stepwise alchemical transformations during a simulation run:
|
|
|
|
</P>
|
|
|
|
<CENTER><IMG SRC = "Eqs/compute_fep_fep.jpg">
|
|
|
|
</CENTER>
|
|
|
|
<P>This compute is suitable for the finite-difference thermodynamic
|
|
|
|
integration (FDTI) method <A HREF = "#Mezei">(Mezei)</A>, which is based on an
|
2014-05-10 00:16:02 +08:00
|
|
|
evaluation of the numerical derivative of the free energy by a
|
2015-07-30 22:38:28 +08:00
|
|
|
perturbation method using a very small δ:
|
|
|
|
</P>
|
|
|
|
<CENTER><IMG SRC = "Eqs/compute_fep_fdti.jpg">
|
|
|
|
</CENTER>
|
|
|
|
<P>where <I>w</I><sub>i</sub> are weights of a numerical quadrature. The <A HREF = "fix_adapt.html">fix
|
|
|
|
adapt</A> command can be used to define the stages of
|
|
|
|
λ at which the derivative is calculated and averaged.
|
|
|
|
</P>
|
|
|
|
<P>The compute fep calculates the exponential Boltzmann term and also the
|
|
|
|
potential energy difference <I>U</I><sub>1</sub>-<I>U</I><sub>0</sub>. By
|
|
|
|
choosing a very small perturbation δ the thermodynamic
|
2014-05-10 00:16:02 +08:00
|
|
|
integration method can be implemented using a numerical evaluation of
|
2015-07-30 22:38:28 +08:00
|
|
|
the derivative of the potential energy with respect to λ:
|
|
|
|
</P>
|
|
|
|
<CENTER><IMG SRC = "Eqs/compute_fep_ti.jpg">
|
|
|
|
</CENTER>
|
|
|
|
<P>Another technique to calculate free energy differences is the
|
|
|
|
acceptance ratio method <A HREF = "#Bennet">(Bennet)</A>, which can be implemented
|
|
|
|
by calculating the potential energy differences with δ = 1.0 on
|
|
|
|
both the forward and reverse routes:
|
|
|
|
</P>
|
|
|
|
<CENTER><IMG SRC = "Eqs/compute_fep_bar.jpg">
|
|
|
|
</CENTER>
|
|
|
|
<P>The value of the free energy difference is determined by numerical
|
|
|
|
root finding to establish the equality.
|
|
|
|
</P>
|
|
|
|
<P>Concerning the choice of how the atomic parameters are perturbed in
|
2014-05-10 00:16:02 +08:00
|
|
|
order to setup an alchemical transformation route, several strategies
|
|
|
|
are available, such as single-topology or double-topology strategies
|
2015-07-30 22:38:28 +08:00
|
|
|
<A HREF = "#Pearlman">(Pearlman)</A>. The latter does not require modification of
|
|
|
|
bond lengths, angles or other internal coordinates.
|
|
|
|
</P>
|
|
|
|
<P>IMPORTANT NOTES: This compute command does not take kinetic energy
|
2014-05-10 00:16:02 +08:00
|
|
|
into account, therefore the masses of the particles should not be
|
|
|
|
modified between the reference and perturbed states, or along the
|
|
|
|
alchemical transformation route. This compute command does not change
|
2015-07-30 22:38:28 +08:00
|
|
|
bond lengths or other internal coordinates <A HREF = "#BoreschKarplus">(Boresch,
|
|
|
|
Karplus)</A>.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>The <I>pair</I> attribute enables various parameters of potentials defined
|
|
|
|
by the <A HREF = "pair_style.html">pair_style</A> and <A HREF = "pair_coeff.html">pair_coeff</A>
|
|
|
|
commands to be changed, if the pair style supports it.
|
|
|
|
</P>
|
|
|
|
<P>The <I>pstyle</I> argument is the name of the pair style. For example,
|
|
|
|
<I>pstyle</I> could be specified as "lj/cut". The <I>pparam</I> argument is the
|
2014-05-10 00:16:02 +08:00
|
|
|
name of the parameter to change. This is a (non-exclusive) list of
|
|
|
|
pair styles and parameters that can be used with this compute. See
|
|
|
|
the doc pages for individual pair styles and their energy formulas for
|
2015-07-30 22:38:28 +08:00
|
|
|
the meaning of these parameters:
|
|
|
|
</P>
|
|
|
|
<DIV ALIGN=center><TABLE BORDER=1 >
|
|
|
|
<TR><TD ><A HREF = "pair_lj.html">lj/cut</A></TD><TD > epsilon,sigma</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut</A></TD><TD > epsilon,sigma</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_lj.html">lj/cut/coul/long</A></TD><TD > epsilon,sigma</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_lj_soft.html">lj/cut/soft</A></TD><TD > epsilon,sigma,lambda</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_lj_soft.html">coul/cut/soft</A></TD><TD > lambda</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_lj_soft.html">coul/long/soft</A></TD><TD > lambda</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_lj_soft.html">lj/cut/coul/cut/soft</A></TD><TD > epsilon,sigma,lambda</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_lj_soft.html">lj/cut/coul/long/soft</A></TD><TD > epsilon,sigma,lambda</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_lj_soft.html">lj/cut/tip4p/long/soft</A></TD><TD > epsilon,sigma,lambda</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_lj_soft.html">tip4p/long/soft</A></TD><TD > lambda</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_lj_soft.html">lj/charmm/coul/long/soft</A></TD><TD > epsilon,sigma,lambda</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_born.html">born</A></TD><TD > a,b,c</TD><TD > type pairs</TD></TR>
|
|
|
|
<TR><TD ><A HREF = "pair_buck.html">buck</A></TD><TD > a,c </TD><TD > type pairs
|
|
|
|
</TD></TR></TABLE></DIV>
|
|
|
|
|
|
|
|
<P>Note that it is easy to add new potentials and their parameters to
|
2014-05-10 00:16:02 +08:00
|
|
|
this list. All it typically takes is adding an extract() method to
|
2015-07-30 22:38:28 +08:00
|
|
|
the pair_*.cpp file associated with the potential.
|
|
|
|
</P>
|
|
|
|
<P>Similar to the <A HREF = "pair_coeff.html">pair_coeff</A> command, I and J can be
|
2014-05-10 00:16:02 +08:00
|
|
|
specified in one of two ways. Explicit numeric values can be used for
|
2015-07-30 22:38:28 +08:00
|
|
|
each, as in the 1st example above. I <= J is required. LAMMPS sets
|
2014-05-10 00:16:02 +08:00
|
|
|
the coefficients for the symmetric J,I interaction to the same
|
|
|
|
values. A wild-card asterisk can be used in place of or in conjunction
|
|
|
|
with the I,J arguments to set the coefficients for multiple pairs of
|
2015-07-30 22:38:28 +08:00
|
|
|
atom types. This takes the form "*" or "*n" or "n*" or "m*n". If N =
|
2014-05-10 00:16:02 +08:00
|
|
|
the number of atom types, then an asterisk with no numeric values
|
|
|
|
means all types from 1 to N. A leading asterisk means all types from
|
|
|
|
1 to n (inclusive). A trailing asterisk means all types from n to N
|
|
|
|
(inclusive). A middle asterisk means all types from m to n
|
2015-07-30 22:38:28 +08:00
|
|
|
(inclusive). Note that only type pairs with I <= J are considered; if
|
|
|
|
asterisks imply type pairs where J < I, they are ignored.
|
|
|
|
</P>
|
|
|
|
<P>If <A HREF = "pair_hybrid.html">pair_style hybrid or hybrid/overlay</A> is being
|
|
|
|
used, then the <I>pstyle</I> will be a sub-style name. You must specify
|
2014-05-10 00:16:02 +08:00
|
|
|
I,J arguments that correspond to type pair values defined (via the
|
2015-07-30 22:38:28 +08:00
|
|
|
<A HREF = "pair_coeff.html">pair_coeff</A> command) for that sub-style.
|
|
|
|
</P>
|
|
|
|
<P>The <I>v_name</I> argument for keyword <I>pair</I> is the name of an
|
|
|
|
<A HREF = "variable.html">equal-style variable</A> which will be evaluated each time
|
2014-05-10 00:16:02 +08:00
|
|
|
this compute is invoked. It should be specified as v_name, where name
|
2015-07-30 22:38:28 +08:00
|
|
|
is the variable name.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>The <I>atom</I> attribute enables atom properties to be changed. The
|
|
|
|
<I>aparam</I> argument is the name of the parameter to change. This is the
|
|
|
|
current list of atom parameters that can be used with this compute:
|
|
|
|
</P>
|
|
|
|
<UL><LI>charge = charge on particle
|
|
|
|
</UL>
|
|
|
|
<P>The <I>v_name</I> argument for keyword <I>pair</I> is the name of an
|
|
|
|
<A HREF = "variable.html">equal-style variable</A> which will be evaluated each time
|
2014-05-10 00:16:02 +08:00
|
|
|
this compute is invoked. It should be specified as v_name, where name
|
2015-07-30 22:38:28 +08:00
|
|
|
is the variable name.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>The <I>tail</I> keyword controls the calculation of the tail correction to
|
|
|
|
"van der Waals" pair energies beyond the cutoff, if this has been
|
|
|
|
activated via the <A HREF = "pair_modify.html">pair_modify</A> command. If the
|
2014-05-10 00:16:02 +08:00
|
|
|
perturbation is small, the tail contribution to the energy difference
|
2015-07-30 22:38:28 +08:00
|
|
|
between the reference and perturbed systems should be negligible.
|
|
|
|
</P>
|
|
|
|
<P>If the keyword <I>volume</I> = <I>yes</I>, then the Boltzmann term is multiplied
|
2014-05-10 00:16:02 +08:00
|
|
|
by the volume so that correct ensemble averaging can be performed over
|
2015-07-30 22:38:28 +08:00
|
|
|
trajectories during which the volume fluctuates or changes <A HREF = "#AllenTildesley">(Allen and
|
|
|
|
Tildesley)</A>:
|
|
|
|
</P>
|
|
|
|
<CENTER><IMG SRC = "Eqs/compute_fep_vol.jpg">
|
|
|
|
</CENTER>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P><B>Output info:</B>
|
|
|
|
</P>
|
|
|
|
<P>This compute calculates a global vector of length 3 which contains the
|
|
|
|
energy difference (<I>U</I><sub>1</sub>-<I>U</I><sub>0</sub>) as c_ID[1], the
|
|
|
|
Boltzmann factor exp(-(<I>U</I><sub>1</sub>-<I>U</I><sub>0</sub>)/<I>kT</I>), or
|
|
|
|
<I>V</I>exp(-(<I>U</I><sub>1</sub>-<I>U</I><sub>0</sub>)/<I>kT</I>), as c_ID[2] and the
|
|
|
|
volume of the simulation box <I>V</I> as c_ID[3]. <I>U</I><sub>1</sub> is the
|
2014-05-10 00:16:02 +08:00
|
|
|
pair potential energy obtained with the perturbed parameters and
|
2015-07-30 22:38:28 +08:00
|
|
|
<I>U</I><sub>0</sub> is the pair potential energy obtained with the
|
2014-05-10 00:16:02 +08:00
|
|
|
unperturbed parameters. The energies include kspace terms if these
|
2015-07-30 22:38:28 +08:00
|
|
|
are used in the simulation.
|
|
|
|
</P>
|
|
|
|
<P>These output results can be used by any command that uses a global
|
|
|
|
scalar or vector from a compute as input. See <A HREF = "Section_howto.html#howto_15">Section_howto
|
|
|
|
15</A> for an overview of LAMMPS output
|
|
|
|
options. For example, the computed values can be averaged using <A HREF = "fix_ave_time.html">fix
|
|
|
|
ave/time</A>.
|
|
|
|
</P>
|
|
|
|
<P>The values calculated by this compute are "extensive".
|
|
|
|
</P>
|
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
|
|
|
<P>This compute is distributed as the USER-FEP package. It is only
|
|
|
|
enabled if LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making
|
|
|
|
LAMMPS</A> section for more info.
|
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
|
|
|
<P><A HREF = "fix_adapt_fep.html">fix adapt/fep</A>, <A HREF = "fix_ave_time.html">fix ave/time</A>,
|
|
|
|
<A HREF = "pair_lj_soft_coul_soft.txt">pair_lj_soft_coul_soft</A>
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B>
|
|
|
|
</P>
|
|
|
|
<P>The option defaults are <I>tail</I> = <I>no</I>, <I>volume</I> = <I>no</I>.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<A NAME = "Pearlman"></A>
|
|
|
|
|
|
|
|
<P><B>(Pearlman)</B> Pearlman, J Chem Phys, 98, 1487 (1994)
|
|
|
|
</P>
|
|
|
|
<A NAME = "Mezei"></A>
|
|
|
|
|
|
|
|
<P><B>(Mezei)</B> Mezei, J Chem Phys, 86, 7084 (1987)
|
|
|
|
</P>
|
|
|
|
<A NAME = "Bennet"></A>
|
|
|
|
|
|
|
|
<P><B>(Bennet)</B> Bennet, J Comput Phys, 22, 245 (1976)
|
|
|
|
</P>
|
|
|
|
<A NAME = "BoreschKarplus"></A>
|
|
|
|
|
|
|
|
<P><B>(BoreschKarplus)</B> Boresch and Karplus, J Phys Chem A, 103, 103 (1999)
|
|
|
|
</P>
|
|
|
|
<A NAME = "AllenTildesley"></A>
|
|
|
|
|
|
|
|
<P><B>(AllenTildesley)</B> Allen and Tildesley, Computer Simulation of
|
|
|
|
Liquids, Oxford University Press (1987)
|
|
|
|
</P>
|
|
|
|
</HTML>
|