[lammps-users] About temperature and pressure calculation

In LAMMPS With temprature and a few corresponding commands I know people can calculate the temperature of some specified local regions, but is it possible to write the results to some output data files through perhaps dump command? Or people have to use some other commands?

Another question is how to do the same things to pressure (I mean calculate the pressure in some specifed regions and write to output data files)? Unfortunately by far I did not find any commands for producing local pressure like temperature command can do. By the way, I also want to ask whether the principle of the pressure calculation in LAMMPS is based on the well know formular summed from a thermal kinetic contribution and a Virial term or not.

Thanks and regards.

Xiang Gu

The thermo_style custom command can print out temperature
results for any number of user-defined temperatures.

For pressure, the dump custom command can write the
per-atom stress tensor (analagous to pressure) to dump
files. The dump group can be for any subset of atoms. So
you can effectively get the pressure in a sub-region by summing
those quantities over the atoms of interest.

Pressure is KE + virial.

Steve