Gromacs  2026.0-dev-20250321-66aade4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::INNPotModel Class Referenceabstract

#include <gromacs/applied_forces/nnpot/nnpotmodel.h>

+ Inheritance diagram for gmx::INNPotModel:

Description

NNPot Module.

Abstract class for a neural network potential model. Inherit from this class to implement a specific neural network backend/framework. Refer to torchmodel.h for an example implementation.

Public Member Functions

virtual void evaluateModel (gmx_enerdata_t *, const ArrayRef< RVec > &, ArrayRef< const int > &, ArrayRef< const std::string > &, ArrayRef< RVec > &, ArrayRef< int > &, matrix *, PbcType *)=0
 Evaluate NN model. More...
 
virtual void setCommRec (const t_commrec *)=0
 set communication record for possible communication of input/output data between ranks
 
virtual bool outputsForces () const =0
 helper function to check if model outputs forces
 

Member Function Documentation

virtual void gmx::INNPotModel::evaluateModel ( gmx_enerdata_t ,
const ArrayRef< RVec > &  ,
ArrayRef< const int > &  ,
ArrayRef< const std::string > &  ,
ArrayRef< RVec > &  ,
ArrayRef< int > &  ,
matrix *  ,
PbcType  
)
pure virtual

Evaluate NN model.

Includes the preparation of inputs, calling inference of the model, and retrieval of outputs. Currently supported inputs:

  • atom positions (ArrayRef<RVec>): atomic positions
  • atom numbers (ArrayRef<int>): atomic numbers
  • box (matrix): simulation box vectors
  • pbc type (PbcType): boolean flags for periodic boundary conditions in x, y, z

Implemented in gmx::TorchModel.


The documentation for this class was generated from the following file: