Remove SoftcoreType::None.
authorSebastian Kehl <sebastian.kehl@mpcdf.mpg.de>
Wed, 22 Sep 2021 13:54:48 +0000 (15:54 +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/listed_forces/pairs.cpp
src/gromacs/mdtypes/md_enums.cpp
src/gromacs/mdtypes/md_enums.h

index d51dc4e8d1bd5e443f5c5810bf9951b8a2843612..33e485d191f139b7152b1d28cf80e66f5d1520b5 100644 (file)
@@ -258,7 +258,7 @@ static inline RealType potSwitchPotentialMod(const RealType potentialInp, const
 
 
 //! Templated free-energy non-bonded kernel
-template<typename DataTypes, SoftcoreType softcoreType, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald, bool elecInteractionTypeIsEwald, bool vdwModifierIsPotSwitch, bool computeForce>
+template<typename DataTypes, KernelSoftcoreType softcoreType, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald, bool elecInteractionTypeIsEwald, bool vdwModifierIsPotSwitch, bool computeForces>
 static void nb_free_energy_kernel(const t_nblist&                                  nlist,
                                   const gmx::ArrayRefWithPadding<const gmx::RVec>& coords,
                                   const int                                        ntype,
@@ -528,8 +528,8 @@ static void nb_free_energy_kernel(const t_nblist&
                         {
                             preloadLjPmeC6Grid[i][s] = 0;
                         }
-                        if constexpr (softcoreType == SoftcoreType::Beutler
-                                      || softcoreType == SoftcoreType::Gapsys)
+                        if constexpr (softcoreType == KernelSoftcoreType::Beutler
+                                      || softcoreType == KernelSoftcoreType::Gapsys)
                         {
                             const real c6  = nbfp[2 * typeIndices[i][s]];
                             const real c12 = nbfp[2 * typeIndices[i][s] + 1];
@@ -549,8 +549,8 @@ static void nb_free_energy_kernel(const t_nblist&
                             }
                         }
                     }
-                    if constexpr (softcoreType == SoftcoreType::Beutler
-                                  || softcoreType == SoftcoreType::Gapsys)
+                    if constexpr (softcoreType == KernelSoftcoreType::Beutler
+                                  || softcoreType == KernelSoftcoreType::Gapsys)
                     {
                         /* only use softcore if one of the states has a zero endstate - softcore is for avoiding infinities!*/
                         const real c12A = nbfp[2 * typeIndices[STATE_A][s] + 1];
@@ -562,12 +562,12 @@ static void nb_free_energy_kernel(const t_nblist&
                         }
                         else
                         {
-                            if constexpr (softcoreType == SoftcoreType::Beutler)
+                            if constexpr (softcoreType == KernelSoftcoreType::Beutler)
                             {
                                 preloadAlphaVdwEff[s]  = alpha_vdw;
                                 preloadAlphaCoulEff[s] = alpha_coul;
                             }
-                            else if constexpr (softcoreType == SoftcoreType::Gapsys)
+                            else if constexpr (softcoreType == KernelSoftcoreType::Gapsys)
                             {
                                 preloadAlphaVdwEff[s]  = alpha_vdw;
                                 preloadAlphaCoulEff[s] = gmx::sixthroot(sigma6_def);
@@ -646,12 +646,14 @@ static void nb_free_energy_kernel(const t_nblist&
                 gmx::gatherLoadTranspose<2>(nbfp.data(), typeIndices[i], &c6[i], &c12[i]);
                 qq[i]          = gmx::load<RealType>(preloadQq[i]);
                 ljPmeC6Grid[i] = gmx::load<RealType>(preloadLjPmeC6Grid[i]);
-                if constexpr (softcoreType == SoftcoreType::Beutler || softcoreType == SoftcoreType::Gapsys)
+                if constexpr (softcoreType == KernelSoftcoreType::Beutler
+                              || softcoreType == KernelSoftcoreType::Gapsys)
                 {
                     sigma6[i] = gmx::load<RealType>(preloadSigma6[i]);
                 }
             }
-            if constexpr (softcoreType == SoftcoreType::Beutler || softcoreType == SoftcoreType::Gapsys)
+            if constexpr (softcoreType == KernelSoftcoreType::Beutler
+                          || softcoreType == KernelSoftcoreType::Gapsys)
             {
                 alphaVdwEff  = gmx::load<RealType>(preloadAlphaVdwEff);
                 alphaCoulEff = gmx::load<RealType>(preloadAlphaCoulEff);
@@ -663,7 +665,7 @@ static void nb_free_energy_kernel(const t_nblist&
             r    = rSq * rInv;
 
             RealType gmx_unused rp, rpm2;
-            if constexpr (softcoreType == SoftcoreType::Beutler)
+            if constexpr (softcoreType == KernelSoftcoreType::Beutler)
             {
                 rpm2 = rSq * rSq;  /* r4 */
                 rp   = rpm2 * rSq; /* r6 */
@@ -701,7 +703,7 @@ static void nb_free_energy_kernel(const t_nblist&
                                              && bPairIncluded && withinCutoffMask);
                     if (gmx::anyTrue(nonZeroState))
                     {
-                        if constexpr (softcoreType == SoftcoreType::Beutler)
+                        if constexpr (softcoreType == KernelSoftcoreType::Beutler)
                         {
                             RealType divisor = (alphaCoulEff * lFacCoul[i] * sigma6[i] + rp);
                             rPInvC           = gmx::inv(divisor);
@@ -755,7 +757,7 @@ static void nb_free_energy_kernel(const t_nblist&
                                     fScalC[i] = ewaldScalarForce(qq[i], rInvC);
                                 }
 
-                                if constexpr (softcoreType == SoftcoreType::Gapsys)
+                                if constexpr (softcoreType == KernelSoftcoreType::Gapsys)
                                 {
                                     ewaldQuadraticPotential(qq[i],
                                                             facel,
@@ -779,7 +781,7 @@ static void nb_free_energy_kernel(const t_nblist&
                                     fScalC[i] = reactionFieldScalarForce(qq[i], rInvC, rC, krf, two);
                                 }
 
-                                if constexpr (softcoreType == SoftcoreType::Gapsys)
+                                if constexpr (softcoreType == KernelSoftcoreType::Gapsys)
                                 {
                                     reactionFieldQuadraticPotential(qq[i],
                                                                     facel,
@@ -822,7 +824,7 @@ static void nb_free_energy_kernel(const t_nblist&
                         if (gmx::anyTrue(computeVdwInteraction))
                         {
                             RealType rInv6;
-                            if constexpr (softcoreType == SoftcoreType::Beutler)
+                            if constexpr (softcoreType == KernelSoftcoreType::Beutler)
                             {
                                 rInv6 = rPInvV;
                             }
@@ -846,7 +848,7 @@ static void nb_free_energy_kernel(const t_nblist&
                                 fScalV[i] = lennardJonesScalarForce(vVdw6, vVdw12);
                             }
 
-                            if constexpr (softcoreType == SoftcoreType::Gapsys)
+                            if constexpr (softcoreType == KernelSoftcoreType::Gapsys)
                             {
                                 lennardJonesQuadraticPotential(c6[i],
                                                                c12[i],
@@ -927,7 +929,7 @@ static void nb_free_energy_kernel(const t_nblist&
                             fScal = fScal + LFV[i] * fScalV[i] * rpm2;
                         }
 
-                        if constexpr (softcoreType == SoftcoreType::Beutler)
+                        if constexpr (softcoreType == KernelSoftcoreType::Beutler)
                         {
                             dvdlCoul = dvdlCoul + vCoul[i] * DLF[i]
                                        + LFC[i] * alphaCoulEff * dlFacCoul[i] * fScalC[i] * sigma6[i];
@@ -1126,7 +1128,7 @@ typedef void (*KernelFunction)(const t_nblist&
                                gmx::ArrayRef<real> threadVv,
                                gmx::ArrayRef<real> threadDvdl);
 
-template<SoftcoreType softcoreType, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald, bool elecInteractionTypeIsEwald, bool vdwModifierIsPotSwitch, bool computeForces>
+template<KernelSoftcoreType softcoreType, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald, bool elecInteractionTypeIsEwald, bool vdwModifierIsPotSwitch, bool computeForces>
 static KernelFunction dispatchKernelOnUseSimd(const bool useSimd)
 {
     if (useSimd)
@@ -1143,7 +1145,7 @@ static KernelFunction dispatchKernelOnUseSimd(const bool useSimd)
     }
 }
 
-template<SoftcoreType softcoreType, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald, bool elecInteractionTypeIsEwald, bool vdwModifierIsPotSwitch>
+template<KernelSoftcoreType softcoreType, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald, bool elecInteractionTypeIsEwald, bool vdwModifierIsPotSwitch>
 static KernelFunction dispatchKernelOnComputeForces(const bool computeForces, const bool useSimd)
 {
     if (computeForces)
@@ -1158,7 +1160,7 @@ static KernelFunction dispatchKernelOnComputeForces(const bool computeForces, co
     }
 }
 
-template<SoftcoreType softcoreType, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald, bool elecInteractionTypeIsEwald>
+template<KernelSoftcoreType softcoreType, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald, bool elecInteractionTypeIsEwald>
 static KernelFunction dispatchKernelOnVdwModifier(const bool vdwModifierIsPotSwitch,
                                                   const bool computeForces,
                                                   const bool useSimd)
@@ -1175,7 +1177,7 @@ static KernelFunction dispatchKernelOnVdwModifier(const bool vdwModifierIsPotSwi
     }
 }
 
-template<SoftcoreType softcoreType, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald>
+template<KernelSoftcoreType softcoreType, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald>
 static KernelFunction dispatchKernelOnElecInteractionType(const bool elecInteractionTypeIsEwald,
                                                           const bool vdwModifierIsPotSwitch,
                                                           const bool computeForces,
@@ -1193,7 +1195,7 @@ static KernelFunction dispatchKernelOnElecInteractionType(const bool elecInterac
     }
 }
 
-template<SoftcoreType softcoreType, bool scLambdasOrAlphasDiffer>
+template<KernelSoftcoreType softcoreType, bool scLambdasOrAlphasDiffer>
 static KernelFunction dispatchKernelOnVdwInteractionType(const bool vdwInteractionTypeIsEwald,
                                                          const bool elecInteractionTypeIsEwald,
                                                          const bool vdwModifierIsPotSwitch,
@@ -1212,7 +1214,7 @@ static KernelFunction dispatchKernelOnVdwInteractionType(const bool vdwInteracti
     }
 }
 
-template<SoftcoreType softcoreType>
+template<KernelSoftcoreType softcoreType>
 static KernelFunction dispatchKernelOnScLambdasOrAlphasDifference(const bool scLambdasOrAlphasDiffer,
                                                                   const bool vdwInteractionTypeIsEwald,
                                                                   const bool elecInteractionTypeIsEwald,
@@ -1240,21 +1242,21 @@ static KernelFunction dispatchKernel(const bool                 scLambdasOrAlpha
                                      const bool                 useSimd,
                                      const interaction_const_t& ic)
 {
-    if ((ic.softCoreParameters->alphaCoulomb == 0 && ic.softCoreParameters->alphaVdw == 0)
-        || ic.softCoreParameters->softcoreType == SoftcoreType::None)
+    if (ic.softCoreParameters->alphaCoulomb == 0 && ic.softCoreParameters->alphaVdw == 0)
     {
-        return (dispatchKernelOnScLambdasOrAlphasDifference<SoftcoreType::None>(scLambdasOrAlphasDiffer,
-                                                                                vdwInteractionTypeIsEwald,
-                                                                                elecInteractionTypeIsEwald,
-                                                                                vdwModifierIsPotSwitch,
-                                                                                computeForces,
-                                                                                useSimd));
+        return (dispatchKernelOnScLambdasOrAlphasDifference<KernelSoftcoreType::None>(
+                scLambdasOrAlphasDiffer,
+                vdwInteractionTypeIsEwald,
+                elecInteractionTypeIsEwald,
+                vdwModifierIsPotSwitch,
+                computeForces,
+                useSimd));
     }
     else
     {
         if (ic.softCoreParameters->softcoreType == SoftcoreType::Beutler)
         {
-            return (dispatchKernelOnScLambdasOrAlphasDifference<SoftcoreType::Beutler>(
+            return (dispatchKernelOnScLambdasOrAlphasDifference<KernelSoftcoreType::Beutler>(
                     scLambdasOrAlphasDiffer,
                     vdwInteractionTypeIsEwald,
                     elecInteractionTypeIsEwald,
@@ -1264,7 +1266,7 @@ static KernelFunction dispatchKernel(const bool                 scLambdasOrAlpha
         }
         else
         {
-            return (dispatchKernelOnScLambdasOrAlphasDifference<SoftcoreType::Gapsys>(
+            return (dispatchKernelOnScLambdasOrAlphasDifference<KernelSoftcoreType::Gapsys>(
                     scLambdasOrAlphasDiffer,
                     vdwInteractionTypeIsEwald,
                     elecInteractionTypeIsEwald,
index 99a4d3dd91e7c19d164bc6197413a7433d918acb..e8e4a02ced7f4d5d1b9b6f3c968a427dd9341703 100644 (file)
@@ -169,7 +169,7 @@ static inline real sixthRoot(const real r)
 }
 
 /*! \brief Compute the energy and force for a single pair interaction under FEP */
-template<SoftcoreType softcoreType>
+template<KernelSoftcoreType softcoreType>
 static real free_energy_evaluate_single(real                                           r2,
                                         real                                           rCoulCutoff,
                                         const interaction_const_t::SoftCoreParameters& scParams,
@@ -222,7 +222,7 @@ static real free_energy_evaluate_single(real
     /* Loop over state A(0) and B(1) */
     for (i = 0; i < 2; i++)
     {
-        if (softcoreType == SoftcoreType::Beutler || softcoreType == SoftcoreType::Gapsys)
+        if (softcoreType == KernelSoftcoreType::Beutler || softcoreType == KernelSoftcoreType::Gapsys)
         {
             if ((c6[i] > 0) && (c12[i] > 0))
             {
@@ -230,7 +230,7 @@ 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.
                  */
                 sigma6[i] = half * c12[i] / c6[i];
-                if (softcoreType == SoftcoreType::Beutler && (sigma6[i] < scParams.sigma6Minimum)) /* for disappearing coul and vdw with soft core at the same time */
+                if (softcoreType == KernelSoftcoreType::Beutler && (sigma6[i] < scParams.sigma6Minimum)) /* for disappearing coul and vdw with soft core at the same time */
                 {
                     sigma6[i] = scParams.sigma6Minimum;
                 }
@@ -243,7 +243,7 @@ static real free_energy_evaluate_single(real
         }
     }
 
-    if (softcoreType == SoftcoreType::Beutler || softcoreType == SoftcoreType::Gapsys)
+    if (softcoreType == KernelSoftcoreType::Beutler || softcoreType == KernelSoftcoreType::Gapsys)
     {
         /* only use softcore if one of the states has a zero endstate - softcore is for avoiding infinities!*/
         if ((c12[0] > 0) && (c12[1] > 0))
@@ -253,12 +253,12 @@ static real free_energy_evaluate_single(real
         }
         else
         {
-            if (softcoreType == SoftcoreType::Beutler)
+            if (softcoreType == KernelSoftcoreType::Beutler)
             {
                 alpha_vdw_eff  = scParams.alphaVdw;
                 alpha_coul_eff = scParams.alphaCoulomb;
             }
-            else if (softcoreType == SoftcoreType::Gapsys)
+            else if (softcoreType == KernelSoftcoreType::Gapsys)
             {
                 alpha_vdw_eff  = scParams.alphaVdw;
                 alpha_coul_eff = gmx::sixthroot(scParams.sigma6WithInvalidSigma);
@@ -282,7 +282,7 @@ static real free_energy_evaluate_single(real
         if ((qq[i] != 0) || (c6[i] != 0) || (c12[i] != 0))
         {
             /* Coulomb */
-            if (softcoreType == SoftcoreType::Beutler)
+            if (softcoreType == KernelSoftcoreType::Beutler)
             {
                 rpinv  = one / (alpha_coul_eff * lfac_coul[i] * sigma_pow[i] + rp);
                 r_coul = sixthRoot(rpinv);
@@ -293,7 +293,7 @@ static real free_energy_evaluate_single(real
                 r_coul = r;
             }
 
-            if (softcoreType == SoftcoreType::Gapsys)
+            if (softcoreType == KernelSoftcoreType::Gapsys)
             {
                 rQ = gmx::sixthroot(one - LFC[i]) * (one + std::fabs(qq[i] / facel));
                 rQ *= alpha_coul_eff;
@@ -305,7 +305,7 @@ static real free_energy_evaluate_single(real
                 }
             }
 
-            if ((softcoreType == SoftcoreType::Gapsys) && (r < rQ))
+            if ((softcoreType == KernelSoftcoreType::Gapsys) && (r < rQ))
             {
                 real rInvQ    = one / rQ;
                 real constFac = qq[i] * rInvQ;
@@ -342,7 +342,7 @@ static real free_energy_evaluate_single(real
             }
 
             /* Vdw */
-            if (softcoreType == SoftcoreType::Beutler)
+            if (softcoreType == KernelSoftcoreType::Beutler)
             {
                 rpinv = one / (alpha_vdw_eff * lfac_vdw[i] * sigma_pow[i] + rp);
                 r_vdw = sixthRoot(rpinv);
@@ -353,7 +353,7 @@ static real free_energy_evaluate_single(real
                 r_vdw = r;
             }
 
-            if (softcoreType == SoftcoreType::Gapsys)
+            if (softcoreType == KernelSoftcoreType::Gapsys)
             {
                 constexpr real c_twentySixSeventh = 26.0_real / 7.0_real;
 
@@ -361,7 +361,7 @@ static real free_energy_evaluate_single(real
                 rLJ *= alpha_vdw_eff;
             }
 
-            if ((softcoreType == SoftcoreType::Gapsys) && (r < rLJ))
+            if ((softcoreType == KernelSoftcoreType::Gapsys) && (r < rLJ))
             {
                 // scaled values for c6 and c12
                 real c6s, c12s;
@@ -446,14 +446,14 @@ static real free_energy_evaluate_single(real
 
         fscal += (LFC[i] * fscal_elec[i] + LFV[i] * fscal_vdw[i]) * rpm2;
 
-        if (softcoreType == SoftcoreType::Gapsys)
+        if (softcoreType == KernelSoftcoreType::Gapsys)
         {
             dvdl_coul_sum += dvdl_elec[i];
             dvdl_vdw_sum += dvdl_vdw[i];
         }
         dvdl_coul_sum += velec[i] * DLF[i];
         dvdl_vdw_sum += vvdw[i] * DLF[i];
-        if (softcoreType == SoftcoreType::Beutler)
+        if (softcoreType == KernelSoftcoreType::Beutler)
         {
             dvdl_coul_sum += LFC[i] * alpha_coul_eff * dlfac_coul[i] * fscal_elec[i] * sigma_pow[i];
             dvdl_vdw_sum += LFV[i] * alpha_vdw_eff * dlfac_vdw[i] * fscal_vdw[i] * sigma_pow[i];
@@ -637,83 +637,87 @@ static real do_pairs_general(int                           ftype,
             c6B  = iparams[itype].lj14.c6B * 6.0;
             c12B = iparams[itype].lj14.c12B * 12.0;
 
-            if (fr->ic->softCoreParameters->softcoreType == SoftcoreType::Gapsys)
+            const auto& scParams = *fr->ic->softCoreParameters;
+            if (scParams.softcoreType == SoftcoreType::Gapsys)
             {
-                fscal = free_energy_evaluate_single<SoftcoreType::Gapsys>(r2,
-                                                                          fr->ic->rcoulomb,
-                                                                          *fr->ic->softCoreParameters,
-                                                                          fr->pairsTable->scale,
-                                                                          fr->pairsTable->data.data(),
-                                                                          fr->pairsTable->stride,
-                                                                          qq,
-                                                                          c6,
-                                                                          c12,
-                                                                          qqB,
-                                                                          c6B,
-                                                                          c12B,
-                                                                          epsfac,
-                                                                          LFC,
-                                                                          LFV,
-                                                                          DLF,
-                                                                          lfac_coul,
-                                                                          lfac_vdw,
-                                                                          dlfac_coul,
-                                                                          dlfac_vdw,
-                                                                          &velec,
-                                                                          &vvdw,
-                                                                          dvdl);
+                fscal = free_energy_evaluate_single<KernelSoftcoreType::Gapsys>(
+                        r2,
+                        fr->ic->rcoulomb,
+                        *fr->ic->softCoreParameters,
+                        fr->pairsTable->scale,
+                        fr->pairsTable->data.data(),
+                        fr->pairsTable->stride,
+                        qq,
+                        c6,
+                        c12,
+                        qqB,
+                        c6B,
+                        c12B,
+                        epsfac,
+                        LFC,
+                        LFV,
+                        DLF,
+                        lfac_coul,
+                        lfac_vdw,
+                        dlfac_coul,
+                        dlfac_vdw,
+                        &velec,
+                        &vvdw,
+                        dvdl);
             }
-            else if (fr->ic->softCoreParameters->softcoreType == SoftcoreType::Beutler)
+            else if (scParams.softcoreType == SoftcoreType::Beutler)
             {
-                fscal = free_energy_evaluate_single<SoftcoreType::Beutler>(r2,
-                                                                           fr->ic->rcoulomb,
-                                                                           *fr->ic->softCoreParameters,
-                                                                           fr->pairsTable->scale,
-                                                                           fr->pairsTable->data.data(),
-                                                                           fr->pairsTable->stride,
-                                                                           qq,
-                                                                           c6,
-                                                                           c12,
-                                                                           qqB,
-                                                                           c6B,
-                                                                           c12B,
-                                                                           epsfac,
-                                                                           LFC,
-                                                                           LFV,
-                                                                           DLF,
-                                                                           lfac_coul,
-                                                                           lfac_vdw,
-                                                                           dlfac_coul,
-                                                                           dlfac_vdw,
-                                                                           &velec,
-                                                                           &vvdw,
-                                                                           dvdl);
+                fscal = free_energy_evaluate_single<KernelSoftcoreType::Beutler>(
+                        r2,
+                        fr->ic->rcoulomb,
+                        *fr->ic->softCoreParameters,
+                        fr->pairsTable->scale,
+                        fr->pairsTable->data.data(),
+                        fr->pairsTable->stride,
+                        qq,
+                        c6,
+                        c12,
+                        qqB,
+                        c6B,
+                        c12B,
+                        epsfac,
+                        LFC,
+                        LFV,
+                        DLF,
+                        lfac_coul,
+                        lfac_vdw,
+                        dlfac_coul,
+                        dlfac_vdw,
+                        &velec,
+                        &vvdw,
+                        dvdl);
             }
             else
             {
-                fscal = free_energy_evaluate_single<SoftcoreType::None>(r2,
-                                                                        fr->ic->rcoulomb,
-                                                                        *fr->ic->softCoreParameters,
-                                                                        fr->pairsTable->scale,
-                                                                        fr->pairsTable->data.data(),
-                                                                        fr->pairsTable->stride,
-                                                                        qq,
-                                                                        c6,
-                                                                        c12,
-                                                                        qqB,
-                                                                        c6B,
-                                                                        c12B,
-                                                                        epsfac,
-                                                                        LFC,
-                                                                        LFV,
-                                                                        DLF,
-                                                                        lfac_coul,
-                                                                        lfac_vdw,
-                                                                        dlfac_coul,
-                                                                        dlfac_vdw,
-                                                                        &velec,
-                                                                        &vvdw,
-                                                                        dvdl);
+                fscal = free_energy_evaluate_single<KernelSoftcoreType::None>(
+                        r2,
+                        fr->ic->rcoulomb,
+                        *fr->ic->softCoreParameters,
+                        fr->pairsTable->scale,
+                        fr->pairsTable->data.data(),
+                        fr->pairsTable->stride,
+                        qq,
+                        c6,
+                        c12,
+                        qqB,
+                        c6B,
+                        c12B,
+                        epsfac,
+                        LFC,
+                        LFV,
+                        DLF,
+                        lfac_coul,
+                        lfac_vdw,
+                        dlfac_coul,
+                        dlfac_vdw,
+                        &velec,
+                        &vvdw,
+                        dvdl);
             }
         }
         else
index 0c40e538576c790347f251ab7d425f396047a4f6..98f873f69bcee80911b3cd5d7a1e1062416f43a7 100644 (file)
@@ -291,6 +291,14 @@ const char* enumValueToString(SeparateDhdlFile enumValue)
 const char* enumValueToString(SoftcoreType enumValue)
 {
     static constexpr gmx::EnumerationArray<SoftcoreType, const char*> softcoreTypeNames = {
+        "beutler", "gapsys"
+    };
+    return softcoreTypeNames[enumValue];
+}
+
+const char* enumValueToString(KernelSoftcoreType enumValue)
+{
+    static constexpr gmx::EnumerationArray<KernelSoftcoreType, const char*> softcoreTypeNames = {
         "beutler", "gapsys", "none"
     };
     return softcoreTypeNames[enumValue];
index 0bfb497cc4cd9e4bb0b8de354549fe8dd41d5947..5f5c303b4549dff885fdc0103ae026987b215455 100644 (file)
@@ -607,19 +607,34 @@ const char* enumValueToString(DhDlDerivativeCalculation enumValue);
 
 /*! \brief soft-core function \
  *
- * Distinguishes between soft-core functions.
+ * Distinguishes between soft-core functions in the input.
  */
 enum class SoftcoreType : int
 {
     Beutler,
     Gapsys,
-    None,
     Count,
     Default = Beutler
 };
 //! Strings for softcore function names
 const char* enumValueToString(SoftcoreType enumValue);
 
+/*! \brief soft-core function as parameter to the nb-fep kernel/14-interaction.\
+ *
+ * Distinguishes between soft-core functions internally. This is different
+ * from SoftcoreType in that it offers 'None' which is not exposed to the user.
+ */
+enum class KernelSoftcoreType : int
+{
+    Beutler,
+    Gapsys,
+    None,
+    Count,
+    Default = Beutler
+};
+//! Strings for softcore function names
+const char* enumValueToString(KernelSoftcoreType enumValue);
+
 /*! \brief Solvent model
  *
  * Distinguishes classical water types with 3 or 4 particles