git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13811 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
sjplimp 2015-07-31 23:59:10 +00:00
parent 7eb82ad620
commit 992d9ff3ea
8 changed files with 80 additions and 56 deletions

View File

@ -168,7 +168,7 @@ needed. For example:
</P>
<PRE>print "Volume = $v"
print 'Volume = $v'
if "$<I>steps</I> > 1000" then quit
if "${steps} > 1000" then quit
variable a string "red green blue &
purple orange cyan"
print """
@ -462,8 +462,8 @@ KOKKOS, o = USER-OMP, t = OPT.
<TR ALIGN="center"><TD ><A HREF = "compute_heat_flux.html">heat/flux</A></TD><TD ><A HREF = "compute_improper_local.html">improper/local</A></TD><TD ><A HREF = "compute_inertia_chunk.html">inertia/chunk</A></TD><TD ><A HREF = "compute_ke.html">ke</A></TD><TD ><A HREF = "compute_ke_atom.html">ke/atom</A></TD><TD ><A HREF = "compute_ke_rigid.html">ke/rigid</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_msd.html">msd</A></TD><TD ><A HREF = "compute_msd_chunk.html">msd/chunk</A></TD><TD ><A HREF = "compute_msd_nongauss.html">msd/nongauss</A></TD><TD ><A HREF = "compute_omega_chunk.html">omega/chunk</A></TD><TD ><A HREF = "compute_pair.html">pair</A></TD><TD ><A HREF = "compute_pair_local.html">pair/local</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_pe.html">pe (c)</A></TD><TD ><A HREF = "compute_pe_atom.html">pe/atom</A></TD><TD ><A HREF = "compute_plasticity_atom.html">plasticity/atom</A></TD><TD ><A HREF = "compute_pressure.html">pressure (c)</A></TD><TD ><A HREF = "compute_property_atom.html">property/atom</A></TD><TD ><A HREF = "compute_property_local.html">property/local</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_property_chunk.html">property/chunk</A></TD><TD ><A HREF = "compute_rdf.html">rdf</A></TD><TD ><A HREF = "compute_reduce.html">reduce</A></TD><TD ><A HREF = "compute_reduce.html">reduce/region</A></TD><TD ><A HREF = "compute_slice.html">slice</A></TD><TD ><A HREF = "compute_sna.html">sna/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_sna.html">snad/atom</A></TD><TD ><A HREF = "compute_sna.html">snav/atom</A></TD><TD ><A HREF = "compute_stress_atom.html">stress/atom</A></TD><TD ><A HREF = "compute_temp.html">temp (c)</A></TD><TD ><A HREF = "compute_temp_asphere.html">temp/asphere</A></TD><TD ><A HREF = "compute_temp_com.html">temp/com</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_property_chunk.html">property/chunk</A></TD><TD ><A HREF = "compute_rdf.html">rdf</A></TD><TD ><A HREF = "compute_reduce.html">reduce</A></TD><TD ><A HREF = "compute_reduce.html">reduce/region</A></TD><TD ><A HREF = "compute_slice.html">slice</A></TD><TD ><A HREF = "compute_sna_atom.html">sna/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_sna_atom.html">snad/atom</A></TD><TD ><A HREF = "compute_sna_atom.html">snav/atom</A></TD><TD ><A HREF = "compute_stress_atom.html">stress/atom</A></TD><TD ><A HREF = "compute_temp.html">temp (c)</A></TD><TD ><A HREF = "compute_temp_asphere.html">temp/asphere</A></TD><TD ><A HREF = "compute_temp_com.html">temp/com</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_temp_chunk.html">temp/chunk</A></TD><TD ><A HREF = "compute_temp_deform.html">temp/deform</A></TD><TD ><A HREF = "compute_temp_partial.html">temp/partial (c)</A></TD><TD ><A HREF = "compute_temp_profile.html">temp/profile</A></TD><TD ><A HREF = "compute_temp_ramp.html">temp/ramp</A></TD><TD ><A HREF = "compute_temp_region.html">temp/region</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_temp_sphere.html">temp/sphere</A></TD><TD ><A HREF = "compute_ti.html">ti</A></TD><TD ><A HREF = "compute_torque_chunk.html">torque/chunk</A></TD><TD ><A HREF = "compute_vacf.html">vacf</A></TD><TD ><A HREF = "compute_vcm_chunk.html">vcm/chunk</A></TD><TD ><A HREF = "compute_voronoi_atom.html">voronoi/atom</A>
</TD></TR></TABLE></DIV>

View File

@ -225,8 +225,8 @@ described above.
have to do it once. For the csh or tcsh shells, add something like
this to your ~/.cshrc file, one line for each of the two files:
</P>
<PRE>setenv PYTHONPATH $<I>PYTHONPATH</I>:/home/sjplimp/lammps/python
setenv LD_LIBRARY_PATH $<I>LD_LIBRARY_PATH</I>:/home/sjplimp/lammps/src
<PRE>setenv PYTHONPATH ${PYTHONPATH}:/home/sjplimp/lammps/python
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/sjplimp/lammps/src
</PRE>
<P>If you use the python/install.py script, you need to invoke it every
time you rebuild LAMMPS (as a shared library) or make changes to the

View File

@ -1138,11 +1138,11 @@ that use it.
<P>For the csh or tcsh shells, you would add something like this to your
~/.cshrc file:
</P>
<PRE>setenv LD_LIBRARY_PATH $<I>LD_LIBRARY_PATH</I>:/home/sjplimp/lammps/src
<PRE>setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/sjplimp/lammps/src
</PRE>
<H5><B>Calling the LAMMPS library:</B>
</H5>
<P>Either flavor of library (static or shared0 allows one or more LAMMPS
<P>Either flavor of library (static or shared) allows one or more LAMMPS
objects to be instantiated from the calling program.
</P>
<P>When used from a C++ program, all of LAMMPS is wrapped in a LAMMPS_NS

View File

@ -223,9 +223,9 @@ page</A>.
<LI><A HREF = "compute_reduce.html">reduce</A> - combine per-atom quantities into a single global value
<LI><A HREF = "compute_reduce.html">reduce/region</A> - same as compute reduce, within a region
<LI><A HREF = "compute_slice.html">slice</A> - extract values from global vector or array
<LI><A HREF = "compute_sna.html">sna/atom</A> - calculate bispectrum coefficients for each atom
<LI><A HREF = "compute_sna.html">snad/atom</A> - derivative of bispectrum coefficients for each atom
<LI><A HREF = "compute_sna.html">snav/atom</A> - virial contribution from bispectrum coefficients for each atom
<LI><A HREF = "compute_sna_atom.html">sna/atom</A> - calculate bispectrum coefficients for each atom
<LI><A HREF = "compute_sna_atom.html">snad/atom</A> - derivative of bispectrum coefficients for each atom
<LI><A HREF = "compute_sna_atom.html">snav/atom</A> - virial contribution from bispectrum coefficients for each atom
<LI><A HREF = "compute_stress_atom.html">stress/atom</A> - stress tensor for each atom
<LI><A HREF = "compute_temp.html">temp</A> - temperature of group of atoms
<LI><A HREF = "compute_temp_asphere.html">temp/asphere</A> - temperature of aspherical particles

View File

@ -93,11 +93,11 @@ as the following may be useful:
velocity all create 600.0 8675309 mom yes rot yes dist gaussian
fix NVE all nve
fix TFIX all langevin 600.0 0.0 100 24601
fix REST all restrain dihedral 2 1 3 8 0.0 5000.0 $<I>angle1</I> dihedral 3 1 2 9 0.0 5000.0 $<I>angle2</I>
fix REST all restrain dihedral 2 1 3 8 0.0 5000.0 ${angle1} dihedral 3 1 2 9 0.0 5000.0 ${angle2}
fix_modify REST energy yes
run 10000
fix TFIX all langevin 0.0 0.0 100 24601
fix REST all restrain dihedral 2 1 3 8 5000.0 5000.0 $<I>angle1</I> dihedral 3 1 2 9 5000.0 5000.0 $<I>angle2</I>
fix REST all restrain dihedral 2 1 3 8 5000.0 5000.0 ${angle1} dihedral 3 1 2 9 5000.0 5000.0 ${angle2}
fix_modify REST energy yes
run 10000
# sanity check for convergence

View File

@ -196,10 +196,43 @@ interactions bewteen pairs of atoms that are also 1-2, 1-3, and 1-4
neighbors in the molecular bond topology, as normally set by the
<A HREF = "special_bonds.html">special_bonds</A> command. Different weights can be
assigned to different pair hybrid sub-styles via the <A HREF = "pair_modify.html">pair_modify
special</A> command. This allows multiple force fields
to be used in a model of a hybrid system. See the
<A HREF = "pair_modify.html">pair_modify</A> doc page for details.
special</A> command. This allows multiple force fields
to be used in a model of a hybrid system, however, there is no consistent
approach to determine parameters automatically for the interactions
between the two force fields, this is only recommended when particles
described by the different force fields do not mix.
</P>
<P>Here is an example for mixing CHARMM and AMBER: The global <I>amber</I>
setting sets the 1-4 interactions to non-zero scaling factors and
then overrides them with 0.0 only for CHARMM:
</P>
<PRE>special_bonds amber
pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0
pair_modify pair lj/charmm/coul/long special lj/coul 0.0 0.0 0.0
</PRE>
<P>The this input achieves the same effect:
</P>
<PRE>special_bonds 0.0 0.0 0.1
pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0
pair_modify pair lj/cut/coul/long special lj 0.0 0.0 0.5
pair_modify pair lj/cut/coul/long special coul 0.0 0.0 0.83333333
pair_modify pair lj/charmm/coul/long special lj/coul 0.0 0.0 0.0
</PRE>
<P>Here is an example for mixing Tersoff with OPLS/AA based on
a data file that defines bonds for all atoms where for the
Tersoff part of the system the force constants for the bonded
interactions have been set to 0. Note the global settings are
effectively <I>lj/coul 0.0 0.0 0.5</I> as required for OPLS/AA:
</P>
<PRE>special_bonds lj/coul 1e-20 1e-20 0.5
pair_hybrid tersoff lj/cut/coul/long 12.0
pair_modify pair tersoff special lj/coul 1.0 1.0 1.0
</PRE>
<P>See the <A HREF = "pair_modify.html">pair_modify</A> doc page for details on
the specific syntax, requirements and restrictions.
</P>
<HR>
<P>The potential energy contribution to the overall system due to an
individual sub-style can be accessed and output via the <A HREF = "compute_pair.html">compute
pair</A> command.

View File

@ -17,14 +17,14 @@
</PRE>
<UL><LI>one or more keyword/value pairs may be listed
<LI>keyword = <I>pair</I> or <I>special</I> or <I>shift</I> or <I>mix</I> or <I>table</I> or <I>table/disp</I> or <I>tabinner</I> or <I>tabinner/disp</I> or <I>tail</I> or <I>compute</I>
<LI>keyword = <I>pair</I> or <I>shift</I> or <I>mix</I> or <I>table</I> or <I>table/disp</I> or <I>tabinner</I> or <I>tabinner/disp</I> or <I>tail</I> or <I>compute</I>
<PRE> <I>pair</I> values = sub-style N special which w1 wt2 wt3
<PRE> <I>pair</I> values = sub-style N <I>special</I> which wt1 wt2 wt3
sub-style = sub-style of <A HREF = "pair_hybrid.html">pair hybrid</A>
N = which instance of sub-style (only if sub-style is used multiple times)
<I>special</I> values = flavor w1 w2 w3
flavor = <I>lj/coul</I> or <I>lj</I> or <I>coul</I>
w1,w2,w3 = weights from 0.0 to 1.0 inclusive
<I>special</I> which wt1 wt2 wt3 = override <I>special_bonds</I> settings (optional)
which = <I>lj/coul</I> or <I>lj</I> or <I>coul</I>
w1,w2,w3 = 1-2, 1-3, and 1-4 weights from 0.0 to 1.0 inclusive
<I>mix</I> value = <I>geometric</I> or <I>arithmetic</I> or <I>sixthpower</I>
<I>shift</I> value = <I>yes</I> or <I>no</I>
<I>table</I> value = N
@ -42,10 +42,12 @@
</UL>
<P><B>Examples:</B>
</P>
<PRE>pair_modify shift yes mix geometric
<P>pair_modify shift yes mix geometric
pair_modify tail yes
pair_modify table 12
</PRE>
pair_modify table 12
pair_modify pair lj/cut compute no
pair_modify pair lj/cut/coul/long 1 special lj/coul 0.0 0.0 0.0:pre
</P>
<P><B>Description:</B>
</P>
<P>Modify the parameters of the currently defined pair style. Not all
@ -64,13 +66,10 @@ keywords will be applied to. Note that if the <I>pair</I> keyword is not
used, and the pair style is <I>hybrid</I> or <I>hybrid/overlay</I>, then all the
specified keywords will be applied to all sub-styles.
</P>
<P>If used, the <I>special</I> keyword must appear second in the list of
keywords, and must follow the <I>pair</I> keyword. Like the <I>pair</I>
keyword, it also can only be used with the <A HREF = "pair_hybrid.html">hybrid and
hybrid/overlay</A> pair styles. Its parameters are
similar to the <A HREF = "special_bonds.html">special_bonds</A> command, and it
overrides the special_bond settings for the specified sub-style. More
details are given below.
<P>The <I>special</I> keyword can only be used in conjunction with the <I>pair</I>
keyword and must directly follow it. It allows to override the
<A HREF = "special_bonds.html">special_bonds</A> settings for the specified sub-style.
More details are given below.
</P>
<P>The <I>mix</I> keyword affects pair coefficients for interactions between
atoms of type I and J, when I != J and the coefficients are not
@ -216,36 +215,28 @@ pair style be defined.
<H5>Use of <I>special</I> keyword
</H5>
<P>The <I>special</I> keyword requires 4 values similar to those specified
with the <A HREF = "special_bonds.html">special_bonds</A> command, <I>flavor</I> and
w1,w2,w3. The <I>flavor</I> argument can be <I>lj</I> to change the
Lennard-Jones settings, <I>coul</I> to change the Coulombic settings, or
<I>lj/coul</I> to change both to the same set of 3 values. The w1,w2,w3
<P>The <I>special</I> keyword allows to override the 1-2, 1-3, and 1-4
exclusion settings for individual sub-styles of a
<A HREF = "pair_hybrid.html">hybrid pair style</A>. It requires 4 arguments similar
to the <A HREF = "special_bonds.html">special_bonds</A> command, <I>which</I> and
wt1,wt2,wt3. The <I>which</I> argument can be <I>lj</I> to change the
Lennard-Jones settings, <I>coul</I> to change the Coulombic settings,
or <I>lj/coul</I> to change both to the same set of 3 values. The wt1,wt2,wt3
values are numeric weights from 0.0 to 1.0 inclusive, for the 1-2,
1-3, and 1-4 bond topology neighbors. For example, these commands
</P>
<PRE>special_bonds lj/coul 0.0 0.0 0.1
pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0
pair_modify pair lj/charmm/coul/long special lj/coul 0.0 0.0 0.0
pair_modify pair lj/cut/coul/long special lj 0.0 0.0 0.5
pair_modify pair lj/cut/coul/long special coul 0.0 0.0 0.8333
</PRE>
<P>show how to use both the CHARMM and AMBER force fields in a single
simulation. The first pair modify command sets the special bonds to
CHARMM values (all 0.0). The last 2 pair modify commands set the
standard AMBER values for LJ and Coulombic weights.
1-3, and 1-4 bond topology neighbors, respectively. The <I>special</I>
keyword can only be used in conjunction with the <I>pair</I> keyword
and has to directly follow it.
</P>
<P>IMPORTANT NOTE: The global settings specified by the
<A HREF = "special_bonds.html">special_bonds</A> command affect the construction of
neighbor lists. Weights of 0.0 (for 1-2, 1-3, or 1-4 neighbors)
exclude those pairs from the neighbor list entirely. Weights of 1.0
store the neighbor with no weighting applied. The format of the
neighbor list cannot be changed by setting a sub-style weight to a
non-zero or non-one value. Thus an error is generated if the new
sub-style value is not 0.0 (or 1.0) when the global setting is 0.0 (or
1.0). Note that as in the example above, the global factor can simply
be set a value other than 0.0 or 1.0, then overridden by any of the
sub-styles with a value that is 0.0 or 1.0.
store the neighbor with no weighting applied. Thus only global values
different from exactly 0.0 or 1.0 can be overridden and an error
is generated if the requested setting is not compatible with the
global setting. Substituting 1.0e-10 for 0.0 and 0.9999999999 for
1.0 is usually a sufficient workaround in this case without causing
a significant error.
</P>
<HR>

View File

@ -64,7 +64,7 @@ def loop(lmpptr,N,cut0):
<PRE> for i in range(N):
cut = cut0 + i*0.1
lmp.set_variable("cut",cut) # set a variable in LAMMPS
lmp.command("pair_style lj/cut $<I>cut</I>") # LAMMPS commands
lmp.command("pair_style lj/cut ${cut}") # LAMMPS commands
lmp.command("pair_coeff * * 1.0 1.0")
lmp.command("run 100")
"""
@ -332,7 +332,7 @@ which loads and runs the following function from examples/python/funcs.py:
cut = cut0 + i*0.1
</PRE>
<PRE> lmp.set_variable("cut",cut) # set a variable in LAMMPS
lmp.command("pair_style lj/cut $<I>cut</I>") # LAMMPS command
lmp.command("pair_style lj/cut ${cut}") # LAMMPS command
#lmp.command("pair_style lj/cut %d" % cut) # LAMMPS command option
</PRE>
<PRE> lmp.command("pair_coeff * * 1.0 1.0") # ditto