lammps/doc/compute_ti.html

126 lines
5.1 KiB
HTML

<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>
<HR>
<H3>compute ti command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group ti keyword args ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>ti = style name of this compute command
<LI>one or more attribute/arg pairs may be appended
<LI>keyword = pair style (lj/cut, gauss, born, etc) or <I>tail</I> or <I>kspace</I>
<PRE> pair style args = v_name1 v_name2
v_name1 = variable with name1 that is energy scale factor and function of lambda
v_name2 = variable with name2 that is derivative of v_name1 with respect to lambda
<I>tail</I> args = v_name1 v_name2
v_name1 = variable with name1 that is energy tail correction scale factor and function of lambda
v_name2 = variable with name2 that is derivative of v_name1 with respect to lambda
<I>kspace</I> args = v_name1 v_name2
v_name1 = variable with name1 that is K-Space scale factor and function of lambda
v_name2 = variable with name2 that is derivative of v_name1 with respect to lambda
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 all ti lj/cut v_lj v_dlj coul/long v_c v_dc kspace v_ks v_dks
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the derivative of the interaction
potential with respect to <I>lambda</I>, the coupling parameter used in a
thermodynamic integration. This derivative can be used to infer a
free energy difference resulting from an alchemical simulation, as
described in <A HREF = "#Eike">Eike</A>.
</P>
<P>Typically this compute will be used in conjunction with the <A HREF = "fix_adapt.html">fix
adapt</A> command which can perform alchemical
transformations by adusting the strength of an interaction potential
as a simulation runs, as defined by one or more
<A HREF = "pair_style.html">pair_style</A> or <A HREF = "kspace_style.html">kspace_style</A>
commands. This scaling is done via a prefactor on the energy, forces,
virial calculated by the pair or K-Space style. The prefactor is
often a function of a <I>lambda</I> parameter which may be adjusted from 0
to 1 (or vice versa) over the course of a <A HREF = "run.html">run</A>. The
time-dependent adjustment is what the <A HREF = "fix_adapt.html">fix adapt</A>
command does.
</P>
<P>Assume that the unscaled energy of a pair_style or kspace_style is
given by U. Then the scaled energy is
</P>
<PRE>Us = f(lambda) U
</PRE>
<P>where f() is some function of lambda. What this compute calculates is
</P>
<PRE>dUs / d(lambda) = U df(lambda)/dlambda = Us / f(lambda) df(lambda)/dlambda
</PRE>
<P>which is the derivative of the system's scaled potential energy Us
with respect to <I>lambda</I>.
</P>
<P>To do this calculation, you provide two functions, as <A HREF = "variable.html">equal-style
variables</A>. The first is specified as <I>v_name1</I>, where
<I>name1</I> is the name of the variable, and is f(lambda) in the notation
above. The second is specified as <I>v_name2</I>, where <I>name2</I> is the
name of the variable, and is df(lambda) / dlambda in the notation
above. I.e. it is the analytic derivative of f() with respect to
lambda. Note that the <I>name1</I> variable is also typically given as an
argument to the <A HREF = "fix_adapt.html">fix adapt</A> command.
</P>
<P>An alchemical simulation may use several pair potentials together,
invoked via the <A HREF = "pair_hybrid.html">pair_style hybrid or hybrid/overlay</A>
command. The total dUs/dlambda for the overall system is calculated
as the sum of each contributing term as listed by the keywords in the
compute ti command. Individual pair potentials can be listed, which
will be sub-styles in the hybrid case. You can also include a K-space
term via the <I>kspace</I> keyword. You can also include a pairwise
long-range tail correction to the energy via the <I>tail</I> keyword.
</P>
<P>For each term you can specify a different (or the same) scale factor
by the two variables that you list. Again, these will typically
correspond toe the scale factors applied to these various potentials
and the K-Space contribution via the <A HREF = "fix_adapt.html">fix_adapt</A>
command.
</P>
<P>More details about the exact functional forms for the computation of
du/dl can be found in the paper by <A HREF = "#Eike">Eike</A>.
</P>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global scalar, namely dUs/dlambda. This
value can be used by any command that uses a global scalar value from
a compute as input. See <A HREF = "Section_howto.html#howto_15">Section_howto
15</A> for an overview of LAMMPS output
options.
</P>
<P>The scalar value calculated by this compute is "extensive".
</P>
<P>The scalar value will be in energy <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_adapt.html">fix adapt</A>
</P>
<P><B>Default:</B> none
</P>
<A NAME = "Eike"></A>
<P><B>(Eike)</B> Eike and Maginn, Journal of Chemical Physics, 124, 164503 (2006).
</P>
</HTML>