7#include "deepmd/deepmd.hpp"
9#include "deepmd/DeepPot.h"
20 ESolver_DP(
const std::string& pot_file) : dp(pot_file)
96 deepmd::hpp::DeepPot dp;
Definition esolver_dp.h:17
void cal_force(UnitCell &ucell, ModuleBase::matrix &force) override
get the computed atomic forces
Definition esolver_dp.cpp:128
std::string dp_file
DeePMD related variables for ESolver_DP class.
Definition esolver_dp.h:110
std::vector< int > atype
atom type corresponding to DP model
Definition esolver_dp.h:111
std::vector< double > aparam
atomic parameter for dp potential: natoms x dim_aparam
Definition esolver_dp.h:113
void type_map(const UnitCell &ucell)
determine the type map of DP model
double rescaling
rescaling factor for DP model
Definition esolver_dp.h:114
void runner(UnitCell &cell, const int istep) override
Run the DP solver for a given ion/md step and unit cell.
Definition esolver_dp.cpp:56
double dp_potential
computed potential energy
Definition esolver_dp.h:115
ModuleBase::matrix dp_virial
computed lattice virials
Definition esolver_dp.h:117
void cal_stress(UnitCell &ucell, ModuleBase::matrix &stress) override
get the computed lattice virials
Definition esolver_dp.cpp:134
ModuleBase::matrix dp_force
computed atomic forces
Definition esolver_dp.h:116
void before_all_runners(UnitCell &ucell, const Input_para &inp) override
Initialize the DP solver with given input parameters and unit cell.
Definition esolver_dp.cpp:33
std::vector< double > fparam
frame parameter for dp potential: dim_fparam
Definition esolver_dp.h:112
double cal_energy() override
get the total energy without ion kinetic energy
Definition esolver_dp.cpp:123
void after_all_runners(UnitCell &ucell) override
Prints the final total energy of the DP model to the output file.
Definition esolver_dp.cpp:149
ESolver_DP(const std::string &pot_file)
Definition esolver_dp.h:26
std::string classname
Definition esolver.h:46
plane wave basis
Definition opt_test_tools.cpp:93