From: Berk Hess Date: Thu, 20 Feb 2014 09:01:22 +0000 (+0100) Subject: Fixed bug with LJ pot-switch in 4xN kernels X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=7ef5eaa461a2d0e50b18a59fcf278e9e843557f5;p=alexxy%2Fgromacs.git Fixed bug with LJ pot-switch in 4xN kernels The recent commit of LJ switch functions in the nbnxn kernels contained a bug in the 4xN kernels which caused the force on some pairs not to be switched. Change-Id: Ib4303223924e92d7e84641071a4a56955de70274 --- diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h index c6c457d81d..b7e54decdf 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h @@ -1054,13 +1054,9 @@ #ifdef CALC_LJ #ifdef CALC_COULOMB - fscal_S0 = gmx_simd_mul_r(rinvsq_S0, - gmx_simd_add_r(frcoul_S0, - gmx_simd_sub_r(FrLJ12_S0, FrLJ6_S0))); + fscal_S0 = gmx_simd_mul_r(rinvsq_S0, gmx_simd_add_r(frcoul_S0, frLJ_S0)); #else - fscal_S0 = gmx_simd_mul_r(rinvsq_S0, - ( - gmx_simd_sub_r(FrLJ12_S0, FrLJ6_S0))); + fscal_S0 = gmx_simd_mul_r(rinvsq_S0, frLJ_S0); #endif #ifdef CALC_COULOMB fscal_S1 = gmx_simd_mul_r(rinvsq_S1, gmx_simd_add_r(frcoul_S1, frLJ_S1));