Gromacs
2020.2
|
Inherits TestWithParam< ConstraintsTestParameters >.
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 pre-computed data.
Public Member Functions | |
void | SetUp () override |
Test setup function. More... | |
void | checkConstrainsLength (FloatingPointTolerance tolerance, const ConstraintsTestData &testData, t_pbc pbc) |
The test on the final length of constrained bonds. More... | |
void | checkConstrainsDirection (const ConstraintsTestData &testData, t_pbc pbc) |
The test on the final length of constrained bonds. More... | |
void | checkCOMCoordinates (FloatingPointTolerance tolerance, const ConstraintsTestData &testData) |
The test on the coordinates of the center of the mass (COM) of the system. More... | |
void | checkCOMVelocity (FloatingPointTolerance tolerance, const ConstraintsTestData &testData) |
The test on the velocity of the center of the mass (COM) of the system. More... | |
void | checkVirialTensor (FloatingPointTolerance tolerance, const ConstraintsTestData &testData) |
The test of virial tensor. More... | |
Public Attributes | |
std::unordered_map < std::string, t_pbc > | pbcs_ |
PBC setups. | |
std::unordered_map < std::string, void(*)(ConstraintsTestData *testData, t_pbc pbc)> | algorithms_ |
Algorithms (SHAKE and LINCS) | |
|
inline |
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. |
|
inline |
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. |
|
inline |
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. |
|
inline |
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. |
|
inline |
The test of virial tensor.
Checks if the values in the scaled virial tensor are equal to pre-computed 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.