<p>where <span class="math">\(w_i\)</span> are weights of a numerical quadrature. The <a class="reference internal" href="fix_adapt.html"><span class="doc">fix adapt</span></a> command can be used to define the stages of
<span class="math">\(\lambda\)</span> at which the derivative is calculated and averaged.</p>
<p>The compute fep calculates the exponential Boltzmann term and also the
potential energy difference <span class="math">\(U_1 -U_0\)</span>. By
choosing a very small perturbation <span class="math">\(\delta\)</span> the thermodynamic
integration method can be implemented using a numerical evaluation of
the derivative of the potential energy with respect to <span class="math">\(\lambda\)</span>:</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
<a class="reference internal" href="#pearlman"><span class="std std-ref">(Pearlman)</span></a>. The latter does not require modification of
bond lengths, angles or other internal coordinates.</p>
<p>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 <a class="reference internal" href="#boreschkarplus"><span class="std std-ref">(Boresch, Karplus)</span></a>.</p>
<hr class="docutils" />
<p>The <em>pair</em> attribute enables various parameters of potentials defined
by the <a class="reference internal" href="pair_style.html"><span class="doc">pair_style</span></a> and <a class="reference internal" href="pair_coeff.html"><span class="doc">pair_coeff</span></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 <a class="reference internal" href="pair_coeff.html"><span class="doc">pair_coeff</span></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 <a class="reference internal" href="pair_hybrid.html"><span class="doc">pair_style hybrid or hybrid/overlay</span></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
<a class="reference internal" href="pair_coeff.html"><span class="doc">pair_coeff</span></a> command) for that sub-style.</p>
<p>The <em>v_name</em> argument for keyword <em>pair</em> is the name of an
<a class="reference internal" href="variable.html"><span class="doc">equal-style variable</span></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>
<hr class="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>
<ul class="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
<a class="reference internal" href="variable.html"><span class="doc">equal-style variable</span></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>
<hr class="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 <a class="reference internal" href="pair_modify.html"><span class="doc">pair_modify</span></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 <a class="reference internal" href="#allentildesley"><span class="std std-ref">(Allen and Tildesley)</span></a>:</p>
<p>This compute calculates a global vector of length 3 which contains the
energy difference ( <span class="math">\(U_1-U_0\)</span> ) as c_ID[1], the
Boltzmann factor <span class="math">\(\exp(-(U_1-U_0)/kT)\)</span>, or
<span class="math">\(V \exp(-(U_1-U_0)/kT)\)</span>, as c_ID[2] and the
volume of the simulation box <span class="math">\(V\)</span> as c_ID[3]. <span class="math">\(U_1\)</span> is the
pair potential energy obtained with the perturbed parameters and
<span class="math">\(U_0\)</span> 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 <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">Section_howto 15</span></a> for an overview of LAMMPS output
options. For example, the computed values can be averaged using <a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a>.</p>
<p>The values calculated by this compute are “extensive”.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions</h2>
<p>This compute is distributed as the USER-FEP package. It is only
enabled if LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span class="std std-ref">Making LAMMPS</span></a> section for more info.</p>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.