Hello,
I would like to check my calculation. I set up one group consisting of only two particles. I try to calculate the evdwl in this group by compute command. However, LAMMPS always gives me the total evdwl of the system. The relevant commands are as following:
group 1 id 344 345
variable LJ_pair equal evdwl
variable distance equal sqrt(add(mult(sub(x[344],x[345]),sub(x[344],x[345])),mult(sub(y[344],y[345]),sub(y[344],y[345]))))
compute 2 1 variable LJ_pair
compute 4 1 epair/atom
compute 5 1 attribute/atom x
fix 6 1 print 50 " at {stepi} distance = {distance} LJ = ${LJ_pair}"
dump 3 1 custom 50 pairPotential c_4
dump 4 1 custom 50 attributesFile c_5
By the command of “compute 2 …” I assume that LAPPMS should calculate the LJ interaction in group 1, not the whole system. Apparently, it is not. Could anyone tell me how I can get LJ between two particles?
dump 3 and dump 4 only gives me two empty files. I am confused why two files are empty. Please give me a hint.
All the best!
Dongsheng