Dear all,

When I compute the center of a angle as below:

for (n = 0; n < nanglelist; n++)

{

i1 = anglelist[n][0];

i2 = anglelist[n][1];

i3 = anglelist[n][2];

type = anglelist[n][3];

// find the center-of-mass

tcx = (x[i1][0] + x[i2][0] + x[i3][0])/3.0;

tcy = (x[i1][1] + x[i2][1] + x[i3][1])/3.0;

tcz = (x[i1][2] + x[i2][2] + x[i3][2])/3.0;

}

it has no problem at local domain, but if some of the atoms belong to one angle pass through the boundary, the compute is incorrect.

Also, I compute some vectors like this

a21x = x[i2][0] - x[i1][0];

a21y = x[i2][1] - x[i1][1];

a21z = x[i2][2] - x[i1][2];

If this is correct when the bond with atom i1 and atom i2 pass across the boundary.

Thanks,

Lynn H. Ye