X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fmdlib%2Fcoupling.c;h=b156c61fad22009667945749571563f0af1b46bd;hb=e336499626008e8ff06b1648c1b7afbab38c949b;hp=7583da13815a4d61edabc6a83c2da295969e404a;hpb=1ff3f3bf02fa4457248228557ab0d3ffbbb7cd76;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/mdlib/coupling.c b/src/gromacs/mdlib/coupling.c index 7583da1381..b156c61fad 100644 --- a/src/gromacs/mdlib/coupling.c +++ b/src/gromacs/mdlib/coupling.c @@ -38,20 +38,19 @@ #include -#include "gromacs/legacyheaders/typedefs.h" -#include "gromacs/legacyheaders/types/commrec.h" -#include "gromacs/utility/smalloc.h" -#include "gromacs/legacyheaders/update.h" -#include "gromacs/math/vec.h" #include "gromacs/legacyheaders/macros.h" -#include "gromacs/math/units.h" +#include "gromacs/legacyheaders/mdrun.h" #include "gromacs/legacyheaders/names.h" -#include "gromacs/utility/fatalerror.h" -#include "gromacs/legacyheaders/txtdump.h" #include "gromacs/legacyheaders/nrnb.h" -#include "gromacs/random/random.h" +#include "gromacs/legacyheaders/txtdump.h" +#include "gromacs/legacyheaders/typedefs.h" #include "gromacs/legacyheaders/update.h" -#include "gromacs/legacyheaders/mdrun.h" +#include "gromacs/legacyheaders/types/commrec.h" +#include "gromacs/math/units.h" +#include "gromacs/math/vec.h" +#include "gromacs/random/random.h" +#include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/smalloc.h" #define NTROTTERPARTS 3 @@ -1237,7 +1236,8 @@ int **init_npt_vars(t_inputrec *ir, t_state *state, t_extmass *MassQ, gmx_bool b real NPT_energy(t_inputrec *ir, t_state *state, t_extmass *MassQ) { - int i, j, nd, ndj, bmass, qmass, ngtcall; + int i, j, bmass, qmass, ngtcall; + real nd, ndj; real ener_npt, reft, eta, kT, tau; double *ivxi, *ixi; double *iQinv; @@ -1320,7 +1320,7 @@ real NPT_energy(t_inputrec *ir, t_state *state, t_extmass *MassQ) reft = max(ir->opts.ref_t[i], 0); kT = BOLTZ * reft; - if (nd > 0) + if (nd > 0.0) { if (IR_NVT_TROTTER(ir)) { @@ -1337,7 +1337,7 @@ real NPT_energy(t_inputrec *ir, t_state *state, t_extmass *MassQ) } else { - ndj = 1; + ndj = 1.0; } ener_npt += ndj*ixi[j]*kT; }