Decompose pair stress contributions

Dear lammps users,

I have a system where to particle types (A and B) interacts through Lennard-Jones potentials (pair_style lj/cut). I would like to decompose the overall stress to obtain the contribution that comes only for the interaction of the type A with the type B. That is, the total stress from pair interactions: S_{pair} = S_{pair}^{A} + S_{pair}^{B} + S_{pair}^{AB}. Where first term is the stress that account for the interactions of the type A with itself, the second account for the interaction of the type B with itself, and the third is interaction between the two group. Is there a way to calculate this quantity (S_{pair}^{AB}) on the fly? I think the answer is with the compute stress/tally command, but I am unsure if this is exactly what I need since the documentation is vague when it comes to describe the stress/tally.

I guess that then I can compute the S_{pair}^{A} by computing the total stress on the group A and subtracting half of S_{pair}^{AB}, right?

I would appreciate any assistance.

best,

Guessing is not a good way to do science. Why not make a test? I.e. set up a simulation and define:

compute 1 all stress/atom pair NULL temp 
compute 2 groupa stress/tally groupa
compute 3 groupb stress/tally groupb
compute 4 groupa stress/tally groupb
compute 5 groupb stress/tally groupa

and then compare the results.

1 Like

Of course I will do it. I just wanted to check if stress/tally is the command implemented to calculate what I want to calculate or if there was some other option I couldn’t think of.

Thank you very much for your reply!!