Gromacs
2025.0-dev-20241011-013a99c
|
#include "gmxpre.h"
#include "gromacs/gmxlib/nonbonded/nb_free_energy.h"
#include "config.h"
#include <cmath>
#include <iterator>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#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/md_enums.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/topology/ifunc.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/enumerationhelpers.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/real.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"
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.
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< real > | gmx::test::anonymous_namespace{nb_free_energy.cpp}::c_fepLambdas = { 0.0, 0.5, 1.0 } |
test parameters | |
std::vector< real > | gmx::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< SoftcoreType > | gmx::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... | |