git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5096 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2010-10-22 21:24:19 +00:00
parent 70de8a1798
commit 729e780c48
6 changed files with 452 additions and 73 deletions

View File

@ -359,7 +359,7 @@ each style or click on the style itself for a full description:
<TR ALIGN="center"><TD ><A HREF = "compute_pair_local.html">pair/local</A></TD><TD ><A HREF = "compute_pe.html">pe</A></TD><TD ><A HREF = "compute_pe_atom.html">pe/atom</A></TD><TD ><A HREF = "compute_pressure.html">pressure</A></TD><TD ><A HREF = "compute_property_atom.html">property/atom</A></TD><TD ><A HREF = "compute_property_local.html">property/local</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_property_molecule.html">property/molecule</A></TD><TD ><A HREF = "compute_rdf.html">rdf</A></TD><TD ><A HREF = "compute_reduce.html">reduce</A></TD><TD ><A HREF = "compute_reduce.html">reduce/region</A></TD><TD ><A HREF = "compute_stress_atom.html">stress/atom</A></TD><TD ><A HREF = "compute_temp.html">temp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_temp_asphere.html">temp/asphere</A></TD><TD ><A HREF = "compute_temp_com.html">temp/com</A></TD><TD ><A HREF = "compute_temp_deform.html">temp/deform</A></TD><TD ><A HREF = "compute_temp_partial.html">temp/partial</A></TD><TD ><A HREF = "compute_temp_profile.html">temp/profile</A></TD><TD ><A HREF = "compute_temp_ramp.html">temp/ramp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_temp_region.html">temp/region</A></TD><TD ><A HREF = "compute_temp_sphere.html">temp/sphere</A>
<TR ALIGN="center"><TD ><A HREF = "compute_temp_region.html">temp/region</A></TD><TD ><A HREF = "compute_temp_sphere.html">temp/sphere</A></TD><TD ><A HREF = "compute_ti.html">ti</A>
</TD></TR></TABLE></DIV>
<P>These are compute styles contributed by users, which can be used if

View File

@ -528,7 +528,8 @@ each style or click on the style itself for a full description:
"temp/profile"_compute_temp_profile.html,
"temp/ramp"_compute_temp_ramp.html,
"temp/region"_compute_temp_region.html,
"temp/sphere"_compute_temp_sphere.html :tb(c=6,ea=c)
"temp/sphere"_compute_temp_sphere.html,
"ti"_compute_ti.html :tb(c=6,ea=c)
These are compute styles contributed by users, which can be used if
"LAMMPS is built with the appropriate package"_Section_start.html#2_3.

124
doc/compute_ti.html Normal file
View File

@ -0,0 +1,124 @@
<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#4_15">this section</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>

113
doc/compute_ti.txt Normal file
View File

