Gromacs  2026.0-dev-20241213-9ac17bb
 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 initModel ()=0
 Initialize the neural network model.
 
virtual void evaluateModel ()=0
 call inference on NN model
 
virtual void getOutputs (std::vector< int > &, gmx_enerdata_t &, const ArrayRef< RVec > &, bool)=0
 retrieve NN model outputs
 
virtual void setCommRec (const t_commrec *)=0
 set communication record for possible communication of input/output data between ranks
 
virtual void prepareAtomPositions (std::vector< RVec > &)=0
 Prepare inputs for NN model. More...
 
virtual void prepareAtomNumbers (std::vector< int > &)=0
 
virtual void prepareBox (matrix &)=0
 
virtual void preparePbcType (PbcType &)=0
 

Member Function Documentation

virtual void gmx::INNPotModel::prepareAtomPositions ( std::vector< RVec > &  )
pure virtual

Prepare inputs for NN model.

Currently supported inputs:

  • atom positions (std::vector<RVec>): atomic positions
  • atom numbers (std::vector<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: