Repository navigation
Expand file tree
/
Copy pathlcao_after_scf.cpp
More file actions
72 lines (62 loc) · 2.06 KB
/
Copy pathlcao_after_scf.cpp
File metadata and controls
72 lines (62 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#include "esolver_ks_lcao.h"
#include "source_io/ctrl_output_lcao.h"
namespace ModuleESolver
{
template <typename TK, typename TR>
void ESolver_KS_LCAO<TK, TR>::after_scf(UnitCell& ucell, const int istep, const bool conv_esolver)
{
ModuleBase::TITLE("ESolver_KS_LCAO", "after_scf");
ModuleBase::timer::tick("ESolver_KS_LCAO", "after_scf");
//------------------------------------------------------------------
//! 1) call after_scf() of ESolver_KS
//------------------------------------------------------------------
ESolver_KS<TK>::after_scf(ucell, istep, conv_esolver);
//------------------------------------------------------------------
//! 2) output of lcao every few ionic steps
//------------------------------------------------------------------
auto* estate = dynamic_cast<elecstate::ElecStateLCAO<TK>*>(this->pelec);
auto* hamilt_lcao = dynamic_cast<hamilt::HamiltLCAO<TK, TR>*>(this->p_hamilt);
if(!estate)
{
ModuleBase::WARNING_QUIT("ModuleIO::ctrl_output_lcao","pelec does not exist");
}
if(istep % PARAM.inp.out_interval == 0)
{
ModuleIO::ctrl_output_lcao<TK, TR>(ucell,
this->kv,
estate,
this->pv,
this->gd,
this->psi,
hamilt_lcao,
this->two_center_bundle_,
this->GK,
this->orb_,
this->pw_wfc,
this->pw_rho,
this->GridT,
this->pw_big,
this->sf,
this->rdmft_solver,
#ifdef __MLALGO
this->ld,
#endif
#ifdef __EXX
*this->exd,
*this->exc,
#endif
istep);
}
//------------------------------------------------------------------
//! 3) Clean up RA, which is used to serach for adjacent atoms
//------------------------------------------------------------------
if (!PARAM.inp.cal_force && !PARAM.inp.cal_stress)
{
RA.delete_grid();
}
ModuleBase::timer::tick("ESolver_KS_LCAO", "after_scf");
}
template class ESolver_KS_LCAO<double, double>;
template class ESolver_KS_LCAO<std::complex<double>, double>;
template class ESolver_KS_LCAO<std::complex<double>, std::complex<double>>;
} // namespace ModuleESolver