biod.pnpi.spb.ru
/
alexxy
/
gromacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Manage compiler flags and some include options per file or target, not globally
[alexxy/gromacs.git]
/
src
/
gromacs
/
listed_forces
/
position_restraints.cpp
diff --git
a/src/gromacs/listed_forces/position_restraints.cpp
b/src/gromacs/listed_forces/position_restraints.cpp
index 460b055d9eeb04ab85e847e72bd949212d18a748..b3309e623625b0a54a17aee44ee282efd0acbb72 100644
(file)
--- a/
src/gromacs/listed_forces/position_restraints.cpp
+++ b/
src/gromacs/listed_forces/position_restraints.cpp
@@
-100,7
+100,7
@@
void posres_dx(const rvec x, const rvec pos0A, const rvec pos0B,
posA *= pbc->box[m][m];
posB *= pbc->box[m][m];
assert(npbcdim <= DIM);
- for (d = m+1; d < npbcdim; d++)
+ for (d = m+1; d < npbcdim
&& d < DIM
; d++)
{
posA += pos0A[d]*pbc->box[d][m];
posB += pos0B[d]*pbc->box[d][m];