[lammps-users] pair style python example

Dear LAMMPS mailing list,
I’m looking at the example pair style python, specifically the file py_pot.py which includes an example of the LJ potential.
On line 27 and 57 the force is computed. Seems to me that the factors of r are r^{-14} and r^{-8}, where r is interatomic distance. Shouldn’t these exponent be 13 and 7?
Best Regards,

It is not the force but force/r.

This is for efficiency and convenience since the pairwise force needs to be converted to x, y, and z components by multiplication with dx, dy, and dz. So the force computation already includes the /r part of dx/r etc.

If you look at the source of the compute function of pair styles lj/cut and python you should see that this is consistent throughout the LAMMPS code.