real fscal_vdw[2], fscal_elec[2];
real velec[2], vvdw[2];
real dvdl_elec[2], dvdl_vdw[2];
- real scaleLinpointCoulGapsys, scaleLinpointVdWGapsys, sigma6VdWGapsys[2];
+ real gapsysScaleLinpointCoul, gapsysScaleLinpointVdW, gapsysSigma6VdW[2];
real rQ, rLJ;
real scaleDvdlRCoul;
int i, ntab;
}
sigma_pow[i] = sigma6[i];
}
+ // NOLINTNEXTLINE(readability-misleading-indentation) remove when clang-tidy-13 is required
if constexpr (softcoreType == KernelSoftcoreType::Gapsys)
{
if ((c6[i] > 0) && (c12[i] > 0))
/* The c6 & c12 coefficients now contain the constants 6.0 and 12.0, respectively.
* 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];
+ gapsysSigma6VdW[i] = half * c12[i] / c6[i];
}
else
{
- sigma6VdWGapsys[i] = scParams.sigma6VdWGapsys;
+ gapsysSigma6VdW[i] = scParams.gapsysSigma6VdW;
}
}
}
+ // NOLINTNEXTLINE(readability-misleading-indentation) remove when clang-tidy-13 is required
if constexpr (softcoreType == KernelSoftcoreType::Beutler)
{
/* only use softcore if one of the states has a zero endstate - softcore is for avoiding infinities!*/
alpha_coul_eff = scParams.alphaCoulomb;
}
}
+ // NOLINTNEXTLINE(readability-misleading-indentation) remove when clang-tidy-13 is required
if constexpr (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))
{
- scaleLinpointVdWGapsys = 0;
- scaleLinpointCoulGapsys = 0;
+ gapsysScaleLinpointVdW = 0;
+ gapsysScaleLinpointCoul = 0;
}
else
{
- scaleLinpointVdWGapsys = scParams.scaleLinpointVdWGapsys;
- scaleLinpointCoulGapsys = scParams.scaleLinpointCoulGapsys;
+ gapsysScaleLinpointVdW = scParams.gapsysScaleLinpointVdW;
+ gapsysScaleLinpointCoul = scParams.gapsysScaleLinpointCoul;
}
}
/* Loop over A and B states again */
+ // NOLINTNEXTLINE(readability-misleading-indentation) remove when clang-tidy-13 is required
for (i = 0; i < 2; i++)
{
fscal_elec[i] = 0;
r_coul = r;
}
+ // NOLINTNEXTLINE(readability-misleading-indentation) remove when clang-tidy-13 is required
if constexpr (softcoreType == KernelSoftcoreType::Gapsys)
{
- rQ = gmx::sixthroot(one - LFC[i]) * (one + std::fabs(qq[i] / facel));
- rQ *= scaleLinpointCoulGapsys;
+ if ((facel != 0) && (LFC[i] < 1))
+ {
+ rQ = gmx::sixthroot(one - LFC[i]) * (one + std::fabs(qq[i] / facel));
+ rQ *= gapsysScaleLinpointCoul;
+ }
+ else
+ {
+ rQ = 0;
+ }
scaleDvdlRCoul = 1;
if (rQ > rCoulCutoff)
{
}
}
+ // NOLINTNEXTLINE(readability-misleading-indentation) remove when clang-tidy-13 is required
if ((softcoreType == KernelSoftcoreType::Gapsys) && (r < rQ))
{
real rInvQ = one / rQ;
{
constexpr real c_twentySixSeventh = 26.0_real / 7.0_real;
- rLJ = gmx::sixthroot(c_twentySixSeventh * sigma6VdWGapsys[i] * (one - LFV[i]));
- rLJ *= scaleLinpointVdWGapsys;
+ if (LFV[i] < 1)
+ {
+
+ rLJ = gmx::sixthroot(c_twentySixSeventh * gapsysSigma6VdW[i] * (one - LFV[i]));
+ rLJ *= gapsysScaleLinpointVdW;
+ }
+ else
+ {
+ rLJ = 0;
+ }
}
+ // NOLINTNEXTLINE(readability-misleading-indentation) remove when clang-tidy-13 is required
if ((softcoreType == KernelSoftcoreType::Gapsys) && (r < rLJ))
{
// scaled values for c6 and c12
fscal_vdw[i] = -quadrFac + linearFac;
fscal_vdw[i] *= rpinv;
- vvdw[i] = 0.5 * quadrFac - linearFac + constFac;
+ vvdw[i] = 0.5_real * quadrFac - linearFac + constFac;
dvdl_vdw[i] += DLF[i] * 28 * (LFV[i] / (one - LFV[i]))
* ((6.5_real * rInv14 - rInv8) - (13 * rInv13 - 2 * rInv7)
dvdl_coul_sum += dvdl_elec[i];
dvdl_vdw_sum += dvdl_vdw[i];
}
+ // NOLINTNEXTLINE(readability-misleading-indentation) remove when clang-tidy-13 is required
dvdl_coul_sum += velec[i] * DLF[i];
dvdl_vdw_sum += vvdw[i] * DLF[i];
if constexpr (softcoreType == KernelSoftcoreType::Beutler)
}
else // Gapsys
{
- if (scParams.scaleLinpointCoulGapsys == 0 && scParams.scaleLinpointVdWGapsys == 0)
+ if (scParams.gapsysScaleLinpointCoul == 0 && scParams.gapsysScaleLinpointVdW == 0)
{
fscal = free_energy_evaluate_single<KernelSoftcoreType::None>(
r2,