Gromacs  2021-beta2-UNCHECKED
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Variables
settle.cpp File Reference
#include "gmxpre.h"
#include "gromacs/mdlib/settle.h"
#include "config.h"
#include <algorithm>
#include <unordered_map>
#include <vector>
#include <gtest/gtest.h>
#include "gromacs/hardware/device_management.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/idef.h"
#include "gromacs/topology/ifunc.h"
#include "gromacs/topology/topology.h"
#include "gromacs/utility/stringutil.h"
#include "gromacs/utility/unique_cptr.h"
#include "gromacs/mdlib/tests/watersystem.h"
#include "testutils/refdata.h"
#include "testutils/test_hardware_environment.h"
#include "testutils/testasserts.h"
#include "settletestdata.h"
#include "settletestrunners.h"
+ Include dependency graph for settle.cpp:


Tests for SETTLE constraints.

The test runs on several small systems, containing 1 to 17 water molecules, with and without periodic boundary conditions, with and without velocity and virial updates. The CPU and GPU versions are tested, if the code was compiled with CUDA support and there is a CUDA-capable GPU in the system.

The tests check:

  1. If the final distances between constrained atoms are within tolerance from the target distance.
  2. If the velocities were updated when needed.
  3. If the virial was computed.

The test also compares the results from the CPU and GPU versions of the algorithm: final coordinates, velocities and virial should be within tolerance to one another.

This also tests that if the calling code requires velocities and virial updates, that those outputs do change, but does not test that those changes are correct.
Only no-PBC and cubic-PBC are tested here, but the correct function of the SIMD version of set_pbx_auic in all cases should be tested elsewhere.
The CPU and GPU versions are tested against each other. This should be changed to a proper test against pre-computed reference values. Also, these test will dry-run on a CUDA build if no CUDA-capable GPU is available.
Mark Abraham
Artem Zhmurov


struct  gmx::test::anonymous_namespace{settle.cpp}::SettleTestParameters
 Parameters that will vary from test to test. More...
class  gmx::test::anonymous_namespace{settle.cpp}::SettleTest
 Test fixture for testing SETTLE. More...


const SettleTestParameters gmx::test::anonymous_namespace{settle.cpp}::parametersSets []
 Sets of parameters on which to run the tests. More...