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_NEP Class Reference

#include <esolver_nep.h>

Inheritance diagram for ModuleESolver::ESolver_NEP:
Collaboration diagram for ModuleESolver::ESolver_NEP:

Public Member Functions

 ESolver_NEP (const std::string &pot_file)
 
void before_all_runners (UnitCell &ucell, const Input_para &inp) override
 Initialize the NEP solver with given input parameters and unit cell.
 
void runner (UnitCell &ucell, const int istep) override
 Run the NEP 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 NEP 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 NEP model
 

Private Attributes

std::string nep_file
 NEP related variables for ESolver_NEP class.
 
std::vector< int > atype = {}
 atom type mapping for NEP model
 
double nep_potential
 computed potential energy
 
ModuleBase::matrix nep_force
 computed atomic forces
 
ModuleBase::matrix nep_virial
 computed lattice virials
 
std::vector< double > _e
 temporary storage for energy computation
 
std::vector< double > _f
 temporary storage for force computation
 
std::vector< double > _v
 temporary storage for virial computation
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ ESolver_NEP()

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

Member Function Documentation

◆ after_all_runners()

void ESolver_NEP::after_all_runners ( UnitCell ucell)
overridevirtual

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

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

Implements ModuleESolver::ESolver.

◆ before_all_runners()

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

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

Parameters
inpinput parameters
cellunitcell information

Implements ModuleESolver::ESolver.

Here is the call graph for this function:

◆ cal_energy()

double ESolver_NEP::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_NEP::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_NEP::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_NEP::runner ( UnitCell ucell,
const int  istep 
)
overridevirtual

Run the NEP 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_NEP::type_map ( const UnitCell ucell)
private

determine the type map of NEP model

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

Member Data Documentation

◆ _e

std::vector<double> ModuleESolver::ESolver_NEP::_e
private

temporary storage for energy computation

◆ _f

std::vector<double> ModuleESolver::ESolver_NEP::_f
private

temporary storage for force computation

◆ _v

std::vector<double> ModuleESolver::ESolver_NEP::_v
private

temporary storage for virial computation

◆ atype

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

atom type mapping for NEP model

◆ nep_file

std::string ModuleESolver::ESolver_NEP::nep_file
private

NEP related variables for ESolver_NEP class.

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

Note
These variables are only defined if the __NEP preprocessor macro is defined. directory of NEP model file

◆ nep_force

ModuleBase::matrix ModuleESolver::ESolver_NEP::nep_force
private

computed atomic forces

◆ nep_potential

double ModuleESolver::ESolver_NEP::nep_potential
private

computed potential energy

◆ nep_virial

ModuleBase::matrix ModuleESolver::ESolver_NEP::nep_virial
private

computed lattice virials


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