Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
36ec9b8
remove some old_gint code
dzzz2001 Oct 21, 2025
f6ebc63
remove olg_gint code in cal_ldos.cpp
dzzz2001 Oct 21, 2025
cb28a7b
remove old_gint in get_pchg_lcao
dzzz2001 Oct 21, 2025
906eba4
remove old_gint code in veff_lcao
dzzz2001 Oct 21, 2025
7e6272f
remove old_gint in pulay_fs_gint
dzzz2001 Oct 21, 2025
696af48
remove old_gint in spar_dh
dzzz2001 Oct 21, 2025
bcd3e88
remove old_gint in veff_lcao.h
dzzz2001 Oct 21, 2025
4ed8d2d
remove old_gint in rdmft_tools
dzzz2001 Oct 21, 2025
0465c6d
remove old_gint in operator_lr_hxc
dzzz2001 Oct 21, 2025
d143885
remove old_gint in module_lr
dzzz2001 Oct 21, 2025
a6ccca1
remove old_gint in get_wf_lcao
dzzz2001 Oct 21, 2025
518d92a
remove ifndef old_gint
dzzz2001 Oct 21, 2025
33061fc
remove gk gg in ctrl_runner_lcao
dzzz2001 Oct 21, 2025
21cf856
remove gg gk in ctrl_runner_lcao.h
dzzz2001 Oct 21, 2025
9dd8667
remove gk gt in ctrl_scf_lcao.cpp
dzzz2001 Oct 21, 2025
7ac73c6
remove gk in ctrl_scf_lcao.h
dzzz2001 Oct 21, 2025
9632226
rm gk in get_pchg_lcao.cpp
dzzz2001 Oct 21, 2025
c736661
rm gk in get_pchg_lcao.h
dzzz2001 Oct 21, 2025
fbc04d6
rm gk in get_wf_lcao.cpp
dzzz2001 Oct 21, 2025
05006f6
rm gk in get_wf_lcao
dzzz2001 Oct 21, 2025
92a9a7d
rm gk in esolver_ks_lcao.h
dzzz2001 Oct 21, 2025
4ee43e4
rm gk in elecstate_lcao.h
dzzz2001 Oct 21, 2025
f05a337
remove gint_k in output_mat_sparse.cpp
dzzz2001 Oct 21, 2025
d90714a
rm gint_k in output_mat_sparse.h
dzzz2001 Oct 21, 2025
2b8ee2a
rm gint_k in write_eband_terms.hpp
dzzz2001 Oct 21, 2025
edb6892
remove gint_k in write_HS_R.cpp
dzzz2001 Oct 21, 2025
e80518d
rm gint_k in write_HS_R.h
dzzz2001 Oct 21, 2025
b965fbc
rm gint_k in write_vxc_r.hpp
dzzz2001 Oct 21, 2025
bb7554f
rm gint_k in get_wf_lcao.h
dzzz2001 Oct 21, 2025
ea8a48f
rm gint in write_vxc.hpp
dzzz2001 Oct 21, 2025
8ee2b25
remove old gint in FORCE.h
dzzz2001 Oct 21, 2025
335bd3a
delete grid_init.cpp
dzzz2001 Oct 21, 2025
7eb2c0c
rm old_gint in hamilt_lcao.cpp
dzzz2001 Oct 21, 2025
ba05d44
rm old_gint in hamilt_lcao.h
dzzz2001 Oct 21, 2025
3b5a2f8
rm old_gint in LCAO_domain.h
dzzz2001 Oct 21, 2025
39c2043
rm old_gint in spar_dh.cpp
dzzz2001 Oct 21, 2025
15231fc
rm olg gint in spar_dh.h
dzzz2001 Oct 21, 2025
041556b
rm old gint in rdmft.h
dzzz2001 Oct 21, 2025
26750e8
rm old gint in rdmft.cpp
dzzz2001 Oct 21, 2025
8943102
rm old gint in rdmft_tools.h
dzzz2001 Oct 21, 2025
7d20d54
rm old gint in esolver_lrtd_lcao.h
dzzz2001 Oct 21, 2025
10e3c7e
remove gint_template.h
dzzz2001 Oct 21, 2025
1eca30e
rm olg_gint in veff_lcao.h
dzzz2001 Oct 21, 2025
be95791
detele gint_move.hpp
dzzz2001 Oct 22, 2025
2161c32
remove gint_gamma in get_pchg_lcao
dzzz2001 Oct 22, 2025
cc0c63b
remove gk in get_wf_lcao.cpp
dzzz2001 Oct 22, 2025
63076c9
rm grid_tech in elecstate_lcao.cpp
dzzz2001 Oct 22, 2025
f5dbbff
remove grid technique in berryphase.cpp
dzzz2001 Oct 22, 2025
eb535bb
remove grid tech in berryphase.h
dzzz2001 Oct 22, 2025
4eacb8c
remove grid tech in to_wannier90_lcao_in_pw.h
dzzz2001 Oct 22, 2025
bc7c756
rm grid tech in to_wannier90_lcao.h
dzzz2001 Oct 22, 2025
8971228
remove grid tech in unk_overlap_lcao.cpp
dzzz2001 Oct 22, 2025
1c7cf99
remove grid tech in unk_overlap_lcao.h
dzzz2001 Oct 22, 2025
450a4d6
delete for_grid function in record_adj
dzzz2001 Oct 22, 2025
fd39468
remove old_gint in operator_lr_hxc.h
dzzz2001 Oct 22, 2025
3c704e9
rm old_gint in hamilt_casida
dzzz2001 Oct 22, 2025
c8ccb9a
rm old_gint in hamilt_ulr.hpp
dzzz2001 Oct 22, 2025
c50f990
rm old gint in lr_spectrum.h
dzzz2001 Oct 22, 2025
6d3c56d
rm old gint in esolver_lrtd_lcao.cpp
dzzz2001 Oct 22, 2025
ff5074c
rm old gint in veff_lcao.h
dzzz2001 Oct 22, 2025
d149e00
rm old gint in rdmft_pot.cpp
dzzz2001 Oct 22, 2025
034cbce
rm old gint in rdmft_tools.h
dzzz2001 Oct 22, 2025
14b44ba
rm olg gint in veff_lcao.h
dzzz2001 Oct 22, 2025
236586b
add missing header
dzzz2001 Oct 22, 2025
21735ad
rm olg gint in hamilt_lcao.cpp
dzzz2001 Oct 22, 2025
121267d
rm old gint in esolver_double_xc.cpp
dzzz2001 Oct 22, 2025
11d9c85
rm old gint in esolver_ks_lcao.cpp
dzzz2001 Oct 22, 2025
c0998da
rm old gint in lcao_before_scf.cpp and lcao_others.cpp
dzzz2001 Oct 22, 2025
a4e7439
rm some comments
dzzz2001 Oct 22, 2025
13d9fa1
rm old_gint in lcao_others.cpp
dzzz2001 Oct 22, 2025
9b4a0b2
rm some comments
dzzz2001 Oct 22, 2025
7c88dda
add missing header
dzzz2001 Oct 22, 2025
3dc02a2
add missing header
dzzz2001 Oct 22, 2025
fc9a032
add missing header
dzzz2001 Oct 22, 2025
d33d3e2
add missing header
dzzz2001 Oct 22, 2025
03d9cd6
rm old gint in esolver_gets.cpp and lcao_after_scf.cpp
dzzz2001 Oct 22, 2025
3fb2c89
add missing headers
dzzz2001 Oct 22, 2025
262b901
modify cmakelist
dzzz2001 Oct 22, 2025
edbfb5d
remove old cuda code in gint module
dzzz2001 Oct 22, 2025
1b6d9d7
delete files of old gint module
dzzz2001 Oct 22, 2025
04b2d5b
remove legacy code
dzzz2001 Oct 22, 2025
7ff1c03
modify makefile
dzzz2001 Oct 22, 2025
a0dbf3c
remove legacy code
dzzz2001 Oct 22, 2025
3289c97
move files from temp_gint to module_gint
dzzz2001 Oct 22, 2025
824ee77
modify headers and makefile
dzzz2001 Oct 22, 2025
59dc8ca
remove legacy code
dzzz2001 Oct 22, 2025
86e39e8
delete compilation option "OLD_GINT"
dzzz2001 Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,6 @@ if(ENABLE_LCAO)
add_compile_definitions(__PEXSI)
set(CMAKE_CXX_STANDARD 14)
endif()
if(OLD_GINT)
add_compile_definitions(__OLD_GINT)
endif()
else()
set(ENABLE_MLALGO OFF)
set(ENABLE_LIBRI OFF)
Expand Down
29 changes: 1 addition & 28 deletions source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ VPATH=./src_global:\
./source_lcao/module_deltaspin:\
./source_lcao/module_operator_lcao:\
./source_lcao/module_gint:\
./source_lcao/module_gint/temp_gint:\
./source_relax:\
./source_hamilt/module_vdw:\
./source_io:\
Expand Down Expand Up @@ -282,32 +281,7 @@ OBJS_ESOLVER_LCAO=esolver_ks_lcao.o\
esolver_dm2rho.o\
esolver_double_xc.o\

