END-TO-END DISTANCE PROBLEM POLYMER

Hi LAMMPS users,

i would like to comput end-to-end length of a polymer using LAMMPS directly. Is this possible???
Thank you

Certainly, if you know the atom ids of the two ends, then you can
write it as a lammps variable expression:

variable rsq equal "(x[\{id0\}\] \- x\[{id1}])^2 + (y[\[id0\}\] \- y\[{id1}])^2 + (z[\{id0\}\] \- z\[{id1}])^2"

Aidan