From: Magnus Lundborg Date: Thu, 21 Oct 2021 09:02:41 +0000 (+0200) Subject: Minor code clean-up in the NB FEP kernel. X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=b571262cdf709f1e4ac0604150f7c7162bd0dbd7 Minor code clean-up in the NB FEP kernel. --- diff --git a/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp b/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp index 6304d85ef2..214e41a9d9 100644 --- a/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp +++ b/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp @@ -401,8 +401,8 @@ static void nb_free_energy_kernel(const t_nblist& const RealType maxRInvSix(c_maxRInvSix); const RealType gmx_unused floatMin(GMX_FLOAT_MIN); - RealType dvdlCoul(zero); - RealType dvdlVdw(zero); + RealType dvdlCoul{ zero }; + RealType dvdlVdw{ zero }; /* Lambda factor for state A, 1-lambda*/ real LFC[NSTATES], LFV[NSTATES]; @@ -621,10 +621,10 @@ static void nb_free_energy_kernel(const t_nblist& preloadGapsysScaleLinpointVdW[j] = 0; preloadGapsysScaleLinpointCoul[j] = 0; + typeIndices[STATE_A][j] = ntiA + typeA[jjnr[k]]; + typeIndices[STATE_B][j] = ntiB + typeB[jjnr[k]]; for (int i = 0; i < NSTATES; i++) { - typeIndices[STATE_A][j] = ntiA + typeA[jjnr[k]]; - typeIndices[STATE_B][j] = ntiB + typeB[jjnr[k]]; preloadLjPmeC6Grid[i][j] = 0; preloadQq[i][j] = 0; preloadSigma6[i][j] = 0;