/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
//! Derivative with respect to lambda
real dvdlambda = 0;
//! Shift vectors
- rvec fshift[N_IVEC] = { { 0 } };
+ rvec fshift[c_numShiftVectors] = { { 0 } };
//! Forces
alignas(GMX_REAL_MAX_SIMD_WIDTH * sizeof(real)) rvec4 f[c_numAtoms] = { { 0 } };
};
* \param[in] a Thole factor
* \param[in] alpha1 Polarizability 1 (nm^3)
* \param[in] alpha2 Polarizability 2 (nm^3)
- * \param[in] rfac Distance factor
* \return The structure itself.
*/
- iListInput setTholePolarization(real a, real alpha1, real alpha2, real rfac)
+ iListInput setTholePolarization(real a, real alpha1, real alpha2)
{
ftype = F_THOLE_POL;
fep = false;
iparams.thole.a = a;
iparams.thole.alpha1 = alpha1;
iparams.thole.alpha2 = alpha2;
- iparams.thole.rfac = rfac;
return *this;
}
/*! \brief Set parameters for Water Polarization
{
SCOPED_TRACE(std::string("Testing PBC type: ") + c_pbcTypeNames[pbcType_]);
std::vector<int> ddgatindex = { 0, 1, 2, 3 };
- std::vector<real> chargeA = { 1.5, -2.0, 1.5, -1.0 };
- t_mdatoms mdatoms = { 0 };
- mdatoms.chargeA = chargeA.data();
+ std::vector<real> charge = { 1.5, -2.0, 1.5, -1.0 };
/* Here we run both the standard, plain-C force+shift-forces+energy+free-energy
* kernel flavor and the potentially optimized, with SIMD and less output,
* force only kernels. Note that we also run the optimized kernel for free-energy
&pbc_,
lambda,
&output.dvdlambda,
- &mdatoms,
+ charge,
/* struct t_fcdata * */ nullptr,
+ nullptr,
+ nullptr,
ddgatindex.data(),
flavor);
// Internal consistency test of both test input
if (computeVirial(flavor))
{
shiftForcesChecker.setDefaultTolerance(shiftForcesTolerance_);
- shiftForcesChecker.checkVector(output.fshift[CENTRAL], "Central");
+ shiftForcesChecker.checkVector(output.fshift[c_centralShiftIndex], "Central");
}
else
{
std::vector<iListInput> c_InputPols = {
{ iListInput(2e-5, 1e-8).setPolarization(0.12) },
{ iListInput(2e-3, 1e-8).setAnharmPolarization(0.0013, 0.02, 1235.6) },
- { iListInput(1.4e-3, 1e-8).setTholePolarization(0.26, 0.07, 0.09, 1.6) },
+ { iListInput(1.4e-3, 1e-8).setTholePolarization(0.26, 0.07, 0.09) },
{ iListInput(2e-3, 1e-8).setWaterPolarization(0.001, 0.0012, 0.0016, 0.095, 0.15, 0.02) },
};
//! PBC values for testing
std::vector<PbcType> c_pbcForTests = { PbcType::No, PbcType::XY, PbcType::Xyz };
-// Those tests give errors with the Intel compiler (as of October 2019) and nothing else, so we disable them only there.
-#if !defined(__INTEL_COMPILER) || (__INTEL_COMPILER >= 2021)
-INSTANTIATE_TEST_CASE_P(Bond,
- ListedForcesTest,
- ::testing::Combine(::testing::ValuesIn(c_InputBonds),
- ::testing::ValuesIn(c_coordinatesForTests),
- ::testing::ValuesIn(c_pbcForTests)));
-
-INSTANTIATE_TEST_CASE_P(Angle,
- ListedForcesTest,
- ::testing::Combine(::testing::ValuesIn(c_InputAngles),
- ::testing::ValuesIn(c_coordinatesForTests),
- ::testing::ValuesIn(c_pbcForTests)));
-
-INSTANTIATE_TEST_CASE_P(Dihedral,
- ListedForcesTest,
- ::testing::Combine(::testing::ValuesIn(c_InputDihs),
- ::testing::ValuesIn(c_coordinatesForTests),
- ::testing::ValuesIn(c_pbcForTests)));
-
-INSTANTIATE_TEST_CASE_P(Polarize,
- ListedForcesTest,
- ::testing::Combine(::testing::ValuesIn(c_InputPols),
- ::testing::ValuesIn(c_coordinatesForTests),
- ::testing::ValuesIn(c_pbcForTests)));
-
-INSTANTIATE_TEST_CASE_P(Restraints,
- ListedForcesTest,
- ::testing::Combine(::testing::ValuesIn(c_InputRestraints),
- ::testing::ValuesIn(c_coordinatesForTests),
- ::testing::ValuesIn(c_pbcForTests)));
-
-INSTANTIATE_TEST_CASE_P(BondZeroLength,
- ListedForcesTest,
- ::testing::Combine(::testing::ValuesIn(c_InputBondsZeroLength),
- ::testing::ValuesIn(c_coordinatesForTestsZeroBondLength),
- ::testing::ValuesIn(c_pbcForTests)));
-
-INSTANTIATE_TEST_CASE_P(AngleZero,
- ListedForcesTest,
- ::testing::Combine(::testing::ValuesIn(c_InputAnglesZeroAngle),
- ::testing::ValuesIn(c_coordinatesForTestsZeroAngle),
- ::testing::ValuesIn(c_pbcForTests)));
-#endif
+INSTANTIATE_TEST_SUITE_P(Bond,
+ ListedForcesTest,
+ ::testing::Combine(::testing::ValuesIn(c_InputBonds),
+ ::testing::ValuesIn(c_coordinatesForTests),
+ ::testing::ValuesIn(c_pbcForTests)));
+
+INSTANTIATE_TEST_SUITE_P(Angle,
+ ListedForcesTest,
+ ::testing::Combine(::testing::ValuesIn(c_InputAngles),
+ ::testing::ValuesIn(c_coordinatesForTests),
+ ::testing::ValuesIn(c_pbcForTests)));
+
+INSTANTIATE_TEST_SUITE_P(Dihedral,
+ ListedForcesTest,
+ ::testing::Combine(::testing::ValuesIn(c_InputDihs),
+ ::testing::ValuesIn(c_coordinatesForTests),
+ ::testing::ValuesIn(c_pbcForTests)));
+
+INSTANTIATE_TEST_SUITE_P(Polarize,
+ ListedForcesTest,
+ ::testing::Combine(::testing::ValuesIn(c_InputPols),
+ ::testing::ValuesIn(c_coordinatesForTests),
+ ::testing::ValuesIn(c_pbcForTests)));
+
+INSTANTIATE_TEST_SUITE_P(Restraints,
+ ListedForcesTest,
+ ::testing::Combine(::testing::ValuesIn(c_InputRestraints),
+ ::testing::ValuesIn(c_coordinatesForTests),
+ ::testing::ValuesIn(c_pbcForTests)));
+
+INSTANTIATE_TEST_SUITE_P(BondZeroLength,
+ ListedForcesTest,
+ ::testing::Combine(::testing::ValuesIn(c_InputBondsZeroLength),
+ ::testing::ValuesIn(c_coordinatesForTestsZeroBondLength),
+ ::testing::ValuesIn(c_pbcForTests)));
+
+INSTANTIATE_TEST_SUITE_P(AngleZero,
+ ListedForcesTest,
+ ::testing::Combine(::testing::ValuesIn(c_InputAnglesZeroAngle),
+ ::testing::ValuesIn(c_coordinatesForTestsZeroAngle),
+ ::testing::ValuesIn(c_pbcForTests)));
} // namespace