diff --git a/doc/src/thermo_modify.rst b/doc/src/thermo_modify.rst index 3d2c19614e..72f36b1198 100644 --- a/doc/src/thermo_modify.rst +++ b/doc/src/thermo_modify.rst @@ -11,7 +11,7 @@ Syntax thermo_modify keyword value ... * one or more keyword/value pairs may be listed -* keyword = *lost* or *lost/bond* or *warn* or *norm* or *flush* or *line* or *colname* or *format* or *temp* or *press* +* keyword = *lost* or *lost/bond* or *warn* or *norm* or *flush* or *line* or *colname* or *format* or *temp* or *press* or *triclinic/general* .. parsed-literal:: @@ -32,6 +32,8 @@ Syntax *or* a thermo keyword or reference to compute, fix, property or variable. *temp* value = compute ID that calculates a temperature *press* value = compute ID that calculates a pressure + *triclinic/general* arg = none + Examples """""""" @@ -240,6 +242,17 @@ command, thermo output uses a default compute for pressure with ID = keyword, then the new pressure compute specified by the *press* keyword will be unaffected by the *temp* setting. +The *triclinic/general* keyword can only be used if the simulation box +was created as a general triclinic box. See the :doc:`Howto_triclinic +` doc page for a detailed explanation of orthogonal, +restricted triclinic, and general triclinic simulation boxes. + +If this keyword is used, the output of pressure tensor components for +the system is affected. These components are specified by the +*pxx,pyy,pzz,pxy,pxz,pyz* keywords of the :doc:`thermo_style +` command. See the :doc:`thermo_style ` +doc page for details. + Restrictions """""""""""" none diff --git a/doc/src/thermo_style.rst b/doc/src/thermo_style.rst index 89a2c0b740..504a7d1d6d 100644 --- a/doc/src/thermo_style.rst +++ b/doc/src/thermo_style.rst @@ -68,7 +68,7 @@ Syntax density = mass density of system lx,ly,lz = box lengths in x,y,z xlo,xhi,ylo,yhi,zlo,zhi = box boundaries - xy,xz,yz = box tilt for triclinic (non-orthogonal) simulation boxes + xy,xz,yz = box tilt for restricted triclinic (non-orthogonal) simulation boxes xlat,ylat,zlat = lattice spacings as calculated by :doc:`lattice ` command bonds,angles,dihedrals,impropers = # of these interactions defined pxx,pyy,pzz,pxy,pxz,pyz = 6 components of pressure tensor @@ -102,9 +102,12 @@ Examples Description """"""""""" -Set the style and content for printing thermodynamic data to the screen -and log files. - +Set the style and content for printing thermodynamic data to the +screen and log files. The units for each column of output +corresponding to the list of keywords is determined by the :doc:`units +` command for the simulation. E.g. energies will be in energy +units, temperature in temperature units, pressure in pressure units. + Style *one* prints a single line of thermodynamic info that is the equivalent of "thermo_style custom step temp epair emol etotal press". The line contains only numeric values. @@ -319,6 +322,27 @@ thermostatting or barostatting to their coupling reservoirs -- that is, the NVT, NPH, or NPT ensembles, the *econserve* quantity should remain constant over time even though *etotal* may change. +The *pxx,pyy,pzz,pxy,pxz,pyz* keywords are the 6 components of the +symmetric pressure tensor for the system. See the :doc:`compute +pressure ` command doc page for details of how it is +calculated. + +If the :doc:`thermo_modify triclinic/general ` option +is set and the simulation box was created as a geenral triclinic box, +then the components will be output as values consistent with the +orientation of the general triclinic box relative to the standard xyz +coordinate axes. If this keyword is not used, the values will be +consistent with the orientation of the restricted triclinic box (which +aligns with the xyz coordinate axes). As explained on the +:doc:`Howto_triclinic ` doc page, even if the +simulation box is created as a general triclinic box, internally +LAMMPS uses a restricted triclinic box. + +Note that because the pressure tensor components are computed using +force vectors and atom coordinates, both of which are rotated in the +general versus restricted triclinic representation, the values will +typically be different for the two cases. + The *fmax* and *fnorm* keywords are useful for monitoring the progress of an :doc:`energy minimization `. The *fmax* keyword calculates the maximum force in any dimension on any atom in the @@ -338,13 +362,13 @@ to reduce the delay factor to ensure no force interactions are missed by atoms moving beyond the neighbor skin distance before a rebuild takes place. -The keywords *cella*, *cellb*, *cellc*, *cellalpha*, -*cellbeta*, *cellgamma*, correspond to the usual crystallographic -quantities that define the periodic unit cell of a crystal. See the -:doc:`Howto triclinic ` page for a geometric -description of triclinic periodic cells, including a precise -definition of these quantities in terms of the internal LAMMPS cell -dimensions *lx*, *ly*, *lz*, *yz*, *xz*, *xy*\ . +The keywords *cella*, *cellb*, *cellc*, *cellalpha*, *cellbeta*, +*cellgamma*, correspond to the usual crystallographic quantities that +define the periodic unit cell of a crystal. See the :doc:`Howto +triclinic ` page for a geometric description of +restricted triclinic periodic cells, including a precise definition of +these quantities in terms of the internal LAMMPS cell dimensions *lx*, +*ly*, *lz*, *yz*, *xz*, *xy*\ . ---------- diff --git a/src/thermo.cpp b/src/thermo.cpp index 082bebe80d..d791f5f856 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -579,7 +579,8 @@ void Thermo::modify_params(int narg, char **arg) if (iarg + 2 > narg) error->all(FLERR,"Illegal thermo_modify command"); triclinic_general = utils::logical(FLERR,arg[iarg+1],false,lmp); if (triclinic_general && !domain->triclinic_general) - error->all(FLERR,"Thermo_modify triclinic/general invalid b/c simulation box is not"); + error->all(FLERR,"Thermo_modify triclinic/general cannot be used " + "if simulation box is not general triclinic"); iarg += 2; } else if (strcmp(arg[iarg], "lost") == 0) { diff --git a/src/thermo.h b/src/thermo.h index b7c973fff5..1829349b96 100644 --- a/src/thermo.h +++ b/src/thermo.h @@ -57,8 +57,8 @@ class Thermo : protected Pointers { private: int nfield, nfield_initial; int *vtype; + int triclinic_general; // set by thermo_modify - int triclinic_general; // set by thermo_modify std::string line; std::vector keyword, format, format_column_user, keyword_user; std::string format_line_user, format_float_user, format_int_user, format_bigint_user;