Added triclinic cell keywords and tilt factor scaling options

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6429 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
athomps 2011-06-16 16:03:29 +00:00
parent a78c881832
commit 0511b7caa1
6 changed files with 110 additions and 24 deletions

View File

@ -755,8 +755,8 @@ See the <A HREF = "dump.html">dump</A> command for more information on XTC files
particles. The <A HREF = "boundary.html">boundary</A> command sets the boundary
conditions of the box (periodic, non-periodic, etc). The orthogonal
box has its "origin" at (xlo,ylo,zlo) and is defined by 3 edge vectors
starting from the origin given by A = (xhi-xlo,0,0); B =
(0,yhi-ylo,0); C = (0,0,zhi-zlo). The 6 parameters
starting from the origin given by <B>a</B> = (xhi-xlo,0,0); <B>b</B> =
(0,yhi-ylo,0); <B>c</B> = (0,0,zhi-zlo). The 6 parameters
(xlo,xhi,ylo,yhi,zlo,zhi) are defined at the time the simluation box
is created, e.g. by the <A HREF = "create_box.html">create_box</A> or
<A HREF = "read_data.html">read_data</A> or <A HREF = "read_restart.html">read_restart</A>
@ -768,14 +768,14 @@ custom</A> command.
<P>LAMMPS also allows simulations to be perfored in non-orthogonal
simulation boxes shaped as a parallelepiped with triclinic symmetry.
The parallelepiped has its "origin" at (xlo,ylo,zlo) and is defined by
3 edge vectors starting from the origin given by A = (xhi-xlo,0,0); B
= (xy,yhi-ylo,0); C = (xz,yz,zhi-zlo). <I>Xy,xz,yz</I> can be 0.0 or
3 edge vectors starting from the origin given by <B>a</B> = (xhi-xlo,0,0); <B>b</B>
= (xy,yhi-ylo,0); <B>c</B> = (xz,yz,zhi-zlo). <I>Xy,xz,yz</I> can be 0.0 or
positive or negative values and are called "tilt factors" because they
are the amount of displacement applied to faces of an originally
orthogonal box to transform it into the parallelepiped. Note that in
LAMMPS the triclinic simulation box edge vectors A,B,C cannot be
arbitrary vectors. As indicated, A must be aligned with the x axis, B
must be in the xy plane, and C is arbitrary. However, this is not a
LAMMPS the triclinic simulation box edge vectors <B>a</B>, <B>b</B>, and <B>c</B> cannot be
arbitrary vectors. As indicated, <B>a</B> must be aligned with the x axis, <B>b</B>
must be in the xy plane, and <B>c</B> is arbitrary. However, this is not a
restriction since it is possible to rotate any set of 3 crystal basis
vectors so that they meet this restriction.
</P>
@ -817,14 +817,25 @@ equivalent.
</P>
<P>Triclinic crystal structures are often defined using three lattice
constants <I>a</I>, <I>b</I>, and <I>c</I>, and three angles <I>alpha</I>, <I>beta</I> and
<I>gamma</I>. Note that in this nomenclature, the a,b,c lattice constants
are the scalar lengths of the 3 A,B,C edge vectors defined above. The
<I>gamma</I>. Note that in this nomenclature, the a, b, and c lattice constants
are the scalar lengths of the edge vectors <B>a</B>, <B>b</B>, and <B>c</B> defined
above. The
relationship between these 6 quantities (a,b,c,alpha,beta,gamma) and
the LAMMPS box sizes (lx,ly,lz) = (xhi-xlo,yhi-ylo,zhi-zlo) and tilt
factors (xy,xz,yz) is as follows:
</P>
<CENTER><IMG SRC = "Eqs/box.jpg">
</CENTER>
<P>The inverse relationship can be written as follows:
</P>
<CENTER><IMG SRC = "Eqs/box_inverse.jpg">
</CENTER>
<P>The values of <I>a</I>, <I>b</I>, <I>c</I> , <I>alpha</I>, <I>beta</I> , and <I>gamma</I> can be printed
out or accessed by computes using the
<A HREF = "thermo_style.html">thermo_style custom</A> keywords
<I>cella</I>, <I>cellb</I>, <I>cellc</I>, <I>cellalpha</I>, <I>cellbeta</I>, <I>cellgamma</I>,
respectively.
</P>
<P>As discussed on the <A HREF = "dump.html">dump</A> command doc page, when the BOX
BOUNDS for a snapshot is written to a dump file for a triclinic box,
an orthogonal bounding box which encloses the triclinic simulation box
@ -1158,7 +1169,7 @@ discussed below, it can be referenced via the following bracket
notation, where ID in this case is the ID of a compute. The leading
"c_" would be replaced by "f_" for a fix, or "v_" for a variable:
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<DIV ALIGN=center><TABLE WIDTH="0%" BORDER=1 >
<TR><TD >c_ID </TD><TD > entire scalar, vector, or array</TD></TR>
<TR><TD >c_ID[I] </TD><TD > one element of vector, one column of array</TD></TR>
<TR><TD >c_ID[I][J] </TD><TD > one element of array
@ -1357,7 +1368,7 @@ data and scalar/vector/array data.
input, that could be an element of a vector or array. Likewise a
vector input could be a column of an array.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<DIV ALIGN=center><TABLE WIDTH="0%" BORDER=1 >
<TR><TD >Command</TD><TD > Input</TD><TD > Output</TD><TD ></TD></TR>
<TR><TD ><A HREF = "thermo_style.html">thermo_style custom</A></TD><TD > global scalars</TD><TD > screen, log file</TD><TD ></TD></TR>
<TR><TD ><A HREF = "dump.html">dump custom</A></TD><TD > per-atom vectors</TD><TD > dump file</TD><TD ></TD></TR>

