Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
gmx::test::anonymous_namespace{settle.cpp}::SettleTest Class Reference

Inherits TestWithParam< SettleTestParameters >.

+ Collaboration diagram for gmx::test::anonymous_namespace{settle.cpp}::SettleTest:

Description

Test fixture for testing SETTLE.

Public Member Functions

 SettleTest ()
 Test setup function. More...
 
void checkConstrainsSatisfied (const int numSettles, const FloatingPointTolerance tolerance, const SettleTestData &testData)
 Check if the final interatomic distances are equal to target set by constraints. More...
 
void checkVirialSymmetric (const bool calcVirial, const FloatingPointTolerance tolerance, const SettleTestData &testData)
 Check if the virial was updated and symmetric. More...
 
void checkFinalPositions (const int numSettles, const SettleTestData &testData)
 Check if the final positions correspond to reference values. More...
 
void checkFinalVelocities (const int numSettles, const SettleTestData &testData)
 Check if the final velocities correspond to reference values. More...
 
void checkVirial (const SettleTestData &testData)
 Check if the computed virial correspond to reference values. More...
 

Static Public Member Functions

static void SetUpTestCase ()
 Before any test is run, work out whether any compatible GPUs exist.
 

Public Attributes

std::unordered_map
< std::string, t_pbc
pbcs_
 PBC setups.
 
std::unordered_map
< std::string, void(*)(SettleTestData
*testData, const t_pbc pbc,
const bool updateVelocities,
const bool calcVirial, const
std::string &testDescription)> 
runners_
 Runners (CPU and GPU versions of SETTLE)
 
TestReferenceData refData_
 Reference data.
 
TestReferenceChecker checker_
 Checker for reference data.
 

Static Public Attributes

static bool s_hasCompatibleGpus = false
 Store whether any compatible GPUs exist.
 

Constructor & Destructor Documentation

gmx::test::anonymous_namespace{settle.cpp}::SettleTest::SettleTest ( )
inline

Test setup function.

Setting up the PBCs and algorithms. Note, that corresponding string keywords have to be explicitly specified when parameters are initialied.

Member Function Documentation

void gmx::test::anonymous_namespace{settle.cpp}::SettleTest::checkConstrainsSatisfied ( const int  numSettles,
const FloatingPointTolerance  tolerance,
const SettleTestData &  testData 
)
inline

Check if the final interatomic distances are equal to target set by constraints.

Parameters
[in]numSettlesNumber of water molecules in the tested system.
[in]toleranceTolerance to compare floating point numbers.
[in]testDataAn object, containing all the data structures needed by SETTLE.
void gmx::test::anonymous_namespace{settle.cpp}::SettleTest::checkFinalPositions ( const int  numSettles,
const SettleTestData &  testData 
)
inline

Check if the final positions correspond to reference values.

Parameters
[in]numSettlesNumber of water molecules in the tested system.
[in]testDataAn object, containing all the data structures needed by SETTLE.
void gmx::test::anonymous_namespace{settle.cpp}::SettleTest::checkFinalVelocities ( const int  numSettles,
const SettleTestData &  testData 
)
inline

Check if the final velocities correspond to reference values.

Parameters
[in]numSettlesNumber of water molecules in the tested system.
[in]testDataAn object, containing all the data structures needed by SETTLE.
void gmx::test::anonymous_namespace{settle.cpp}::SettleTest::checkVirial ( const SettleTestData &  testData)
inline

Check if the computed virial correspond to reference values.

Parameters
[in]testDataAn object, containing all the data structures needed by SETTLE.
void gmx::test::anonymous_namespace{settle.cpp}::SettleTest::checkVirialSymmetric ( const bool  calcVirial,
const FloatingPointTolerance  tolerance,
const SettleTestData &  testData 
)
inline

Check if the virial was updated and symmetric.

The two tests on virial are:

  1. If it was updated in case calcVirial is true.
  2. If it is symmetrical.
Parameters
[in]calcVirialIf the virial is computed.
[in]toleranceTolerance to compare floating point numbers.
[in]testDataAn object, containing all the data structures needed by SETTLE.

The documentation for this class was generated from the following file: