Gromacs  2024.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions | Variables
nb_free_energy.cpp File Reference
#include "gmxpre.h"
#include "gromacs/gmxlib/nonbonded/nb_free_energy.h"
#include <cmath>
#include <gtest/gtest.h>
#include "gromacs/ewald/ewald_utils.h"
#include "gromacs/gmxlib/nonbonded/nonbonded.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/math/arrayrefwithpadding.h"
#include "gromacs/math/paddedvector.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdtypes/enerdata.h"
#include "gromacs/mdtypes/forceoutput.h"
#include "gromacs/mdtypes/forcerec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/interaction_const.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/mdtypes/nblist.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/tables/forcetable.h"
#include "gromacs/topology/forcefieldparameters.h"
#include "gromacs/topology/idef.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/enumerationhelpers.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/strconvert.h"
#include "gromacs/utility/stringstream.h"
#include "gromacs/utility/textwriter.h"
#include "testutils/refdata.h"
#include "testutils/testasserts.h"
+ Include dependency graph for nb_free_energy.cpp:

Description

Implements test of nonbonded fep kernel.

Implements the test logic from the bonded interactions also for the nonbonded fep kernel. This requires setting up some more input structures that in the bonded case.

The test setup consists of an atom pair that is evaluated in an fep setting (vanishing charge and lennard-jones parameters of atom #2) with and without softcore Potentials.

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{nb_free_energy.cpp}::OutputQuantities
 Output from nonbonded fep kernel. More...
 
struct  gmx::test::anonymous_namespace{nb_free_energy.cpp}::AtomData
 Utility structure to hold atoms data. More...
 
struct  gmx::test::anonymous_namespace{nb_free_energy.cpp}::ListInput
 Input structure for nonbonded fep kernel. More...
 

Functions

void gmx::test::anonymous_namespace{nb_free_energy.cpp}::checkOutput (TestReferenceChecker *checker, const OutputQuantities &output)
 Utility to check the output from nonbonded test. More...
 

Variables

constexpr int gmx::test::anonymous_namespace{nb_free_energy.cpp}::c_numAtoms = 4
 Number of atoms used in these tests.
 
constexpr int gmx::test::anonymous_namespace{nb_free_energy.cpp}::c_numAtomTypes = 3
 
std::vector< ListInput > gmx::test::anonymous_namespace{nb_free_energy.cpp}::c_interaction
 configurations to test More...
 
std::vector< realgmx::test::anonymous_namespace{nb_free_energy.cpp}::c_fepLambdas = { 0.0, 0.5, 1.0 }
 test parameters
 
std::vector< realgmx::test::anonymous_namespace{nb_free_energy.cpp}::c_softcoreBeutlerAlphaOrGapsysLinpointScaling = { 0.0, 0.3 }
 
std::vector< bool > gmx::test::anonymous_namespace{nb_free_energy.cpp}::c_softcoreCoulomb = { true, false }
 
std::vector< SoftcoreTypegmx::test::anonymous_namespace{nb_free_energy.cpp}::c_softcoreType = { SoftcoreType::Beutler, SoftcoreType::Gapsys }
 
std::vector< PaddedVector< RVec > > gmx::test::anonymous_namespace{nb_free_energy.cpp}::c_coordinates
 Coordinates for testing. More...
 
std::vector< PaddedVector< RVec > > gmx::test::anonymous_namespace{nb_free_energy.cpp}::c_coordinatesShortDistance
 Coordinates for testing with near atomic overlap. More...