View File

@ -747,8 +747,8 @@ By default, LAMMPS uses an orthogonal simulation box to encompass the
particles. The "boundary"_boundary.html command sets the boundary
conditions of the box (periodic, non-periodic, etc). The orthogonal
box has its "origin" at (xlo,ylo,zlo) and is defined by 3 edge vectors
starting from the origin given by A = (xhi-xlo,0,0); B =
(0,yhi-ylo,0); C = (0,0,zhi-zlo). The 6 parameters
starting from the origin given by [a] = (xhi-xlo,0,0); [b] =
(0,yhi-ylo,0); [c] = (0,0,zhi-zlo). The 6 parameters
(xlo,xhi,ylo,yhi,zlo,zhi) are defined at the time the simluation box
is created, e.g. by the "create_box"_create_box.html or
"read_data"_read_data.html or "read_restart"_read_restart.html
@ -760,14 +760,14 @@ custom"_thermo_style.html command.
LAMMPS also allows simulations to be perfored in non-orthogonal
simulation boxes shaped as a parallelepiped with triclinic symmetry.
The parallelepiped has its "origin" at (xlo,ylo,zlo) and is defined by
3 edge vectors starting from the origin given by A = (xhi-xlo,0,0); B
= (xy,yhi-ylo,0); C = (xz,yz,zhi-zlo). {Xy,xz,yz} can be 0.0 or
3 edge vectors starting from the origin given by [a] = (xhi-xlo,0,0); [b]
= (xy,yhi-ylo,0); [c] = (xz,yz,zhi-zlo). {Xy,xz,yz} can be 0.0 or
positive or negative values and are called "tilt factors" because they
are the amount of displacement applied to faces of an originally
orthogonal box to transform it into the parallelepiped. Note that in
LAMMPS the triclinic simulation box edge vectors A,B,C cannot be
arbitrary vectors. As indicated, A must be aligned with the x axis, B
must be in the xy plane, and C is arbitrary. However, this is not a
LAMMPS the triclinic simulation box edge vectors [a], [b], and [c] cannot be
arbitrary vectors. As indicated, [a] must be aligned with the x axis, [b]
must be in the xy plane, and [c] is arbitrary. However, this is not a
restriction since it is possible to rotate any set of 3 crystal basis
vectors so that they meet this restriction.
@ -809,14 +809,25 @@ equivalent.
Triclinic crystal structures are often defined using three lattice
constants {a}, {b}, and {c}, and three angles {alpha}, {beta} and
{gamma}. Note that in this nomenclature, the a,b,c lattice constants
are the scalar lengths of the 3 A,B,C edge vectors defined above. The
{gamma}. Note that in this nomenclature, the a, b, and c lattice constants
are the scalar lengths of the edge vectors [a], [b], and [c] defined
above. The
relationship between these 6 quantities (a,b,c,alpha,beta,gamma) and
the LAMMPS box sizes (lx,ly,lz) = (xhi-xlo,yhi-ylo,zhi-zlo) and tilt
factors (xy,xz,yz) is as follows:
:c,image(Eqs/box.jpg)
The inverse relationship can be written as follows:
:c,image(Eqs/box_inverse.jpg)
The values of {a}, {b}, {c} , {alpha}, {beta} , and {gamma} can be printed
out or accessed by computes using the
"thermo_style custom"_thermo_style.html keywords
{cella}, {cellb}, {cellc}, {cellalpha}, {cellbeta}, {cellgamma},
respectively.
As discussed on the "dump"_dump.html command doc page, when the BOX
BOUNDS for a snapshot is written to a dump file for a triclinic box,
an orthogonal bounding box which encloses the triclinic simulation box

