How to dump out per-atom force from pairwise interaction between certain types of atoms

Dear LAMMPS users,

I know that the question I am going to ask has been asked before. But, this question was asked four years and I thought that a solution might have been introduced during the past years that I am not aware of.

Lets assume that there are type 1 and type 2 atoms in the system that are interacting with each other by Lennard-Jones (LJ) pairwise potential. There are interactions between type 1 atoms which is described by REBO potential. How can I dump the forces per atom of type 1 which are due to only LJ pairwise interactions in an output file?

I tried the following commands, but I think they are not appropriate for my purpose. I am saying this, because of the results I observed.

fix FPA type1 store/state ${print_frq} fx

compute FPA type1 pair/local force fx fy fz

The best,


You already got a good answer to this Q.

Use the rerun command on a previous run’s
dump file, and only define the pair style you
want forces from, in the rerun script.



I would like to thank you and also thank Niall for helping me on this issue.

The best,