ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ModuleESolver::ESolver_DP Class Reference

#include <esolver_dp.h>

Inheritance diagram for ModuleESolver::ESolver_DP:
Collaboration diagram for ModuleESolver::ESolver_DP:

Public Member Functions

 ESolver_DP (const std::string &pot_file)
 
void before_all_runners (UnitCell &ucell, const Input_para &inp) override
 Initialize the DP solver with given input parameters and unit cell.
 
void runner (UnitCell &cell, const int istep) override
 Run the DP solver for a given ion/md step and unit cell.
 
double cal_energy () override
 get the total energy without ion kinetic energy
 
void cal_force (UnitCell &ucell, ModuleBase::matrix &force) override
 get the computed atomic forces
 
void cal_stress (UnitCell &ucell, ModuleBase::matrix &stress) override
 get the computed lattice virials
 
void after_all_runners (UnitCell &ucell) override
 Prints the final total energy of the DP model to the output file.
 
- Public Member Functions inherited from ModuleESolver::ESolver
 ESolver ()
 
virtual ~ESolver ()
 
virtual void others (UnitCell &ucell, const int istep)
 

Private Member Functions

void type_map (const UnitCell &ucell)
 determine the type map of DP model
 

Private Attributes

std::string dp_file
 DeePMD related variables for ESolver_DP class.
 
std::vector< int > atype = {}
 atom type corresponding to DP model
 
std::vector< double > fparam = {}
 frame parameter for dp potential: dim_fparam
 
std::vector< double > aparam = {}
 atomic parameter for dp potential: natoms x dim_aparam
 
double rescaling = 1.0
 rescaling factor for DP model
 
double dp_potential = 0.0
 computed potential energy
 
ModuleBase::matrix dp_force
 computed atomic forces
 
ModuleBase::matrix dp_virial
 computed lattice virials
 

Additional Inherited Members

- Public Attributes inherited from ModuleESolver::ESolver
bool conv_esolver = true
 
std::string classname
 

Constructor & Destructor Documentation

◆ ESolver_DP()

ModuleESolver::ESolver_DP::ESolver_DP ( const std::string &  pot_file)
inline

Member Function Documentation

◆ after_all_runners()

void ESolver_DP::after_all_runners ( UnitCell ucell)
overridevirtual

Prints the final total energy of the DP model to the output file.

This function prints the final total energy of the DP model in eV to the output file along with some formatting.

Implements ModuleESolver::ESolver.

◆ before_all_runners()

void ESolver_DP::before_all_runners ( UnitCell ucell,
const Input_para inp 
)
overridevirtual

Initialize the DP solver with given input parameters and unit cell.

Parameters
inpinput parameters
cellunitcell information

Implements ModuleESolver::ESolver.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_energy()

double ESolver_DP::cal_energy ( )
overridevirtual

get the total energy without ion kinetic energy

Parameters
etotthe computed energy
Returns
total energy without ion kinetic energy

Implements ModuleESolver::ESolver.

◆ cal_force()

void ESolver_DP::cal_force ( UnitCell ucell,
ModuleBase::matrix force 
)
overridevirtual

get the computed atomic forces

Parameters
forcethe computed atomic forces

Implements ModuleESolver::ESolver.

Here is the call graph for this function:

◆ cal_stress()

void ESolver_DP::cal_stress ( UnitCell ucell,
ModuleBase::matrix stress 
)
overridevirtual

get the computed lattice virials

Parameters
stressthe computed lattice virials

Implements ModuleESolver::ESolver.

Here is the call graph for this function:

◆ runner()

void ESolver_DP::runner ( UnitCell cell,
const int  istep 
)
overridevirtual

Run the DP solver for a given ion/md step and unit cell.

Parameters
istepthe current ion/md step
cellunitcell information

Implements ModuleESolver::ESolver.

Here is the call graph for this function:

◆ type_map()

void ModuleESolver::ESolver_DP::type_map ( const UnitCell ucell)
private

determine the type map of DP model

Parameters
ucellunitcell information
Here is the caller graph for this function:

Member Data Documentation

◆ aparam

std::vector<double> ModuleESolver::ESolver_DP::aparam = {}
private

atomic parameter for dp potential: natoms x dim_aparam

◆ atype

std::vector<int> ModuleESolver::ESolver_DP::atype = {}
private

atom type corresponding to DP model

◆ dp_file

std::string ModuleESolver::ESolver_DP::dp_file
private

DeePMD related variables for ESolver_DP class.

These variables are related to the DeePMD method and are used in the ESolver_DP class to compute the potential energy and forces.

Note
These variables are only defined if the __DPMD preprocessor macro is defined. Variables for storing simulation data in ESolver_DP class

These variables are used in the ESolver_DP class to store simulation data such as atomic positions, types, and the potential energy and forces. directory of DP model file

◆ dp_force

ModuleBase::matrix ModuleESolver::ESolver_DP::dp_force
private

computed atomic forces

◆ dp_potential

double ModuleESolver::ESolver_DP::dp_potential = 0.0
private

computed potential energy

◆ dp_virial

ModuleBase::matrix ModuleESolver::ESolver_DP::dp_virial
private

computed lattice virials

◆ fparam

std::vector<double> ModuleESolver::ESolver_DP::fparam = {}
private

frame parameter for dp potential: dim_fparam

◆ rescaling

double ModuleESolver::ESolver_DP::rescaling = 1.0
private

rescaling factor for DP model


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