X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fgmxana%2Fgmx_dyecoupl.cpp;fp=src%2Fgromacs%2Fgmxana%2Fgmx_dyecoupl.c;h=7c8898466a59b01f397a81bcf985219aa6e3645a;hb=c3f2d46e4047f0c465f7234b3784a2fa6f02a065;hp=2f985fa6e5469bbc262807293270a8d2dbadceca;hpb=0595b4a4c763a0bc574658992081abf8b0abc3fe;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/gmxana/gmx_dyecoupl.c b/src/gromacs/gmxana/gmx_dyecoupl.cpp similarity index 97% rename from src/gromacs/gmxana/gmx_dyecoupl.c rename to src/gromacs/gmxana/gmx_dyecoupl.cpp index 2f985fa6e5..7c8898466a 100644 --- a/src/gromacs/gmxana/gmx_dyecoupl.c +++ b/src/gromacs/gmxana/gmx_dyecoupl.cpp @@ -39,6 +39,7 @@ #include "gromacs/fileio/trx.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" +#include "gromacs/gmxana/gmx_ana.h" #include "gromacs/legacyheaders/copyrite.h" #include "gromacs/legacyheaders/macros.h" #include "gromacs/math/vec.h" @@ -97,7 +98,7 @@ int gmx_dyecoupl(int argc, char *argv[]) #define NFILE asize(fnm) - const char *in_trajfile, *in_ndxfile, *out_xvgrkfile = NULL, *out_xvginstefffile = NULL, *out_xvgrhistfile = NULL, *out_xvgkhistfile = NULL, *out_datfile = NULL; + const char *in_trajfile, *out_xvgrkfile = NULL, *out_xvginstefffile = NULL, *out_xvgrhistfile = NULL, *out_xvgkhistfile = NULL, *out_datfile = NULL; gmx_bool bHaveFirstFrame, bHaveNextFrame, indexOK = TRUE; int ndon, nacc; atom_id *donindex, *accindex; @@ -138,7 +139,6 @@ int gmx_dyecoupl(int argc, char *argv[]) /* Check command line options for filenames and set bool flags when switch used*/ in_trajfile = opt2fn("-f", NFILE, fnm); - in_ndxfile = opt2fn("-n", NFILE, fnm); out_xvgrkfile = opt2fn("-ot", NFILE, fnm); out_xvgrhistfile = opt2fn("-rhist", NFILE, fnm); out_xvgkhistfile = opt2fn("-khist", NFILE, fnm); @@ -289,8 +289,8 @@ int gmx_dyecoupl(int argc, char *argv[]) unitv(donvec, donvec); unitv(accvec, accvec); - svmul((real) 1. / ndon, donpos, donpos); - svmul((real) 1. / nacc, accpos, accpos); + svmul(1.0 / ndon, donpos, donpos); + svmul(1.0 / nacc, accpos, accpos); if (bPBCdist) { @@ -397,7 +397,7 @@ int gmx_dyecoupl(int argc, char *argv[]) for (i = 1; i < rkcount; i++) { - bin = (int) ((rvalues[i] - rmin) / rincr); + bin = static_cast((rvalues[i] - rmin) / rincr); rhist[bin] += 1; } if (bNormHist) @@ -431,7 +431,7 @@ int gmx_dyecoupl(int argc, char *argv[]) for (i = 1; i < rkcount; i++) { - bin = (int) ((kappa2values[i] - kmin) / kincr); + bin = static_cast((kappa2values[i] - kmin) / kincr); khist[bin] += 1; } if (bNormHist)