1339 |
|
for (int j = 0; j < 3; j++) { |
1340 |
|
scaled[j] -= roundMe(scaled[j]); |
1341 |
|
scaled[j] += 0.5; |
1342 |
+ |
// Handle the special case when an object is exactly on the |
1343 |
+ |
// boundary (a scaled coordinate of 1.0 is the same as |
1344 |
+ |
// scaled coordinate of 0.0) |
1345 |
+ |
if (scaled[j] >= 1.0) scaled[j] -= 1.0; |
1346 |
|
} |
1347 |
|
|
1348 |
|
// find xyz-indices of cell that cutoffGroup is in. |
1367 |
|
for (int j = 0; j < 3; j++) { |
1368 |
|
scaled[j] -= roundMe(scaled[j]); |
1369 |
|
scaled[j] += 0.5; |
1370 |
+ |
// Handle the special case when an object is exactly on the |
1371 |
+ |
// boundary (a scaled coordinate of 1.0 is the same as |
1372 |
+ |
// scaled coordinate of 0.0) |
1373 |
+ |
if (scaled[j] >= 1.0) scaled[j] -= 1.0; |
1374 |
|
} |
1375 |
|
|
1376 |
|
// find xyz-indices of cell that cutoffGroup is in. |
1397 |
|
for (int j = 0; j < 3; j++) { |
1398 |
|
scaled[j] -= roundMe(scaled[j]); |
1399 |
|
scaled[j] += 0.5; |
1400 |
+ |
// Handle the special case when an object is exactly on the |
1401 |
+ |
// boundary (a scaled coordinate of 1.0 is the same as |
1402 |
+ |
// scaled coordinate of 0.0) |
1403 |
+ |
if (scaled[j] >= 1.0) scaled[j] -= 1.0; |
1404 |
|
} |
1405 |
|
|
1406 |
|
// find xyz-indices of cell that cutoffGroup is in. |