X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fgmxana%2Fgmx_rotmat.cpp;fp=src%2Fgromacs%2Fgmxana%2Fgmx_rotmat.c;h=28fd1e81a6d317aadb713d362d7a8c6f97559a5f;hb=c3f2d46e4047f0c465f7234b3784a2fa6f02a065;hp=1c95da982faae63eb698031aee3a8ab67079aced;hpb=0595b4a4c763a0bc574658992081abf8b0abc3fe;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/gmxana/gmx_rotmat.c b/src/gromacs/gmxana/gmx_rotmat.cpp similarity index 97% rename from src/gromacs/gmxana/gmx_rotmat.c rename to src/gromacs/gmxana/gmx_rotmat.cpp index 1c95da982f..28fd1e81a6 100644 --- a/src/gromacs/gmxana/gmx_rotmat.c +++ b/src/gromacs/gmxana/gmx_rotmat.cpp @@ -34,8 +34,8 @@ */ #include "gmxpre.h" -#include -#include +#include +#include #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/confio.h" @@ -50,6 +50,7 @@ #include "gromacs/pbcutil/rmpbc.h" #include "gromacs/topology/index.h" #include "gromacs/utility/futil.h" +#include "gromacs/utility/gmxassert.h" #include "gromacs/utility/smalloc.h" static void get_refx(output_env_t oenv, const char *trxfn, int nfitdim, int skip, @@ -134,8 +135,8 @@ static void get_refx(output_env_t oenv, const char *trxfn, int nfitdim, int skip } } msd /= tot_mass; - srmsd[i] += sqrt(msd); - srmsd[j] += sqrt(msd); + srmsd[i] += std::sqrt(msd); + srmsd[j] += std::sqrt(msd); } sfree(xi[i]); } @@ -251,6 +252,7 @@ int gmx_rotmat(int argc, char *argv[]) get_index(&top.atoms, ftp2fn_null(efNDX, NFILE, fnm), 1, &gnx, &index, &grpname); + GMX_RELEASE_ASSERT(reffit[0] != NULL, "Options inconsistency; reffit[0] is NULL"); if (reffit[0][0] != 'n') { get_refx(oenv, ftp2fn(efTRX, NFILE, fnm), reffit[0][2] == 'z' ? 3 : 2, skip,