Dear LAMMPS users,
I’d like to get information on the forces and potential energy for each atom in my system, which consists of 3 species of atoms interacting with different pair styles, that I simulate thanks to the hybrid or hybrid/overlay styles.
To dump the per-atom potential energy I use the compute:
compute peratom_energy all pe/atom
but I think I get wrong per-atom energies, because if I sum up all the contributions obtained in such a way, via the compute:
compute pe all reduce sum c_peratom_energy
I obtain a value for c_pe different from that of pe. I made some test, and I understood that the problem stays in the combined use of the pe/atom compute and the hybrid pair_style. For example, if I set up my potentials as:
pair_style lj/cut 1.122462
pair_modify shift yes
pair_coeff 1 * 1.0 1.0
pair_coeff 2 * 0.0 0.55
pair_coeff 3 * 1.0 0.1
I obtain the same value for both pe and c_pe (around 3.23 for my first configuration), while if I set up the potential using the hybrid style:
pair_style hybrid lj/cut 1.122462 lj/cut 1.122462
pair_modify shift yes
pair_coeff 1 * lj/cut 1 1.0 1.0
pair_coeff 2 * lj/cut 2 0.0 0.55
pair_coeff 3 * lj/cut 1 1.0 0.1
I get the same result for pe but a different one for c_pe (around 1.90 for the same configuration).
Am I misinterpreting something? Where am I wrong?
Thank you all,
Giovanni