biod.pnpi.spb.ru
/
alexxy
/
gromacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5affaa8
)
Fixed int overflow happening in genion when number of water molecules is large
author
Carsten Kutzner
<ckutzne@gwdg.de>
Wed, 16 Feb 2011 16:37:06 +0000
(17:37 +0100)
committer
Carsten Kutzner
<ckutzne@gwdg.de>
Wed, 16 Feb 2011 16:37:06 +0000
(17:37 +0100)
src/tools/gmx_genion.c
patch
|
blob
|
history
diff --git
a/src/tools/gmx_genion.c
b/src/tools/gmx_genion.c
index c1c209ac60ea2de3598c394036e9f5ded7e06249..5cff7733289acee0e8e2528d8239cf48a837b714 100644
(file)
--- a/
src/tools/gmx_genion.c
+++ b/
src/tools/gmx_genion.c
@@
-71,11
+71,12
@@
static void insert_ion(int nsa,int *nwater,
real extr_e,poti,rmin2;
rvec xei,dx;
gmx_bool bSub=FALSE;
-
int
maxrand;
+
gmx_large_int_t
maxrand;
ei=-1;
nw = *nwater;
- maxrand = 1000*nw;
+ maxrand = nw;
+ maxrand *= 1000;
if (bRandom) {
do {
ei = nw*rando(seed);