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"
6
7namespace ModuleESolver
8{
9
10 class ESolver_LJ : public ESolver
11 {
12 public:
14 {
15 classname = "ESolver_LJ";
16 }
17
19
20 void before_all_runners(UnitCell& ucell, const Input_para& inp) override;
21
22 void runner(UnitCell& cell, const int istep) override;
23
24 double cal_energy() override;
25
26 void cal_force(UnitCell& ucell, ModuleBase::matrix& force) override;
27
28 void cal_stress(UnitCell& ucell, ModuleBase::matrix& stress) override;
29
30 void after_all_runners(UnitCell& ucell) override;
31
32 private:
33 double LJ_energy(const double& d, const int& i, const int& j) const;
34
35 ModuleBase::Vector3<double> LJ_force(const ModuleBase::Vector3<double>& dr, const int& i, const int& j) const;
36
38
39 void rcut_search_radius(const int& ntype, const std::vector<double>& rcut);
40
41 void set_c6_c12(const int& ntype,
42 const int& rule,
43 const std::vector<double>& epsilon,
44 const std::vector<double>& sigma);
45
46 void cal_en_shift(const int& ntype, const bool& is_shift);
47
48 //--------------temporary----------------------------
49 double search_radius=-1.0;
54
55 double lj_potential=0.0;
58 //---------------------------------------------------
59 };
60}
61#endif
const std::complex< double > i
Definition cal_pLpR.cpp:46
3 elements vector
Definition vector3.h:24
Definition matrix.h:18
Definition esolver_lj.h:11
double lj_potential
Definition esolver_lj.h:55
ModuleBase::matrix lj_c12
Definition esolver_lj.h:51
ModuleBase::matrix en_shift
Definition esolver_lj.h:53
void set_c6_c12(const int &ntype, const int &rule, const std::vector< double > &epsilon, const std::vector< double > &sigma)
Definition esolver_lj.cpp:264
double search_radius
Definition esolver_lj.h:49
void LJ_virial(const ModuleBase::Vector3< double > &force, const ModuleBase::Vector3< double > &dtau)
Definition esolver_lj.cpp:218
void runner(UnitCell &cell, const int istep) override
run energy solver
Definition esolver_lj.cpp:58
void after_all_runners(UnitCell &ucell) override
perform post processing calculations
Definition esolver_lj.cpp:189
ModuleBase::matrix lj_c6
Definition esolver_lj.h:52
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:37
ESolver_LJ()
Definition esolver_lj.h:13
ModuleBase::Vector3< double > LJ_force(const ModuleBase::Vector3< double > &dr, const int &i, const int &j) const
Definition esolver_lj.cpp:206
void cal_stress(UnitCell &ucell, ModuleBase::matrix &stress) override
calcualte stress of given cell
Definition esolver_lj.cpp:172
double cal_energy() override
calculate total energy of a given system
Definition esolver_lj.cpp:161
void rcut_search_radius(const int &ntype, const std::vector< double > &rcut)
Definition esolver_lj.cpp:229
ModuleBase::matrix lj_virial
Definition esolver_lj.h:57
ModuleBase::matrix lj_rcut
Definition esolver_lj.h:50
double LJ_energy(const double &d, const int &i, const int &j) const
Definition esolver_lj.cpp:197
ModuleBase::matrix lj_force
Definition esolver_lj.h:56
UnitCellPlus change_from_ucell_to_ucell_plus(const UnitCell &ucell)
Definition esolver_lj.cpp:14
void cal_en_shift(const int &ntype, const bool &is_shift)
Definition esolver_lj.cpp:342
void cal_force(UnitCell &ucell, ModuleBase::matrix &force) override
calcualte forces for the atoms in the given cell
Definition esolver_lj.cpp:166
Definition esolver.h:12
std::string classname
Definition esolver.h:50
Definition unitcell_plus.h:7
Definition unitcell.h:15
The First-Principles (FP) Energy Solver Class.
Definition opt_test_tools.cpp:93
Definition input_parameter.h:12