X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fgmxlib%2Fdisre.cpp;fp=src%2Fgromacs%2Fgmxlib%2Fdisre.cpp;h=491504b82e6575ccb2653c2100e44f5055a5fc43;hb=ac65de032cce28672cb4e14cd9d83d853855a43a;hp=cecfb04bfac6acd65981e5b725034f47d261c33d;hpb=a04f855267ee04b810f645e184f75fe6b520b8af;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/gmxlib/disre.cpp b/src/gromacs/gmxlib/disre.cpp index cecfb04bfa..491504b82e 100644 --- a/src/gromacs/gmxlib/disre.cpp +++ b/src/gromacs/gmxlib/disre.cpp @@ -41,8 +41,9 @@ #include "config.h" -#include -#include +#include +#include +#include #include @@ -109,7 +110,7 @@ void init_disres(FILE *fplog, const gmx_mtop_t *mtop, else { dd->dr_bMixed = ir->bDisreMixed; - dd->ETerm = exp(-(ir->delta_t/ir->dr_tau)); + dd->ETerm = std::exp(-(ir->delta_t/ir->dr_tau)); } dd->ETerm1 = 1.0 - dd->ETerm; @@ -331,7 +332,7 @@ void calc_disres_R_6(int nfa, const t_iatom forceatoms[], const t_iparams ip[], rt_1 = gmx_invsqrt(rt2); rt_3 = rt_1*rt_1*rt_1; - rt[pair] = sqrt(rt2); + rt[pair] = std::sqrt(rt2); if (bTav) { /* Here we update rm3tav in t_fcdata using the data @@ -429,15 +430,15 @@ real ta_disres(int nfa, const t_iatom forceatoms[], const t_iparams ip[], { bConservative = (dr_weighting == edrwConservative) && (npair > 1); bMixed = dr_bMixed; - Rt = pow(Rt_6[res], -sixth); - Rtav = pow(Rtav_6[res], -sixth); + Rt = std::pow(Rt_6[res], -sixth); + Rtav = std::pow(Rtav_6[res], -sixth); } else { /* When rtype=2 use instantaneous not ensemble avereged distance */ bConservative = (npair > 1); bMixed = FALSE; - Rt = pow(Rtl_6[res], -sixth); + Rt = std::pow(Rtl_6[res], -sixth); Rtav = Rt; } @@ -501,7 +502,7 @@ real ta_disres(int nfa, const t_iatom forceatoms[], const t_iparams ip[], } if (bViolation) { - mixed_viol = sqrt(tav_viol*instant_viol); + mixed_viol = std::sqrt(tav_viol*instant_viol); f_scal = -k0*mixed_viol; violtot += mixed_viol; } @@ -528,7 +529,7 @@ real ta_disres(int nfa, const t_iatom forceatoms[], const t_iparams ip[], } else { - f_scal /= (real)npair; + f_scal /= npair; f_scal = std::max(f_scal, fmax_scal); } @@ -557,12 +558,12 @@ real ta_disres(int nfa, const t_iatom forceatoms[], const t_iparams ip[], { if (!dr_bMixed) { - weight_rt_1 *= pow(dd->rm3tav[pair], seven_three); + weight_rt_1 *= std::pow(dd->rm3tav[pair], seven_three); } else { - weight_rt_1 *= tav_viol_Rtav7*pow(dd->rm3tav[pair], seven_three)+ - instant_viol_Rtav7*pow(dd->rt[pair], -7); + weight_rt_1 *= tav_viol_Rtav7*std::pow(dd->rm3tav[pair], seven_three)+ + instant_viol_Rtav7*std::pow(dd->rt[pair], static_cast(-7)); } }