View File

@ -46,7 +46,10 @@ keyword = <I>temp</I> or <I>iso</I> or <I>aniso</I> or <I>tri</I> or <I>x</I> or
<I>ploop</I> value = number of sub-cycles to perform on barostat thermostat
<I>nreset</I> value = reset reference cell every this many timesteps
<I>drag</I> value = drag factor added to barostat/thermostat (0.0 = no drag)
<I>dilate</I> value = <I>all</I> or <I>partial</I>
<I>dilate</I> value = <I>all</I> or <I>partial</I>
<I>scaleyz</I> value = <I>yes</I> or <I>no</I> = scale yz with lz
<I>scalexz</I> value = <I>yes</I> or <I>no</I> = scale xz with lz
<I>scalexy</I> value = <I>yes</I> or <I>no</I> = scale xy with ly
</PRE>
</UL>
@ -272,6 +275,16 @@ specified values of the external stress tensor. A value of <I>nstep</I>
means that every <I>nstep</I> timesteps, the reference dimensions are set
to those of the current simulation domain.
</P>
<P>The <I>scaleyz</I>, <I>scalexz</I>, and <I>scalexy</I> keywords control whether or
not the corresponding tilt factors are scaled with the
associated box dimensions
when barostatting triclinic periodic cells.
The default values <I>yes</I> will turn on scaling, which corresponds to
adjusting the linear dimensions of the cell while preserving its shape.
Choosing <I>no</I> ensures that the tilt factors are not scaled with the
box dimensions. See below for restrictions and default values in different
situations.
</P>
<HR>
<P>IMPORTANT NOTE: Using a barostat coupled to tilt dimensions <I>xy</I>,
@ -483,6 +496,12 @@ the meaning of the xy,xz,yz tilt factors.
make the external T = 0.0 at some timestep during the simulation which
is not allowed in the Nose/Hoover formulation.
</P>
<P>The <I>scaleyz yes</I> and <I>scalexz yes</I> keyword/value pairs can not be used
for 2D simulations. <I>scaleyz yes</I>, <I>scalexz yes</I>, and <I>scalexy yes</I> options
can only be used if the 2nd dimension in the keyword is periodic,
and if the tilt factor is not coupled to the barostat via keywords
<I>tri</I>, <I>yz</I>, <I>xz</I>, and <I>xy</I>.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_nve.html">fix nve</A>, <A HREF = "fix_modify.html">fix_modify</A>, <A HREF = "run_style.html">run_style</A>
@ -490,7 +509,9 @@ is not allowed in the Nose/Hoover formulation.
<P><B>Default:</B>
</P>
<P>The keyword defaults are tchain = 3, pchain = 3, mtk = yes, tloop =
ploop = 1, nreset = 0, drag = 0.0, dilate = all, and couple = none.
ploop = 1, nreset = 0, drag = 0.0, dilate = all, couple = none,
scaleyz = scalexz = scalexy = yes if periodic in 2nd dimension and
not coupled to barostat, otherwise no.
</P>
<HR>

View File

