git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2332 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -113,8 +113,8 @@ line are arguments.
|
||||
<P>(6) Text with spaces can be enclosed in double quotes so it will be
|
||||
treated as a single argument. See the <A HREF = "dump_modify.html">dump modify</A>
|
||||
or <A HREF = "fix_print.html">fix print</A> commands for examples. A '#' or '$'
|
||||
character that in text between double quotes will not be treated as a
|
||||
comment or substituted for as a variable.
|
||||
character that is in text between double quotes will not be treated as
|
||||
a comment or substituted for as a variable.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
@ -317,14 +317,14 @@ in the command's documentation.
|
||||
of each style or click on the style itself for a full description:
|
||||
</P>
|
||||
<DIV ALIGN=center><TABLE BORDER=1 >
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_addforce.html">addforce</A></TD><TD ><A HREF = "fix_aveforce.html">aveforce</A></TD><TD ><A HREF = "fix_ave_atom.html">ave/atom</A></TD><TD ><A HREF = "fix_ave_spatial.html">ave/spatial</A></TD><TD ><A HREF = "fix_ave_time.html">ave/time</A></TD><TD ><A HREF = "fix_bond_swap.html">bond/swap</A></TD><TD ><A HREF = "fix_com.html">com</A></TD><TD ><A HREF = "fix_coord_original.html">coord/original</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_deform.html">deform</A></TD><TD ><A HREF = "fix_deposit.html">deposit</A></TD><TD ><A HREF = "fix_drag.html">drag</A></TD><TD ><A HREF = "fix_dt_reset.html">dt/reset</A></TD><TD ><A HREF = "fix_efield.html">efield</A></TD><TD ><A HREF = "fix_enforce2d.html">enforce2d</A></TD><TD ><A HREF = "fix_freeze.html">freeze</A></TD><TD ><A HREF = "fix_gravity.html">gravity</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_gyration.html">gyration</A></TD><TD ><A HREF = "fix_heat.html">heat</A></TD><TD ><A HREF = "fix_indent.html">indent</A></TD><TD ><A HREF = "fix_langevin.html">langevin</A></TD><TD ><A HREF = "fix_lineforce.html">lineforce</A></TD><TD ><A HREF = "fix_msd.html">msd</A></TD><TD ><A HREF = "fix_momentum.html">momentum</A></TD><TD ><A HREF = "fix_nph.html">nph</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_npt.html">npt</A></TD><TD ><A HREF = "fix_npt_asphere.html">npt/asphere</A></TD><TD ><A HREF = "fix_npt_sphere.html">npt/sphere</A></TD><TD ><A HREF = "fix_nve.html">nve</A></TD><TD ><A HREF = "fix_nve_asphere.html">nve/asphere</A></TD><TD ><A HREF = "fix_nve_limit.html">nve/limit</A></TD><TD ><A HREF = "fix_nve_noforce.html">nve/noforce</A></TD><TD ><A HREF = "fix_nve_sphere.html">nve/sphere</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_nvt.html">nvt</A></TD><TD ><A HREF = "fix_nvt_asphere.html">nvt/asphere</A></TD><TD ><A HREF = "fix_nvt_sllod.html">nvt/sllod</A></TD><TD ><A HREF = "fix_nvt_sphere.html">nvt/sphere</A></TD><TD ><A HREF = "fix_orient_fcc.html">orient/fcc</A></TD><TD ><A HREF = "fix_planeforce.html">planeforce</A></TD><TD ><A HREF = "fix_poems.html">poems</A></TD><TD ><A HREF = "fix_pour.html">pour</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_press_berendsen.html">press/berendsen</A></TD><TD ><A HREF = "fix_print.html">print</A></TD><TD ><A HREF = "fix_rdf.html">rdf</A></TD><TD ><A HREF = "fix_recenter.html">recenter</A></TD><TD ><A HREF = "fix_rigid.html">rigid</A></TD><TD ><A HREF = "fix_setforce.html">setforce</A></TD><TD ><A HREF = "fix_shake.html">shake</A></TD><TD ><A HREF = "fix_spring.html">spring</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_spring_rg.html">spring/rg</A></TD><TD ><A HREF = "fix_spring_self.html">spring/self</A></TD><TD ><A HREF = "fix_temp_berendsen.html">temp/berendsen</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale</A></TD><TD ><A HREF = "fix_thermal_conductivity.html">thermal/conductivity</A></TD><TD ><A HREF = "fix_tmd.html">tmd</A></TD><TD ><A HREF = "fix_viscosity.html">viscosity</A></TD><TD ><A HREF = "fix_viscous.html">viscous</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_wall_gran.html">wall/gran</A></TD><TD ><A HREF = "fix_wall_lj126.html">wall/lj126</A></TD><TD ><A HREF = "fix_wall_lj93.html">wall/lj93</A></TD><TD ><A HREF = "fix_wall_reflect.html">wall/reflect</A></TD><TD ><A HREF = "fix_wiggle.html">wiggle</A>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_addforce.html">addforce</A></TD><TD ><A HREF = "fix_aveforce.html">aveforce</A></TD><TD ><A HREF = "fix_ave_atom.html">ave/atom</A></TD><TD ><A HREF = "fix_ave_spatial.html">ave/spatial</A></TD><TD ><A HREF = "fix_ave_time.html">ave/time</A></TD><TD ><A HREF = "fix_bond_break.html">bond/break</A></TD><TD ><A HREF = "fix_bond_create.html">bond/create</A></TD><TD ><A HREF = "fix_bond_swap.html">bond/swap</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_com.html">com</A></TD><TD ><A HREF = "fix_coord_original.html">coord/original</A></TD><TD ><A HREF = "fix_deform.html">deform</A></TD><TD ><A HREF = "fix_deposit.html">deposit</A></TD><TD ><A HREF = "fix_drag.html">drag</A></TD><TD ><A HREF = "fix_dt_reset.html">dt/reset</A></TD><TD ><A HREF = "fix_efield.html">efield</A></TD><TD ><A HREF = "fix_enforce2d.html">enforce2d</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_freeze.html">freeze</A></TD><TD ><A HREF = "fix_gravity.html">gravity</A></TD><TD ><A HREF = "fix_gyration.html">gyration</A></TD><TD ><A HREF = "fix_heat.html">heat</A></TD><TD ><A HREF = "fix_indent.html">indent</A></TD><TD ><A HREF = "fix_langevin.html">langevin</A></TD><TD ><A HREF = "fix_lineforce.html">lineforce</A></TD><TD ><A HREF = "fix_msd.html">msd</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_momentum.html">momentum</A></TD><TD ><A HREF = "fix_nph.html">nph</A></TD><TD ><A HREF = "fix_npt.html">npt</A></TD><TD ><A HREF = "fix_npt_asphere.html">npt/asphere</A></TD><TD ><A HREF = "fix_npt_sphere.html">npt/sphere</A></TD><TD ><A HREF = "fix_nve.html">nve</A></TD><TD ><A HREF = "fix_nve_asphere.html">nve/asphere</A></TD><TD ><A HREF = "fix_nve_limit.html">nve/limit</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_nve_noforce.html">nve/noforce</A></TD><TD ><A HREF = "fix_nve_sphere.html">nve/sphere</A></TD><TD ><A HREF = "fix_nvt.html">nvt</A></TD><TD ><A HREF = "fix_nvt_asphere.html">nvt/asphere</A></TD><TD ><A HREF = "fix_nvt_sllod.html">nvt/sllod</A></TD><TD ><A HREF = "fix_nvt_sphere.html">nvt/sphere</A></TD><TD ><A HREF = "fix_orient_fcc.html">orient/fcc</A></TD><TD ><A HREF = "fix_planeforce.html">planeforce</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_poems.html">poems</A></TD><TD ><A HREF = "fix_pour.html">pour</A></TD><TD ><A HREF = "fix_press_berendsen.html">press/berendsen</A></TD><TD ><A HREF = "fix_print.html">print</A></TD><TD ><A HREF = "fix_rdf.html">rdf</A></TD><TD ><A HREF = "fix_recenter.html">recenter</A></TD><TD ><A HREF = "fix_rigid.html">rigid</A></TD><TD ><A HREF = "fix_setforce.html">setforce</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_shake.html">shake</A></TD><TD ><A HREF = "fix_spring.html">spring</A></TD><TD ><A HREF = "fix_spring_rg.html">spring/rg</A></TD><TD ><A HREF = "fix_spring_self.html">spring/self</A></TD><TD ><A HREF = "fix_temp_berendsen.html">temp/berendsen</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale</A></TD><TD ><A HREF = "fix_thermal_conductivity.html">thermal/conductivity</A></TD><TD ><A HREF = "fix_tmd.html">tmd</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_viscosity.html">viscosity</A></TD><TD ><A HREF = "fix_viscous.html">viscous</A></TD><TD ><A HREF = "fix_wall_gran.html">wall/gran</A></TD><TD ><A HREF = "fix_wall_lj126.html">wall/lj126</A></TD><TD ><A HREF = "fix_wall_lj93.html">wall/lj93</A></TD><TD ><A HREF = "fix_wall_reflect.html">wall/reflect</A></TD><TD ><A HREF = "fix_wiggle.html">wiggle</A>
|
||||
</TD></TR></TABLE></DIV>
|
||||
|
||||
<P>These are fix styles contributed by users, which can be used if
|
||||
|
||||
@ -110,8 +110,8 @@ line are arguments.
|
||||
(6) Text with spaces can be enclosed in double quotes so it will be
|
||||
treated as a single argument. See the "dump modify"_dump_modify.html
|
||||
or "fix print"_fix_print.html commands for examples. A '#' or '$'
|
||||
character that in text between double quotes will not be treated as a
|
||||
comment or substituted for as a variable.
|
||||
character that is in text between double quotes will not be treated as
|
||||
a comment or substituted for as a variable.
|
||||
|
||||
:line
|
||||
|
||||
@ -380,6 +380,8 @@ of each style or click on the style itself for a full description:
|
||||
"ave/atom"_fix_ave_atom.html,
|
||||
"ave/spatial"_fix_ave_spatial.html,
|
||||
"ave/time"_fix_ave_time.html,
|
||||
"bond/break"_fix_bond_break.html,
|
||||
"bond/create"_fix_bond_create.html,
|
||||
"bond/swap"_fix_bond_swap.html,
|
||||
"com"_fix_com.html,
|
||||
"coord/original"_fix_coord_original.html,
|
||||
|
||||
@ -42,8 +42,8 @@ See the discussion of the <I>loop</I> option in the
|
||||
</P>
|
||||
<P>Similarly, the <A HREF = "create_atoms.html">create_atoms</A> command generates a
|
||||
lattice of atoms. For the same physical system, the ordering and
|
||||
numbering of atoms (atom ID or tag) may be different depending on the
|
||||
number of processors.
|
||||
numbering of atoms by atom ID may be different depending on the number
|
||||
of processors.
|
||||
</P>
|
||||
<P>Some commands use random number generators which may be setup to
|
||||
produce different random number streams on each processor and hence
|
||||
|
||||
@ -39,8 +39,8 @@ See the discussion of the {loop} option in the
|
||||
|
||||
Similarly, the "create_atoms"_create_atoms.html command generates a
|
||||
lattice of atoms. For the same physical system, the ordering and
|
||||
numbering of atoms (atom ID or tag) may be different depending on the
|
||||
number of processors.
|
||||
numbering of atoms by atom ID may be different depending on the number
|
||||
of processors.
|
||||
|
||||
Some commands use random number generators which may be setup to
|
||||
produce different random number streams on each processor and hence
|
||||
|
||||
@ -48,9 +48,8 @@ assigned to other hybrid styles, use the style name (e.g. "harmonic")
|
||||
appropriate to that style. The BondBond and BondAngle coeffs for that
|
||||
angle type will then be ignored.
|
||||
</P>
|
||||
<P>An angle style of <I>none</I> can be specified as an argument to
|
||||
angle_style hybrid and the corresponding angle_coeff commands, if you
|
||||
desire to turn off certain angle types.
|
||||
<P>An angle style of <I>none</I> can be specified as the 2nd argument to the
|
||||
angle_coeff command, if you desire to turn off certain angle types.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
|
||||
@ -45,9 +45,8 @@ assigned to other hybrid styles, use the style name (e.g. "harmonic")
|
||||
appropriate to that style. The BondBond and BondAngle coeffs for that
|
||||
angle type will then be ignored.
|
||||
|
||||
An angle style of {none} can be specified as an argument to
|
||||
angle_style hybrid and the corresponding angle_coeff commands, if you
|
||||
desire to turn off certain angle types.
|
||||
An angle style of {none} can be specified as the 2nd argument to the
|
||||
angle_coeff command, if you desire to turn off certain angle types.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
|
||||
@ -41,9 +41,8 @@ coefficients 80.0, 1.2 for K, r0. All other bond types (2-N) would be
|
||||
computed with a <I>fene</I> potential with coefficients 30.0, 1.5, 1.0, 1.0
|
||||
for K, R0, epsilon, sigma.
|
||||
</P>
|
||||
<P>A bond style of <I>none</I> can be specified as an argument to bond_style
|
||||
hybrid and the corresponding bond_coeff commands, if you desire to
|
||||
turn off certain bond types.
|
||||
<P>A bond style of <I>none</I> can be specified as the 2nd argument to the
|
||||
bond_coeff command, if you desire to turn off certain bond types.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
|
||||
@ -38,9 +38,8 @@ coefficients 80.0, 1.2 for K, r0. All other bond types (2-N) would be
|
||||
computed with a {fene} potential with coefficients 30.0, 1.5, 1.0, 1.0
|
||||
for K, R0, epsilon, sigma.
|
||||
|
||||
A bond style of {none} can be specified as an argument to bond_style
|
||||
hybrid and the corresponding bond_coeff commands, if you desire to
|
||||
turn off certain bond types.
|
||||
A bond style of {none} can be specified as the 2nd argument to the
|
||||
bond_coeff command, if you desire to turn off certain bond types.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
|
||||
@ -50,9 +50,9 @@ to other hybrid styles, use the style name (e.g. "harmonic")
|
||||
appropriate to that style. The MiddleBondTorsion, etc coeffs for that
|
||||
dihedral type will then be ignored.
|
||||
</P>
|
||||
<P>A dihedral style of <I>none</I> can be specified as an argument to
|
||||
dihedral_style hybrid and the corresponding dihedral_coeff commands,
|
||||
if you desire to turn off certain dihedral types.
|
||||
<P>A dihedral style of <I>none</I> can be specified as the 2nd argument to the
|
||||
dihedral_coeff command, if you desire to turn off certain dihedral
|
||||
types.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
|
||||
@ -47,9 +47,9 @@ to other hybrid styles, use the style name (e.g. "harmonic")
|
||||
appropriate to that style. The MiddleBondTorsion, etc coeffs for that
|
||||
dihedral type will then be ignored.
|
||||
|
||||
A dihedral style of {none} can be specified as an argument to
|
||||
dihedral_style hybrid and the corresponding dihedral_coeff commands,
|
||||
if you desire to turn off certain dihedral types.
|
||||
A dihedral style of {none} can be specified as the 2nd argument to the
|
||||
dihedral_coeff command, if you desire to turn off certain dihedral
|
||||
types.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<I>xtc</I> args = none
|
||||
<I>xyz</I> args = none
|
||||
<I>custom</I> args = list of atom attributes
|
||||
possible attributes = tag, mol, type,
|
||||
possible attributes = id, mol, type,
|
||||
x, y, z, xs, ys, zs, xu, yu, zu, ix, iy, iz,
|
||||
vx, vy, vz, fx, fy, fz,
|
||||
q, mux, muy, muz,
|
||||
@ -41,7 +41,7 @@
|
||||
angmomx, angmomy, angmomz,
|
||||
quatw, quati, quatj, quatk, tqx, tqy, tqz,
|
||||
c_ID, c_ID[N], f_ID, f_ID[N], v_name
|
||||
tag = atom ID
|
||||
id = atom ID
|
||||
mol = molecule ID
|
||||
type = atom type
|
||||
x,y,z = unscaled atom coordinates
|
||||
@ -69,8 +69,8 @@
|
||||
</P>
|
||||
<PRE>dump myDump all atom 100 dump.atom
|
||||
dump 2 subgroup atom 50 dump.run.bin
|
||||
dump 4a all custom 100 dump.myforce.* tag type x y vx fx
|
||||
dump 4b flow custom 100 dump.%.myforce tag type c_myF[3] v_ke
|
||||
dump 4a all custom 100 dump.myforce.* id type x y vx fx
|
||||
dump 4b flow custom 100 dump.%.myforce id type c_myF[3] v_ke
|
||||
dump 1 all xtc 1000 file.xtc
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
@ -229,8 +229,8 @@ styles.
|
||||
<P>This section explains the atom quantities that can be specified as
|
||||
part of the <I>custom</I> style.
|
||||
</P>
|
||||
<P>The <I>tag</I>, <I>mol</I>, <I>type</I>, <I>x</I>, <I>y</I>, <I>z</I>, <I>vx</I>, <I>vy</I>, <I>vz</I>, <I>fx</I>, <I>fy</I>,
|
||||
<I>fz</I>, <I>q</I> keywords are self-explanatory. <I>Tag</I> is the atom ID. <I>Mol</I>
|
||||
<P>The <I>id</I>, <I>mol</I>, <I>type</I>, <I>x</I>, <I>y</I>, <I>z</I>, <I>vx</I>, <I>vy</I>, <I>vz</I>, <I>fx</I>, <I>fy</I>,
|
||||
<I>fz</I>, <I>q</I> keywords are self-explanatory. <I>Id</I> is the atom ID. <I>Mol</I>
|
||||
is the molecule ID, included in the data file for molecular systems.
|
||||
The <I>x</I>, <I>y</I>, <I>z</I> keywords write atom coordinates "unscaled", in the
|
||||
appropriate distance <A HREF = "units.html">units</A> (Angstroms, sigma, etc). Use
|
||||
|
||||
12
doc/dump.txt
12
doc/dump.txt
@ -24,7 +24,7 @@ args = list of arguments for a particular style :l
|
||||
{xtc} args = none
|
||||
{xyz} args = none
|
||||
{custom} args = list of atom attributes
|
||||
possible attributes = tag, mol, type,
|
||||
possible attributes = id, mol, type,
|
||||
x, y, z, xs, ys, zs, xu, yu, zu, ix, iy, iz,
|
||||
vx, vy, vz, fx, fy, fz,
|
||||
q, mux, muy, muz,
|
||||
@ -32,7 +32,7 @@ args = list of arguments for a particular style :l
|
||||
angmomx, angmomy, angmomz,
|
||||
quatw, quati, quatj, quatk, tqx, tqy, tqz,
|
||||
c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name
|
||||
tag = atom ID
|
||||
id = atom ID
|
||||
mol = molecule ID
|
||||
type = atom type
|
||||
x,y,z = unscaled atom coordinates
|
||||
@ -59,8 +59,8 @@ args = list of arguments for a particular style :l
|
||||
|
||||
dump myDump all atom 100 dump.atom
|
||||
dump 2 subgroup atom 50 dump.run.bin
|
||||
dump 4a all custom 100 dump.myforce.* tag type x y vx fx
|
||||
dump 4b flow custom 100 dump.%.myforce tag type c_myF\[3\] v_ke
|
||||
dump 4a all custom 100 dump.myforce.* id type x y vx fx
|
||||
dump 4b flow custom 100 dump.%.myforce id type c_myF\[3\] v_ke
|
||||
dump 1 all xtc 1000 file.xtc :pre
|
||||
|
||||
[Description:]
|
||||
@ -219,8 +219,8 @@ styles.
|
||||
This section explains the atom quantities that can be specified as
|
||||
part of the {custom} style.
|
||||
|
||||
The {tag}, {mol}, {type}, {x}, {y}, {z}, {vx}, {vy}, {vz}, {fx}, {fy},
|
||||
{fz}, {q} keywords are self-explanatory. {Tag} is the atom ID. {Mol}
|
||||
The {id}, {mol}, {type}, {x}, {y}, {z}, {vx}, {vy}, {vz}, {fx}, {fy},
|
||||
{fz}, {q} keywords are self-explanatory. {Id} is the atom ID. {Mol}
|
||||
is the molecule ID, included in the data file for molecular systems.
|
||||
The {x}, {y}, {z} keywords write atom coordinates "unscaled", in the
|
||||
appropriate distance "units"_units.html (Angstroms, sigma, etc). Use
|
||||
|
||||
@ -108,6 +108,8 @@ list of fix styles available in LAMMPS:
|
||||
<LI><A HREF = "fix_ave_atom.html">ave/atom</A> - compute per-atom time-averaged quantities
|
||||
<LI><A HREF = "fix_ave_spatial.html">ave/spatial</A> - output per-atom quantities by layer
|
||||
<LI><A HREF = "fix_ave_time.html">ave/time</A> - output time-averaged compute quantities
|
||||
<LI><A HREF = "fix_bond_break.html">bond/break</A> - break bonds on the fly
|
||||
<LI><A HREF = "fix_bond_create.html">bond/create</A> - create bonds on the fly
|
||||
<LI><A HREF = "fix_bond_swap.html">bond/swap</A> - Monte Carlo bond swapping
|
||||
<LI><A HREF = "fix_com.html">com</A> - compute a center-of-mass
|
||||
<LI><A HREF = "fix_coord_original.html">coord/original</A> - store original coords of each atom
|
||||
|
||||
@ -105,6 +105,8 @@ list of fix styles available in LAMMPS:
|
||||
"ave/atom"_fix_ave_atom.html - compute per-atom time-averaged quantities
|
||||
"ave/spatial"_fix_ave_spatial.html - output per-atom quantities by layer
|
||||
"ave/time"_fix_ave_time.html - output time-averaged compute quantities
|
||||
"bond/break"_fix_bond_break.html - break bonds on the fly
|
||||
"bond/create"_fix_bond_create.html - create bonds on the fly
|
||||
"bond/swap"_fix_bond_swap.html - Monte Carlo bond swapping
|
||||
"com"_fix_com.html - compute a center-of-mass
|
||||
"coord/original"_fix_coord_original.html - store original coords of each atom
|
||||
|
||||
@ -43,14 +43,6 @@ the corresponding timestep asymmetrically, energy conservation is only
|
||||
satisfied to O(dt), rather than to O(dt^2) as it would be for
|
||||
velocity-Verlet integration without reflective walls.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: This fix performs its operations at the same point in
|
||||
the timestep as other time integration fixes, such as <A HREF = "fix_nve.html">fix
|
||||
nve</A>, <A HREF = "fix_nvt.html">fix nvt</A>, or <A HREF = "fix_npt.html">fix npt</A>.
|
||||
Thus fix wall/reflect should normally be the last such fix specified
|
||||
in the input script, since the adjustments it makes to atom
|
||||
coordinates should come after the changes made by time integration.
|
||||
LAMMPS will warn you if your fixes are not ordered this way.
|
||||
</P>
|
||||
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
||||
</P>
|
||||
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
|
||||
|
||||
@ -40,14 +40,6 @@ the corresponding timestep asymmetrically, energy conservation is only
|
||||
satisfied to O(dt), rather than to O(dt^2) as it would be for
|
||||
velocity-Verlet integration without reflective walls.
|
||||
|
||||
IMPORTANT NOTE: This fix performs its operations at the same point in
|
||||
the timestep as other time integration fixes, such as "fix
|
||||
nve"_fix_nve.html, "fix nvt"_fix_nvt.html, or "fix npt"_fix_npt.html.
|
||||
Thus fix wall/reflect should normally be the last such fix specified
|
||||
in the input script, since the adjustments it makes to atom
|
||||
coordinates should come after the changes made by time integration.
|
||||
LAMMPS will warn you if your fixes are not ordered this way.
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
|
||||
@ -49,9 +49,9 @@ to other hybrid styles, use the style name (e.g. "harmonic")
|
||||
appropriate to that style. The AngleAngle coeffs for that improper
|
||||
type will then be ignored.
|
||||
</P>
|
||||
<P>An improper style of <I>none</I> can be specified as an argument to
|
||||
improper_style hybrid and the corresponding improper_coeff commands,
|
||||
if you desire to turn off certain improper types.
|
||||
<P>An improper style of <I>none</I> can be specified as the 2nd argument to
|
||||
the improper_coeff command, if you desire to turn off certain improper
|
||||
types.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
|
||||
@ -46,9 +46,9 @@ to other hybrid styles, use the style name (e.g. "harmonic")
|
||||
appropriate to that style. The AngleAngle coeffs for that improper
|
||||
type will then be ignored.
|
||||
|
||||
An improper style of {none} can be specified as an argument to
|
||||
improper_style hybrid and the corresponding improper_coeff commands,
|
||||
if you desire to turn off certain improper types.
|
||||
An improper style of {none} can be specified as the 2nd argument to
|
||||
the improper_coeff command, if you desire to turn off certain improper
|
||||
types.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
|
||||
@ -74,9 +74,19 @@ The tangential force between 2 particles grows according to a
|
||||
tangential spring and dash-pot model until Ft/Fn = xmu and is then
|
||||
held at Ft = Fn*xmu until the particles lose contact.
|
||||
</P>
|
||||
<P>For granular styles there are no individual atom type coefficients
|
||||
that can be set via the <A HREF = "pair_coeff.html">pair_coeff</A> command. All
|
||||
global settings are made via the pair_style command.
|
||||
<P>For granular styles there are no additional coefficients to set for
|
||||
each pair of atom types via the <A HREF = "pair_coeff.html">pair_coeff</A> command.
|
||||
All settings are global and are made via the pair_style command.
|
||||
However you must still use the <A HREF = "pair_coeff.html">pair_coeff</A> for all
|
||||
pairs of granular atom types. For example the command
|
||||
</P>
|
||||
<PRE>pair_coeff * *
|
||||
</PRE>
|
||||
<P>should be used if all atoms in the simulation interact via a granular
|
||||
potential. If a granular potential is used as part of <A HREF = "pair_hybrid.html">pair_style
|
||||
hybrid</A>, then specific atom types can be used in the
|
||||
pair_coeff command to determine which atoms interact via a granular
|
||||
potential.
|
||||
</P>
|
||||
<P>See the citation below for more discussion of granular potentials.
|
||||
</P>
|
||||
|
||||
@ -66,9 +66,19 @@ The tangential force between 2 particles grows according to a
|
||||
tangential spring and dash-pot model until Ft/Fn = xmu and is then
|
||||
held at Ft = Fn*xmu until the particles lose contact.
|
||||
|
||||
For granular styles there are no individual atom type coefficients
|
||||
that can be set via the "pair_coeff"_pair_coeff.html command. All
|
||||
global settings are made via the pair_style command.
|
||||
For granular styles there are no additional coefficients to set for
|
||||
each pair of atom types via the "pair_coeff"_pair_coeff.html command.
|
||||
All settings are global and are made via the pair_style command.
|
||||
However you must still use the "pair_coeff"_pair_coeff.html for all
|
||||
pairs of granular atom types. For example the command
|
||||
|
||||
pair_coeff * * :pre
|
||||
|
||||
should be used if all atoms in the simulation interact via a granular
|
||||
potential. If a granular potential is used as part of "pair_style
|
||||
hybrid"_pair_hybrid.html, then specific atom types can be used in the
|
||||
pair_coeff command to determine which atoms interact via a granular
|
||||
potential.
|
||||
|
||||
See the citation below for more discussion of granular potentials.
|
||||
|
||||
|
||||
@ -78,6 +78,7 @@ is different than the default.
|
||||
<LI><I>angle types</I> = # of angle types in system
|
||||
<LI><I>dihedral types</I> = # of dihedral types in system
|
||||
<LI><I>improper types</I> = # of improper types in system
|
||||
<LI><I>extra bond per atom</I> = leave space for this many new bonds per atom
|
||||
<LI><I>xlo xhi</I> = simulation box boundaries in x dimension
|
||||
<LI><I>ylo yhi</I> = simulation box boundaries in y dimension
|
||||
<LI><I>zlo zhi</I> = simulation box boundaries in z dimension
|
||||
@ -87,7 +88,7 @@ is different than the default.
|
||||
In any dimension, the system may be periodic or non-periodic; see the
|
||||
<A HREF = "boundary.html">boundary</A> command.
|
||||
</P>
|
||||
<P>If the <I>xy xz yz</I> line does not appear, then LAMMPS will set up an
|
||||
<P>If the <I>xy xz yz</I> line does not appear, LAMMPS will set up an
|
||||
axis-aligned (orthogonal) simulation box. If the line does appear,
|
||||
LAMMPS creates a non-orthogonal simulation domain shaped as a
|
||||
parallelepiped with triclinic symmetry. See the <A HREF = "region.html">region
|
||||
@ -139,6 +140,11 @@ specified box size to layout the 3d grid of processors. A huge
|
||||
parallel simulation to lose atoms if LAMMPS shrink-wraps the box
|
||||
around the atoms.
|
||||
</P>
|
||||
<P>The "extra bond per atom" setting should be used if new bonds will be
|
||||
added to the system when a simulation runs, e.g. by using the <A HREF = "fix_bond_create.html">fix
|
||||
bond/create</A> command. This will pre-allocate
|
||||
space in LAMMPS data structures for storing the new bonds.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P>These are the section keywords for the body of the file.
|
||||
|
||||
@ -73,6 +73,7 @@ is different than the default.
|
||||
{angle types} = # of angle types in system
|
||||
{dihedral types} = # of dihedral types in system
|
||||
{improper types} = # of improper types in system
|
||||
{extra bond per atom} = leave space for this many new bonds per atom
|
||||
{xlo xhi} = simulation box boundaries in x dimension
|
||||
{ylo yhi} = simulation box boundaries in y dimension
|
||||
{zlo zhi} = simulation box boundaries in z dimension
|
||||
@ -82,7 +83,7 @@ The initial simulation box size is determined by the lo/hi settings.
|
||||
In any dimension, the system may be periodic or non-periodic; see the
|
||||
"boundary"_boundary.html command.
|
||||
|
||||
If the {xy xz yz} line does not appear, then LAMMPS will set up an
|
||||
If the {xy xz yz} line does not appear, LAMMPS will set up an
|
||||
axis-aligned (orthogonal) simulation box. If the line does appear,
|
||||
LAMMPS creates a non-orthogonal simulation domain shaped as a
|
||||
parallelepiped with triclinic symmetry. See the "region
|
||||
@ -134,6 +135,11 @@ specified box size to layout the 3d grid of processors. A huge
|
||||
parallel simulation to lose atoms if LAMMPS shrink-wraps the box
|
||||
around the atoms.
|
||||
|
||||
The "extra bond per atom" setting should be used if new bonds will be
|
||||
added to the system when a simulation runs, e.g. by using the "fix
|
||||
bond/create"_fix_bond_create.html command. This will pre-allocate
|
||||
space in LAMMPS data structures for storing the new bonds.
|
||||
|
||||
:line
|
||||
|
||||
These are the section keywords for the body of the file.
|
||||
|
||||
@ -30,15 +30,14 @@ dimension. A replication factor of 1 in a dimension leaves the
|
||||
simulation domain unchanged.
|
||||
</P>
|
||||
<P>All properties of the atoms are replicated, including their
|
||||
velocities, which may or may not be desirable. New atom IDs (tags)
|
||||
are assigned to new atoms, as are molecule IDs. Bonds and other
|
||||
topology interactions are created between pairs of new atoms as well
|
||||
as between old and new atoms. This is done by using the image flag
|
||||
for each atom to "unwrap" it out of the periodic box before
|
||||
replicating it. This means that molecular bonds you specify in the
|
||||
original data file that span the periodic box should be between two
|
||||
atoms with image flags that differ by 1. This will allow them to be
|
||||
unwrapped appropriately.
|
||||
velocities, which may or may not be desirable. New atom IDs are
|
||||
assigned to new atoms, as are molecule IDs. Bonds and other topology
|
||||
interactions are created between pairs of new atoms as well as between
|
||||
old and new atoms. This is done by using the image flag for each atom
|
||||
to "unwrap" it out of the periodic box before replicating it. This
|
||||
means that molecular bonds you specify in the original data file that
|
||||
span the periodic box should be between two atoms with image flags
|
||||
that differ by 1. This will allow them to be unwrapped appropriately.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
|
||||
@ -27,15 +27,14 @@ dimension. A replication factor of 1 in a dimension leaves the
|
||||
simulation domain unchanged.
|
||||
|
||||
All properties of the atoms are replicated, including their
|
||||
velocities, which may or may not be desirable. New atom IDs (tags)
|
||||
are assigned to new atoms, as are molecule IDs. Bonds and other
|
||||
topology interactions are created between pairs of new atoms as well
|
||||
as between old and new atoms. This is done by using the image flag
|
||||
for each atom to "unwrap" it out of the periodic box before
|
||||
replicating it. This means that molecular bonds you specify in the
|
||||
original data file that span the periodic box should be between two
|
||||
atoms with image flags that differ by 1. This will allow them to be
|
||||
unwrapped appropriately.
|
||||
velocities, which may or may not be desirable. New atom IDs are
|
||||
assigned to new atoms, as are molecule IDs. Bonds and other topology
|
||||
interactions are created between pairs of new atoms as well as between
|
||||
old and new atoms. This is done by using the image flag for each atom
|
||||
to "unwrap" it out of the periodic box before replicating it. This
|
||||
means that molecular bonds you specify in the original data file that
|
||||
span the periodic box should be between two atoms with image flags
|
||||
that differ by 1. This will allow them to be unwrapped appropriately.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
|
||||
@ -45,6 +45,21 @@ write. See the <A HREF = "undump.html">undump</A> command or <A HREF = "restart
|
||||
if necessary. New specifications for dump and restart files can be
|
||||
given after the reset_timestep command is used.
|
||||
</P>
|
||||
<P>This command cannot be used when any fixes are defined that keep track
|
||||
of time or the timestep in order to perform time-dependent operations.
|
||||
Examples include the "ave" or "wall" fixes such as <A HREF = "fix_ave_spatial.html">fix
|
||||
ave/spatial</A> or <A HREF = "fix_wall_lj126.html">fix
|
||||
wall/lj126</A>, and also <A HREF = "fix_indent.html">fix
|
||||
indent</A>. The wall and indeter fixes allow for a
|
||||
velocity or other time-dependent parameter to be specified, which
|
||||
would be messed up by resetting the timestep.
|
||||
</P>
|
||||
<P>Restting the timestep will clear the flags for <A HREF = "compute.html">computes</A>
|
||||
that may have calculated some quantity from a previous run. This
|
||||
means that quantity cannot be accessed by a variable in between runs
|
||||
until a new run is performed. See the <A HREF = "variable.html">variable</A>
|
||||
command for more details.
|
||||
</P>
|
||||
<P><B>Related commands:</B> none
|
||||
</P>
|
||||
<P><B>Default:</B> none
|
||||
|
||||
@ -42,6 +42,21 @@ write. See the "undump"_undump.html command or "restart
|
||||
if necessary. New specifications for dump and restart files can be
|
||||
given after the reset_timestep command is used.
|
||||
|
||||
This command cannot be used when any fixes are defined that keep track
|
||||
of time or the timestep in order to perform time-dependent operations.
|
||||
Examples include the "ave" or "wall" fixes such as "fix
|
||||
ave/spatial"_fix_ave_spatial.html or "fix
|
||||
wall/lj126"_fix_wall_lj126.html, and also "fix
|
||||
indent"_fix_indent.html. The wall and indeter fixes allow for a
|
||||
velocity or other time-dependent parameter to be specified, which
|
||||
would be messed up by resetting the timestep.
|
||||
|
||||
Restting the timestep will clear the flags for "computes"_compute.html
|
||||
that may have calculated some quantity from a previous run. This
|
||||
means that quantity cannot be accessed by a variable in between runs
|
||||
until a new run is performed. See the "variable"_variable.html
|
||||
command for more details.
|
||||
|
||||
[Related commands:] none
|
||||
|
||||
[Default:] none
|
||||
|
||||
@ -157,6 +157,14 @@ command (e.g. print "Protein Rg = $r" as in the example above). This
|
||||
means that, if specified, the <I>every</I> option must be the last keyword
|
||||
used.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: For the <I>every</I> option, if the command includes a
|
||||
variable (e.g. $x or ${abc}), and you want the variable to be
|
||||
evaluated afresh each time the command is invoked, then you should
|
||||
enclose that command argument in double quotes, as in the "Protein Rg
|
||||
= $r" example above. If you don't do this, then the variable will be
|
||||
substituted for only once initially when the run command is parsed,
|
||||
just as occurs for any other command containing a variable.
|
||||
</P>
|
||||
<P>If the <I>pre</I> and <I>post</I> options are set to "no" when used with the
|
||||
<I>every</I> keyword, then the 1st run will do the full setup and the last
|
||||
run will print the full timing summary, but these operations will be
|
||||
|
||||
@ -150,6 +150,14 @@ command (e.g. print "Protein Rg = $r" as in the example above). This
|
||||
means that, if specified, the {every} option must be the last keyword
|
||||
used.
|
||||
|
||||
IMPORTANT NOTE: For the {every} option, if the command includes a
|
||||
variable (e.g. $x or $\{abc\}), and you want the variable to be
|
||||
evaluated afresh each time the command is invoked, then you should
|
||||
enclose that command argument in double quotes, as in the "Protein Rg
|
||||
= $r" example above. If you don't do this, then the variable will be
|
||||
substituted for only once initially when the run command is parsed,
|
||||
just as occurs for any other command containing a variable.
|
||||
|
||||
If the {pre} and {post} options are set to "no" when used with the
|
||||
{every} keyword, then the 1st run will do the full setup and the last
|
||||
run will print the full timing summary, but these operations will be
|
||||
|
||||
@ -13,105 +13,125 @@
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<PRE>special_bonds style args
|
||||
<PRE>special_bonds keyword values ...
|
||||
</PRE>
|
||||
<UL><LI>style = <I>charmm</I> or <I>amber</I> or <I>dihedral</I> or <I>explicit</I> (<I>explicit</I> can be omitted)
|
||||
<UL><LI>one or more keyword/value pairs may be appended
|
||||
|
||||
<PRE> <I>charmm</I> args = none
|
||||
<I>amber</I> args = none
|
||||
<I>dihedral</I> args = c1 c2 c3 c4 c5 c6
|
||||
c1,c2,c3 = weights (0.0 to 1.0) on pairwise Lennard-Jones interactions (and Coulomb if c4,c5,c6 are not specified)
|
||||
c4,c5,c6 = weights (0.0 to 1.0) on pairwise Coulomb interactions (optional)
|
||||
<I>explicit</I> args = c1 c2 c3 c4 c5 c6
|
||||
c1,c2,c3 = weights (0.0 to 1.0) on pairwise Lennard-Jones interactions (and Coulomb if c4,c5,c6 are not specified)
|
||||
c4,c5,c6 = weights (0.0 to 1.0) on pairwise Coulomb interactions (optional)
|
||||
<LI>keyword = <I>amber</I> or <I>charmm</I> or <I>fene</I> or <I>lj/coul</I> or <I>lj</I> or <I>coul</I> or <I>dihedral</I> or <I>extra</I>
|
||||
|
||||
<PRE> <I>amber</I> values = none
|
||||
<I>charmm</I> values = none
|
||||
<I>fene</I> values = none
|
||||
<I>lj/coul</I> values = w1,w2,w3
|
||||
w1,w2,w3 = weights (0.0 to 1.0) on pairwise Lennard-Jones and Coulombic interactions
|
||||
<I>lj</I> values = w1,w2,w3
|
||||
w1,w2,w3 = weights (0.0 to 1.0) on pairwise Lennard-Jones interactions
|
||||
<I>coul</I> values = w1,w2,w3
|
||||
w1,w2,w3 = weights (0.0 to 1.0) on pairwise Coulombic interactions
|
||||
<I>dihedral</I> value = <I>yes</I> or <I>no</I>
|
||||
<I>extra</I> value = N
|
||||
N = number of extra 1-2,1-3,1-4 interactions to save space for
|
||||
</PRE>
|
||||
|
||||
</UL>
|
||||
<P>Examples:
|
||||
</P>
|
||||
<PRE>special_bonds charmm
|
||||
special_bonds amber
|
||||
special_bonds dihedral 0.0 0.0 0.5
|
||||
special_bonds explicit 0 1 1
|
||||
special_bonds 0 1 1
|
||||
special_bonds 0.0 0.0 1.0 0.0 0.0 0.5
|
||||
<PRE>special_bonds amber
|
||||
special_bonds charmm
|
||||
special_bonds fene dihedral no
|
||||
special_bonds lj/coul 0.0 0.0 0.5 dihedral yes
|
||||
special_bonds lj 0.0 0.0 0.5 coul 0.0 0.0 0.0 dihedral yes
|
||||
special_bonds lj/coul 0 1 1 extra 2
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>Set the weighting coefficients for the pairwise force and energy
|
||||
contributions from atom pairs that are also bonded to each other
|
||||
directly or indirectly. For Lennard-Jones and Coulombic pairwise
|
||||
interactions, the 1st coefficient is the weighting factor on 1-2 atom
|
||||
pairs, which are those directly bonded to each other. The 2nd
|
||||
coefficient is the weighting factor on 1-3 atom pairs which are those
|
||||
separated by 2 bonds (e.g. the 2 H atoms in a water molecule). The
|
||||
3rd coefficient is the weighting factor on 1-4 atom pairs which are
|
||||
separated by 3 bonds (e.g. the 1st and 4th atoms in a dihedral
|
||||
interaction).
|
||||
<P>Set weighting coefficients for pairwise energy and force contributions
|
||||
from atom pairs that are also bonded to each other directly or
|
||||
indirectly. For Lennard-Jones (LJ) and Coulombic pairwise
|
||||
interactions, these coefficients come in sets of three. The 1st
|
||||
coefficient is the weighting factor on 1-2 atom pairs, which are those
|
||||
directly bonded to each other. The 2nd coefficient is the weighting
|
||||
factor on 1-3 atom pairs which are those separated by 2 bonds
|
||||
(e.g. the two H atoms in a water molecule). The 3rd coefficient is
|
||||
the weighting factor on 1-4 atom pairs which are those separated by 3
|
||||
bonds (e.g. the 1st and 4th atoms in a dihedral interaction). Thus if
|
||||
the 1-2 coefficient is set to 0.0, then the pairwise interaction is
|
||||
effectively turned off for all pairs of atoms bonded to each other.
|
||||
</P>
|
||||
<P>Note that for purposes of computing weighted pairwise interactions,
|
||||
1-3 and 1-4 interactions are NOT defined from the list of angles or
|
||||
dihedrals used by the simulation. Rather, they are inferred
|
||||
topologically by the set of bonds defined when atoms are read in from
|
||||
a file (<A HREF = "read_data.html">read_data</A> or
|
||||
<A HREF = "read_restart.html">read_restart</A>). Thus the set of 1-2,1-3,1-4
|
||||
interactions is the same whether angle and dihedral potentials are
|
||||
<P>IMPORTANT NOTE: For purposes of computing weighted pairwise
|
||||
interactions, 1-3 and 1-4 interactions are not defined from the list
|
||||
of angles or dihedrals used by the simulation. Rather, they are
|
||||
inferred topologically from the set of bonds defined when the
|
||||
simulation is defined from a data or restart file (see
|
||||
<A HREF = "read_data.html">read_data</A> or <A HREF = "read_restart.html">read_restart</A>
|
||||
commands). Thus the set of 1-2,1-3,1-4 interactions that the weights
|
||||
apply to is the same whether angle and dihedral potentials are
|
||||
computed or not, and remains the same even if bonds are constrained,
|
||||
or turned off, or removed during a simulation.
|
||||
</P>
|
||||
<P>The two exceptions to this rule are (a) if the special_bonds
|
||||
<I>dihedral</I> style is used (see below), or (b) if the
|
||||
<P>The two exceptions to this rule are (a) if the <I>dihedral</I> keyword is
|
||||
set to <I>yes</I> (see below), or (b) if the
|
||||
<A HREF = "delete_bonds.html">delete_bonds</A> command is used with the <I>special</I>
|
||||
option that recomputes the 1-2,1-3,1-4 topologies after bonds are
|
||||
deleted; see the <A HREF = "delete_bonds.html">delete_bonds</A> command for more
|
||||
details.
|
||||
</P>
|
||||
<P>The <I>charmm</I> style sets all 3 coefficients to 0.0 for both LJ and
|
||||
Coulombic interactions, which is the default for the CHARMM force
|
||||
field. In pair styles <I>lj/charmm/coul/charmm</I> and
|
||||
<I>lj/charmm/coul/long</I> the 1-4 coefficients are defined explicitly, and
|
||||
these pair-wise contributions are computed in the charmm dihedral
|
||||
style - see the <A HREF = "pair_coeff.html">pair_coeff</A> and
|
||||
<A HREF = "dihedral_style.html">dihedral_style</A> commands for more information.
|
||||
</P>
|
||||
<P>The <I>amber</I> style sets the 3 coefficients to 0.0 0.0 0.5 for LJ
|
||||
interactions and to 0.0 0.0 0.8333 for Coulombic interactions, which
|
||||
is the default for a particular version of the AMBER force field,
|
||||
<P>The <I>amber</I> keyword sets the 3 coefficients to 0.0, 0.0, 0.5 for LJ
|
||||
interactions and to 0.0, 0.0, 0.8333 for Coulombic interactions, which
|
||||
is the default for a commonly used version of the AMBER force field,
|
||||
where the last value is really 5/6.
|
||||
</P>
|
||||
<P>The <I>dihedral</I> style requires you to set 3 or 6 coefficients (see the
|
||||
<I>explicit</I> style), but it turns off the 1-4 weighting factor for
|
||||
individual atom pairs if they are not listed as the first and last
|
||||
<P>The <I>charmm</I> keyword sets the 3 coefficients to 0.0, 0.0, 0.0 for both
|
||||
LJ and Coulombic interactions, which is the default for a commonly
|
||||
used version of the CHARMM force field. Note that in pair styles
|
||||
<I>lj/charmm/coul/charmm</I> and <I>lj/charmm/coul/long</I> the 1-4 coefficients
|
||||
are defined explicitly, and these pairwise contributions are computed
|
||||
as part of the charmm dihedral style - see the
|
||||
<A HREF = "pair_coeff.html">pair_coeff</A> and <A HREF = "dihedral_style.html">dihedral_style</A>
|
||||
commands for more information.
|
||||
</P>
|
||||
<P>The <I>fene</I> keyword sets the 3 coefficients to 0.0, 1.0, 1.0 for both
|
||||
LJ and Coulombic interactions, which is consistent with a
|
||||
coarse-grained polymer model with <A HREF = "bond_fene.html">FENE bonds</A>.
|
||||
</P>
|
||||
<P>The <I>lj/coul</I>, <I>lj</I>, and <I>coul</I> keywords allow the 3 coefficients to
|
||||
be set explicitly. The <I>lj/coul</I> keyword sets both the LJ and
|
||||
Coulombic coefficients to the same 3 values. The <I>lj</I> and <I>coul</I>
|
||||
keywords only set either the LJ or Coulombic coefficients. Use both
|
||||
of them if you wish to set the LJ coefficients to different values
|
||||
than the Coulombic coefficients.
|
||||
</P>
|
||||
<P>The <I>dihedral</I> keyword allows the 1-4 weighting factor to be ignored
|
||||
for individual atom pairs if they are not listed as the first and last
|
||||
atoms in any dihedral defined in the simulation. For example, imagine
|
||||
you have set the 1-4 weighting factor to 0.5 and you have a linear
|
||||
molecule with 5 atoms and bonds as follows: 1-2-3-4-5. If your data
|
||||
file defines 1-2-3-4 as a dihedral, but does not define 2-3-4-5 as a
|
||||
dihedral, then the pairwise interaction between atoms 1 and 4 will be
|
||||
weighted by 0.5, but the interaction between atoms 2 and 5 will be
|
||||
unaffected (full weighting of 1.0). Note that if any of the other
|
||||
special_bond styles are used, then the 2,5 interaction would also be
|
||||
weighted by 0.5. The <I>dihedral</I> style is provided because some force
|
||||
fields follow this rule.
|
||||
the 1-4 weighting factor is set to 0.5 and you have a linear molecule
|
||||
with 5 atoms and bonds as follows: 1-2-3-4-5. If your data file
|
||||
defines 1-2-3-4 as a dihedral, but does not define 2-3-4-5 as a
|
||||
dihedral, then the pairwise interaction between atoms 1 and 4 will
|
||||
always be weighted by 0.5, but different force fields use different
|
||||
rules for weighting the pairwise interaction between atoms 2 and 5.
|
||||
If the <I>dihedral</I> keyword is specified as <I>yes</I>, then the pairwise
|
||||
interaction between atoms 2 and 5 will be unaffected (full weighting
|
||||
of 1.0). If the <I>dihedral</I> keyword is specified as <I>no</I> which is the
|
||||
default, then the 2,5 interaction will also be weighted by 0.5.
|
||||
</P>
|
||||
<P>The <I>explicit</I> style requires you to set 3 or 6 coefficients directly.
|
||||
If 3 are specified, they are used for both LJ and Coulombic
|
||||
interactions. If 6 are specified then the first 3 are LJ coefficients
|
||||
and the second 3 are Coulombic coefficients. Note that the <I>explicit</I>
|
||||
keyword itself is optional; the special_bonds command can just take 3
|
||||
or 6 numeric arguments by themselves.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: For a <A HREF = "units.html">lj units</A> system with <A HREF = "bond_fene.html">FENE
|
||||
bonds</A> a setting of special bonds 0 1 1 should be used.
|
||||
<P>The <I>extra</I> keyword is used when additional bonds will be created
|
||||
during a simulation run, e.g. by the <A HREF = "fix_bond_create.html">fix
|
||||
bond/create</A> command. A list of 1-2,1-3,1-4
|
||||
neighbors for each atom is calculated and stored by LAMMPS. If new
|
||||
bonds are created, the list needs to grow. Using the <I>extra</I> keyword
|
||||
leaves empty space in the list for N additional bonds to be added. If
|
||||
you do not do this, you may get an error when bonds are added.
|
||||
</P>
|
||||
<P><B>Restrictions:</B> none
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "delete_bonds.html">delete_bonds</A>
|
||||
<P><A HREF = "delete_bonds.html">delete_bonds</A>, <A HREF = "fix_bond_create.html">fix bond/create</A>
|
||||
</P>
|
||||
<P><B>Default:</B>
|
||||
</P>
|
||||
<PRE>special_bonds 0.0 0.0 0.0
|
||||
</PRE>
|
||||
<P>All 3 Lennard-Jones and 3 Coulobmic weighting coefficients = 0.0,
|
||||
dihedral = no, and extra = 0.
|
||||
</P>
|
||||
</HTML>
|
||||
|
||||
@ -10,101 +10,120 @@ special_bonds command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
special_bonds style args :pre
|
||||
special_bonds keyword values ... :pre
|
||||
|
||||
style = {charmm} or {amber} or {dihedral} or {explicit} ({explicit} can be omitted) :ulb,l
|
||||
{charmm} args = none
|
||||
{amber} args = none
|
||||
{dihedral} args = c1 c2 c3 c4 c5 c6
|
||||
c1,c2,c3 = weights (0.0 to 1.0) on pairwise Lennard-Jones interactions (and Coulomb if c4,c5,c6 are not specified)
|
||||
c4,c5,c6 = weights (0.0 to 1.0) on pairwise Coulomb interactions (optional)
|
||||
{explicit} args = c1 c2 c3 c4 c5 c6
|
||||
c1,c2,c3 = weights (0.0 to 1.0) on pairwise Lennard-Jones interactions (and Coulomb if c4,c5,c6 are not specified)
|
||||
c4,c5,c6 = weights (0.0 to 1.0) on pairwise Coulomb interactions (optional) :pre
|
||||
one or more keyword/value pairs may be appended :ulb,l
|
||||
keyword = {amber} or {charmm} or {fene} or {lj/coul} or {lj} or {coul} or {dihedral} or {extra} :l
|
||||
{amber} values = none
|
||||
{charmm} values = none
|
||||
{fene} values = none
|
||||
{lj/coul} values = w1,w2,w3
|
||||
w1,w2,w3 = weights (0.0 to 1.0) on pairwise Lennard-Jones and Coulombic interactions
|
||||
{lj} values = w1,w2,w3
|
||||
w1,w2,w3 = weights (0.0 to 1.0) on pairwise Lennard-Jones interactions
|
||||
{coul} values = w1,w2,w3
|
||||
w1,w2,w3 = weights (0.0 to 1.0) on pairwise Coulombic interactions
|
||||
{dihedral} value = {yes} or {no}
|
||||
{extra} value = N
|
||||
N = number of extra 1-2,1-3,1-4 interactions to save space for :pre
|
||||
:ule
|
||||
|
||||
Examples:
|
||||
|
||||
special_bonds charmm
|
||||
special_bonds amber
|
||||
special_bonds dihedral 0.0 0.0 0.5
|
||||
special_bonds explicit 0 1 1
|
||||
special_bonds 0 1 1
|
||||
special_bonds 0.0 0.0 1.0 0.0 0.0 0.5 :pre
|
||||
special_bonds charmm
|
||||
special_bonds fene dihedral no
|
||||
special_bonds lj/coul 0.0 0.0 0.5 dihedral yes
|
||||
special_bonds lj 0.0 0.0 0.5 coul 0.0 0.0 0.0 dihedral yes
|
||||
special_bonds lj/coul 0 1 1 extra 2 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Set the weighting coefficients for the pairwise force and energy
|
||||
contributions from atom pairs that are also bonded to each other
|
||||
directly or indirectly. For Lennard-Jones and Coulombic pairwise
|
||||
interactions, the 1st coefficient is the weighting factor on 1-2 atom
|
||||
pairs, which are those directly bonded to each other. The 2nd
|
||||
coefficient is the weighting factor on 1-3 atom pairs which are those
|
||||
separated by 2 bonds (e.g. the 2 H atoms in a water molecule). The
|
||||
3rd coefficient is the weighting factor on 1-4 atom pairs which are
|
||||
separated by 3 bonds (e.g. the 1st and 4th atoms in a dihedral
|
||||
interaction).
|
||||
Set weighting coefficients for pairwise energy and force contributions
|
||||
from atom pairs that are also bonded to each other directly or
|
||||
indirectly. For Lennard-Jones (LJ) and Coulombic pairwise
|
||||
interactions, these coefficients come in sets of three. The 1st
|
||||
coefficient is the weighting factor on 1-2 atom pairs, which are those
|
||||
directly bonded to each other. The 2nd coefficient is the weighting
|
||||
factor on 1-3 atom pairs which are those separated by 2 bonds
|
||||
(e.g. the two H atoms in a water molecule). The 3rd coefficient is
|
||||
the weighting factor on 1-4 atom pairs which are those separated by 3
|
||||
bonds (e.g. the 1st and 4th atoms in a dihedral interaction). Thus if
|
||||
the 1-2 coefficient is set to 0.0, then the pairwise interaction is
|
||||
effectively turned off for all pairs of atoms bonded to each other.
|
||||
|
||||
Note that for purposes of computing weighted pairwise interactions,
|
||||
1-3 and 1-4 interactions are NOT defined from the list of angles or
|
||||
dihedrals used by the simulation. Rather, they are inferred
|
||||
topologically by the set of bonds defined when atoms are read in from
|
||||
a file ("read_data"_read_data.html or
|
||||
"read_restart"_read_restart.html). Thus the set of 1-2,1-3,1-4
|
||||
interactions is the same whether angle and dihedral potentials are
|
||||
IMPORTANT NOTE: For purposes of computing weighted pairwise
|
||||
interactions, 1-3 and 1-4 interactions are not defined from the list
|
||||
of angles or dihedrals used by the simulation. Rather, they are
|
||||
inferred topologically from the set of bonds defined when the
|
||||
simulation is defined from a data or restart file (see
|
||||
"read_data"_read_data.html or "read_restart"_read_restart.html
|
||||
commands). Thus the set of 1-2,1-3,1-4 interactions that the weights
|
||||
apply to is the same whether angle and dihedral potentials are
|
||||
computed or not, and remains the same even if bonds are constrained,
|
||||
or turned off, or removed during a simulation.
|
||||
|
||||
The two exceptions to this rule are (a) if the special_bonds
|
||||
{dihedral} style is used (see below), or (b) if the
|
||||
The two exceptions to this rule are (a) if the {dihedral} keyword is
|
||||
set to {yes} (see below), or (b) if the
|
||||
"delete_bonds"_delete_bonds.html command is used with the {special}
|
||||
option that recomputes the 1-2,1-3,1-4 topologies after bonds are
|
||||
deleted; see the "delete_bonds"_delete_bonds.html command for more
|
||||
details.
|
||||
|
||||
The {charmm} style sets all 3 coefficients to 0.0 for both LJ and
|
||||
Coulombic interactions, which is the default for the CHARMM force
|
||||
field. In pair styles {lj/charmm/coul/charmm} and
|
||||
{lj/charmm/coul/long} the 1-4 coefficients are defined explicitly, and
|
||||
these pair-wise contributions are computed in the charmm dihedral
|
||||
style - see the "pair_coeff"_pair_coeff.html and
|
||||
"dihedral_style"_dihedral_style.html commands for more information.
|
||||
|
||||
The {amber} style sets the 3 coefficients to 0.0 0.0 0.5 for LJ
|
||||
interactions and to 0.0 0.0 0.8333 for Coulombic interactions, which
|
||||
is the default for a particular version of the AMBER force field,
|
||||
The {amber} keyword sets the 3 coefficients to 0.0, 0.0, 0.5 for LJ
|
||||
interactions and to 0.0, 0.0, 0.8333 for Coulombic interactions, which
|
||||
is the default for a commonly used version of the AMBER force field,
|
||||
where the last value is really 5/6.
|
||||
|
||||
The {dihedral} style requires you to set 3 or 6 coefficients (see the
|
||||
{explicit} style), but it turns off the 1-4 weighting factor for
|
||||
individual atom pairs if they are not listed as the first and last
|
||||
The {charmm} keyword sets the 3 coefficients to 0.0, 0.0, 0.0 for both
|
||||
LJ and Coulombic interactions, which is the default for a commonly
|
||||
used version of the CHARMM force field. Note that in pair styles
|
||||
{lj/charmm/coul/charmm} and {lj/charmm/coul/long} the 1-4 coefficients
|
||||
are defined explicitly, and these pairwise contributions are computed
|
||||
as part of the charmm dihedral style - see the
|
||||
"pair_coeff"_pair_coeff.html and "dihedral_style"_dihedral_style.html
|
||||
commands for more information.
|
||||
|
||||
The {fene} keyword sets the 3 coefficients to 0.0, 1.0, 1.0 for both
|
||||
LJ and Coulombic interactions, which is consistent with a
|
||||
coarse-grained polymer model with "FENE bonds"_bond_fene.html.
|
||||
|
||||
The {lj/coul}, {lj}, and {coul} keywords allow the 3 coefficients to
|
||||
be set explicitly. The {lj/coul} keyword sets both the LJ and
|
||||
Coulombic coefficients to the same 3 values. The {lj} and {coul}
|
||||
keywords only set either the LJ or Coulombic coefficients. Use both
|
||||
of them if you wish to set the LJ coefficients to different values
|
||||
than the Coulombic coefficients.
|
||||
|
||||
The {dihedral} keyword allows the 1-4 weighting factor to be ignored
|
||||
for individual atom pairs if they are not listed as the first and last
|
||||
atoms in any dihedral defined in the simulation. For example, imagine
|
||||
you have set the 1-4 weighting factor to 0.5 and you have a linear
|
||||
molecule with 5 atoms and bonds as follows: 1-2-3-4-5. If your data
|
||||
file defines 1-2-3-4 as a dihedral, but does not define 2-3-4-5 as a
|
||||
dihedral, then the pairwise interaction between atoms 1 and 4 will be
|
||||
weighted by 0.5, but the interaction between atoms 2 and 5 will be
|
||||
unaffected (full weighting of 1.0). Note that if any of the other
|
||||
special_bond styles are used, then the 2,5 interaction would also be
|
||||
weighted by 0.5. The {dihedral} style is provided because some force
|
||||
fields follow this rule.
|
||||
the 1-4 weighting factor is set to 0.5 and you have a linear molecule
|
||||
with 5 atoms and bonds as follows: 1-2-3-4-5. If your data file
|
||||
defines 1-2-3-4 as a dihedral, but does not define 2-3-4-5 as a
|
||||
dihedral, then the pairwise interaction between atoms 1 and 4 will
|
||||
always be weighted by 0.5, but different force fields use different
|
||||
rules for weighting the pairwise interaction between atoms 2 and 5.
|
||||
If the {dihedral} keyword is specified as {yes}, then the pairwise
|
||||
interaction between atoms 2 and 5 will be unaffected (full weighting
|
||||
of 1.0). If the {dihedral} keyword is specified as {no} which is the
|
||||
default, then the 2,5 interaction will also be weighted by 0.5.
|
||||
|
||||
The {explicit} style requires you to set 3 or 6 coefficients directly.
|
||||
If 3 are specified, they are used for both LJ and Coulombic
|
||||
interactions. If 6 are specified then the first 3 are LJ coefficients
|
||||
and the second 3 are Coulombic coefficients. Note that the {explicit}
|
||||
keyword itself is optional; the special_bonds command can just take 3
|
||||
or 6 numeric arguments by themselves.
|
||||
|
||||
IMPORTANT NOTE: For a "lj units"_units.html system with "FENE
|
||||
bonds"_bond_fene.html a setting of special bonds 0 1 1 should be used.
|
||||
The {extra} keyword is used when additional bonds will be created
|
||||
during a simulation run, e.g. by the "fix
|
||||
bond/create"_fix_bond_create.html command. A list of 1-2,1-3,1-4
|
||||
neighbors for each atom is calculated and stored by LAMMPS. If new
|
||||
bonds are created, the list needs to grow. Using the {extra} keyword
|
||||
leaves empty space in the list for N additional bonds to be added. If
|
||||
you do not do this, you may get an error when bonds are added.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"delete_bonds"_delete_bonds.html
|
||||
"delete_bonds"_delete_bonds.html, "fix bond/create"_fix_bond_create.html
|
||||
|
||||
[Default:]
|
||||
|
||||
special_bonds 0.0 0.0 0.0 :pre
|
||||
All 3 Lennard-Jones and 3 Coulobmic weighting coefficients = 0.0,
|
||||
dihedral = no, and extra = 0.
|
||||
|
||||
@ -69,17 +69,18 @@ evaluation later in the input script or during a simulation.
|
||||
referenced elsewhere in an input script to become part of a new input
|
||||
command. For variable styles that store multiple strings, the
|
||||
<A HREF = "next.html">next</A> command can be used to increment which string is
|
||||
assigned to the variable. Variables of style <I>equal</I> can be evaluated
|
||||
to produce a single numeric value which can be output either directly
|
||||
(see the <A HREF = "print.html">print</A>, <A HREF = "fix_print.html">fix print</A>, and <A HREF = "run.html">run
|
||||
every</A> commands) or as part of thermodynamic output (see the
|
||||
<A HREF = "thermo_style.html">thermo_style</A> command), or used as input to an
|
||||
averaging fix (see the <A HREF = "fix_ave/time">fix ave/time</A> command).
|
||||
Variables of style <I>atom</I> can be evaluated to produce one numeric
|
||||
value per atom which can be output to a dump file (see the <A HREF = "dump.html">dump
|
||||
custom</A> command) or used as input to an averaging fix (see
|
||||
the <A HREF = "fix_ave_spatial.html">fix ave/spatial</A> and <A HREF = "fix_ave_atom.html">fix
|
||||
ave/atom</A> commands).
|
||||
assigned to the variable. Variables of style <I>equal</I> store a formula
|
||||
which when evaluated produces a single numeric value which can be
|
||||
output either directly (see the <A HREF = "print.html">print</A>, <A HREF = "fix_print.html">fix
|
||||
print</A>, and <A HREF = "run.html">run every</A> commands) or as part
|
||||
of thermodynamic output (see the <A HREF = "thermo_style.html">thermo_style</A>
|
||||
command), or used as input to an averaging fix (see the <A HREF = "fix_ave/time">fix
|
||||
ave/time</A> command). Variables of style <I>atom</I> store a
|
||||
formula which when evaluated produces one numeric value per atom which
|
||||
can be output to a dump file (see the <A HREF = "dump.html">dump custom</A> command)
|
||||
or used as input to an averaging fix (see the <A HREF = "fix_ave_spatial.html">fix
|
||||
ave/spatial</A> and <A HREF = "fix_ave_atom.html">fix ave/atom</A>
|
||||
commands).
|
||||
</P>
|
||||
<P>In the discussion that follows, the "name" of the variable is the
|
||||
arbitrary string that is the 1st argument in the variable command.
|
||||
@ -92,6 +93,12 @@ evaluation of the string. Note that the same string can generate
|
||||
different values when it is evaluated at different times during a
|
||||
simulation.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: When the input script line that defines a variable of
|
||||
style <I>equal</I> or <I>atom</I> that contain a formula is encountered, the
|
||||
formula is NOT immediately evaluated and the result stored. See the
|
||||
discussion below about "Immediate Evaluation of Variables" if you want
|
||||
to do this.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: When a variable command is encountered in the input
|
||||
script and the variable name has already been specified, the command
|
||||
is ignored. This means variables can NOT be re-defined in an input
|
||||
@ -104,9 +111,9 @@ script.
|
||||
</P>
|
||||
<P>There are two exceptions to this rule. First, variables of style
|
||||
<I>equal</I> and <I>atom</I> ARE redefined each time the command is encountered.
|
||||
This allows them to be reset, when their formulas contain a
|
||||
substitution for another variable, e.g. $x. This can be useful in a
|
||||
loop.
|
||||
This only changes their associated formula if the formula contains a
|
||||
substitution for another variable, e.g. $x. But that can be useful,
|
||||
for example, in a loop.
|
||||
</P>
|
||||
<P>Second, as described below, if a variable is iterated on to the end of
|
||||
its list of strings via the <A HREF = "next.html">next</A> command, it is removed
|
||||
@ -214,7 +221,10 @@ atom whenever it is evaluated.
|
||||
different stages of the input script or at different times during a
|
||||
run. For example, if an <I>equal</I> variable is used in a <A HREF = "fix_print.html">fix
|
||||
print</A> command, different values could be printed each
|
||||
timestep it was invoked.
|
||||
timestep it was invoked. If you want a variable to be evaluated
|
||||
immediately, so that the result is stored by the variable instead of
|
||||
the string, see the section below on "Immediate Evaluation of
|
||||
Variables".
|
||||
</P>
|
||||
<P>The next command cannot be used with <I>equal</I> or <I>atom</I> style
|
||||
variables, since there is only one string.
|
||||
@ -253,10 +263,17 @@ can use formula elements that produce either global values or per-atom
|
||||
values.
|
||||
</P>
|
||||
<P>The thermo keywords allowed in a formula are those defined by the
|
||||
"thermo_style custom" command. Since many thermodynamic quantities
|
||||
are only computable after the a simulation has begun, these keywords
|
||||
cannot be used if a variable is evaluated before the first simulation
|
||||
begins.
|
||||
"thermo_style custom" command. Thermo keywords that require a
|
||||
<A HREF = "compute.html">compute</A> to calculate their values such as "temp" or
|
||||
"press", use computes stored and invoked by the thermo_style command.
|
||||
This means that you can only use those keywords in a variable if the
|
||||
style you are using with the thermo_style command (and the thermo
|
||||
keywords associated with that style) also define and use the needed
|
||||
compute. Note that some thermo keywords use a compute indirectly to
|
||||
calculate their value (e.g. the enthalpy keyword uses temp, pe, and
|
||||
pressure). If a variable is evaluated in an input script (not during
|
||||
a run), then the values accessed by the thermo keyword must be
|
||||
current. See the discussion below about "Variable Accuracy".
|
||||
</P>
|
||||
<P>Math operations are written in the usual way, where the "x" and "y" in
|
||||
the examples above can be another section of the formula. Operators
|
||||
@ -300,7 +317,10 @@ See the doc pages for individual computes to see which ones calculate
|
||||
global versus per-atom quantities. If the compute reference contains
|
||||
empty brackets, then per-atom values calculated by the compute are
|
||||
accessed. Otherwise a single value (global or per-atom) calculated by
|
||||
the compute is accessed.
|
||||
the compute is accessed. If a variable containing a compute is
|
||||
evaluated in an input script (not during a run), then the values
|
||||
accessed by the compute must be current. See the discussion below
|
||||
about "Variable Accuracy".
|
||||
</P>
|
||||
<P>The different kinds of compute references are as follows. M is a
|
||||
positive integer <= the number of vector values calculated by the
|
||||
@ -321,14 +341,17 @@ actual ID of the fix defined elsewhere in the input script. See the
|
||||
doc pages for individual computes to see which ones calculate global
|
||||
versus per-atom quantities. If the fix reference contains empty
|
||||
brackets, then per-atom values calculated by the fix are accessed.
|
||||
Otherwise a single value (global or per-atom) calculated by the
|
||||
fix is accessed.
|
||||
Otherwise a single value (global or per-atom) calculated by the fix is
|
||||
accessed.
|
||||
</P>
|
||||
<P>Note that some fixes only generate quantities on certain timesteps.
|
||||
If a variable attempts to access the fix on non-allowed timesteps, an
|
||||
error is generated. For example, the <A HREF = "fix_ave_time.html">fix ave/time</A>
|
||||
command may only generate averaged quantities every 100 steps. See
|
||||
the doc pages for individual fix commands for details.
|
||||
the doc pages for individual fix commands for details. If a variable
|
||||
containing a fix is evaluated in an input script (not during a run),
|
||||
then the values accessed by the fix should be current. See the
|
||||
discussion below about "Variable Accuracy".
|
||||
</P>
|
||||
<P>The different kinds of fix references are exactly the same as the
|
||||
compute references listed in the above table, where "c_" is replaced
|
||||
@ -358,48 +381,177 @@ print $a
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P>It is useful to understand the distinction between referencing a
|
||||
variable in a formula using the $x form instead of v_x. There is a
|
||||
subtle difference between the two references that has to do with when
|
||||
the evaluation of the included variable is done.
|
||||
<P>Immediate Evaluation of Variables:
|
||||
</P>
|
||||
<P>Referencing the variable as $x, the value of the include variable is
|
||||
substituted for immediately when the line is read from the input
|
||||
script, just as it would be in other input script command.
|
||||
<P>There is a difference between referencing a variable with a leading $
|
||||
sign (e.g. $x or ${abc}) versus with a leading "v_" (e.g. v_x or
|
||||
v_abc). The former can be used in any command, including a variable
|
||||
command, to force the immediate evaluation of the referenced variable
|
||||
and the substitution of its value into the command. The latter is a
|
||||
required kind of argument to some commands (e.g. the <A HREF = "fix_ave_spatial.html">fix
|
||||
ave/spatial</A> or <A HREF = "dump.html">dump custom</A> or
|
||||
<A HREF = "thermo_style.html">thermo_style</A> commands) if you wish it to evaluate
|
||||
a variable periodically during a run. It can also be used in a
|
||||
variable formula if you wish to reference a second variable. The
|
||||
second variable will be evaluated whenever the first variable is
|
||||
evaluated.
|
||||
</P>
|
||||
<P>This could be the desired behavior if a static value is desired. Or
|
||||
it could be the desired behavior for an equal-style variable if the
|
||||
variable command appears in a loop (see the <A HREF = "jump.html">jump</A> and
|
||||
<A HREF = "next.html">next</A> commands), since the substitution will be performed
|
||||
anew each time thru the loop as the command is re-read. Note that if
|
||||
the variable formula is enclosed in double quotes, this prevents
|
||||
variable substitution and thus an error will be generated when the
|
||||
variable formula is evaluated.
|
||||
<P>As an example, suppose you use this command in your input script to
|
||||
define the variable "v" as
|
||||
</P>
|
||||
<P>Referencing the variable as v_x, the value of the included variable
|
||||
will not be accessed until the variable formula is evaluated. Thus
|
||||
the value may change each time the evaluation is performed. This may
|
||||
also be desired behavior.
|
||||
</P>
|
||||
<P>As an example, if the current simulation box volume is 1000.0, then
|
||||
these lines:
|
||||
</P>
|
||||
<PRE>variable x equal vol
|
||||
variable y equal 2*$x
|
||||
<PRE>variable v equal vol
|
||||
</PRE>
|
||||
<P>will associate the equation string "2*1000.0" with variable y.
|
||||
<P>before a run where the simulation box size changes. You might think
|
||||
this will assign the initial volume to the variable "v". That is not
|
||||
the case. Rather it assigns a formula which evaluates the volume
|
||||
(using the thermo_style keyword "vol") to the variable "v". If you
|
||||
use the variable "v" in some other command like "fix ave/time" then
|
||||
the current volume of the box will be evaluated continuously during
|
||||
the run.
|
||||
</P>
|
||||
<P>By contrast, these lines:
|
||||
<P>If you want to store the initial volume of the system, you can do it
|
||||
this way:
|
||||
</P>
|
||||
<PRE>variable x equal vol
|
||||
variable y equal 2*v_x
|
||||
<PRE>variable v equal vol
|
||||
variable v0 equal $v
|
||||
</PRE>
|
||||
<P>will associate the equation string "2*v_x" with variable y.
|
||||
<P>The second command will force "v" to be evaluated (yielding the
|
||||
initial volume) and assign that value to the variable "v0". Thus the
|
||||
command
|
||||
</P>
|
||||
<P>Thus if the variable y were evaluated periodically during a run where
|
||||
the box volume changed, the resulting value would always be 2000.0 for
|
||||
the first case, but would change dynamically for the second case.
|
||||
<PRE>thermo_style custom step v_v v_v0
|
||||
</PRE>
|
||||
<P>would print out both the current and initial volume periodically
|
||||
during the run.
|
||||
</P>
|
||||
<P>Note that it is a mistake to enclose a variable formula in double
|
||||
quotes if it contains variables preceeded by $ signs. For example,
|
||||
</P>
|
||||
<PRE>variable vratio equal "${vfinal}/${v0}"
|
||||
</PRE>
|
||||
<P>This is because the quotes prevent variable substitution (see <A HREF = "Section_commands.html#3_2">this
|
||||
section</A> on parsing input script commands),
|
||||
and thus an error will occur when the formula for "vratio" is
|
||||
evaluated later.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P>Variable Accuracy:
|
||||
</P>
|
||||
<P>Obviously, LAMMPS attempts to evaluate variables containing formulas
|
||||
(<I>equal</I> and <I>atom</I> style variables) accurately whenever the
|
||||
evaluation is performed. Depending on what is included in the
|
||||
formula, this may require invoking a <A HREF = "compute.html">compute</A>, either
|
||||
directly or indirectly via a thermo keyword, or accessing a value
|
||||
calculated and stored by a <A HREF = "fix.html">fix</A>. If the compute is one that
|
||||
calculates the pressure or energy of the system, then these quantities
|
||||
need to be tallied during the evaluation of the interatomic potentials
|
||||
(pair, bond, etc) on timesteps that the variable will need the values.
|
||||
</P>
|
||||
<P>LAMMPS keeps track of all of this during a <A HREF = "run.html">run</A> or <A HREF = "minimize.html">energy
|
||||
minimization</A>. An error will be generated if you
|
||||
attempt to evaluate a variable on timesteps when it cannot produce
|
||||
accurate values. For example, if a <A HREF = "thermo_style.html">thermo_style
|
||||
custom</A> command prints a variable which accesses
|
||||
values stored by a <A HREF = "fix_ave_time.html">fix ave/time</A> command and the
|
||||
timesteps on which thermo output is generated are not multiples of the
|
||||
averaging frequency used in the fix command, then it is an error.
|
||||
</P>
|
||||
<P>However, your input script can also require variables to be evaluated
|
||||
before or after or inbetween runs. In this case, one of three things
|
||||
may happen.
|
||||
</P>
|
||||
<P>(1) The variable may be evaluated accurately. If it contains
|
||||
references to a compute or fix, and these values were calculated and
|
||||
stored on the last timestep of a preceeding run, then they can be
|
||||
accessed and used by the variable.
|
||||
</P>
|
||||
<P>(2) LAMMPS may not be able to evaluate the variable and generate an
|
||||
error. For example, if the variable formula requires a
|
||||
<A HREF = "compute.html">compute</A> to be invoked, either directly or indirectly
|
||||
via a thermo keyword, then the variable cannot be evaluated before the
|
||||
first run has occurred. The general rule is that if a variable uses a
|
||||
value calculated by a compute, and the variable is not being evaluated
|
||||
during a run, then the variable will not invoke the compute. Instead,
|
||||
it can only use the value stored by the compute, which for accuracy
|
||||
requires that the compute was already invoked on the same timestep
|
||||
during a preceeding run.
|
||||
</P>
|
||||
<P>Thus the way to get around this error is to perform a 0-timestep run
|
||||
before using the variable. For example, these commands
|
||||
</P>
|
||||
<PRE>variable t equal temp
|
||||
print "Initial temperature = $t"
|
||||
run 1000
|
||||
</PRE>
|
||||
<P>will generate an error if the run is the first run specified in the
|
||||
input script, because generating a value for the "t" variable requires
|
||||
a compute for calculating the temperature to be invoked.
|
||||
</P>
|
||||
<P>However, this sequence of commands would be fine:
|
||||
</P>
|
||||
<PRE>run 0
|
||||
variable t equal temp
|
||||
print "Initial temperature = $t"
|
||||
run 1000
|
||||
</PRE>
|
||||
<P>The 0-timestep run initializes and invokes various computes, including
|
||||
the one for temperature, so that the value it stores is current and
|
||||
can be accessed by the variable "t" after the run has completed. Note
|
||||
that a 0-timestep run does not alter the state of the system, so it
|
||||
does not change the input state for the 1000-timestep run that
|
||||
follows. Also note, that the 0-timestep run must actually use and
|
||||
invoke the compute in question (e.g. via <A HREF = "thermo_style.html">thermo</A> or
|
||||
<A HREF = "dump.html">dump</A> output) in order for it to enable the compute to be
|
||||
used in a variable after the run.
|
||||
</P>
|
||||
<P>Note that unlike computes, <A HREF = "fix.html">fixes</A> will never generate an
|
||||
error if their values are accessed by a variable in between runs.
|
||||
They always return some value to the variable. However, this value
|
||||
may not be what you expect if the fix has not yet calculated the
|
||||
quantity of interest. For example, the <A HREF = "fix_indent.html">fix indent</A>
|
||||
command stores the force on the indenter. But this is not computed
|
||||
until a run is performed. Thus if a variable attempts to print this
|
||||
value before the first run, values of zero will be output. Again,
|
||||
performing a 0-timestep run before printing the variable has the
|
||||
desired effect.
|
||||
</P>
|
||||
<P>(3) The variable may be evaluated incorrectly. And LAMMPS may have
|
||||
no way to detect this has occurred. Consider the following sequence
|
||||
of commands:
|
||||
</P>
|
||||
<PRE>pair_coeff 1 1 1.0 1.0
|
||||
run 1000
|
||||
pair_coeff 1 1 1.5 1.0
|
||||
variable e equal pe
|
||||
print "Final potential energy = $e"
|
||||
</PRE>
|
||||
<P>The first run is performed using one setting for the pairwise
|
||||
potential defined by the <A HREF = "pair_style.html">pair_style</A> and
|
||||
<A HREF = "pair_coeff.html">pair_coeff</A> commands. The potential energy is
|
||||
evaluated on the final timestep and stored by the <A HREF = "compute_pe.html">compute
|
||||
pe</A> compute (this is done by the
|
||||
<A HREF = "thermo_style.html">thermo_style</A> command). Then a pair coefficient is
|
||||
changed, altering the potential energy of the system. When the
|
||||
potential energy is printed via the "e" variable, LAMMPS will use the
|
||||
potential energy value stored by the <A HREF = "compute_pe.html">compute pe</A>
|
||||
compute, thinking it is current. There are many other commands which
|
||||
could alter the state of the system between runs, causing a variable
|
||||
to evaluate incorrectly.
|
||||
</P>
|
||||
<P>The solution to this issue is the same as for case (2) above, namely
|
||||
to perform a 0-timestep run before the variable is evaluated to insure
|
||||
the system is up-to-date. For example, this sequence of commands
|
||||
would print a potential energy that reflected the changed pairwise
|
||||
coefficient:
|
||||
</P>
|
||||
<PRE>pair_coeff 1 1 1.0 1.0
|
||||
run 1000
|
||||
pair_coeff 1 1 1.5 1.0
|
||||
run 0
|
||||
variable e equal pe
|
||||
print "Final potential energy = $e"
|
||||
</PRE>
|
||||
<HR>
|
||||
|
||||
<P><B>Restrictions:</B>
|
||||
|
||||
260
doc/variable.txt
260
doc/variable.txt
@ -63,17 +63,18 @@ Variables can be used in several ways in LAMMPS. A variable can be
|
||||
referenced elsewhere in an input script to become part of a new input
|
||||
command. For variable styles that store multiple strings, the
|
||||
"next"_next.html command can be used to increment which string is
|
||||
assigned to the variable. Variables of style {equal} can be evaluated
|
||||
to produce a single numeric value which can be output either directly
|
||||
(see the "print"_print.html, "fix print"_fix_print.html, and "run
|
||||
every"_run.html commands) or as part of thermodynamic output (see the
|
||||
"thermo_style"_thermo_style.html command), or used as input to an
|
||||
averaging fix (see the "fix ave/time"_fix_ave/time command).
|
||||
Variables of style {atom} can be evaluated to produce one numeric
|
||||
value per atom which can be output to a dump file (see the "dump
|
||||
custom"_dump.html command) or used as input to an averaging fix (see
|
||||
the "fix ave/spatial"_fix_ave_spatial.html and "fix
|
||||
ave/atom"_fix_ave_atom.html commands).
|
||||
assigned to the variable. Variables of style {equal} store a formula
|
||||
which when evaluated produces a single numeric value which can be
|
||||
output either directly (see the "print"_print.html, "fix
|
||||
print"_fix_print.html, and "run every"_run.html commands) or as part
|
||||
of thermodynamic output (see the "thermo_style"_thermo_style.html
|
||||
command), or used as input to an averaging fix (see the "fix
|
||||
ave/time"_fix_ave/time command). Variables of style {atom} store a
|
||||
formula which when evaluated produces one numeric value per atom which
|
||||
can be output to a dump file (see the "dump custom"_dump.html command)
|
||||
or used as input to an averaging fix (see the "fix
|
||||
ave/spatial"_fix_ave_spatial.html and "fix ave/atom"_fix_ave_atom.html
|
||||
commands).
|
||||
|
||||
In the discussion that follows, the "name" of the variable is the
|
||||
arbitrary string that is the 1st argument in the variable command.
|
||||
@ -86,6 +87,12 @@ evaluation of the string. Note that the same string can generate
|
||||
different values when it is evaluated at different times during a
|
||||
simulation.
|
||||
|
||||
IMPORTANT NOTE: When the input script line that defines a variable of
|
||||
style {equal} or {atom} that contain a formula is encountered, the
|
||||
formula is NOT immediately evaluated and the result stored. See the
|
||||
discussion below about "Immediate Evaluation of Variables" if you want
|
||||
to do this.
|
||||
|
||||
IMPORTANT NOTE: When a variable command is encountered in the input
|
||||
script and the variable name has already been specified, the command
|
||||
is ignored. This means variables can NOT be re-defined in an input
|
||||
@ -98,9 +105,9 @@ script.
|
||||
|
||||
There are two exceptions to this rule. First, variables of style
|
||||
{equal} and {atom} ARE redefined each time the command is encountered.
|
||||
This allows them to be reset, when their formulas contain a
|
||||
substitution for another variable, e.g. $x. This can be useful in a
|
||||
loop.
|
||||
This only changes their associated formula if the formula contains a
|
||||
substitution for another variable, e.g. $x. But that can be useful,
|
||||
for example, in a loop.
|
||||
|
||||
Second, as described below, if a variable is iterated on to the end of
|
||||
its list of strings via the "next"_next.html command, it is removed
|
||||
@ -208,7 +215,10 @@ Note that {equal} and {atom} variables can produce different values at
|
||||
different stages of the input script or at different times during a
|
||||
run. For example, if an {equal} variable is used in a "fix
|
||||
print"_fix_print.html command, different values could be printed each
|
||||
timestep it was invoked.
|
||||
timestep it was invoked. If you want a variable to be evaluated
|
||||
immediately, so that the result is stored by the variable instead of
|
||||
the string, see the section below on "Immediate Evaluation of
|
||||
Variables".
|
||||
|
||||
The next command cannot be used with {equal} or {atom} style
|
||||
variables, since there is only one string.
|
||||
@ -248,10 +258,17 @@ can use formula elements that produce either global values or per-atom
|
||||
values.
|
||||
|
||||
The thermo keywords allowed in a formula are those defined by the
|
||||
"thermo_style custom" command. Since many thermodynamic quantities
|
||||
are only computable after the a simulation has begun, these keywords
|
||||
cannot be used if a variable is evaluated before the first simulation
|
||||
begins.
|
||||
"thermo_style custom" command. Thermo keywords that require a
|
||||
"compute"_compute.html to calculate their values such as "temp" or
|
||||
"press", use computes stored and invoked by the thermo_style command.
|
||||
This means that you can only use those keywords in a variable if the
|
||||
style you are using with the thermo_style command (and the thermo
|
||||
keywords associated with that style) also define and use the needed
|
||||
compute. Note that some thermo keywords use a compute indirectly to
|
||||
calculate their value (e.g. the enthalpy keyword uses temp, pe, and
|
||||
pressure). If a variable is evaluated in an input script (not during
|
||||
a run), then the values accessed by the thermo keyword must be
|
||||
current. See the discussion below about "Variable Accuracy".
|
||||
|
||||
Math operations are written in the usual way, where the "x" and "y" in
|
||||
the examples above can be another section of the formula. Operators
|
||||
@ -295,7 +312,10 @@ See the doc pages for individual computes to see which ones calculate
|
||||
global versus per-atom quantities. If the compute reference contains
|
||||
empty brackets, then per-atom values calculated by the compute are
|
||||
accessed. Otherwise a single value (global or per-atom) calculated by
|
||||
the compute is accessed.
|
||||
the compute is accessed. If a variable containing a compute is
|
||||
evaluated in an input script (not during a run), then the values
|
||||
accessed by the compute must be current. See the discussion below
|
||||
about "Variable Accuracy".
|
||||
|
||||
The different kinds of compute references are as follows. M is a
|
||||
positive integer <= the number of vector values calculated by the
|
||||
@ -314,14 +334,17 @@ actual ID of the fix defined elsewhere in the input script. See the
|
||||
doc pages for individual computes to see which ones calculate global
|
||||
versus per-atom quantities. If the fix reference contains empty
|
||||
brackets, then per-atom values calculated by the fix are accessed.
|
||||
Otherwise a single value (global or per-atom) calculated by the
|
||||
fix is accessed.
|
||||
Otherwise a single value (global or per-atom) calculated by the fix is
|
||||
accessed.
|
||||
|
||||
Note that some fixes only generate quantities on certain timesteps.
|
||||
If a variable attempts to access the fix on non-allowed timesteps, an
|
||||
error is generated. For example, the "fix ave/time"_fix_ave_time.html
|
||||
command may only generate averaged quantities every 100 steps. See
|
||||
the doc pages for individual fix commands for details.
|
||||
the doc pages for individual fix commands for details. If a variable
|
||||
containing a fix is evaluated in an input script (not during a run),
|
||||
then the values accessed by the fix should be current. See the
|
||||
discussion below about "Variable Accuracy".
|
||||
|
||||
The different kinds of fix references are exactly the same as the
|
||||
compute references listed in the above table, where "c_" is replaced
|
||||
@ -349,47 +372,176 @@ then LAMMPS will run for a while when the print statement is invoked!
|
||||
|
||||
:line
|
||||
|
||||
It is useful to understand the distinction between referencing a
|
||||
variable in a formula using the $x form instead of v_x. There is a
|
||||
subtle difference between the two references that has to do with when
|
||||
the evaluation of the included variable is done.
|
||||
Immediate Evaluation of Variables:
|
||||
|
||||
Referencing the variable as $x, the value of the include variable is
|
||||
substituted for immediately when the line is read from the input
|
||||
script, just as it would be in other input script command.
|
||||
There is a difference between referencing a variable with a leading $
|
||||
sign (e.g. $x or $\{abc\}) versus with a leading "v_" (e.g. v_x or
|
||||
v_abc). The former can be used in any command, including a variable
|
||||
command, to force the immediate evaluation of the referenced variable
|
||||
and the substitution of its value into the command. The latter is a
|
||||
required kind of argument to some commands (e.g. the "fix
|
||||
ave/spatial"_fix_ave_spatial.html or "dump custom"_dump.html or
|
||||
"thermo_style"_thermo_style.html commands) if you wish it to evaluate
|
||||
a variable periodically during a run. It can also be used in a
|
||||
variable formula if you wish to reference a second variable. The
|
||||
second variable will be evaluated whenever the first variable is
|
||||
evaluated.
|
||||
|
||||
This could be the desired behavior if a static value is desired. Or
|
||||
it could be the desired behavior for an equal-style variable if the
|
||||
variable command appears in a loop (see the "jump"_jump.html and
|
||||
"next"_next.html commands), since the substitution will be performed
|
||||
anew each time thru the loop as the command is re-read. Note that if
|
||||
the variable formula is enclosed in double quotes, this prevents
|
||||
variable substitution and thus an error will be generated when the
|
||||
variable formula is evaluated.
|
||||
As an example, suppose you use this command in your input script to
|
||||
define the variable "v" as
|
||||
|
||||
Referencing the variable as v_x, the value of the included variable
|
||||
will not be accessed until the variable formula is evaluated. Thus
|
||||
the value may change each time the evaluation is performed. This may
|
||||
also be desired behavior.
|
||||
variable v equal vol :pre
|
||||
|
||||
As an example, if the current simulation box volume is 1000.0, then
|
||||
these lines:
|
||||
before a run where the simulation box size changes. You might think
|
||||
this will assign the initial volume to the variable "v". That is not
|
||||
the case. Rather it assigns a formula which evaluates the volume
|
||||
(using the thermo_style keyword "vol") to the variable "v". If you
|
||||
use the variable "v" in some other command like "fix ave/time" then
|
||||
the current volume of the box will be evaluated continuously during
|
||||
the run.
|
||||
|
||||
variable x equal vol
|
||||
variable y equal 2*$x :pre
|
||||
If you want to store the initial volume of the system, you can do it
|
||||
this way:
|
||||
|
||||
will associate the equation string "2*1000.0" with variable y.
|
||||
variable v equal vol
|
||||
variable v0 equal $v :pre
|
||||
|
||||
By contrast, these lines:
|
||||
The second command will force "v" to be evaluated (yielding the
|
||||
initial volume) and assign that value to the variable "v0". Thus the
|
||||
command
|
||||
|
||||
variable x equal vol
|
||||
variable y equal 2*v_x :pre
|
||||
thermo_style custom step v_v v_v0 :pre
|
||||
|
||||
will associate the equation string "2*v_x" with variable y.
|
||||
would print out both the current and initial volume periodically
|
||||
during the run.
|
||||
|
||||
Thus if the variable y were evaluated periodically during a run where
|
||||
the box volume changed, the resulting value would always be 2000.0 for
|
||||
the first case, but would change dynamically for the second case.
|
||||
Note that it is a mistake to enclose a variable formula in double
|
||||
quotes if it contains variables preceeded by $ signs. For example,
|
||||
|
||||
variable vratio equal "$\{vfinal\}/$\{v0\}" :pre
|
||||
|
||||
This is because the quotes prevent variable substitution (see "this
|
||||
section"_Section_commands.html#3_2 on parsing input script commands),
|
||||
and thus an error will occur when the formula for "vratio" is
|
||||
evaluated later.
|
||||
|
||||
:line
|
||||
|
||||
Variable Accuracy:
|
||||
|
||||
Obviously, LAMMPS attempts to evaluate variables containing formulas
|
||||
({equal} and {atom} style variables) accurately whenever the
|
||||
evaluation is performed. Depending on what is included in the
|
||||
formula, this may require invoking a "compute"_compute.html, either
|
||||
directly or indirectly via a thermo keyword, or accessing a value
|
||||
calculated and stored by a "fix"_fix.html. If the compute is one that
|
||||
calculates the pressure or energy of the system, then these quantities
|
||||
need to be tallied during the evaluation of the interatomic potentials
|
||||
(pair, bond, etc) on timesteps that the variable will need the values.
|
||||
|
||||
LAMMPS keeps track of all of this during a "run"_run.html or "energy
|
||||
minimization"_minimize.html. An error will be generated if you
|
||||
attempt to evaluate a variable on timesteps when it cannot produce
|
||||
accurate values. For example, if a "thermo_style
|
||||
custom"_thermo_style.html command prints a variable which accesses
|
||||
values stored by a "fix ave/time"_fix_ave_time.html command and the
|
||||
timesteps on which thermo output is generated are not multiples of the
|
||||
averaging frequency used in the fix command, then it is an error.
|
||||
|
||||
However, your input script can also require variables to be evaluated
|
||||
before or after or inbetween runs. In this case, one of three things
|
||||
may happen.
|
||||
|
||||
(1) The variable may be evaluated accurately. If it contains
|
||||
references to a compute or fix, and these values were calculated and
|
||||
stored on the last timestep of a preceeding run, then they can be
|
||||
accessed and used by the variable.
|
||||
|
||||
(2) LAMMPS may not be able to evaluate the variable and generate an
|
||||
error. For example, if the variable formula requires a
|
||||
"compute"_compute.html to be invoked, either directly or indirectly
|
||||
via a thermo keyword, then the variable cannot be evaluated before the
|
||||
first run has occurred. The general rule is that if a variable uses a
|
||||
value calculated by a compute, and the variable is not being evaluated
|
||||
during a run, then the variable will not invoke the compute. Instead,
|
||||
it can only use the value stored by the compute, which for accuracy
|
||||
requires that the compute was already invoked on the same timestep
|
||||
during a preceeding run.
|
||||
|
||||
Thus the way to get around this error is to perform a 0-timestep run
|
||||
before using the variable. For example, these commands
|
||||
|
||||
variable t equal temp
|
||||
print "Initial temperature = $t"
|
||||
run 1000 :pre
|
||||
|
||||
will generate an error if the run is the first run specified in the
|
||||
input script, because generating a value for the "t" variable requires
|
||||
a compute for calculating the temperature to be invoked.
|
||||
|
||||
However, this sequence of commands would be fine:
|
||||
|
||||
run 0
|
||||
variable t equal temp
|
||||
print "Initial temperature = $t"
|
||||
run 1000 :pre
|
||||
|
||||
The 0-timestep run initializes and invokes various computes, including
|
||||
the one for temperature, so that the value it stores is current and
|
||||
can be accessed by the variable "t" after the run has completed. Note
|
||||
that a 0-timestep run does not alter the state of the system, so it
|
||||
does not change the input state for the 1000-timestep run that
|
||||
follows. Also note, that the 0-timestep run must actually use and
|
||||
invoke the compute in question (e.g. via "thermo"_thermo_style.html or
|
||||
"dump"_dump.html output) in order for it to enable the compute to be
|
||||
used in a variable after the run.
|
||||
|
||||
Note that unlike computes, "fixes"_fix.html will never generate an
|
||||
error if their values are accessed by a variable in between runs.
|
||||
They always return some value to the variable. However, this value
|
||||
may not be what you expect if the fix has not yet calculated the
|
||||
quantity of interest. For example, the "fix indent"_fix_indent.html
|
||||
command stores the force on the indenter. But this is not computed
|
||||
until a run is performed. Thus if a variable attempts to print this
|
||||
value before the first run, values of zero will be output. Again,
|
||||
performing a 0-timestep run before printing the variable has the
|
||||
desired effect.
|
||||
|
||||
(3) The variable may be evaluated incorrectly. And LAMMPS may have
|
||||
no way to detect this has occurred. Consider the following sequence
|
||||
of commands:
|
||||
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
run 1000
|
||||
pair_coeff 1 1 1.5 1.0
|
||||
variable e equal pe
|
||||
print "Final potential energy = $e" :pre
|
||||
|
||||
The first run is performed using one setting for the pairwise
|
||||
potential defined by the "pair_style"_pair_style.html and
|
||||
"pair_coeff"_pair_coeff.html commands. The potential energy is
|
||||
evaluated on the final timestep and stored by the "compute
|
||||
pe"_compute_pe.html compute (this is done by the
|
||||
"thermo_style"_thermo_style.html command). Then a pair coefficient is
|
||||
changed, altering the potential energy of the system. When the
|
||||
potential energy is printed via the "e" variable, LAMMPS will use the
|
||||
potential energy value stored by the "compute pe"_compute_pe.html
|
||||
compute, thinking it is current. There are many other commands which
|
||||
could alter the state of the system between runs, causing a variable
|
||||
to evaluate incorrectly.
|
||||
|
||||
The solution to this issue is the same as for case (2) above, namely
|
||||
to perform a 0-timestep run before the variable is evaluated to insure
|
||||
the system is up-to-date. For example, this sequence of commands
|
||||
would print a potential energy that reflected the changed pairwise
|
||||
coefficient:
|
||||
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
run 1000
|
||||
pair_coeff 1 1 1.5 1.0
|
||||
run 0
|
||||
variable e equal pe
|
||||
print "Final potential energy = $e" :pre
|
||||
|
||||
:line
|
||||
|
||||
|
||||
Reference in New Issue
Block a user