2007-02-10 05:40:32 +08:00
|
|
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
|
|
:link(ld,Manual.html)
|
|
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
compute pressure command :h3
|
2011-06-09 05:46:03 +08:00
|
|
|
compute pressure/cuda command :h3
|
2007-02-10 05:40:32 +08:00
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
2007-12-01 07:16:45 +08:00
|
|
|
compute ID group-ID pressure temp-ID keyword ... :pre
|
2007-02-10 05:40:32 +08:00
|
|
|
|
|
|
|
ID, group-ID are documented in "compute"_compute.html command
|
|
|
|
pressure = style name of this compute command
|
2014-02-11 04:45:07 +08:00
|
|
|
temp-ID = ID of compute that calculates temperature, can be NULL if not needed
|
2007-12-01 07:16:45 +08:00
|
|
|
zero or more keywords may be appended
|
2009-03-06 05:17:05 +08:00
|
|
|
keyword = {ke} or {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} or {virial} :ul
|
2007-02-10 05:40:32 +08:00
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
2014-02-11 04:45:07 +08:00
|
|
|
compute 1 all pressure thermo_temp
|
|
|
|
compute 1 all pressure NULL pair bond :pre
|
2007-02-10 05:40:32 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2007-11-02 00:46:50 +08:00
|
|
|
Define a computation that calculates the pressure of the entire system
|
|
|
|
of atoms. The specified group must be "all". See the "compute
|
|
|
|
stress/atom"_compute_stress_atom.html command if you want per-atom
|
|
|
|
pressure (stress). These per-atom values could be summed for a group
|
2008-02-26 00:06:38 +08:00
|
|
|
of atoms via the "compute reduce"_compute_reduce.html command.
|
2007-02-10 05:40:32 +08:00
|
|
|
|
2007-11-02 00:46:50 +08:00
|
|
|
The pressure is computed by the formula
|
2007-02-10 05:40:32 +08:00
|
|
|
|
|
|
|
:c,image(Eqs/pressure.jpg)
|
|
|
|
|
|
|
|
where N is the number of atoms in the system (see discussion of DOF
|
2007-07-04 03:54:12 +08:00
|
|
|
below), Kb is the Boltzmann constant, T is the temperature, d is the
|
|
|
|
dimensionality of the system (2 or 3 for 2d/3d), V is the system
|
|
|
|
volume (or area in 2d), and the second term is the virial, computed
|
2007-12-01 07:16:45 +08:00
|
|
|
within LAMMPS for all pairwise as well as 2-body, 3-body, and 4-body,
|
|
|
|
and long-range interactions. "Fixes"_fix.html that impose constraints
|
2007-07-04 03:54:12 +08:00
|
|
|
(e.g. the "fix shake"_fix_shake.html command) also contribute to the
|
|
|
|
virial term.
|
2007-02-10 05:40:32 +08:00
|
|
|
|
2009-12-04 07:58:11 +08:00
|
|
|
A symmetric pressure tensor, stored as a 6-element vector, is also
|
|
|
|
calculated by this compute. The 6 components of the vector are
|
|
|
|
ordered xx, yy, zz, xy, xz, yz. The equation for the I,J components
|
|
|
|
(where I and J = x,y,z) is similar to the above formula, except that
|
|
|
|
the first term uses components of the kinetic energy tensor and the
|
|
|
|
second term uses components of the virial tensor:
|
2014-02-11 04:45:07 +08:00
|
|
|
|
2009-03-04 01:00:10 +08:00
|
|
|
:c,image(Eqs/pressure_tensor.jpg)
|
|
|
|
|
|
|
|
If no extra keywords are listed, the entire equations above are
|
2015-02-05 00:35:01 +08:00
|
|
|
calculated. This includes a kinetic energy (temperature) term and the
|
2009-03-06 05:17:05 +08:00
|
|
|
virial as the sum of pair, bond, angle, dihedral, improper, kspace
|
2009-03-04 01:00:10 +08:00
|
|
|
(long-range), and fix contributions to the force on each atom. If any
|
|
|
|
extra keywords are listed, then only those components are summed to
|
2009-03-06 05:17:05 +08:00
|
|
|
compute temperature or ke and/or the virial. The {virial} keyword
|
|
|
|
means include all terms except the kinetic energy {ke}.
|
2007-02-10 05:40:32 +08:00
|
|
|
|
2015-02-05 00:35:01 +08:00
|
|
|
Details of how LAMMPS computes the virial efficiently for the entire
|
|
|
|
system, including the effects of periodic boundary conditions is
|
|
|
|
discussed in "(Thompson)"_#Thompson.
|
|
|
|
|
2007-02-10 05:40:32 +08:00
|
|
|
The temperature and kinetic energy tensor is not calculated by this
|
2007-12-01 07:16:45 +08:00
|
|
|
compute, but rather by the temperature compute specified with the
|
2014-02-11 04:45:07 +08:00
|
|
|
command. If the kinetic energy is not included in the pressure, than
|
|
|
|
the temperature compute is not used and can be specified as NULL.
|
|
|
|
Normally the temperature compute used by compute pressure should
|
|
|
|
calculate the temperature of all atoms for consistency with the virial
|
|
|
|
term, but any compute style that calculates temperature can be used,
|
|
|
|
e.g. one that excludes frozen atoms or other degrees of freedom.
|
|
|
|
|
|
|
|
Note that if desired the specified temperature compute can be one that
|
|
|
|
subtracts off a bias to calculate a temperature using only the thermal
|
|
|
|
velocity of the atoms, e.g. by subtracting a background streaming
|
|
|
|
velocity. See the doc pages for individual "compute
|
|
|
|
commands"_compute.html to determine which ones include a bias.
|
|
|
|
|
|
|
|
Also note that the N in the first formula above is really
|
2009-03-04 01:03:38 +08:00
|
|
|
degrees-of-freedom divided by d = dimensionality, where the DOF value
|
|
|
|
is calcluated by the temperature compute. See the various "compute
|
2009-03-04 01:00:10 +08:00
|
|
|
temperature"_compute.html styles for details.
|
2007-02-10 05:40:32 +08:00
|
|
|
|
2008-01-18 07:46:30 +08:00
|
|
|
A compute of this style with the ID of "thermo_press" is created when
|
|
|
|
LAMMPS starts up, as if this command were in the input script:
|
2007-11-02 00:46:50 +08:00
|
|
|
|
2008-01-18 07:46:30 +08:00
|
|
|
compute thermo_press all pressure thermo_temp :pre
|
2007-11-02 00:46:50 +08:00
|
|
|
|
|
|
|
where "thermo_temp" is the ID of a similarly defined compute of style
|
|
|
|
"temp". See the "thermo_style" command for more details.
|
|
|
|
|
2011-06-09 05:46:03 +08:00
|
|
|
:line
|
|
|
|
|
|
|
|
Styles with a {cuda} suffix are functionally the same as the
|
|
|
|
corresponding style without the suffix. They have been optimized to
|
|
|
|
run faster, depending on your available hardware, as discussed in
|
2011-12-14 04:35:35 +08:00
|
|
|
"Section_accelerate"_Section_accelerate.html of the manual. The
|
|
|
|
accelerated styles take the same arguments and should produce the same
|
|
|
|
results, except for round-off and precision issues.
|
2011-06-09 05:46:03 +08:00
|
|
|
|
2011-08-27 02:53:00 +08:00
|
|
|
These accelerated styles are part of the USER-CUDA package. They are
|
|
|
|
only enabled if LAMMPS was built with that package. See the "Making
|
|
|
|
LAMMPS"_Section_start.html#start_3 section for more info.
|
2011-06-09 05:46:03 +08:00
|
|
|
|
|
|
|
You can specify the accelerated styles explicitly in your input script
|
|
|
|
by including their suffix, or you can use the "-suffix command-line
|
2012-01-28 07:39:14 +08:00
|
|
|
switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can
|
2011-08-26 00:46:23 +08:00
|
|
|
use the "suffix"_suffix.html command in your input script.
|
2011-06-09 05:46:03 +08:00
|
|
|
|
2011-12-14 04:35:35 +08:00
|
|
|
See "Section_accelerate"_Section_accelerate.html of the manual for
|
|
|
|
more instructions on how to use the accelerated styles effectively.
|
2011-06-09 05:46:03 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
2008-01-03 03:25:15 +08:00
|
|
|
[Output info:]
|
|
|
|
|
2009-12-04 07:58:11 +08:00
|
|
|
This compute calculates a global scalar (the pressure) and a global
|
|
|
|
vector of length 6 (pressure tensor), which can be accessed by indices
|
|
|
|
1-6. These values can be used by any command that uses global scalar
|
|
|
|
or vector values from a compute as input. See "this
|
2011-08-26 01:01:01 +08:00
|
|
|
section"_Section_howto.html#howto_15 for an overview of LAMMPS output
|
2009-12-04 07:58:11 +08:00
|
|
|
options.
|
|
|
|
|
2009-03-04 01:10:43 +08:00
|
|
|
The scalar and vector values calculated by this compute are
|
2010-03-03 05:51:16 +08:00
|
|
|
"intensive". The scalar and vector values will be in pressure
|
|
|
|
"units"_units.html.
|
2010-01-24 07:20:05 +08:00
|
|
|
|
2007-02-10 05:40:32 +08:00
|
|
|
[Restrictions:] none
|
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
2007-12-01 07:16:45 +08:00
|
|
|
"compute temp"_compute_temp.html, "compute
|
|
|
|
stress/atom"_compute_stress_atom.html,
|
2008-03-01 09:13:20 +08:00
|
|
|
"thermo_style"_thermo_style.html,
|
2007-02-10 05:40:32 +08:00
|
|
|
|
|
|
|
[Default:] none
|
2015-02-05 00:35:01 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
:link(Thompson)
|
|
|
|
[(Thompson)] Thompson, Plimpton, Mattson, J Chem Phys, 131, 154107 (2009).
|