@ -37,7 +37,10 @@ keyword = {temp} or {iso} or {aniso} or {tri} or {x} or {y} or {z} or {xy} or {y
{ploop} value = number of sub-cycles to perform on barostat thermostat
{nreset} value = reset reference cell every this many timesteps
{drag} value = drag factor added to barostat/thermostat (0.0 = no drag)
{dilate} value = {all} or {partial} :pre
{dilate} value = {all} or {partial}
{scaleyz} value = {yes} or {no} = scale yz with lz
{scalexz} value = {yes} or {no} = scale xz with lz
{scalexy} value = {yes} or {no} = scale xy with ly :pre
:ule
[Examples:]
@ -262,6 +265,16 @@ specified values of the external stress tensor. A value of {nstep}
means that every {nstep} timesteps, the reference dimensions are set
to those of the current simulation domain.
The {scaleyz}, {scalexz}, and {scalexy} keywords control whether or
not the corresponding tilt factors are scaled with the
associated box dimensions
when barostatting triclinic periodic cells.
The default values {yes} will turn on scaling, which corresponds to
adjusting the linear dimensions of the cell while preserving its shape.
Choosing {no} ensures that the tilt factors are not scaled with the
box dimensions. See below for restrictions and default values in different
situations.
:line
IMPORTANT NOTE: Using a barostat coupled to tilt dimensions {xy},
@ -473,6 +486,12 @@ For the {temp} keyword, the final Tstop cannot be 0.0 since it would
make the external T = 0.0 at some timestep during the simulation which
is not allowed in the Nose/Hoover formulation.
The {scaleyz yes} and {scalexz yes} keyword/value pairs can not be used
for 2D simulations. {scaleyz yes}, {scalexz yes}, and {scalexy yes} options
can only be used if the 2nd dimension in the keyword is periodic,
and if the tilt factor is not coupled to the barostat via keywords
{tri}, {yz}, {xz}, and {xy}.
[Related commands:]
"fix nve"_fix_nve.html, "fix_modify"_fix_modify.html, "run_style"_run_style.html
@ -480,7 +499,9 @@ is not allowed in the Nose/Hoover formulation.
[Default:]
The keyword defaults are tchain = 3, pchain = 3, mtk = yes, tloop =
ploop = 1, nreset = 0, drag = 0.0, dilate = all, and couple = none.
ploop = 1, nreset = 0, drag = 0.0, dilate = all, couple = none,
scaleyz = scalexz = scalexy = yes if periodic in 2nd dimension and
not coupled to barostat, otherwise no.
:line

View File

@ -30,6 +30,7 @@
xy, xz, yz, xlat, ylat, zlat,
pxx, pyy, pzz, pxy, pxz, pyz,
fmax, fnorm,
cella, cellb, cellc, cellalpha, cellbeta, cellgamma,
c_ID, c_ID[I], c_ID[I][J],
f_ID, f_ID[I], f_ID[I][J],
v_name
@ -65,6 +66,8 @@
pxx,pyy,pzz,pxy,pxz,pyz = 6 components of pressure tensor
fmax = max component of force on any atom in any dimension
fnorm = length of force vector for all atoms
cella,cellb,cellc = periodic cell lattice constants a,b,c
cellalpha, cellbeta, cellgamma = periodic cell angles alpha,beta,gamma
c_ID = global scalar value calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID
c_ID[I][J] = I,J component of global array calculated by a compute with ID
@ -230,6 +233,14 @@ calculates the maximum force in any dimension on any atom in the
system, or the infinity-norm of the force vector for the system. The
<I>fnorm</I> keyword calculates the 2-norm or length of the force vector.
</P>
<P>The keywords <I>cella</I>, <I>cellb</I>, <I>cellc</I>, <I>cellalpha</I>, <I>cellbeta</I>, <I>cellgamma</I>,
correspond to the usual crystallographic quantities that define
the periodic unit cell of a crystal.
See <A HREF = "Section_howto.html#4_12">this section</A> of the doc pages for a
geometric description of triclinic periodic cells, including
a precise defintion of these quantities in terms of the internal
LAMMPS cell dimensions <I>lx</I>, <I>ly</I>, <I>lz</I>, <I>yz</I>, <I>xz</I>, <I>xy</I>,
</P>
<HR>
<P>The <I>c_ID</I> and <I>c_ID[I]</I> and <I>c_ID[I][J]</I> keywords allow global

View File

@ -25,6 +25,7 @@ args = list of arguments for a particular style :l
xy, xz, yz, xlat, ylat, zlat,
pxx, pyy, pzz, pxy, pxz, pyz,
fmax, fnorm,
cella, cellb, cellc, cellalpha, cellbeta, cellgamma,
c_ID, c_ID\[I\], c_ID\[I\]\[J\],
f_ID, f_ID\[I\], f_ID\[I\]\[J\],
v_name
@ -60,6 +61,8 @@ args = list of arguments for a particular style :l
pxx,pyy,pzz,pxy,pxz,pyz = 6 components of pressure tensor
fmax = max component of force on any atom in any dimension
fnorm = length of force vector for all atoms
cella,cellb,cellc = periodic cell lattice constants a,b,c
cellalpha, cellbeta, cellgamma = periodic cell angles alpha,beta,gamma
c_ID = global scalar value calculated by a compute with ID
c_ID\[I\] = Ith component of global vector calculated by a compute with ID
c_ID\[I\]\[J\] = I,J component of global array calculated by a compute with ID
@ -224,6 +227,14 @@ calculates the maximum force in any dimension on any atom in the
system, or the infinity-norm of the force vector for the system. The
{fnorm} keyword calculates the 2-norm or length of the force vector.
The keywords {cella}, {cellb}, {cellc}, {cellalpha}, {cellbeta}, {cellgamma},
correspond to the usual crystallographic quantities that define
the periodic unit cell of a crystal.
See "this section"_Section_howto.html#4_12 of the doc pages for a
geometric description of triclinic periodic cells, including
a precise defintion of these quantities in terms of the internal
LAMMPS cell dimensions {lx}, {ly}, {lz}, {yz}, {xz}, {xy},
:line
The {c_ID} and {c_ID\[I\]} and {c_ID\[I\]\[J\]} keywords allow global