ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
esolver_lj.h
Go to the documentation of this file.
1#ifndef ESOLVER_LJ_H
2#define ESOLVER_LJ_H
3
4#include "esolver.h"
5
6namespace ModuleESolver
7{
8
9 class ESolver_LJ : public ESolver
10 {
11 public:
13 {
14 classname = "ESolver_LJ";
15 }
16
17 void before_all_runners(UnitCell& ucell, const Input_para& inp) override;
18
19 void runner(UnitCell& cell, const int istep) override;
20
21 double cal_energy() override;
22
23 void cal_force(UnitCell& ucell, ModuleBase::matrix& force) override;
24
25 void cal_stress(UnitCell& ucell, ModuleBase::matrix& stress) override;
26
27 void after_all_runners(UnitCell& ucell) override;
28
29 private:
30 double LJ_energy(const double& d, const int& i, const int& j);
31
32 ModuleBase::Vector3<double> LJ_force(const ModuleBase::Vector3<double>& dr, const int& i, const int& j);
33
35
36 void rcut_search_radius(const int& ntype, const std::vector<double>& rcut);
37
38 void set_c6_c12(const int& ntype,
39 const int& rule,
40 const std::vector<double>& epsilon,
41 const std::vector<double>& sigma);
42
43 void cal_en_shift(const int& ntype, const bool& is_shift);
44
45 //--------------temporary----------------------------
46 double search_radius=-1.0;
51
52 double lj_potential=0.0;
55 //---------------------------------------------------
56 };
57}
58#endif
3 elements vector
Definition vector3.h:22
Definition matrix.h:19
Definition esolver_lj.h:10
double lj_potential
Definition esolver_lj.h:52
ModuleBase::matrix lj_c12
Definition esolver_lj.h:48
ModuleBase::matrix en_shift
Definition esolver_lj.h:50
void set_c6_c12(const int &ntype, const int &rule, const std::vector< double > &epsilon, const std::vector< double > &sigma)
Definition esolver_lj.cpp:196
double search_radius
Definition esolver_lj.h:46
void LJ_virial(const ModuleBase::Vector3< double > &force, const ModuleBase::Vector3< double > &dtau)
Definition esolver_lj.cpp:150
void runner(UnitCell &cell, const int istep) override
run energy solver
Definition esolver_lj.cpp:33
void after_all_runners(UnitCell &ucell) override
perform post processing calculations
Definition esolver_lj.cpp:121
ModuleBase::matrix lj_c6
Definition esolver_lj.h:49
void before_all_runners(UnitCell &ucell, const Input_para &inp) override
initialize the energy solver by using input parameters and cell modules
Definition esolver_lj.cpp:12
ESolver_LJ()
Definition esolver_lj.h:12
void cal_stress(UnitCell &ucell, ModuleBase::matrix &stress) override
calcualte stress of given cell
Definition esolver_lj.cpp:104
double cal_energy() override
calculate total energy of a given system
Definition esolver_lj.cpp:93
double LJ_energy(const double &d, const int &i, const int &j)
Definition esolver_lj.cpp:129
void rcut_search_radius(const int &ntype, const std::vector< double > &rcut)
Definition esolver_lj.cpp:161
ModuleBase::matrix lj_virial
Definition esolver_lj.h:54
ModuleBase::matrix lj_rcut
Definition esolver_lj.h:47
ModuleBase::matrix lj_force
Definition esolver_lj.h:53
ModuleBase::Vector3< double > LJ_force(const ModuleBase::Vector3< double > &dr, const int &i, const int &j)
Definition esolver_lj.cpp:138
void cal_en_shift(const int &ntype, const bool &is_shift)
Definition esolver_lj.cpp:274
void cal_force(UnitCell &ucell, ModuleBase::matrix &force) override
calcualte forces for the atoms in the given cell
Definition esolver_lj.cpp:98
Definition esolver.h:11
std::string classname
Definition esolver.h:46
Definition unitcell.h:16
plane wave basis
Definition opt_test_tools.cpp:93
Definition input_parameter.h:12