Gromacs
2025.0-dev-20241009-5c23d5f
|
#include "gmxpre.h"
#include "gromacs/listed_forces/pairs.h"
#include <cmath>
#include <filesystem>
#include <iterator>
#include <memory>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
#include <gtest/gtest.h>
#include "gromacs/listed_forces/bonded.h"
#include "gromacs/listed_forces/listed_forces.h"
#include "gromacs/math/paddedvector.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/enerdata.h"
#include "gromacs/mdtypes/forcerec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/interaction_const.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/mdtypes/nblist.h"
#include "gromacs/mdtypes/simulation_workload.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/tables/forcetable.h"
#include "gromacs/topology/idef.h"
#include "gromacs/topology/ifunc.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/booltype.h"
#include "gromacs/utility/enumerationhelpers.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/real.h"
#include "gromacs/utility/strconvert.h"
#include "gromacs/utility/stringstream.h"
#include "gromacs/utility/textwriter.h"
#include "testutils/refdata.h"
#include "testutils/testasserts.h"
Implements test of 1-4 interactions.
This test is copied from the bonded interactions test and slightly modified since 'do_pairs' takes a different set of arguments than 'calculateSimpleBond'. To keep the test setup uncluttered this test is therefore not merged into the bonded test but implemented standalone.
The test setup consists of 2 atom pairs that are tested in an fep setting (vanishing charge and lennard-jones parameters of one atom) and without fep. Placement of the atoms in the box is such that shift-forces and pbc paths in do_pairs are covered.
Classes | |
struct | gmx::test::anonymous_namespace{pairs.cpp}::OutputQuantities |
Output from pairs kernels. More... | |
struct | gmx::test::anonymous_namespace{pairs.cpp}::ListInput |
Input structure for listed forces tests. More... | |
Functions | |
void | gmx::test::anonymous_namespace{pairs.cpp}::checkOutput (TestReferenceChecker *checker, const OutputQuantities &output, const BondedKernelFlavor bondedKernelFlavor, const int functionType) |
Utility to check the output from pairs tests. More... | |
Variables | |
constexpr int | gmx::test::anonymous_namespace{pairs.cpp}::c_numAtoms = 3 |
Number of atoms used in these tests. | |
ForcerecHelper | gmx::test::anonymous_namespace{pairs.cpp}::frHelper |
std::vector< ListInput > | gmx::test::anonymous_namespace{pairs.cpp}::c_14Interaction |
Function types for testing 1-4 interaction. Add new terms at the end. More... | |
std::vector< PbcType > | gmx::test::anonymous_namespace{pairs.cpp}::c_pbcForTests = { PbcType::No, PbcType::XY, PbcType::Xyz } |
PBC values for testing. | |
std::vector< PaddedVector< RVec > > | gmx::test::anonymous_namespace{pairs.cpp}::c_coordinatesFor14Interaction |
Coordinates for testing 1-4 interaction. More... | |