"Higher level section"_Howto.html - "LAMMPS WWW Site"_lws - "LAMMPS
Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)

:line

Barostats :h3

Barostatting means controlling the pressure in an MD simulation.
"Thermostatting"_Howto_thermostat.html means controlling the
temperature of the particles.  Since the pressure includes a kinetic
component due to particle velocities, both these operations require
calculation of the temperature.  Typically a target temperature (T)
and/or pressure (P) is specified by the user, and the thermostat or
barostat attempts to equilibrate the system to the requested T and/or
P.

Barostatting in LAMMPS is performed by "fixes"_fix.html.  Two
barostatting methods are currently available: Nose-Hoover (npt and
nph) and Berendsen:

"fix npt"_fix_nh.html
"fix npt/sphere"_fix_npt_sphere.html
"fix npt/asphere"_fix_npt_asphere.html
"fix nph"_fix_nh.html
"fix press/berendsen"_fix_press_berendsen.html :ul

The "fix npt"_fix_nh.html commands include a Nose-Hoover thermostat
and barostat.  "Fix nph"_fix_nh.html is just a Nose/Hoover barostat;
it does no thermostatting.  Both "fix nph"_fix_nh.html and "fix
press/berendsen"_fix_press_berendsen.html can be used in conjunction
with any of the thermostatting fixes.

As with the "thermostats"_Howto_thermostat.html, "fix npt"_fix_nh.html
and "fix nph"_fix_nh.html only use translational motion of the
particles in computing T and P and performing thermo/barostatting.
"Fix npt/sphere"_fix_npt_sphere.html and "fix
npt/asphere"_fix_npt_asphere.html thermo/barostat using not only
translation velocities but also rotational velocities for spherical
and aspherical particles.

All of the barostatting fixes use the "compute
pressure"_compute_pressure.html compute to calculate a current
pressure.  By default, this compute is created with a simple "compute
temp"_compute_temp.html (see the last argument of the "compute
pressure"_compute_pressure.html command), which is used to calculated
the kinetic component of the pressure.  The barostatting fixes can
also use temperature computes that remove bias for the purpose of
computing the kinetic component which contributes to the current
pressure.  See the doc pages for the individual fixes and for the
"fix_modify"_fix_modify.html command for instructions on how to assign
a temperature or pressure compute to a barostatting fix.

NOTE: As with the thermostats, the Nose/Hoover methods ("fix
npt"_fix_nh.html and "fix nph"_fix_nh.html) perform time integration.
"Fix press/berendsen"_fix_press_berendsen.html does NOT, so it should
be used with one of the constant NVE fixes or with one of the NVT
fixes.

Thermodynamic output, which can be setup via the
"thermo_style"_thermo_style.html command, often includes pressure
values.  As explained on the doc page for the
"thermo_style"_thermo_style.html command, the default pressure is
setup by the thermo command itself.  It is NOT the pressure associated
with any barostatting fix you have defined or with any compute you
have defined that calculates a pressure.  The doc pages for the
barostatting fixes explain the ID of the pressure compute they create.
Thus if you want to view these pressures, you need to specify them
explicitly via the "thermo_style custom"_thermo_style.html command.
Or you can use the "thermo_modify"_thermo_modify.html command to
re-define what pressure compute is used for default thermodynamic
output.
