# Understanding periodic boundaries with center of mass

Background

Hello,

I am trying to calculate the center of mass (COM) of two different parts of a molecule on my system.

During the simulation the molecule “closes” and “open” in which the two groups of the molecules come closer and farther away respectively

I want to measure the count of each configuration (closed and open) using the COM compute and using the distance between the COM to classify if it is opened or closed.

I have gathered initial results where the distance between the COM for the two group continually goes up which in inconsistent with the system I have(stays closed the whole time).

As I understand the COM compute gives you unwrapped coordinates.

I still am having trouble grasping the concept of unwrapped coordinates how the apply to a periodic boundary system

For example I have a data set for a periodic boundary of 51x51x51

153.29818 178.29083 139.69913 17.251465 -17.271319 21.559371
154.13428 175.47004 137.51149 16.807555 -20.777417 19.887791

Where the six numbers for each line are the COM coordinates for the two groups(x1,y1,z1 and x2,y2,z2)

Questions

1. Are the coordinates where the value is above that for the periodic boundary mean it has passed the periodic boundary and continues to increase in a positive manner ?

For example does the x1 for line 1 153.29818 mean it has passed the periodic boundary twice as it has a length of about three periodic boxes in the x direction?

1. Does a negative number just indicate it passed the periodic boundary on say the left side? if passing on the right side means increasing in a positive manner

Thanks,

Michael Goytia
University of Utah Chemistry Department

1 Like

Background

Hello,

I am trying to calculate the center of mass (COM) of two different parts of
a molecule on my system.

During the simulation the molecule “closes” and “open” in which the two
groups of the molecules come closer and farther away respectively

parts of one molecule, in the second about two groups of molecules.
which is it now?

I want to measure the count of each configuration (closed and open) using
the COM compute and using the distance between the COM to classify if it is
opened or closed.

I have gathered initial results where the distance between the COM for the
two group continually goes up which in inconsistent with the system I
have(stays closed the whole time).

As I understand the COM compute gives you unwrapped coordinates.

I still am having trouble grasping the concept of unwrapped coordinates how
the apply to a periodic boundary system

LAMMPS keeps track when an atom passes through a periodic boundary and
either increases or decreases the corresponding "image counter" for
the given direction and atom. this allows to have the x, y and z
coordinates to be (approximately) inside the box and yet one can
reconstruct the position of any single atom without jumps from
wrapping them back into the principal cell.

For example I have a data set for a periodic boundary of 51x51x51

this is an incomplete description, as it doesn't state where origin is
located relative to the (cubic) periodic cell.

153.29818 178.29083 139.69913 17.251465 -17.271319 21.559371
154.13428 175.47004 137.51149 16.807555 -20.777417 19.887791

Where the six numbers for each line are the COM coordinates for the two
groups(x1,y1,z1 and x2,y2,z2)

Questions

1) Are the coordinates where the value is above that for the periodic
boundary mean it has passed the periodic boundary and continues to increase
in a positive manner ?

impossible to say without knowing the location of the box corners or
the origin relative to the box.

For example does the x1 for line 1 153.29818 mean it has passed the periodic
boundary twice as it has a length of about three periodic boxes in the x
direction?

2) Does a negative number just indicate it passed the periodic boundary on
say the left side? if passing on the right side means increasing in a
positive manner

same as above.

you can easily output the position of atoms and image flags for all
atoms to a dump file and then track down how COMs are computed.

axel.

My apologizes, Two groups(two different parts) within one molecule.
The two groups in the molecule come together within relative distance (closed)
or stay elongated (open)

Once again forgive my incompleteness.

1. 51.577 xlo xhi

2. 51.048 ylo yhi

-0.338411 49.3384 zlo zhi

I will try the above suggestion.

I hope the above responses to my incompleteness will help you to give me a clearer answer.

Thanks for the help.

Michael Goytia

You can also write a (2nd) dump file with unwrapped coords

(xu yu zu in dump custom), and see for each atom now

the wrapped coord (x y z) is combined with the image

flag and box length to get the unwrapped coord. The COM

is simply computed on the unwrapped coords.

Steve