MDStressLab++
Loading...
Searching...
No Matches
Kim Class Reference

#include <kim.h>

Collaboration diagram for Kim:

Public Member Functions

 Kim (const std::string &modelname)
 
 Kim ()
 
virtual ~Kim ()
 
void queryModel ()
 
void broadcastToModel (const Configuration *config_ptr, const VectorXi &particleContributing, const MatrixXd *forces_ptr, NeighList *nl_ptr, KIM::Function *get_neigh_ptr, InteratomicForces *bonds, KIM::Function *processDEDr_ptr)
 
void compute ()
 
const double * getCutoffs () const
 
int getNumberOfNeighborLists () const
 

Public Attributes

std::vector< int > speciesCode
 
std::string modelname
 
double influenceDistance
 
KIM::Model * kim_ptr
 
KIM::ComputeArguments * computeArguments
 

Detailed Description

The Kim class links MDStressLab to an openkim interatomic potential model.

Examples
crack/main.cpp, testLDADLJ.cpp, testLJ.cpp, and testMls.cpp.

Definition at line 20 of file kim.h.

Constructor & Destructor Documentation

◆ Kim() [1/2]

Kim::Kim ( const std::string &  modelname)

Constructs the Kim object

Parameters
modelname- KIM model name

Definition at line 13 of file kim.cpp.

◆ Kim() [2/2]

Kim::Kim ( )
inline

Definition at line 34 of file kim.h.

◆ ~Kim()

Kim::~Kim ( )
virtual

Definition at line 40 of file kim.cpp.

Member Function Documentation

◆ broadcastToModel()

void Kim::broadcastToModel ( const Configuration config_ptr,
const VectorXi particleContributing,
const MatrixXd forces_ptr,
NeighList nl_ptr,
KIM::Function *  get_neigh_ptr,
InteratomicForces bonds,
KIM::Function *  processDEDr_ptr 
)

This function broadcasts the atomistic system to the KIM model

Parameters
config_ptr- pointer to the configuration of atoms
particleContributing- an integer array of size equal to the number of atoms. If a particle is contributing it is marked as 1, and 0 otherwise.
forces_ptr- pointer to a matrix of size [3 x numberOfParticle] describing atomic forces
nl_ptr- pointer to the neighbor list
get_neigh_ptr- a pointer to a function that return the neighbor list of an atom
bonds- pointer to a InteratomicForces object
processDEDr_ptr- a pointer to the processdEdr function

Definition at line 254 of file kim.cpp.

◆ compute()

void Kim::compute ( )

This function call the model's compute routine to calculate the atomic forces. In addition, if processDEDr_ptr!=nullptr, interatomic forces are calculated using the model's processdEdr functionality.

Definition at line 303 of file kim.cpp.

◆ getCutoffs()

const double * Kim::getCutoffs ( ) const

Definition at line 48 of file kim.cpp.

◆ getNumberOfNeighborLists()

int Kim::getNumberOfNeighborLists ( ) const

Definition at line 59 of file kim.cpp.

◆ queryModel()

void Kim::queryModel ( )

Definition at line 71 of file kim.cpp.

Member Data Documentation

◆ computeArguments

KIM::ComputeArguments* Kim::computeArguments

Definition at line 27 of file kim.h.

◆ influenceDistance

double Kim::influenceDistance

Definition at line 25 of file kim.h.

◆ kim_ptr

KIM::Model* Kim::kim_ptr

Definition at line 26 of file kim.h.

◆ modelname

std::string Kim::modelname

Definition at line 24 of file kim.h.

◆ speciesCode

std::vector<int> Kim::speciesCode

Definition at line 23 of file kim.h.


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