Dear All,
I am working with lj/cut potential.
I used the following commands to output pair list , coordinates of atom , force on atom and distance between pairs of atoms. When I try to calculate fx (force in xdirection) on each atom using LJ 126 formula, I was unable to get the ‘fx’ which i got from dump command.
Am i doing anything wrong here?
compute 1 upper property/local patom1 patom2
compute 2 upper pair/local dist force
dump 2 upper custom 10 cfs id x y z fx
dump 5 upper local 10 indices c_1[1] c_1[2]
dump 6 upper local 10 dist_force c_2[1] c_2[2]
Thanks&Regards
Sivashankar

Fx will be the sum of all forces on atom I in your dump atom file.
Shoudl be the sum of all terms involving atom I in your dump local file.
Steve
Hi steeve
thanks for the reply.
I have one more question on the LJ force.
I used these commands for LJ Potential.
pair_style lj/cut 2.5
pair_coeff * * 1.0 1.0 2.5
compute 2 upper pair/local dist force eng
dump 6 upper local 10 dist_force c_2[1] c_2[2] c_2[3]
I calculated the forces from the pair distances that i got from the dump command using the expression 4*[12r^13 + 6r^7]. The calculated forces and the forces that i got from the dump command are not matching. But the energy is exactly matching.
pair distance Calculated forces Forces from dump command
1.93527 0.2271 0.0117334
2.25307 0.0802 0.03557
Can anyone help me
Thanks in advance
Sivashankar
Compute pair/local was missing a factor of “r” in the force calculation.
I’ll post a patch this AM. Then see if you get the answers you expect.
Thanks,
Steve