--- branches/development/src/parallel/ForceMatrixDecomposition.cpp 2012/07/06 22:01:58 1767 +++ branches/development/src/parallel/ForceMatrixDecomposition.cpp 2012/07/27 17:34:10 1771 @@ -1389,6 +1389,10 @@ namespace OpenMD { for (int j = 0; j < 3; j++) { scaled[j] -= roundMe(scaled[j]); scaled[j] += 0.5; + // Handle the special case when an object is exactly on the + // boundary (a scaled coordinate of 1.0 is the same as + // scaled coordinate of 0.0) + if (scaled[j] >= 1.0) scaled[j] -= 1.0; } // find xyz-indices of cell that cutoffGroup is in.