[lammps-users] group energy

Dear lammps users and developers,

I have a small query. I want to write out the vdw interaction energy between two different groups of atoms in to a separate file in each time step of the simulation. How can I do that? Could anyone please help me out?

kind regards
bhaskar

group A …
group B …
compute 1 A group/group B
fix extra all print 100 “${c_ID[1]}” file AB.txt

You can try the above code.

To extend this, you can take the output of the compute group/group and
do many things with it - such as print with thermodynamics, time average it,
etc. See section 4.15 of the doc pages.

Steve