@ -0,0 +1,113 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute ti command :h3
[Syntax:]
compute ID group ti keyword args ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
ti = style name of this compute command :l
one or more attribute/arg pairs may be appended :l
keyword = pair style (lj/cut, gauss, born, etc) or {tail} or {kspace} :l
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
{tail} 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
{kspace} 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
:ule
[Examples:]
compute 1 all ti lj/cut v_lj v_dlj coul/long v_c v_dc kspace v_ks v_dks :pre
[Description:]
Define a computation that calculates the derivative of the interaction
potential with respect to {lambda}, 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 "Eike"_#Eike.
Typically this compute will be used in conjunction with the "fix
adapt"_fix_adapt.html command which can perform alchemical
transformations by adusting the strength of an interaction potential
as a simulation runs, as defined by one or more
"pair_style"_pair_style.html or "kspace_style"_kspace_style.html
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 {lambda} parameter which may be adjusted from 0
to 1 (or vice versa) over the course of a "run"_run.html. The
time-dependent adjustment is what the "fix adapt"_fix_adapt.html
command does.
Assume that the unscaled energy of a pair_style or kspace_style is
given by U. Then the scaled energy is
Us = f(lambda) U :pre
where f() is some function of lambda. What this compute calculates is
dUs / d(lambda) = U df(lambda)/dlambda = Us / f(lambda) df(lambda)/dlambda :pre
which is the derivative of the system's scaled potential energy Us
with respect to {lambda}.
To do this calculation, you provide two functions, as "equal-style
variables"_variable.html. The first is specified as {v_name1}, where
{name1} is the name of the variable, and is f(lambda) in the notation
above. The second is specified as {v_name2}, where {name2} 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 {name1} variable is also typically given as an
argument to the "fix adapt"_fix_adapt.html command.
An alchemical simulation may use several pair potentials together,
invoked via the "pair_style hybrid or hybrid/overlay"_pair_hybrid.html
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 {kspace} keyword. You can also include a pairwise
long-range tail correction to the energy via the {tail} keyword.
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 "fix_adapt"_fix_adapt.html
command.
More details about the exact functional forms for the computation of
du/dl can be found in the paper by "Eike"_#Eike.
[Output info:]
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 "this section"_Section_howto.html#4_15 for an
overview of LAMMPS output options.
The scalar value calculated by this compute is "extensive".
The scalar value will be in energy "units"_units.html.
[Restrictions:] none
[Related commands:]
"fix adapt"_fix_adapt.html
[Default:] none
:link(Eike)
[(Eike)] Eike and Maginn, Journal of Chemical Physics, 124, 164503 (2006).

View File

