From: Sebastian Kehl Date: Fri, 24 Sep 2021 16:14:14 +0000 (+0200) Subject: Fix port of gapsys-LJ to simd. X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=45bca68776a4eafd3bcf064118335218e3249397;p=alexxy%2Fgromacs.git Fix port of gapsys-LJ to simd. --- diff --git a/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp b/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp index 41bcedc058..e9f138e572 100644 --- a/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp +++ b/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp @@ -571,10 +571,6 @@ static void nb_free_energy_kernel(const t_nblist& { /* c12 is stored scaled with 12.0 and c6 is scaled with 6.0 - correct for this */ preloadSigma6VdWGapsys[i][s] = 0.5_real * c12 / c6; - if (preloadSigma6VdWGapsys[i][s] < sigma6VdWGapsys) - { - preloadSigma6VdWGapsys[i][s] = sigma6VdWGapsys; - } } else { diff --git a/src/gromacs/gmxlib/nonbonded/nb_softcore.h b/src/gromacs/gmxlib/nonbonded/nb_softcore.h index 2fc4754cc2..8bd817cbfb 100644 --- a/src/gromacs/gmxlib/nonbonded/nb_softcore.h +++ b/src/gromacs/gmxlib/nonbonded/nb_softcore.h @@ -250,9 +250,9 @@ static inline void lennardJonesQuadraticPotential(const RealType c6, * ((6.5_real * rInv14C - rInv8C) - (13 * rInv13C - 2. * rInv7C) + (6.5_real * rInv12C - rInv6C)); - *potential = *potential - + gmx::selectByMask(((c12s * repulsionShift) - (c6s * dispersionShift)), - computeValues); + potentialQuad = potentialQuad + + gmx::selectByMask(((c12s * repulsionShift) - (c6s * dispersionShift)), + computeValues); *force = gmx::blend(*force, forceQuad, computeValues); *potential = gmx::blend(*potential, potentialQuad, computeValues); *dvdl = *dvdl + gmx::selectByMask(dvdlQuad, computeValues); diff --git a/src/gromacs/listed_forces/pairs.cpp b/src/gromacs/listed_forces/pairs.cpp index 59fb748c55..8e267f23b7 100644 --- a/src/gromacs/listed_forces/pairs.cpp +++ b/src/gromacs/listed_forces/pairs.cpp @@ -250,11 +250,6 @@ static real free_energy_evaluate_single(real * Correct for this by multiplying with (1/12.0)/(1/6.0)=6.0/12.0=0.5. */ sigma6VdWGapsys[i] = half * c12[i] / c6[i]; - if (sigma6VdWGapsys[i] - < scParams.sigma6VdWGapsys) /* for disappearing coul and vdw with soft core at the same time */ - { - sigma6VdWGapsys[i] = scParams.sigma6VdWGapsys; - } } else {