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
Replace rounding using int(x+0.5) with roundToInt
[alexxy/gromacs.git]
/
src
/
gromacs
/
mdlib
/
shellfc.cpp
diff --git
a/src/gromacs/mdlib/shellfc.cpp
b/src/gromacs/mdlib/shellfc.cpp
index e4b54384c5ba642101ca418cc2f3ac543704f45c..667c9581508bfa4e2e382d41f4302d5c0433ee87 100644
(file)
--- a/
src/gromacs/mdlib/shellfc.cpp
+++ b/
src/gromacs/mdlib/shellfc.cpp
@@
-848,7
+848,7
@@
static real rms_force(const t_commrec *cr, gmx::ArrayRef<const gmx::RVec> force,
buf[2] = *sf_dir;
buf[3] = *Epot;
gmx_sumd(4, buf, cr);
- ntot =
static_cast<int>(buf[1] + 0.5
);
+ ntot =
gmx::roundToInt(buf[1]
);
*sf_dir = buf[2];
*Epot = buf[3];
}