OBJS_GINT=gint_old.o\
gint_gamma_env.o\
gint_gamma_vl.o\
gint_fvl_old.o\
gint_rho_old.o\
gint_tau_old.o\
gint_vl_old.o\
gint_k_env.o\
gint_k_sparse1.o\
gint_k_pvpr.o\
gint_k_pvdpr.o\
gint_tools.o\
grid_bigcell.o\
grid_meshball.o\
grid_meshcell.o\
grid_meshk.o\
grid_technique.o\
gint_force_cpu_interface.o\
gint_rho_cpu_interface.o\
gint_vl_cpu_interface.o\
cal_psir_ylm.o\
cal_dpsir_ylm.o\
cal_ddpsir_ylm.o\
mult_psi_dmr.o\
init_orb.o\
batch_biggrid.o\
OBJS_GINT=batch_biggrid.o\
big_grid.o\
biggrid_info.o\
divide_info.o\
Expand Down Expand Up @@ -655,7 +629,6 @@ OBJS_LCAO=evolve_elec.o\
stress_tools.o\
edm.o\
pulay_fs_center2.o\
grid_init.o\
spar_dh.o\
spar_exx.o\
spar_hsr.o\
Expand Down
4 changes: 0 additions & 4 deletions source/source_esolver/esolver_double_xc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ void ESolver_DoubleXC<TK, TR>::before_all_runners(UnitCell& ucell, const Input_p
this->pelec_base = new elecstate::ElecStateLCAO<TK>(&(this->chr_base), // use which parameter?
&(this->kv),
this->kv.get_nks(),
&(this->GG),
&(this->GK),
this->pw_rho,
this->pw_big);
}
Expand Down Expand Up @@ -145,8 +143,6 @@ void ESolver_DoubleXC<TK, TR>::before_scf(UnitCell& ucell, const int istep)
elecstate::DensityMatrix<TK, double>* DM = dynamic_cast<elecstate::ElecStateLCAO<TK>*>(this->pelec_base)->get_DM();

