Gromacs  2022.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions | Variables
#include "gmxpre.h"
#include "gromacs/listed_forces/bonded.h"
#include <cmath>
#include <memory>
#include <unordered_map>
#include <gtest/gtest.h>
#include "gromacs/listed_forces/listed_forces.h"
#include "gromacs/listed_forces/pairs.h"
#include "gromacs/math/paddedvector.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/mdtypes/simulation_workload.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/nblist.h"
#include "gromacs/tables/forcetable.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/idef.h"
#include "gromacs/utility/enumerationhelpers.h"
#include "gromacs/utility/strconvert.h"
#include "gromacs/utility/stringstream.h"
#include "gromacs/utility/textwriter.h"
#include "gromacs/utility/fatalerror.h"
#include "testutils/refdata.h"
#include "testutils/testasserts.h"
+ Include dependency graph for pairs.cpp:

Description

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.

Author
Sebastian Kehl sebas.nosp@m.tian.nosp@m..kehl.nosp@m.@mpc.nosp@m.df.mp.nosp@m.g.de

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< PbcTypegmx::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...