diff --git a/doc/Section_howto.html b/doc/Section_howto.html index 18c003bb30..69efc7c06b 100644 --- a/doc/Section_howto.html +++ b/doc/Section_howto.html @@ -755,8 +755,8 @@ See the dump command for more information on XTC files particles. The boundary 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 or read_data or read_restart @@ -768,14 +768,14 @@ custom 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.

@@ -817,14 +817,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:

+

The inverse relationship can be written as follows: +

+
+
+

The values of a, b, c , alpha, beta , and gamma can be printed +out or accessed by computes using the +thermo_style custom keywords +cella, cellb, cellc, cellalpha, cellbeta, cellgamma, +respectively. +

As discussed on the dump 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:

-
+
c_ID entire scalar, vector, or array
c_ID[I] one element of vector, one column of array
c_ID[I][J] 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.

-
+
diff --git a/doc/Section_howto.txt b/doc/Section_howto.txt index 0404b67bfc..b6337c7de3 100644 --- a/doc/Section_howto.txt +++ b/doc/Section_howto.txt @@ -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 diff --git a/doc/fix_nh.html b/doc/fix_nh.html index 757319b5cd..429f0aebd8 100644 --- a/doc/fix_nh.html +++ b/doc/fix_nh.html @@ -46,7 +46,10 @@ keyword = temp or iso or aniso or tri or x or 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 + 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 @@ -272,6 +275,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. +


IMPORTANT NOTE: Using a barostat coupled to tilt dimensions xy, @@ -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.

+

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_modify, run_style @@ -490,7 +509,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.


diff --git a/doc/fix_nh.txt b/doc/fix_nh.txt index e44e24b16f..0ab1e76a19 100644 --- a/doc/fix_nh.txt +++ b/doc/fix_nh.txt @@ -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 diff --git a/doc/thermo_style.html b/doc/thermo_style.html index 53fc4dabbf..11d4e7a8be 100644 --- a/doc/thermo_style.html +++ b/doc/thermo_style.html @@ -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 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 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, +


The c_ID and c_ID[I] and c_ID[I][J] keywords allow global diff --git a/doc/thermo_style.txt b/doc/thermo_style.txt index daa1ea836e..03ad2c917b 100644 --- a/doc/thermo_style.txt +++ b/doc/thermo_style.txt @@ -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

Command Input Output
thermo_style custom global scalars screen, log file
dump custom per-atom vectors dump file