@ -13,7 +13,7 @@
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID adapt N keyword values ...
<PRE>fix ID group-ID adapt N attribute args ... keyword value ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
@ -21,67 +21,116 @@
<LI>N = adapt simulation settings every this many timesteps
<LI>one or more keyword/value pairs may be appended
<LI>one or more attribute/arg pairs may be appended
<LI>keyword = <I>pair</I> or <I>atom</I>
<LI>attribute = <I>pair</I> or <I>kspace</I> or <I>atom</I>
<PRE> <I>pair</I> args = pstyle pparam I J v_name
pstyle = pair style name, e.g. lj/cut
pparam = parameter to adapt over time
I,J = type pair(s) to set parameter for
v_name = variable with name that calculates value of pparam
<I>kspace</I> arg = v_name
v_name = variable with name that calculates scale factor on K-space terms
<I>atom</I> args = aparam v_name
aparam = parameter to adapt over time
v_name = variable with name that calculates value of aparam
</PRE>
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>scale</I> or <I>reset</I>
<PRE> <I>scale</I> value = <I>no</I> or <I>yes</I>
<I>no</I> = the variable value is the new setting
<I>yes</I> = the variable value multiplies the original setting
</PRE>
<PRE> <I>reset</I> value = <I>no</I> or <I>yes</I>
<I>no</I> = values will remain altered at the end of a run
<I>yes</I> = reset altered values to their original values at the end of a run
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 all adapt 1 pair soft a 1 1 v_prefactor
fix 1 all adapt 1 pair soft a 2* 3 v_prefactor
fix 1 all adapt 1 pair soft a * * v_prefactor soft a 3 3 v_prefactor2
fix 1 all adapt 1 pair lj/cut epsilon * * v_scale1 coul/cut pre 3 3 v_scale2 scale yes reset yes
fix 1 all adapt 10 atom diameter v_size
</PRE>
<P><B>Description:</B>
</P>
<P>Change or adapt one or more specific simulation settings over time as
a simulation runs. Pair potential and atom attribute parameters which
can be varied by this fix are discussed below. Many other fixes can
also be used to time-vary simulation parameters, e.g. the "fix deform"
command will change the simulation box size/shape and the "fix move"
command will change atom positions and velocities in prescribed
manners.
<P>Change or adapt one or more specific simulation attributes or settings
over time as a simulation runs. Pair potential and K-space and atom
attributes which can be varied by this fix are discussed below. Many
other fixes can also be used to time-vary simulation parameters,
e.g. the "fix deform" command will change the simulation box
size/shape and the "fix move" command will change atom positions and
velocities in a prescribed manner.
</P>
<P>IMPORTANT NOTE: Any settings changed by fix adapt are not reset to
their original values at the end of a simulation. They remain changed
to the final values they were set to at the end of the run.
<P>If <I>N</I> is specified as 0, the specified attributes are only changed
once, before the simulation begins. This is all that is needed if the
associated variables are not time-dependent. If <I>N</I> > 0, then changes
are made every <I>N</I> steps during the simulation, presumably with a
variable that is time-dependent.
</P>
<P>Depending on the value of the <I>reset</I> keyword, attributes changed by
this fix will or will not be reset back to their original values at
the end of a simulation. Even if <I>reset</I> is specified as <I>yes</I>, a
restart file written during a simulation will contain the modified
settings.
</P>
<P>If the <I>scale</I> keyword is set to <I>no</I>, then the value the parameter is
set to will be whatever the variable generates. If the <I>scale</I>
keyword is set to <I>yes</I>, then the value of the altered parameter will
be the initial value of that parameter multiplied by whatever the
variable generates. I.e. the variable is now a "scale factor" applied
in (presumably) a time-varying fashion to the parameter. Internally,
the parameters themselves are actually altered; make sure you use the
<I>reset yes</I> option if you want the parameters to be restored to their
initial values after the run.
</P>
<HR>
<P>The <I>pair</I> keyword enables various parameters of potentials defined by
the <A HREF = "pair_style.html">pair_style</A> command to be changed, if the pair
style supports it. The <I>pstyle</I> argument is the name of the pair
style. If <A HREF = "pair_hybrid.html">pair_style hybrid or hybrid/overlay</A> is
used, <I>pstyle</I> should be a sub-style name. For example, <I>pstyle</I>
could be specified as "soft" or "lubricate". The <I>pparam</I> argument is
the name of the parameter to change. This is the current list of pair
styles and parameters that can be varied by this fix. See the doc
pages for individual pair styles for the meaning of these parameters.
style supports it. Note that the <A HREF = "pair_style.html">pair_style</A> and
<A HREF = "pair_coeff.html">pair_coeff</A> commands must be used in the usual manner
to specify these parameters initially; the fix adapt command simply
overrides the parameters.
</P>
<P>The <I>pstyle</I> argument is the name of the pair style. If <A HREF = "pair_hybrid.html">pair_style
hybrid or hybrid/overlay</A> is used, <I>pstyle</I> should be
a sub-style name. For example, <I>pstyle</I> could be specified as "soft"
or "lubricate". The <I>pparam</I> argument is the name of the parameter to
change. This is the current list of pair styles and parameters that
can be varied by this fix. See the doc pages for individual pair
styles and their energy formulas for the meaning of these parameters:
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR><TD ><A HREF = "pair_soft.html">soft</A></TD><TD > a</TD><TD > global</TD></TR>
<TR><TD ><A HREF = "pair_lubricate.html">lubricate</A></TD><TD > mu</TD><TD > type pairs
<TR><TD ><A HREF = "pair_born.html">born</A>: a</TD><TD >b</TD><TD >c: type pairs:<A HREF = "pair_buck.html">buck</A>: a</TD></TR>
<TR><TD >c: type pairs:<A HREF = "pair_coul.html">coul/cut</A>: scale: type pairs:<A HREF = "pair_coul.html">coul/debye</A>: scale: type pairs:<A HREF = "pair_coul.html">coul/long</A>: scale: type pairs:<A HREF = "pair_lj.html">lj/cut</A>: epsilon: type pairs:<A HREF = "pair_lj.html">lj/cut/opt</A>: epsilon: type pairs:<A HREF = "pair_lubricate.html">lubricate</A>: mu: global:<A HREF = "pair_gauss.html">gauss</A>: a: type pairs:<A HREF = "pair_soft.html">soft</A>: a: type pairs
</TD></TR></TABLE></DIV>
<P>Some parameters are global settings for the pair style, e.g. the
viscosity setting "mu" for <A HREF = "pair_lubricate.html">pair_style lubricate</A>.
Other parameters apply to pairs of atom types within the pair style,
e.g. the prefactor "a" for <A HREF = "pair_soft.html">pair_style soft</A>. If a
type pair parameter is specified, the <I>I</I> and <I>J</I> settings should be
specified to indicate which pair(s) to apply it to. Note that in all
cases, the <A HREF = "pair_style.html">pair_style</A> and
<A HREF = "pair_coeff.html">pair_coeff</A> commands must be used in the usual manner
to specify these parameters initially; the fix adapt command simply
overrides the parameters.
Other parameters apply to atom type pairs within the pair style,
e.g. the prefactor "a" for <A HREF = "pair_soft.html">pair_style soft</A>.
</P>
<P>Note that for many of the potentials, the parameter that can be varied
is effectively a prefactor on the entire energy expression for the
potential, e.g. the lj/cut epsilon. The parameters listed as "scale"
are exactly that, since the energy expression for the
<A HREF = "pair_coul.html">coul/cut</A> potential (for example) has no labeled
prefactor in its formula. To apply an effective prefactor to some
potentials, multiple parameters need to be altered. For example, the
<A HREF = "pair_buck.html">Buckingham potential</A> needs both the A and C terms
altered together. To scale the Buckingham potential, you should thus
list the pair style twice, once for A and once for C.
</P>
<P>If a type pair parameter is specified, the <I>I</I> and <I>J</I> settings should
be specified to indicate which type pairs to apply it to. If a global
parameter is specified, the <I>I</I> and <I>J</I> settings still need to be
specified, but are ignored.
</P>
<P>Similar to the <A HREF = "pair_coeff.html">pair_coeff command</A>, I and J can be
specified in one of two ways. Explicit numeric values can be used for
@ -98,8 +147,11 @@ all types from 1 to N. A leading asterisk means all types from 1 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 global parameter is specified, the <I>I</I> and <I>J</I> settings still
need to be specified, but are ignored.
<P>IMPROTANT NOTE: 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 I,J arguments that correspond
to type pair values defined (via the <A HREF = "doc/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
@ -121,6 +173,18 @@ linear fashion over the course of a simulation:
<PRE>variable prefactor equal ramp(10,30)
fix 1 all adapt 1 pair soft a * * v_prefactor
</PRE>
<HR>
<P>The <I>kspace</I> keyword used the specified variable as a scale factor on
the energy, forces, virial calculated by whatever K-Space solver is
defined by the <A HREF = "kspace_style.html">kspace_style</A> command. If the
variable has a value of 1.0, then the solver is unaltered.
</P>
<P>The <I>kspace</I> keyword works this way whether the <I>scale</I> keyword
is set to <I>no</I> or <I>yes</I>.
</P>
<HR>
<P>The <I>atom</I> keyword enables various 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 varied by this fix:
@ -160,8 +224,12 @@ This fix is not invoked during <A HREF = "minimize.html">energy minimization</A>
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B> none
<P><B>Related commands:</B>
</P>
<P><B>Default:</B> none
<P><A HREF = "compute_ti.html">compute ti</A>
</P>
<P><B>Default:</B>
</P>
<P>The option defaults are scale = no, reset = no.
</P>
</HTML>

View File

@ -10,67 +10,121 @@ fix adapt command :h3
[Syntax:]
fix ID group-ID adapt N keyword values ... :pre
fix ID group-ID adapt N attribute args ... keyword value ... :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
adapt = style name of this fix command :l
N = adapt simulation settings every this many timesteps :l
one or more keyword/value pairs may be appended :l
keyword = {pair} or {atom} :l
one or more attribute/arg pairs may be appended :l
attribute = {pair} or {kspace} or {atom} :l
{pair} args = pstyle pparam I J v_name
pstyle = pair style name, e.g. lj/cut
pparam = parameter to adapt over time
I,J = type pair(s) to set parameter for
v_name = variable with name that calculates value of pparam
{kspace} arg = v_name
v_name = variable with name that calculates scale factor on K-space terms
{atom} args = aparam v_name
aparam = parameter to adapt over time
v_name = variable with name that calculates value of aparam :pre
zero or more keyword/value pairs may be appended :l
keyword = {scale} or {reset} :l
{scale} value = {no} or {yes}
{no} = the variable value is the new setting
{yes} = the variable value multiplies the original setting :pre
{reset} value = {no} or {yes}
{no} = values will remain altered at the end of a run
{yes} = reset altered values to their original values at the end of a run :pre
:ule
[Examples:]
fix 1 all adapt 1 pair soft a 1 1 v_prefactor
fix 1 all adapt 1 pair soft a 2* 3 v_prefactor
fix 1 all adapt 1 pair soft a * * v_prefactor soft a 3 3 v_prefactor2
fix 1 all adapt 1 pair lj/cut epsilon * * v_scale1 coul/cut pre 3 3 v_scale2 scale yes reset yes
fix 1 all adapt 10 atom diameter v_size :pre
[Description:]
Change or adapt one or more specific simulation settings over time as
a simulation runs. Pair potential and atom attribute parameters which
can be varied by this fix are discussed below. Many other fixes can
also be used to time-vary simulation parameters, e.g. the "fix deform"
command will change the simulation box size/shape and the "fix move"
command will change atom positions and velocities in prescribed
manners.
Change or adapt one or more specific simulation attributes or settings
over time as a simulation runs. Pair potential and K-space and atom
attributes which can be varied by this fix are discussed below. Many
other fixes can also be used to time-vary simulation parameters,
e.g. the "fix deform" command will change the simulation box
size/shape and the "fix move" command will change atom positions and
velocities in a prescribed manner.
IMPORTANT NOTE: Any settings changed by fix adapt are not reset to
their original values at the end of a simulation. They remain changed
to the final values they were set to at the end of the run.
If {N} is specified as 0, the specified attributes are only changed
once, before the simulation begins. This is all that is needed if the
associated variables are not time-dependent. If {N} > 0, then changes
are made every {N} steps during the simulation, presumably with a
variable that is time-dependent.
Depending on the value of the {reset} keyword, attributes changed by
this fix will or will not be reset back to their original values at
the end of a simulation. Even if {reset} is specified as {yes}, a
restart file written during a simulation will contain the modified
settings.
If the {scale} keyword is set to {no}, then the value the parameter is
set to will be whatever the variable generates. If the {scale}
keyword is set to {yes}, then the value of the altered parameter will
be the initial value of that parameter multiplied by whatever the
variable generates. I.e. the variable is now a "scale factor" applied
in (presumably) a time-varying fashion to the parameter. Internally,
the parameters themselves are actually altered; make sure you use the
{reset yes} option if you want the parameters to be restored to their
initial values after the run.
:line
The {pair} keyword enables various parameters of potentials defined by
the "pair_style"_pair_style.html command to be changed, if the pair
style supports it. The {pstyle} argument is the name of the pair
style. If "pair_style hybrid or hybrid/overlay"_pair_hybrid.html is
used, {pstyle} should be a sub-style name. For example, {pstyle}
could be specified as "soft" or "lubricate". The {pparam} argument is
the name of the parameter to change. This is the current list of pair
styles and parameters that can be varied by this fix. See the doc
pages for individual pair styles for the meaning of these parameters.
"soft"_pair_soft.html, a, global,
"lubricate"_pair_lubricate.html, mu, type pairs :tb(c=3)
Some parameters are global settings for the pair style, e.g. the
viscosity setting "mu" for "pair_style lubricate"_pair_lubricate.html.
Other parameters apply to pairs of atom types within the pair style,
e.g. the prefactor "a" for "pair_style soft"_pair_soft.html. If a
type pair parameter is specified, the {I} and {J} settings should be
specified to indicate which pair(s) to apply it to. Note that in all
cases, the "pair_style"_pair_style.html and
style supports it. Note that the "pair_style"_pair_style.html and
"pair_coeff"_pair_coeff.html commands must be used in the usual manner
to specify these parameters initially; the fix adapt command simply
overrides the parameters.
The {pstyle} argument is the name of the pair style. If "pair_style
hybrid or hybrid/overlay"_pair_hybrid.html is used, {pstyle} should be
a sub-style name. For example, {pstyle} could be specified as "soft"
or "lubricate". The {pparam} argument is the name of the parameter to
change. This is the current list of pair styles and parameters that
can be varied by this fix. See the doc pages for individual pair
styles and their energy formulas for the meaning of these parameters:
"born"_pair_born.html: a,b,c: type pairs:
"buck"_pair_buck.html: a,c: type pairs:
"coul/cut"_pair_coul.html: scale: type pairs:
"coul/debye"_pair_coul.html: scale: type pairs:
"coul/long"_pair_coul.html: scale: type pairs:
"lj/cut"_pair_lj.html: epsilon: type pairs:
"lj/cut/opt"_pair_lj.html: epsilon: type pairs:
"lubricate"_pair_lubricate.html: mu: global:
"gauss"_pair_gauss.html: a: type pairs:
"soft"_pair_soft.html: a: type pairs :tb(c=3)
Some parameters are global settings for the pair style, e.g. the
viscosity setting "mu" for "pair_style lubricate"_pair_lubricate.html.
Other parameters apply to atom type pairs within the pair style,
e.g. the prefactor "a" for "pair_style soft"_pair_soft.html.
Note that for many of the potentials, the parameter that can be varied
is effectively a prefactor on the entire energy expression for the
potential, e.g. the lj/cut epsilon. The parameters listed as "scale"
are exactly that, since the energy expression for the
"coul/cut"_pair_coul.html potential (for example) has no labeled
prefactor in its formula. To apply an effective prefactor to some
potentials, multiple parameters need to be altered. For example, the
"Buckingham potential"_pair_buck.html needs both the A and C terms
altered together. To scale the Buckingham potential, you should thus
list the pair style twice, once for A and once for C.
If a type pair parameter is specified, the {I} and {J} settings should
be specified to indicate which type pairs to apply it to. If a global
parameter is specified, the {I} and {J} settings still need to be
specified, but are ignored.
Similar to the "pair_coeff command"_pair_coeff.html, 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
@ -86,8 +140,11 @@ all types from 1 to N. A leading asterisk means all types from 1 to n
(inclusive). Note that only type pairs with I <= J are considered; if
asterisks imply type pairs where J < I, they are ignored.
If a global parameter is specified, the {I} and {J} settings still
need to be specified, but are ignored.
IMPROTANT NOTE: If "pair_style hybrid or
hybrid/overlay"_pair_hybrid.html is being used, then the {pstyle} will
be a sub-style name. You must specify I,J arguments that correspond
to type pair values defined (via the "pair_coeff"_doc/pair_coeff.html
command) for that sub-style.
The {v_name} argument for keyword {pair} is the name of an
"equal-style variable"_variable.html which will be evaluated each time
@ -109,6 +166,18 @@ linear fashion over the course of a simulation:
variable prefactor equal ramp(10,30)
fix 1 all adapt 1 pair soft a * * v_prefactor :pre
:line
The {kspace} keyword used the specified variable as a scale factor on
the energy, forces, virial calculated by whatever K-Space solver is
defined by the "kspace_style"_kspace_style.html command. If the
variable has a value of 1.0, then the solver is unaltered.
The {kspace} keyword works this way whether the {scale} keyword
is set to {no} or {yes}.
:line
The {atom} keyword enables various atom properties to be changed. The
{aparam} argument is the name of the parameter to change. This is the
current list of atom parameters that can be varied by this fix:
@ -148,6 +217,10 @@ This fix is not invoked during "energy minimization"_minimize.html.
[Restrictions:] none
[Related commands:] none
[Related commands:]
[Default:] none
"compute ti"_compute_ti.html
[Default:]
The option defaults are scale = no, reset = no.