<p>where <ahref="#id5"><spanclass="problematic"id="id6">*</span></a>w*<sub>i</sub> are weights of a numerical quadrature. The <aclass="reference internal"href="fix_adapt.html"><em>fix adapt</em></a> command can be used to define the stages of
&lambda; at which the derivative is calculated and averaged.</p>
<p>The compute fep calculates the exponential Boltzmann term and also the
potential energy difference <ahref="#id7"><spanclass="problematic"id="id8">*</span></a>U*<sub>1</sub>-<ahref="#id9"><spanclass="problematic"id="id10">*</span></a>U*<sub>0</sub>. By
choosing a very small perturbation &delta; the thermodynamic
integration method can be implemented using a numerical evaluation of
the derivative of the potential energy with respect to &lambda;:</p>
<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
order to setup an alchemical transformation route, several strategies
are available, such as single-topology or double-topology strategies
<aclass="reference internal"href="#pearlman"><span>(Pearlman)</span></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
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
bond lengths or other internal coordinates <aclass="reference internal"href="#boreschkarplus"><span>(Boresch, Karplus)</span></a>.</p>
<hrclass="docutils"/>
<p>The <em>pair</em> attribute enables various parameters of potentials defined
by the <aclass="reference internal"href="pair_style.html"><em>pair_style</em></a> and <aclass="reference internal"href="pair_coeff.html"><em>pair_coeff</em></a>
commands to be changed, if the pair style supports it.</p>
<p>The <em>pstyle</em> argument is the name of the pair style. For example,
<em>pstyle</em> could be specified as “lj/cut”. The <em>pparam</em> argument is the
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
<p>Note that it is easy to add new potentials and their parameters to
this list. All it typically takes is adding an extract() method to
the pair_*.cpp file associated with the potential.</p>
<p>Similar to the <aclass="reference internal"href="pair_coeff.html"><em>pair_coeff</em></a> command, I and J can be
specified in one of two ways. Explicit numeric values can be used for
each, as in the 1st example above. I <= J is required. LAMMPS sets
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
atom types. This takes the form “*” or “<em>n” or “n</em>” or “m*n”. If N =
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
(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 <aclass="reference internal"href="pair_hybrid.html"><em>pair_style hybrid or hybrid/overlay</em></a> is being
used, then the <em>pstyle</em> will be a sub-style name. You must specify
I,J arguments that correspond to type pair values defined (via the
<aclass="reference internal"href="pair_coeff.html"><em>pair_coeff</em></a> command) for that sub-style.</p>
<p>The <em>v_name</em> argument for keyword <em>pair</em> is the name of an
<aclass="reference internal"href="variable.html"><em>equal-style variable</em></a> which will be evaluated each time
this compute is invoked. It should be specified as v_name, where name
is the variable name.</p>
<hrclass="docutils"/>
<p>The <em>atom</em> attribute enables atom properties to be changed. The
<em>aparam</em> 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>
<ulclass="simple">
<li>charge = charge on particle</li>
</ul>
<p>The <em>v_name</em> argument for keyword <em>pair</em> is the name of an
<aclass="reference internal"href="variable.html"><em>equal-style variable</em></a> which will be evaluated each time
this compute is invoked. It should be specified as v_name, where name
is the variable name.</p>
<hrclass="docutils"/>
<p>The <em>tail</em> keyword controls the calculation of the tail correction to
“van der Waals” pair energies beyond the cutoff, if this has been
activated via the <aclass="reference internal"href="pair_modify.html"><em>pair_modify</em></a> command. If the
perturbation is small, the tail contribution to the energy difference
between the reference and perturbed systems should be negligible.</p>
<p>If the keyword <em>volume</em> = <em>yes</em>, then the Boltzmann term is multiplied
by the volume so that correct ensemble averaging can be performed over
trajectories during which the volume fluctuates or changes <aclass="reference internal"href="#allentildesley"><span>(Allen and Tildesley)</span></a>:</p>
<p>This compute calculates a global vector of length 3 which contains the
energy difference (<em>U*<sub>1</sub>-*U*<sub>0</sub>) as c_ID[1], the
Boltzmann factor exp(-(*U*<sub>1</sub>-*U*<sub>0</sub>)/*kT</em>), or
<em>V*exp(-(*U*<sub>1</sub>-*U*<sub>0</sub>)/*kT</em>), as c_ID[2] and the
volume of the simulation box <em>V</em> as c_ID[3]. <ahref="#id11"><spanclass="problematic"id="id12">*</span></a>U*<sub>1</sub> is the
pair potential energy obtained with the perturbed parameters and
<ahref="#id13"><spanclass="problematic"id="id14">*</span></a>U*<sub>0</sub> is the pair potential energy obtained with the
unperturbed parameters. The energies include kspace terms if these
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 <aclass="reference internal"href="Section_howto.html#howto-15"><span>Section_howto 15</span></a> for an overview of LAMMPS output
options. For example, the computed values can be averaged using <aclass="reference internal"href="fix_ave_time.html"><em>fix ave/time</em></a>.</p>
<p>The values calculated by this compute are “extensive”.</p>
</div>
<divclass="section"id="restrictions">
<h2>Restrictions<aclass="headerlink"href="#restrictions"title="Permalink to this headline">¶</a></h2>
<p>This compute is distributed as the USER-FEP package. It is only
enabled if LAMMPS was built with that package. See the <aclass="reference internal"href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
</div>
<divclass="section"id="related-commands">
<h2>Related commands<aclass="headerlink"href="#related-commands"title="Permalink to this headline">¶</a></h2>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.