Fix port of gapsys-LJ to simd.
authorSebastian Kehl <sebastian.kehl@mpcdf.mpg.de>
Fri, 24 Sep 2021 16:14:14 +0000 (18:14 +0200)
committerMagnus Lundborg <magnus.lundborg@scilifelab.se>
Tue, 5 Oct 2021 11:38:46 +0000 (11:38 +0000)
src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp
src/gromacs/gmxlib/nonbonded/nb_softcore.h
src/gromacs/listed_forces/pairs.cpp

index 41bcedc0585e0de8d7559f0e9d256797d501792b..e9f138e572214fb126162e6bd8d275d7dd21e768 100644 (file)
@@ -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
                             {
index 2fc4754cc24652ef6eec085eb6d49656290914d6..8bd817cbfb2d8d1582ca4f127ce280a5671f7a15 100644 (file)
@@ -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);
index 59fb748c553092a971292b97d41e6bc1b0f58dc3..8e267f23b7daf3103ca6888db3d5ce00bd30217e 100644 (file)
@@ -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
             {