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_mdmat.cpp
diff --git
a/src/gromacs/gmxana/gmx_mdmat.c
b/src/gromacs/gmxana/gmx_mdmat.cpp
similarity index 97%
rename from
src/gromacs/gmxana/gmx_mdmat.c
rename to
src/gromacs/gmxana/gmx_mdmat.cpp
index 8d2ac08527ab1a3d5367d54d667db66d3cfcfd83..d832088c9051cdf4e91e6190ef092b8eaf112958 100644
(file)
--- a/
src/gromacs/gmxana/gmx_mdmat.c
+++ b/
src/gromacs/gmxana/gmx_mdmat.cpp
@@
-36,8
+36,10
@@
*/
#include "gmxpre.h"
*/
#include "gmxpre.h"
-#include <math.h>
-#include <string.h>
+#include <cmath>
+#include <cstring>
+
+#include <algorithm>
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/confio.h"
@@
-134,7
+136,7
@@
static void calc_mat(int nres, int natoms, int rndx[],
nmat[resi][j]++;
nmat[resj][i]++;
}
nmat[resi][j]++;
nmat[resj][i]++;
}
- mdmat[resi][resj] = min(r2, mdmat[resi][resj]);
+ mdmat[resi][resj] =
std::
min(r2, mdmat[resi][resj]);
}
}
}
}
@@
-143,7
+145,7
@@
static void calc_mat(int nres, int natoms, int rndx[],
mdmat[resi][resi] = 0;
for (resj = resi+1; (resj < nres); resj++)
{
mdmat[resi][resi] = 0;
for (resj = resi+1; (resj < nres); resj++)
{
- r = sqrt(mdmat[resi][resj]);
+ r = s
td::s
qrt(mdmat[resi][resj]);
mdmat[resi][resj] = r;
mdmat[resj][resi] = r;
}
mdmat[resi][resj] = r;
mdmat[resj][resi] = r;
}
@@
-183,7
+185,6
@@
int gmx_mdmat(int argc, char *argv[])
"The output can be processed with [gmx-xpm2ps] to make a PostScript (tm) plot."
};
static real truncate = 1.5;
"The output can be processed with [gmx-xpm2ps] to make a PostScript (tm) plot."
};
static real truncate = 1.5;
- static gmx_bool bAtom = FALSE;
static int nlevels = 40;
t_pargs pa[] = {
{ "-t", FALSE, etREAL, {&truncate},
static int nlevels = 40;
t_pargs pa[] = {
{ "-t", FALSE, etREAL, {&truncate},
@@
-210,9
+211,8
@@
int gmx_mdmat(int argc, char *argv[])
char *grpname;
int *rndx, *natm, prevres, newres;
char *grpname;
int *rndx, *natm, prevres, newres;
- int i, j, nres, natoms, nframes,
it,
trxnat;
+ int i, j, nres, natoms, nframes, trxnat;
t_trxstatus *status;
t_trxstatus *status;
- int nr0;
gmx_bool bCalcN, bFrames;
real t, ratio;
char title[256], label[234];
gmx_bool bCalcN, bFrames;
real t, ratio;
char title[256], label[234];