Gromacs
2025-dev-20240516-46ce888
|
Classes | |
struct | KernelOptions |
The options for the kernel. More... | |
struct | TestSystem |
Description of the system used for benchmarking. More... | |
struct | KernelInputParameters |
Convenience typedef of the test input parameters. More... | |
class | NbnxmKernelTest |
Class that sets up and holds a set of N atoms and a full NxM pairlist. More... | |
Enumerations | |
enum | EnergyHandling : int { NoEnergies, Energies, ThreeEnergyGroups, Count } |
How the kernel should compute energies. More... | |
Functions | |
std::pair< real, real > | combineLJParams (const real sigma0, const real epsilon0, const real sigma1, const real epsilon1, const LJCombinationRule ljCombinationRule) |
Generate a C6, C12 pair using the combination rule. | |
LJCombinationRule | chooseLJPmeCombinationRule (const KernelOptions &options) |
Returns the enum value for initializing the LJ PME-grid combination rule for nbxnm_atomdata_t. | |
std::unique_ptr < nonbonded_verlet_t > | setupNbnxmForBenchInstance (const KernelOptions &options, const TestSystem &system) |
Sets up and returns a Nbnxm object for the given benchmark options and system. | |
CoulombInteractionType | coulombInteractionType (CoulombKernelType coulombKernelType) |
Returns the coulomb interaction type given the Coulomb kernel type. | |
interaction_const_t | setupInteractionConst (const KernelOptions &options) |
Return an interaction constants struct with members used in the benchmark set appropriately. | |
std::string | nameOfTest (const testing::TestParamInfo< KernelInputParameters > &info) |
Help GoogleTest name our test cases. More... | |
bool | isTabulated (const CoulombKernelType coulombKernelType) |
std::string | makeRefDataFileName () |
Construct a refdata filename for this test. More... | |
Variables | |
const EnumerationArray < EnergyHandling, int > | sc_numEnergyGroups = { 0, 1, 3 } |
Lookup table for the number of energy groups in use. | |
const EnumerationArray < EnergyHandling, const char * > | sc_energyGroupNames |
Names for the kinds of energy handling. More... | |
constexpr int | numAtomsInMolecule = 3 |
The number of atoms in a molecule. | |
constexpr int | typeO = 0 |
The atom type of the oxygen atom. | |
constexpr int | typeHWithLJ = 1 |
The atom type of a hydrogen atom with LJ. | |
constexpr int | typeHWithoutLJ = 2 |
The atom type of a hydrogen atom without LJ. | |
constexpr real | chargeO = -0.8476 |
The charge of the oxygen atom. | |
constexpr real | chargeH = 0.4238 |
The charge of the hydrogen atom. | |
constexpr real | sigmaO = 0.316557 |
The LJ sigma parameter of the Oxygen atom. | |
constexpr real | epsilonO = 0.650194 |
The LJ epsilon parameter of the Oxygen atom. | |
constexpr real | sigmaH = 0.04 |
The LJ sigma parameter of Hydrogen atoms with LJ. | |
constexpr real | epsilonH = 0.192464 |
The LJ epsilon parameter Hydrogen atoms with LJ. | |
const EnumerationArray < CoulombKernelType, const char * > | coulombKernelTypeName |
const std::array< const char *, vdwktNR > | vdwKernelTypeName |
|
strong |
How the kernel should compute energies.
Note that the construction of the test system is currently not general enough to handle more than one case with multiple energy groups.
std::string gmx::test::anonymous_namespace{kernel_test.cpp}::makeRefDataFileName | ( | ) |
Construct a refdata filename for this test.
We want the same reference data to apply to every kernel type that we test. That means we need to store it in a file whose name relates to the name of the test excluding the part related to the kernel type. By default, the reference data filename is set via a call to gmx::TestFileManager::getTestSpecificFileName() that queries GoogleTest and gets a string that includes the return value for nameOfTest(). This code works similarly, but removes the part that relates to kernel type. This logic must match the implementation of nameOfTest() so that it works as intended.
In particular, the name must include a "Coulomb" substring that follows the name of the kernel type, so that this can be removed.
std::string gmx::test::anonymous_namespace{kernel_test.cpp}::nameOfTest | ( | const testing::TestParamInfo< KernelInputParameters > & | info | ) |
Help GoogleTest name our test cases.
If changes are needed here, consider making matching changes in makeRefDataFileName().
const EnumerationArray<CoulombKernelType, const char*> gmx::test::anonymous_namespace{kernel_test.cpp}::coulombKernelTypeName |
const EnumerationArray<EnergyHandling, const char*> gmx::test::anonymous_namespace{kernel_test.cpp}::sc_energyGroupNames |
Names for the kinds of energy handling.
const std::array<const char*, vdwktNR> gmx::test::anonymous_namespace{kernel_test.cpp}::vdwKernelTypeName |