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

This commit is contained in:
sjplimp 2014-07-28 18:46:39 +00:00
parent 6751f3508a
commit 16dc820a58
2 changed files with 91 additions and 3 deletions

View File

@ -31,7 +31,7 @@
</PRE>
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>mol</I> or <I>basis</I> or <I>remap</I> or <I>units</I>
<LI>keyword = <I>mol</I> or <I>basis</I> or <I>remap</I> or <I>var</I> or <I>set</I> or <I>units</I>
<PRE> <I>mol</I> value = template-ID seed
template-ID = ID of molecule template specified in a separate <A HREF = "molecule.html">molecule</A> command
@ -40,6 +40,10 @@
M = which basis atom
itype = atom type (1-N) to assign to this basis atom
<I>remap</I> value = <I>yes</I> or <I>no</I>
<I>var</I> value = name = variable name to evaluate for test of atom creation
<I>set</I> values = dim vname
dim = <I>x</I> or <I>y</I> or <I>z</I>
name = name of variable to set with x,y,z atom position
<I>units</I> value = <I>lattice</I> or <I>box</I>
<I>lattice</I> = the geometry is defined in lattice units
<I>box</I> = the geometry is defined in simulation box units
@ -51,6 +55,7 @@
<PRE>create_atoms 1 box
create_atoms 3 region regsphere basis 2 3
create_atoms 3 single 0 0 5
create_atoms 1 box var v set x xpos set y ypos
</PRE>
<P><B>Description:</B>
</P>
@ -189,6 +194,45 @@ box, it will mapped back into the box, assuming the relevant
dimensions are periodic. If it is set to <I>no</I>, no remapping is done
and no particle is created if its position is outside the box.
</P>
<P>The <I>var</I> and <I>set</I> keywords can be used to provide a criterion for
accepting or rejecting the addition of an individual atom, based on
its coordinates. The <I>vname</I> specified for the <I>var</I> keyword is the
name of an <A HREF = "variable.html">equal-style variable</A> which should evaluate
to a zero or non-zero value based on one or two or three variables
which will store the x, y, or z coordinates of an atom (one variable
per coordinate). These other variables must be <A HREF = "variable.html">equal-style
variables</A> defined in the input script, but their
formula can by anything. The <I>set</I> keyword is used to identify the
names of these other variables, one variable for the x-coordinate of a
created atom, one for y, and one for z.
</P>
<P>When an atom is created, its x, y, or z coordinates override the
formula for any <I>set</I> variable that is defined. The <I>var</I> variable is
then evaluated. If the returned value is 0.0, the atom is not
created. If it is non-zero, the atom is created.
</P>
<P>As an example, these commands can be used in a 2d simulation, to
create a sinusoidal surface. Note that the surface is "rough" due to
individual lattice points being "above" or "below" the mathematical
expression for the sinusoidal curve. If a finer lattice were used,
the sinusoid would appear to be "smoother". Also note the use of the
"xlat" and "ylat" <A HREF = "thermo_style.html">thermo_style</A> keywords which
converts lattice spacings to distance. Click on the image for a
larger version.
</P>
<PRE>variable x equal 100
variable y equal 25
lattice hex 0.8442
region box block 0 $x 0 $y -0.5 0.5
create_box 1 box
</PRE>
<PRE>variable xx equal 0.0
variable yy equal 0.0
variable v equal "(0.2*v_y*ylat * cos(v_xx/xlat * 2.0*PI*4.0/v_x) + 0.5*v_y*ylat - v_yy) > 0.0"
create_atoms 1 box var v set x xx set y yy
</PRE>
<CENTER><A HREF = "JPG/sinusoid.jpg"><IMG SRC = "JPG/sinusoid_small.jpg"></A>
</CENTER>
<P>The <I>units</I> keyword determines the meaning of the distance units used
to specify the coordinates of the one particle created by the <I>single</I>
style. A <I>box</I> value selects standard distance units as defined by

View File

@ -24,7 +24,7 @@ style = {box} or {region} or {single} or {random} :l
seed = random # seed (positive integer)
region-ID = create atoms within this region, use NULL for entire simulation box :pre
zero or more keyword/value pairs may be appended :l
keyword = {mol} or {basis} or {remap} or {units} :l
keyword = {mol} or {basis} or {remap} or {var} or {set} or {units} :l
{mol} value = template-ID seed
template-ID = ID of molecule template specified in a separate "molecule"_molecule.html command
seed = random # seed (positive integer)
@ -32,6 +32,10 @@ keyword = {mol} or {basis} or {remap} or {units} :l
M = which basis atom
itype = atom type (1-N) to assign to this basis atom
{remap} value = {yes} or {no}
{var} value = name = variable name to evaluate for test of atom creation
{set} values = dim vname
dim = {x} or {y} or {z}
name = name of variable to set with x,y,z atom position
{units} value = {lattice} or {box}
{lattice} = the geometry is defined in lattice units
{box} = the geometry is defined in simulation box units :pre
@ -41,7 +45,8 @@ keyword = {mol} or {basis} or {remap} or {units} :l
create_atoms 1 box
create_atoms 3 region regsphere basis 2 3
create_atoms 3 single 0 0 5 :pre
create_atoms 3 single 0 0 5
create_atoms 1 box var v set x xpos set y ypos :pre
[Description:]
@ -180,6 +185,45 @@ box, it will mapped back into the box, assuming the relevant
dimensions are periodic. If it is set to {no}, no remapping is done
and no particle is created if its position is outside the box.
The {var} and {set} keywords can be used to provide a criterion for
accepting or rejecting the addition of an individual atom, based on
its coordinates. The {vname} specified for the {var} keyword is the
name of an "equal-style variable"_variable.html which should evaluate
to a zero or non-zero value based on one or two or three variables
which will store the x, y, or z coordinates of an atom (one variable
per coordinate). These other variables must be "equal-style
variables"_variable.html defined in the input script, but their
formula can by anything. The {set} keyword is used to identify the
names of these other variables, one variable for the x-coordinate of a
created atom, one for y, and one for z.
When an atom is created, its x, y, or z coordinates override the
formula for any {set} variable that is defined. The {var} variable is
then evaluated. If the returned value is 0.0, the atom is not
created. If it is non-zero, the atom is created.
As an example, these commands can be used in a 2d simulation, to
create a sinusoidal surface. Note that the surface is "rough" due to
individual lattice points being "above" or "below" the mathematical
expression for the sinusoidal curve. If a finer lattice were used,
the sinusoid would appear to be "smoother". Also note the use of the
"xlat" and "ylat" "thermo_style"_thermo_style.html keywords which
converts lattice spacings to distance. Click on the image for a
larger version.
variable x equal 100
variable y equal 25
lattice hex 0.8442
region box block 0 $x 0 $y -0.5 0.5
create_box 1 box :pre
variable xx equal 0.0
variable yy equal 0.0
variable v equal "(0.2*v_y*ylat * cos(v_xx/xlat * 2.0*PI*4.0/v_x) + 0.5*v_y*ylat - v_yy) > 0.0"
create_atoms 1 box var v set x xx set y yy :pre
:c,image(JPG/sinusoid_small.jpg,JPG/sinusoid.jpg)
The {units} keyword determines the meaning of the distance units used
to specify the coordinates of the one particle created by the {single}
style. A {box} value selects standard distance units as defined by