Gromacs
2021.3

Inherits TestWithParam< std::string >.
Test fixture for constraints.
The fixture uses following test systems:
For all systems, the final lengths of the constraints are tested against the reference values, the direction of each constraint is checked. Test also verifies that the center of mass has not been shifted by the constraints and that its velocity has not changed. For some systems, the value for scaled virial tensor is checked against precomputed data.
Public Member Functions  
void  SetUp () override 
Test setup function. More...  
Static Public Member Functions  
static void  checkConstrainsLength (FloatingPointTolerance tolerance, const ConstraintsTestData &testData, t_pbc pbc) 
The test on the final length of constrained bonds. More...  
static void  checkConstrainsDirection (const ConstraintsTestData &testData, t_pbc pbc) 
The test on the final length of constrained bonds. More...  
static void  checkCOMCoordinates (FloatingPointTolerance tolerance, const ConstraintsTestData &testData) 
The test on the coordinates of the center of the mass (COM) of the system. More...  
static void  checkCOMVelocity (FloatingPointTolerance tolerance, const ConstraintsTestData &testData) 
The test on the velocity of the center of the mass (COM) of the system. More...  
static void  checkVirialTensor (FloatingPointTolerance tolerance, const ConstraintsTestData &testData) 
The test of virial tensor. More...  
static std::vector < std::unique_ptr < IConstraintsTestRunner > >  getRunners () 
Before any test is run, work out whether any compatible GPUs exist.  
Public Attributes  
std::unordered_map < std::string, t_pbc >  pbcs_ 
PBC setups.  

inlinestatic 
The test on the coordinates of the center of the mass (COM) of the system.
Checks if the center of mass has not been shifted by the constraints. Note, that this test does not take into account the periodic boundary conditions. Hence it will not work should the constraints decide to move atoms across PBC borders.
[in]  tolerance  Allowed tolerance in COM coordinates. 
[in]  testData  Test data structure. 

inlinestatic 
The test on the velocity of the center of the mass (COM) of the system.
Checks if the velocity of the center of mass has not changed.
[in]  tolerance  Allowed tolerance in COM velocity components. 
[in]  testData  Test data structure. 

inlinestatic 
The test on the final length of constrained bonds.
Goes through all the constraints and checks if the direction of constraint has not changed by the algorithm (i.e. the constraints algorithm arrived to the solution that is closest to the initial system conformation).
[in]  testData  Test data structure. 
[in]  pbc  Periodic boundary data. 

inlinestatic 
The test on the final length of constrained bonds.
Goes through all the constraints and checks if the final length of all the constraints is equal to the target length with provided tolerance.
[in]  tolerance  Allowed tolerance in final lengths. 
[in]  testData  Test data structure. 
[in]  pbc  Periodic boundary data. 

inlinestatic 
The test of virial tensor.
Checks if the values in the scaled virial tensor are equal to precomputed values.
[in]  tolerance  Tolerance for the tensor values. 
[in]  testData  Test data structure. 

inlineoverride 
Test setup function.
Setting up the pbcs and algorithms. Note, that corresponding string keywords have to be explicitly added at the end of this file when the tests are called.