OpenMD 3.2
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
nep.hpp
1#ifndef BRAINS_NEP_HPP
2#define BRAINS_NEP_HPP
3
4#include <config.h>
5#include "NEP_CPU/src/nep.h"
6
7using namespace std;
8
9namespace OpenMD {
10
11 struct NEPAtoms {
12 int N;
13 std::vector<int> type;
14 std::vector<RealType> cell, position, mass;
15 };
16
17 class NEP {
18 public:
19
20 NEP(const std::string &model_filename, int N_atoms,
21 std::vector<RealType> box, std::vector<std::string> atom_symbols,
22 std::vector<RealType> positions, std::vector<RealType> masses);
23
24 std::vector<RealType> getDescriptors();
25 std::vector<RealType> getDipole();
26 std::vector<RealType> getDipoleGradient(RealType displacement, int method,
27 RealType charge);
28 std::vector<RealType> getPolarizability();
29 std::vector<RealType> getPolarizabilityGradient(RealType displacement,
30 std::vector<int> components);
31 std::vector<RealType> getLatentSpace();
32 std::tuple<std::vector<RealType>, std::vector<RealType>, std::vector<RealType>> getPotentialForcesAndVirials();
33 std::vector<std::string> _getAtomSymbols(std::string model_filename);
34 void _convertAtomTypeNEPIndex(int N, std::vector<std::string> atom_symbols,
35 std::vector<std::string> model_atom_symbols,
36 std::vector<int> &type);
37 void _getCenterOfMass(std::vector<RealType> center_of_mass);
38 void setPositions(std::vector<RealType> positions);
39 void setCell(std::vector<RealType> cell);
40 void setMasses(std::vector<RealType> masses);
41 void setSymbols(std::vector<std::string> atom_symbols);
42
43 private:
44 NEP3 nep;
45 struct NEPAtoms atoms;
46 std::string model_filename;
47 };
48}
49#endif
void setCell(std::vector< RealType > cell)
Definition nep.cpp:492
void setMasses(std::vector< RealType > masses)
Definition nep.cpp:503
void setSymbols(std::vector< std::string > atom_symbols)
Definition nep.cpp:514
std::vector< RealType > getPolarizability()
Definition nep.cpp:308
NEP(const std::string &model_filename, int N_atoms, std::vector< RealType > box, std::vector< std::string > atom_symbols, std::vector< RealType > positions, std::vector< RealType > masses)
Definition nep.cpp:12
void setPositions(std::vector< RealType > positions)
Definition nep.cpp:480
void _getCenterOfMass(std::vector< RealType > center_of_mass)
Definition nep.cpp:69
std::vector< RealType > getDipoleGradient(RealType displacement, int method, RealType charge)
Definition nep.cpp:92
std::vector< RealType > getLatentSpace()
Definition nep.cpp:48
void _convertAtomTypeNEPIndex(int N, std::vector< std::string > atom_symbols, std::vector< std::string > model_atom_symbols, std::vector< int > &type)
Definition nep.cpp:448
std::vector< RealType > getPolarizabilityGradient(RealType displacement, std::vector< int > components)
Definition nep.cpp:321
std::vector< RealType > getDipole()
Definition nep.cpp:59
std::vector< RealType > getDescriptors()
Definition nep.cpp:38
std::vector< std::string > _getAtomSymbols(std::string model_filename)
Definition nep.cpp:421
std::tuple< std::vector< RealType >, std::vector< RealType >, std::vector< RealType > > getPotentialForcesAndVirials()
Definition nep.cpp:408
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.