Skip to content

Commit

Permalink
use safe version of Domain::minimum_image() for large image flag counts.
Browse files Browse the repository at this point in the history
  • Loading branch information
akohlmey committed Dec 15, 2024
1 parent 014b304 commit b9a14a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/COLVARS/colvarproxy_lammps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ cvm::rvector colvarproxy_lammps::position_distance(cvm::atom_pos const &pos1,
double xtmp = pos2.x - pos1.x;
double ytmp = pos2.y - pos1.y;
double ztmp = pos2.z - pos1.z;
_lmp->domain->minimum_image(xtmp,ytmp,ztmp);
_lmp->domain->minimum_image_big(xtmp,ytmp,ztmp);
return {xtmp, ytmp, ztmp};
}

Expand Down
2 changes: 1 addition & 1 deletion src/PHONON/fix_phonon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ void FixPhonon::end_of_step()
ndim = sysdim;
for (i = 1; i < nucell; ++i) {
for (idim = 0; idim < sysdim; ++idim) dist2orig[idim] = Rnow[idx][ndim++] - Rnow[idx][idim];
domain->minimum_image(dist2orig);
domain->minimum_image_big(dist2orig);
for (idim = 0; idim < sysdim; ++idim) basis[i][idim] += dist2orig[idim];
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/RIGID/fix_ehex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ bool FixEHEX::check_cluster(tagint *shake_atom, int n, Region *region)

// take into account pbc

domain->minimum_image(xtemp);
domain->minimum_image_big(xtemp);

for (int k = 0; k < 3; k++) xcom[k] += mi * (x[lid[0]][k] + xtemp[k]);
}
Expand Down

0 comments on commit b9a14a5

Please sign in to comment.