Skip to content

Commit b8a0882

Browse files
authored
Fix "ntype=0" bug in hse example (#918)
* move init_basis before init_exx * add new file to Makefile.Objects
1 parent 10a4ec4 commit b8a0882

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

source/Makefile.Objects

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ gint_k_init.o\
121121
gint_k_vl.o\
122122
gint_k_rho.o\
123123
gint_k_fvl.o\
124+
gint_k_fvl_new.o\
124125
gint_k_env.o \
125126
ORB_control.o\
126127
ORB_read.o\

source/module_esolver/esolver_ks_lcao.cpp

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,19 @@ namespace ModuleESolver
143143
int ion_step = 0;
144144
GlobalC::pot.init_pot(ion_step, GlobalC::pw.strucFac);
145145

146+
//------------------init Basis_lcao----------------------
147+
// Init Basis should be put outside of Ensolver.
148+
// * reading the localized orbitals/projectors
149+
// * construct the interpolation tables.
150+
this->Init_Basis_lcao(this->orb_con, inp, ucell);
151+
//------------------init Basis_lcao----------------------
152+
153+
//------------------init Hamilt_lcao----------------------
154+
// * allocate H and S matrices according to computational resources
155+
// * set the 'trace' between local H/S and global H/S
156+
this->LM.divide_HS_in_frag(GlobalV::GAMMA_ONLY_LOCAL, orb_con.ParaV);
157+
//------------------init Hamilt_lcao----------------------
158+
146159
#ifdef __MPI
147160
// PLEASE simplify the Exx_Global interface
148161
// mohan add 2021-03-25
@@ -175,19 +188,7 @@ namespace ModuleESolver
175188

176189
if (INPUT.dft_plus_dmft) GlobalC::dmft.init(INPUT, ucell);
177190

178-
//------------------init Basis_lcao----------------------
179-
// Init Basis should be put outside of Ensolver.
180-
// * reading the localized orbitals/projectors
181-
// * construct the interpolation tables.
182-
this->Init_Basis_lcao(this->orb_con, inp, ucell);
183-
//------------------init Basis_lcao----------------------
184-
185-
//------------------init Hamilt_lcao----------------------
186-
// * allocate H and S matrices according to computational resources
187-
// * set the 'trace' between local H/S and global H/S
188-
this->LM.divide_HS_in_frag(GlobalV::GAMMA_ONLY_LOCAL, orb_con.ParaV);
189-
//------------------init Hamilt_lcao----------------------
190-
//init Psi
191+
//init Psi
191192
if (GlobalV::GAMMA_ONLY_LOCAL)
192193
this->LOWF.wfc_gamma.resize(GlobalV::NSPIN);
193194
else

0 commit comments

Comments
 (0)