compute pressure

Dear all,
I have one question regarding the compute pressure command.
I want to have total Pxy component.
So, I belive "compute 1 all pressure thermo_temp” is good for my calculation as I want all the contributions from virial term in addition to kinetic term. From the documentation virial contributions are as “the sum of pair, bond, angle, dihedral, improper, kspace (long-range), and fix contributions to the force on each atom”. What does it mean by “and fix contributions”?
Is it right that Lammps internally calculates every particles pressure and sum them up as 6 different components?

With best regards,
Pritam

The only fixes that contribute to the pressure are:

[athomps@…5834… src]$ grep virial_flag /fix.cpp
POEMS/fix_poems.cpp: virial_flag = 1;
RIGID/fix_rigid.cpp: virial_flag = 1;
RIGID/fix_rigid_small.cpp: virial_flag = 1;
RIGID/fix_shake.cpp: virial_flag = 1;
USER-LB/fix_lb_rigid_pc_sphere.cpp: virial_flag = 1;

LAMMPS has a few different ways to compute the pressure tensor, but they all equal the expression in the doc page.

Aidan

Dear all,
I have one question regarding the compute pressure command.
I want to have total Pxy component.
So, I belive "compute 1 all pressure thermo_temp” is good for my calculation
as I want all the contributions from virial term in addition to kinetic
term. From the documentation virial contributions are as “the sum of pair,
bond, angle, dihedral, improper, kspace (long-range), and fix contributions
to the force on each atom”. What does it mean by “and fix contributions”?

fixes may have an impact on the virial, e.g. the various options to
keep bond/angles/objects rigid: shake, rigid, poems
these contributions are tallied into the total virial, or else the
pressure would be incorrect.

Is it right that Lammps internally calculates every particles pressure and
sum them up as 6 different components?

please note that "pressure" is a global property and thus there cannot
be a per-particle pressure.

what LAMMPS does is to compute the *virial* and then computes the
pressure from that using the volume of the simulation cell.
how the contributions to the virial are collected varies with what
styles are active and what kind of output is requested. usually only
the global virial is accumulated per sub-category and then combined in
the compute pressure command.
kspace contributions are always computed globally unless particularly
requested on a per-atom basis, as those would require additional (time
consuming) fourier transforms.

axel.