git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12963 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -301,7 +301,7 @@ void DeleteAtoms::delete_overlap(int narg, char **arg)
|
|||||||
|
|
||||||
// double loop over owned atoms and their full neighbor list
|
// double loop over owned atoms and their full neighbor list
|
||||||
// at end of loop, there are no more overlaps
|
// at end of loop, there are no more overlaps
|
||||||
// only ever delete owned atom I, never J even if owned
|
// only ever delete owned atom I in I loop iteration, never J even if owned
|
||||||
|
|
||||||
tagint *tag = atom->tag;
|
tagint *tag = atom->tag;
|
||||||
int *mask = atom->mask;
|
int *mask = atom->mask;
|
||||||
@ -340,10 +340,18 @@ void DeleteAtoms::delete_overlap(int narg, char **arg)
|
|||||||
if (factor_lj == 0.0 && factor_coul == 0.0) continue;
|
if (factor_lj == 0.0 && factor_coul == 0.0) continue;
|
||||||
|
|
||||||
// only consider deletion if I,J distance < cutoff
|
// only consider deletion if I,J distance < cutoff
|
||||||
|
// compute rsq identically on both I,J loop iterations
|
||||||
|
// ignoring possibility that I,J tags are equal
|
||||||
|
|
||||||
delx = xtmp - x[j][0];
|
if (tag[i] < tag[j]) {
|
||||||
dely = ytmp - x[j][1];
|
delx = xtmp - x[j][0];
|
||||||
delz = ztmp - x[j][2];
|
dely = ytmp - x[j][1];
|
||||||
|
delz = ztmp - x[j][2];
|
||||||
|
} else {
|
||||||
|
delx = x[j][0] - xtmp;
|
||||||
|
dely = x[j][1] - ytmp;
|
||||||
|
delz = x[j][2] - ztmp;
|
||||||
|
}
|
||||||
rsq = delx*delx + dely*dely + delz*delz;
|
rsq = delx*delx + dely*dely + delz*delz;
|
||||||
if (rsq >= cutsq) continue;
|
if (rsq >= cutsq) continue;
|
||||||
|
|
||||||
|
|||||||
@ -175,7 +175,7 @@ void Special::build()
|
|||||||
memory->destroy(count);
|
memory->destroy(count);
|
||||||
|
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
// done if special_bonds for 1-3, 1-4 are set to 1.0
|
// done if special_bond weights for 1-3, 1-4 are set to 1.0
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
|
|
||||||
if (force->special_lj[2] == 1.0 && force->special_coul[2] == 1.0 &&
|
if (force->special_lj[2] == 1.0 && force->special_coul[2] == 1.0 &&
|
||||||
@ -292,7 +292,7 @@ void Special::build()
|
|||||||
|
|
||||||
memory->destroy(buf);
|
memory->destroy(buf);
|
||||||
|
|
||||||
// done if special_bonds for 1-4 are set to 1.0
|
// done if special_bond weights for 1-4 are set to 1.0
|
||||||
|
|
||||||
if (force->special_lj[3] == 1.0 && force->special_coul[3] == 1.0) {
|
if (force->special_lj[3] == 1.0 && force->special_coul[3] == 1.0) {
|
||||||
dedup();
|
dedup();
|
||||||
|
|||||||
Reference in New Issue
Block a user