2010-10-23 05:24:19 +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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
2013-02-22 23:37:20 +08:00
|
|
|
<PRE> pair style args = atype v_name1 v_name2
|
|
|
|
atype = atom type (see asterisk form below)
|
2010-10-23 05:24:19 +08:00
|
|
|
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
|
2013-02-22 23:37:20 +08:00
|
|
|
<I>tail</I> args = atype v_name1 v_name2
|
|
|
|
atype = atom type (see asterisk form below)
|
2010-10-23 05:24:19 +08:00
|
|
|
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
|
2013-02-22 23:37:20 +08:00
|
|
|
<I>kspace</I> args = atype v_name1 v_name2
|
|
|
|
atype = atom type (see asterisk form below)
|
2010-10-23 05:24:19 +08:00
|
|
|
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>
|
2013-02-22 23:37:20 +08:00
|
|
|
<PRE>compute 1 all ti lj/cut 1 v_lj v_dlj coul/long 2 v_c v_dc kspace 1 v_ks v_dks
|
|
|
|
compute 1 all ti lj/cut 1*3 v_lj v_dlj coul/long * v_c v_dc kspace * v_ks v_dks
|
2010-10-23 05:24:19 +08:00
|
|
|
</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>
|
2013-02-22 23:37:20 +08:00
|
|
|
<P>To perform this calculation, you provide one or more atom types as
|
|
|
|
<I>atype</I>. <I>Atype</I> can be specified in one of two ways. An explicit
|
|
|
|
numeric values can be used, as in the 1st example above. Or a
|
|
|
|
wildcard asterisk can be used in place of or in conjunction with the
|
|
|
|
<I>atype</I> argument to select multiple atom types. This takes the form
|
|
|
|
"*" or "*n" or "n*" 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).
|
|
|
|
</P>
|
|
|
|
<P>You also specify two functions, as <A HREF = "variable.html">equal-style
|
2010-10-23 05:24:19 +08:00
|
|
|
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
|
2011-12-14 04:43:36 +08:00
|
|
|
a compute as input. See <A HREF = "Section_howto.html#howto_15">Section_howto
|
|
|
|
15</A> for an overview of LAMMPS output
|
|
|
|
options.
|
2010-10-23 05:24:19 +08:00
|
|
|
</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>
|