I have minimized the energy of a system of two atoms. Now I have their coordinates. How do I compute the distance between the two atoms? What is the command to find the distance between the two atoms using their coordinates?
# Screen and file output
thermo 1
thermo_style custom step etotal temp fmax fnorm dist
compute pnrg all pe/atom
compute 1 all pair/local dist
dump cg all custom 10 Cul_2atom.min id type x y z c_pnrg
# Minimize total structure
min_style cg
min_modify line backtrack
minimize 1.0e-10 1.0e-10 30000 100000
undump cg
undump rmin
from here - the lammps documentation:
This will write out the distance, energy, and force between all pairs of atoms in your system and output to a dump file.