this->p_hamilt_base = new hamilt::HamiltLCAO<TK, TR>(
PARAM.globalv.gamma_only_local ? &(this->GG) : nullptr,
PARAM.globalv.gamma_only_local ? nullptr : &(this->GK),
ucell,
this->gd,
&this->pv,
Expand Down
2 changes: 0 additions & 2 deletions source/source_esolver/esolver_gets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ void ESolver_GetS::before_all_runners(UnitCell& ucell, const Input_para& inp)
this->pelec = new elecstate::ElecStateLCAO<std::complex<double>>(&(this->chr), // use which parameter?
&(this->kv),
this->kv.get_nks(),
nullptr, // mohan add 2024-04-01
nullptr, // mohan add 2024-04-01
this->pw_rho,
this->pw_big);
}
Expand Down
12 changes: 5 additions & 7 deletions source/source_esolver/esolver_ks_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
{
// TK stands for double and std::complex<double>?
this->pelec = new elecstate::ElecStateLCAO<TK>(&(this->chr), &(this->kv),
this->kv.get_nks(), &(this->GG), &(this->GK), this->pw_rho, this->pw_big);
this->kv.get_nks(), this->pw_rho, this->pw_big);
}

// 3) read LCAO orbitals/projectors and construct the interpolation tables.
Expand Down Expand Up @@ -136,7 +136,7 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
// 16) init rdmft, added by jghan
if (inp.rdmft == true)
{
rdmft_solver.init(this->GG, this->GK, this->pv, ucell,
rdmft_solver.init(this->pv, ucell,
this->gd, this->kv, *(this->pelec), this->orb_,
two_center_bundle_, inp.dft_functional, inp.rdmft_power_alpha);
}
Expand Down Expand Up @@ -198,8 +198,6 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
elecstate::DensityMatrix<TK, double>* DM = estate->get_DM();

this->p_hamilt = new hamilt::HamiltLCAO<TK, TR>(
PARAM.globalv.gamma_only_local ? &(this->GG) : nullptr,
PARAM.globalv.gamma_only_local ? nullptr : &(this->GK),
ucell, this->gd, &this->pv, this->pelec->pot, this->kv,
two_center_bundle_, orb_, DM, this->deepks
#ifdef __EXX
Expand Down Expand Up @@ -371,7 +369,7 @@ void ESolver_KS_LCAO<TK, TR>::after_all_runners(UnitCell& ucell)
ModuleIO::ctrl_runner_lcao<TK, TR>(ucell,
PARAM.inp, this->kv, estate, this->pv, this->Pgrid,
this->gd, this->psi, this->chr, hamilt_lcao,
this->two_center_bundle_, this->GG, this->GK,
this->two_center_bundle_,
this->orb_, this->pw_rho, this->pw_rhod,
this->sf, this->locpp.vloc, this->exx_nao, this->solvent);

Expand Down Expand Up @@ -639,9 +637,9 @@ void ESolver_KS_LCAO<TK, TR>::after_scf(UnitCell& ucell, const int istep, const
ModuleIO::ctrl_scf_lcao<TK, TR>(ucell,
PARAM.inp, this->kv, estate, this->pv,
this->gd, this->psi, hamilt_lcao,
this->two_center_bundle_, this->GK,
this->two_center_bundle_,
this->orb_, this->pw_wfc, this->pw_rho,
this->GridT, this->pw_big, this->sf,
this->pw_big, this->sf,
this->rdmft_solver, this->deepks, this->exx_nao,
this->conv_esolver, this->scf_nmax_flag,
istep);
Expand Down
20 changes: 2 additions & 18 deletions source/source_esolver/esolver_ks_lcao.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
#include "esolver_ks.h"
#include "source_lcao/record_adj.h" // adjacent atoms
#include "source_basis/module_nao/two_center_bundle.h" // nao basis
#include "source_lcao/module_gint/gint_gamma.h" // gint for gamma-only k-points
#include "source_lcao/module_gint/gint_k.h" // gint for multi k-points
#include "source_lcao/module_gint/temp_gint/gint.h" // gint
#include "source_lcao/module_gint/temp_gint/gint_info.h"
#include "source_lcao/module_gint/gint.h" // gint
#include "source_lcao/module_gint/gint_info.h"
#include "source_lcao/setup_deepks.h" // for deepks, mohan add 20251008
#include "source_lcao/setup_exx.h" // for exx, mohan add 20251008
#include "source_lcao/module_rdmft/rdmft.h" // rdmft
Expand Down Expand Up @@ -67,15 +65,6 @@ class ESolver_KS_LCAO : public ESolver_KS<TK>
//! NAO orbitals: 2d block-cyclic distribution info
Parallel_Orbitals pv;

//! Grid integration: used for k-point-dependent algorithm
Gint_k GK;

//! Grid integration: used for gamma only algorithms.
Gint_Gamma GG;

//! Grid integration: used to store some basic information
Grid_Technique GridT;

//! GintInfo: used to store some basic infomation about module_gint
std::unique_ptr<ModuleGint::GintInfo> gint_info_;

Expand Down Expand Up @@ -107,12 +96,7 @@ class ESolver_KS_LCAO : public ESolver_KS<TK>
const Record_adj & get_RA() const { return RA; }
const Grid_Driver & get_gd() const { return gd; }
const Parallel_Orbitals & get_pv() const { return pv; }
const Gint_k & get_GK() const { return GK; }
const Gint_Gamma & get_GG() const { return GG; }
const Grid_Technique & get_GridT() const { return GridT; }
#ifndef __OLD_GINT
const std::unique_ptr<ModuleGint::GintInfo> & get_gint_info() const { return gint_info_; }
#endif
const TwoCenterBundle & get_two_center_bundle() const { return two_center_bundle_; }
const rdmft::RDMFT<TK, TR> & get_rdmft_solver() const { return rdmft_solver; }
const LCAO_Orbitals & get_orb() const { return orb_; }
Expand Down
10 changes: 2 additions & 8 deletions source/source_esolver/lcao_others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
{
elecstate::DensityMatrix<TK, double>* DM = dynamic_cast<elecstate::ElecStateLCAO<TK>*>(this->pelec)->get_DM();
this->p_hamilt = new hamilt::HamiltLCAO<TK, TR>(
PARAM.globalv.gamma_only_local ? &(this->GG) : nullptr,
PARAM.globalv.gamma_only_local ? nullptr : &(this->GK),
ucell,
this->gd,
&this->pv,
Expand Down Expand Up @@ -235,8 +233,7 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
Get_pchg_lcao get_pchg(this->psi, &(this->pv));
if (PARAM.globalv.gamma_only_local)
{
get_pchg.begin(this->GG,
this->chr.rho,
get_pchg.begin(this->chr.rho,
this->pelec->wg,
this->pelec->eferm.get_all_ef(),
this->pw_rhod->nrxx,
Expand All @@ -253,8 +250,7 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
}
else
{
get_pchg.begin(this->GK,
this->chr.rho,
get_pchg.begin(this->chr.rho,
this->chr.rhog,
this->pelec->wg,
this->pelec->eferm.get_all_ef(),
Expand Down Expand Up @@ -286,7 +282,6 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
this->pw_wfc,
this->Pgrid,
this->pv,
this->GG,
PARAM.inp.out_wfc_pw,
this->kv,
PARAM.inp.nelec,
Expand All @@ -305,7 +300,6 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
this->pw_wfc,
this->Pgrid,
this->pv,
this->GK,
PARAM.inp.out_wfc_pw,
this->kv,
PARAM.inp.nelec,
Expand Down
26 changes: 1 addition & 25 deletions source/source_estate/elecstate_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
#include "source_estate/module_dm/cal_dm_psi.h"
#include "source_hamilt/module_xc/xc_functional.h"
#include "source_lcao/module_deltaspin/spin_constrain.h"
#include "source_lcao/module_gint/grid_technique.h"
#include "source_pw/module_pwdft/global.h"
#include "source_io/module_parameter/parameter.h"

#include "source_lcao/module_gint/temp_gint/gint_interface.h"
#include "source_lcao/module_gint/gint_interface.h"

#include <vector>

Expand All @@ -34,13 +33,7 @@ void ElecStateLCAO<std::complex<double>>::psiToRho(const psi::Psi<std::complex<d
//------------------------------------------------------------

ModuleBase::GlobalFunc::NOTE("Calculate the charge on real space grid!");
#ifdef __OLD_GINT
this->gint_k->transfer_DM2DtoGrid(this->DM->get_DMR_vector()); // transfer dm2d to DM_grid in gint
Gint_inout inout(this->charge->rho, Gint_Tools::job_type::rho, PARAM.inp.nspin);
this->gint_k->cal_gint(&inout);
#else
ModuleGint::cal_gint_rho(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->rho);
#endif

if (XC_Functional::get_ked_flag())
{
Expand Down Expand Up @@ -71,13 +64,7 @@ void ElecStateLCAO<double>::psiToRho(const psi::Psi<double>& psi)
//------------------------------------------------------------
ModuleBase::GlobalFunc::NOTE("Calculate the charge on real space grid!");

#ifdef __OLD_GINT
this->gint_gamma->transfer_DM2DtoGrid(this->DM->get_DMR_vector()); // transfer dm2d to DM_grid in gint
Gint_inout inout(this->charge->rho, Gint_Tools::job_type::rho, PARAM.inp.nspin);
this->gint_gamma->cal_gint(&inout);
#else
ModuleGint::cal_gint_rho(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->rho);
#endif

if (XC_Functional::get_ked_flag())
{
Expand Down Expand Up @@ -139,25 +126,14 @@ void ElecStateLCAO<double>::dmToRho(std::vector<double*> pexsi_DM, std::vector<d
}

ModuleBase::GlobalFunc::NOTE("Calculate the charge on real space grid!");
#ifdef __OLD_GINT
this->gint_gamma->transfer_DM2DtoGrid(this->DM->get_DMR_vector()); // transfer dm2d to DM_grid in gint
Gint_inout inout(this->charge->rho, Gint_Tools::job_type::rho, PARAM.inp.nspin);
this->gint_gamma->cal_gint(&inout);
#else
ModuleGint::cal_gint_rho(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->rho);
#endif
if (XC_Functional::get_ked_flag())
{
for (int is = 0; is < PARAM.inp.nspin; is++)
{
ModuleBase::GlobalFunc::ZEROS(this->charge->kin_r[0], this->charge->nrxx);
}
#ifdef __OLD_GINT
Gint_inout inout1(this->charge->kin_r, Gint_Tools::job_type::tau);
this->gint_gamma->cal_gint(&inout1);
#else
ModuleGint::cal_gint_tau(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->kin_r);
#endif
}

this->charge->renormalize_rho();
Expand Down
8 changes: 0 additions & 8 deletions source/source_estate/elecstate_lcao.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#include "elecstate.h"
#include "source_estate/module_dm/density_matrix.h"
#include "source_lcao/module_gint/gint_gamma.h"
#include "source_lcao/module_gint/gint_k.h"

#include <vector>

Expand All @@ -20,14 +18,10 @@ class ElecStateLCAO : public ElecState
ElecStateLCAO(Charge* chg_in,
const K_Vectors* klist_in,
int nks_in,
Gint_Gamma* gint_gamma_in, // mohan add 2024-04-01
Gint_k* gint_k_in, // mohan add 2024-04-01
ModulePW::PW_Basis* rhopw_in,
ModulePW::PW_Basis_Big* bigpw_in)
{
init_ks(chg_in, klist_in, nks_in, rhopw_in, bigpw_in);
this->gint_gamma = gint_gamma_in; // mohan add 2024-04-01
this->gint_k = gint_k_in; // mohan add 2024-04-01
this->classname = "ElecStateLCAO";
}

Expand Down Expand Up @@ -85,8 +79,6 @@ class ElecStateLCAO : public ElecState
// calcualte rho for each k
// void rhoBandK(const psi::Psi<std::complex<double>>& psi);

Gint_Gamma* gint_gamma = nullptr; // mohan add 2024-04-01
Gint_k* gint_k = nullptr; // mohan add 2024-04-01
};

template <typename TK>
Expand Down
12 changes: 1 addition & 11 deletions source/source_estate/elecstate_lcao_cal_tau.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "elecstate_lcao.h"
#include "source_lcao/module_gint/temp_gint/gint_interface.h"
#include "source_lcao/module_gint/gint_interface.h"

#include "source_base/timer.h"

Expand All @@ -16,12 +16,7 @@ void ElecStateLCAO<std::complex<double>>::cal_tau(const psi::Psi<std::complex<do
{
ModuleBase::GlobalFunc::ZEROS(this->charge->kin_r[is], this->charge->nrxx);
}
#ifdef __OLD_GINT
Gint_inout inout1(this->charge->kin_r, Gint_Tools::job_type::tau, PARAM.inp.nspin);
this->gint_k->cal_gint(&inout1);
#else
ModuleGint::cal_gint_tau(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->kin_r);
#endif
ModuleBase::timer::tick("ElecStateLCAO", "cal_tau");
return;
}
Expand All @@ -36,12 +31,7 @@ void ElecStateLCAO<double>::cal_tau(const psi::Psi<double>& psi)
{
ModuleBase::GlobalFunc::ZEROS(this->charge->kin_r[is], this->charge->nrxx);
}
#ifdef __OLD_GINT
Gint_inout inout1(this->charge->kin_r, Gint_Tools::job_type::tau, PARAM.inp.nspin);
this->gint_gamma->cal_gint(&inout1);
#else
ModuleGint::cal_gint_tau(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->kin_r);
#endif

ModuleBase::timer::tick("ElecStateLCAO", "cal_tau");
return;
Expand Down
3 changes: 1 addition & 2 deletions source/source_io/berryphase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ void berryphase::get_occupation_bands()
void berryphase::lcao_init(const UnitCell& ucell,
const Grid_Driver& gd,
const K_Vectors& kv,
const Grid_Technique& grid_tech,
const LCAO_Orbitals& orb)
{
ModuleBase::TITLE("berryphase", "lcao_init");
lcao_method.init(ucell,grid_tech, kv.get_nkstot(), orb);
lcao_method.init(ucell, kv.get_nkstot(), orb);
lcao_method.cal_R_number(ucell, gd);
lcao_method.cal_orb_overlap(ucell);
return;
Expand Down
1 change: 0 additions & 1 deletion source/source_io/berryphase.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class berryphase
void lcao_init(const UnitCell& ucell,
const Grid_Driver& gd,
const K_Vectors& kv,
const Grid_Technique& grid_tech,
const LCAO_Orbitals& orb);
#endif
void set_kpoints(const K_Vectors& kv, const int direction);
Expand Down
7 changes: 1 addition & 6 deletions source/source_io/cal_ldos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "cal_dos.h"
#include "cube_io.h"
#include "source_estate/module_dm/cal_dm_psi.h"
#include "source_lcao/module_gint/temp_gint/gint_interface.h"
#include "source_lcao/module_gint/gint_interface.h"

#include <type_traits>

Expand Down Expand Up @@ -60,12 +60,7 @@ void Cal_ldos<T>::cal_ldos_lcao(const elecstate::ElecStateLCAO<T>* pelec,
}

// calculate ldos
#ifdef __OLD_GINT
ModuleBase::WARNING_QUIT("Cal_ldos::dm2ldos",
"do not support old grid integral, please recompile with __NEW_GINT");
#else
ModuleGint::cal_gint_rho(dm_ldos.get_DMR_vector(), PARAM.inp.nspin, ldos);
#endif

// I'm not sure whether ldos should be output for each spin or not
// ldos[0] += ldos[1] for nspin_dm == 2
Expand Down
Loading
Loading