Skip to content

Commit 07c7f40

Browse files
committed
update
1 parent 7fa6897 commit 07c7f40

File tree

2 files changed

+46
-15
lines changed

2 files changed

+46
-15
lines changed

source/module_esolver/lcao_after_scf.cpp

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,34 @@
3232
#include "module_io/ctrl_output_lcao.h"
3333
#include <iostream>
3434

35+
#include "module_elecstate/elecstate_lcao.h" // use elecstate::ElecState
36+
#include "module_io/ctrl_output_lcao.h" // use ctrl_output_lcao()
37+
#include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" // use hamilt::HamiltLCAO<TK, TR>
38+
#include "module_hamilt_general/hamilt.h" // use Hamilt<T>
39+
40+
#include "module_io/write_dmr.h" // use ModuleIO::write_dmr()
41+
#include "module_io/io_dmk.h" // use ModuleIO::write_dmk()
42+
#include "module_io/write_HS.h" // use ModuleIO::write_hsk()
43+
#include "module_io/write_wfc_nao.h" // use ModuleIO::write_wfc_nao()
44+
#include "module_io/output_mat_sparse.h" // use ModuleIO::output_mat_sparse()
45+
#include "module_io/output_mulliken.h" // use cal_mag()
46+
#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/ekinetic_new.h" // use hamilt::EkineticNew
47+
#include "module_io/cal_pLpR.h" // use AngularMomentumCalculator()
48+
#include "module_hamilt_lcao/module_deltaspin/spin_constrain.h" // use spinconstrain::SpinConstrain<TK>
49+
#include "module_io/berryphase.h" // use berryphase
50+
#include "module_io/to_wannier90_lcao.h" // use toWannier90_LCAO
51+
#include "module_io/to_wannier90_lcao_in_pw.h" // use toWannier90_LCAO_IN_PW
52+
#ifdef __EXX
53+
//#include "module_io/restart_exx_csr.h"
54+
#include "module_ri/RPA_LRI.h" // use RPA code
55+
#endif
56+
#include "module_rdmft/rdmft.h" // use RDMFT codes
57+
#include "module_io/to_qo.h" // use toQO
58+
59+
60+
61+
62+
3563
namespace ModuleESolver
3664
{
3765

@@ -50,21 +78,22 @@ void ESolver_KS_LCAO<TK, TR>::after_scf(UnitCell& ucell, const int istep, const
5078
//! 2) output of lcao every few ionic steps
5179
//------------------------------------------------------------------
5280
const auto* estate = dynamic_cast<const elecstate::ElecStateLCAO<TK>*>(this->pelec);
81+
const auto* hamilt_lcao = dynamic_cast<const hamilt::HamiltLCAO<TK, TR>*>(this->p_hamilt);
82+
5383
if(!estate)
5484
{
5585
ModuleBase::WARNING_QUIT("ModuleIO::ctrl_output_lcao","pelec does not exist");
5686
}
5787

5888
if(istep % PARAM.inp.out_interval == 0)
5989
{
60-
/*
6190
ModuleIO::ctrl_output_lcao<TK, TR>(ucell,
6291
this->kv,
63-
this->pelec,
92+
estate,
6493
this->pv,
6594
this->gd,
6695
this->psi,
67-
this->p_hamilt,
96+
hamilt_lcao,
6897
this->two_center_bundle_,
6998
this->GK,
7099
this->orb_,
@@ -82,7 +111,6 @@ void ESolver_KS_LCAO<TK, TR>::after_scf(UnitCell& ucell, const int istep, const
82111
this->exc,
83112
#endif
84113
istep);
85-
*/
86114
}
87115

88116
//------------------------------------------------------------------

source/module_io/ctrl_output_lcao.cpp

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ void ctrl_output_lcao(UnitCell& ucell,
4545
const Structure_Factor& sf, // for Wannier90
4646
rdmft::RDMFT<TK, TR> &rdmft_solver, // for RDMFT
4747
#ifdef __DEEPKS
48-
LCAO_Deepks<T>& ld,
48+
LCAO_Deepks<TK>& ld,
4949
#endif
5050
#ifdef __EXX
51-
Exx_LRI_Interface<T, double>& exd,
52-
Exx_LRI_Interface<T, std::complex<double>>& exc,
51+
Exx_LRI_Interface<TK, double>& exd,
52+
Exx_LRI_Interface<TK, std::complex<double>>& exc,
5353
#endif
5454
const int istep)
5555
{
@@ -421,9 +421,12 @@ template void ModuleIO::ctrl_output_lcao<double, double>(UnitCell& ucell,
421421
const ModulePW::PW_Basis_Big* pw_big, // for Wannier90
422422
const Structure_Factor& sf, // for Wannier90
423423
rdmft::RDMFT<double, double> &rdmft_solver, // for RDMFT
424+
#ifdef __DEEPKS
425+
LCAO_Deepks<TK>& ld,
426+
#endif
424427
#ifdef __EXX
425-
Exx_LRI_Interface<T, double>& exd,
426-
Exx_LRI_Interface<T, std::complex<double>>& exc,
428+
Exx_LRI_Interface<TK, double>& exd,
429+
Exx_LRI_Interface<TK, std::complex<double>>& exc,
427430
#endif
428431
const int istep);
429432

@@ -445,11 +448,11 @@ template void ModuleIO::ctrl_output_lcao<std::complex<double>, double>(UnitCell&
445448
const Structure_Factor& sf, // for Wannier90
446449
rdmft::RDMFT<std::complex<double>, double> &rdmft_solver, // for RDMFT
447450
#ifdef __DEEPKS
448-
LCAO_Deepks<T>& ld,
451+
LCAO_Deepks<TK>& ld,
449452
#endif
450453
#ifdef __EXX
451-
Exx_LRI_Interface<T, double>& exd,
452-
Exx_LRI_Interface<T, std::complex<double>>& exc,
454+
Exx_LRI_Interface<TK, double>& exd,
455+
Exx_LRI_Interface<TK, std::complex<double>>& exc,
453456
#endif
454457
const int istep);
455458

@@ -470,11 +473,11 @@ template void ModuleIO::ctrl_output_lcao<std::complex<double>, std::complex<doub
470473
const Structure_Factor& sf, // for Wannier90
471474
rdmft::RDMFT<std::complex<double>, std::complex<double>> &rdmft_solver, // for RDMFT
472475
#ifdef __DEEPKS
473-
LCAO_Deepks<T>& ld,
476+
LCAO_Deepks<TK>& ld,
474477
#endif
475478
#ifdef __EXX
476-
Exx_LRI_Interface<T, double>& exd,
477-
Exx_LRI_Interface<T, std::complex<double>>& exc,
479+
Exx_LRI_Interface<TK, double>& exd,
480+
Exx_LRI_Interface<TK, std::complex<double>>& exc,
478481
#endif
479482
const int istep);
480483

0 commit comments

Comments
 (0)