X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fgmxana%2Fgmx_mdmat.cpp;fp=src%2Fgromacs%2Fgmxana%2Fgmx_mdmat.c;h=d832088c9051cdf4e91e6190ef092b8eaf112958;hb=84ef6402a10d308f2e6fa9c53a5717103224f637;hp=8d2ac08527ab1a3d5367d54d667db66d3cfcfd83;hpb=3a5934fccd489925ab5e80aeb4bf703040137071;p=alexxy%2Fgromacs.git 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 8d2ac08527..d832088c90 100644 --- a/src/gromacs/gmxana/gmx_mdmat.c +++ b/src/gromacs/gmxana/gmx_mdmat.cpp @@ -36,8 +36,10 @@ */ #include "gmxpre.h" -#include -#include +#include +#include + +#include #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]++; } - 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++) { - r = sqrt(mdmat[resi][resj]); + r = std::sqrt(mdmat[resi][resj]); 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; - static gmx_bool bAtom = FALSE; 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; - int i, j, nres, natoms, nframes, it, trxnat; + int i, j, nres, natoms, nframes, trxnat; t_trxstatus *status; - int nr0; gmx_bool bCalcN, bFrames; real t, ratio; char title[256], label[234];