Gromacs  2026.0-dev-20251119-5f0a571d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
nnpotforceprovider.cpp File Reference
#include "gmxpre.h"
#include "nnpotforceprovider.h"
#include <filesystem>
#include "gromacs/domdec/localatomset.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/mdrunutility/mdmodulesnotifiers.h"
#include "gromacs/mdtypes/enerdata.h"
#include "gromacs/mdtypes/forceoutput.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/embedded_system_preprocessing.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/logger.h"
#include "gromacs/utility/mpicomm.h"
#include "gromacs/utility/vectypes.h"
#include "nnpotmodel.h"
#include "nnpotoptions.h"
#include "torchmodel.h"
+ Include dependency graph for nnpotforceprovider.cpp:

Description

Implements the NNPot Force Provider class.

Author
Lukas Müllender lukas.nosp@m..mue.nosp@m.llend.nosp@m.er@g.nosp@m.mail..nosp@m.com

Functions

static std::optional< ptrdiff_t > indexOf (gmx::ArrayRef< const int > vec, const int val)
 
static void gmx::centerAtomPositions (ArrayRef< RVec > nnPos, ArrayRef< RVec > mmPos, const matrix &box, const PbcType &pbcType)
 
 gmx::atomNumbers_ (params_.numAtoms_,-1)
 
 gmx::inputToLocalIndex_ (params_.numAtoms_,-1)
 
 gmx::logger_ (logger)
 
 gmx::mpiComm_ (mpiComm)
 

Variables

 gmx::box_ { { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 } }
 

Function Documentation

static std::optional<ptrdiff_t> indexOf ( gmx::ArrayRef< const int >  vec,
const int  val 
)
static

Helper function to find the index of a value in a vector

Returns the index of the first occurrence of val in vec, or -1 if not found. Can be used as an inversion for the index lookup tables.

Parameters
[in]vecvector to search in
[in]valvalue to search for