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
Merge branch 'master' into pygromacs
[alexxy/gromacs.git]
/
src
/
gromacs
/
gmxana
/
gmx_saltbr.cpp
diff --git
a/src/gromacs/gmxana/gmx_saltbr.c
b/src/gromacs/gmxana/gmx_saltbr.cpp
similarity index 96%
rename from
src/gromacs/gmxana/gmx_saltbr.c
rename to
src/gromacs/gmxana/gmx_saltbr.cpp
index cc4417213daa0cc39ce816d0227a35ca93273b60..85e05de0e8ada5a44a612635ea529a5155b1d401 100644
(file)
--- a/
src/gromacs/gmxana/gmx_saltbr.c
+++ b/
src/gromacs/gmxana/gmx_saltbr.cpp
@@
-36,8
+36,8
@@
*/
#include "gmxpre.h"
*/
#include "gmxpre.h"
-#include <
math.
h>
-#include <
string.h
>
+#include <
cmat
h>
+#include <
cstring
>
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/filenm.h"
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/filenm.h"
@@
-75,7
+75,7
@@
static t_charge *mk_charge(t_atoms *atoms, t_block *cgs, int *nncg)
{
qq += atoms->atom[j].q;
}
{
qq += atoms->atom[j].q;
}
- if (
f
abs(qq) > 1.0e-5)
+ if (
std::
abs(qq) > 1.0e-5)
{
srenew(cg, ncg+1);
cg[ncg].q = qq;
{
srenew(cg, ncg+1);
cg[ncg].q = qq;
@@
-124,7
+124,7
@@
static real calc_dist(t_pbc *pbc, rvec x[], t_block *cgs, int icg, int jcg)
}
}
}
}
}
}
- return sqrt(mindist2);
+ return s
td::s
qrt(mindist2);
}
int gmx_saltbr(int argc, char *argv[])
}
int gmx_saltbr(int argc, char *argv[])
@@
-170,14
+170,12
@@
int gmx_saltbr(int argc, char *argv[])
int ePBC;
char *buf;
t_trxstatus *status;
int ePBC;
char *buf;
t_trxstatus *status;
- int i, j, k, m, nnn, teller, ncg
, n1, n2, n3, natoms
;
+ int i, j, k, m, nnn, teller, ncg;
real t, *time, qi, qj;
t_charge *cg;
real ***cgdist;
int **nWithin;
real t, *time, qi, qj;
t_charge *cg;
real ***cgdist;
int **nWithin;
- double t0, dt;
- char label[234];
t_pbc pbc;
rvec *x;
matrix box;
t_pbc pbc;
rvec *x;
matrix box;
@@
-199,7
+197,7
@@
int gmx_saltbr(int argc, char *argv[])
snew(nWithin[i], ncg);
}
snew(nWithin[i], ncg);
}
-
natoms =
read_first_x(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &t, &x, box);
+ read_first_x(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &t, &x, box);
teller = 0;
time = NULL;
teller = 0;
time = NULL;