Skip to content

Commit 8d16c36

Browse files
authored
Update ESolver psi and delete some gint codes (#6619)
* add update_pot in source_estate * split update_pot in rt-TDDFT into two functions, one is the original update_pot, which is replaced by update_pot function in estate, the other is save2 function used in after_iter * fix bugs * update * update esolver_ks * small updates * small bug fixed * update E_bandgap to E_gap(k) * delete rho_restart file * change setup_parameters to print_parameters * move setup_pw.cpp to setup_pwwfc.cpp in module_pwdft * update esolver, small things * delete some old_gint codes in esolver * fix bugs, update outputs * fix bug in tests * change efermi to Efermi in fp_energy.h * fix bugs * fix exd and exc in ctrl_runner_lcao * fix cmake * fix bug * delete lcao_after_scf and lcao_before_scf * modify codes including read_wfc_nao to delete pelec, add setup_psi_lcao codes * fix bugs * delete grid integral in FORCE_STRESS * move read psi to esolver, not in psi * fix system bug * fix bug in read_wfc_nao.h * change PARAM.inp to inp * fix bugs
1 parent 3e89604 commit 8d16c36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+628
-1189
lines changed

source/Makefile.Objects

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,6 @@ OBJS_ESOLVER=esolver.o\
277277

278278
OBJS_ESOLVER_LCAO=esolver_ks_lcao.o\
279279
esolver_ks_lcao_tddft.o\
280-
lcao_before_scf.o\
281-
lcao_after_scf.o\
282280
esolver_gets.o\
283281
lcao_others.o\
284282
esolver_dm2rho.o\
@@ -625,7 +623,6 @@ OBJS_IO_LCAO=cal_r_overlap_R.o\
625623
write_dmk.o\
626624
unk_overlap_lcao.o\
627625
read_wfc_nao.o\
628-
read_wfc_lcao.o\
629626
write_wfc_nao.o\
630627
write_HS_sparse.o\
631628
single_R_io.o\
@@ -767,6 +764,7 @@ OBJS_SRCPW=H_Ewald_pw.o\
767764
of_stress_pw.o\
768765
symmetry_rho.o\
769766
symmetry_rhog.o\
767+
setup_psi_pw.o\
770768
setup_psi.o\
771769
psi_init.o\
772770
elecond.o\

source/source_esolver/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ if(ENABLE_LCAO)
1818
list(APPEND objects
1919
esolver_ks_lcao.cpp
2020
esolver_ks_lcao_tddft.cpp
21-
lcao_before_scf.cpp
22-
lcao_after_scf.cpp
2321
esolver_gets.cpp
2422
lcao_others.cpp
2523
esolver_dm2rho.cpp

source/source_esolver/esolver_double_xc.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,6 @@ void ESolver_DoubleXC<TK, TR>::cal_force(UnitCell& ucell, ModuleBase::matrix& fo
399399
this->pv,
400400
this->pelec_base,
401401
this->psi,
402-
this->GG, // mohan add 2024-04-01
403-
this->GK, // mohan add 2024-04-01
404402
this->two_center_bundle_,
405403
this->orb_,
406404
force_base,

source/source_esolver/esolver_ks.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "source_io/output_log.h" // use write_head
1515
#include "source_estate/elecstate_print.h" // print_etot
1616
#include "source_io/print_info.h" // print_parameters
17+
#include "source_psi/setup_psi.h" // mohan add 20251009
1718

1819
namespace ModuleESolver
1920
{
@@ -28,7 +29,8 @@ ESolver_KS<T, Device>::~ESolver_KS()
2829
//****************************************************
2930
// do not add any codes in this deconstructor funcion
3031
//****************************************************
31-
delete this->psi;
32+
Setup_Psi<T>::deallocate_psi(this->psi);
33+
3234
delete this->p_hamilt;
3335
delete this->p_chgmix;
3436
this->ppcell.release_memory();

source/source_esolver/esolver_ks.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class ESolver_KS : public ESolver_FP
7171
int maxniter; //! maximum iter steps for scf
7272
int niter; //! iter steps actually used in scf
7373
bool oscillate_esolver = false; // whether esolver is oscillated
74-
7574
bool scf_nmax_flag = false; // whether scf has reached nmax, mohan add 20250921
7675
};
7776
} // namespace ModuleESolver

0 commit comments

Comments
 (0)