Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
b69c085
Refactor: Encapsulate timer functionality in timer_wrapper.h
Jan 23, 2026
3829268
Refactor timer code and clean_esolver function
Jan 23, 2026
6fbf3dc
Merge branch 'develop' of github.com:mohanchen/abacus-mc into develop
Jan 24, 2026
c2767b7
Refactor: Move heterogeneous parallel code to source_base/module_device
Jan 24, 2026
4a99dde
Refactor heterogeneous parallel code and migrate exx_info to module_xc
Jan 24, 2026
ce6f894
Move GlobalC::restart to source_io/restart
Jan 24, 2026
2421709
Remove unnecessary global.h includes and fix line_search.cpp compilat…
Jan 25, 2026
5552c1a
update global.h
Jan 25, 2026
7ba3971
update global.h
Jan 25, 2026
e53bff9
update global.h
Jan 25, 2026
3a3898a
update global.h
Jan 25, 2026
86dc68e
update stress_pw.cpp
Jan 25, 2026
0881637
update global.h
Jan 25, 2026
cf3d4ea
update global.h in module_pwdft
Jan 25, 2026
3495500
update global.h
Jan 25, 2026
bb426f7
update module_stodft
Jan 25, 2026
c5b5c5e
delete global.h in source_io
Jan 25, 2026
8d7335d
fix source_io
Jan 25, 2026
c4e01bc
delete inclusion of global.h in source_io
Jan 25, 2026
3d8a6db
Refactor: Remove unnecessary includes and clean up global.h references
Jan 25, 2026
8dd74b1
delete global.h in source_lcao
Jan 25, 2026
90a314d
update
Jan 25, 2026
68716bb
update
Jan 25, 2026
a6a9c17
fix
Jan 25, 2026
d82c5ef
update
Jan 25, 2026
976c570
fix
Jan 25, 2026
9babf70
update source_cell
Jan 25, 2026
e7e8729
update source_esolver
Jan 25, 2026
8a7412d
update esolver
Jan 25, 2026
b315be2
update
Jan 25, 2026
caeddef
update module_charge
Jan 25, 2026
339667c
update module_pot
Jan 25, 2026
b38e69f
continue
Jan 25, 2026
985e01f
update fix
Jan 25, 2026
d902c3f
Merge branch 'develop' into delete_globalh
mohanchen Jan 25, 2026
79ba152
fix
Jan 25, 2026
2f13f11
update dftu
Jan 25, 2026
d0f8bbe
update deepks
Jan 25, 2026
dacafac
ifx
Jan 25, 2026
308b862
delete globalc.h in module_ri
Jan 25, 2026
e7d155f
fix
Jan 25, 2026
da99144
fix
Jan 25, 2026
3e0aae2
Merge branch 'develop' into delete_globalh
mohanchen Jan 25, 2026
feb2be0
fix dftu_io
Jan 25, 2026
0dc9d73
Merge branch 'delete_globalh' of github.com:mohanchen/abacus-mc into …
Jan 25, 2026
0889330
fix diago_lapack.cpp
Jan 25, 2026
4b45b57
updates
Jan 25, 2026
e5dca81
update rdmft
Jan 25, 2026
51a4d83
update module_rt
Jan 25, 2026
d031b19
update td operator
Jan 25, 2026
62c79d3
update module_pwdft/operator etc
Jan 25, 2026
384620e
solve fft
Jan 25, 2026
390eced
update xc
Jan 25, 2026
30c9215
update
Jan 25, 2026
a1ee0fc
delete global.h and global.cpp, finally after nearly 20 years
Jan 25, 2026
5e2945c
fix op_exx_lcao
Jan 25, 2026
0f8610e
fix
Jan 25, 2026
c73cf3e
fix
Jan 25, 2026
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
1 change: 0 additions & 1 deletion source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,6 @@ OBJS_SRCPW=H_Ewald_pw.o\
onsite_op.o\
wf_op.o\
vnl_op.o\
global.o\
magnetism.o\
occupy.o\
structure_factor.o\
Expand Down
5 changes: 2 additions & 3 deletions source/source_base/module_fft/fft_cuda.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "fft_cuda.h"

#include "source_base/module_device/memory_op.h"
#include "source_pw/module_pwdft/global.h"
#include "source_base/module_device/device_check.h"

namespace ModuleBase
{
Expand Down Expand Up @@ -111,4 +110,4 @@ template FFT_CUDA<float>::FFT_CUDA();
template FFT_CUDA<float>::~FFT_CUDA();
template FFT_CUDA<double>::FFT_CUDA();
template FFT_CUDA<double>::~FFT_CUDA();
} // namespace ModuleBase
} // namespace ModuleBase
5 changes: 3 additions & 2 deletions source/source_base/module_fft/fft_rocm.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "fft_rocm.h"
#include "source_base/module_device/memory_op.h"
#include "source_pw/module_pwdft/global.h"
#include "source_base/module_device/device_check.h"

namespace ModuleBase
{
template <typename FPTYPE>
Expand Down Expand Up @@ -107,4 +108,4 @@ template FFT_ROCM<float>::FFT_ROCM();
template FFT_ROCM<float>::~FFT_ROCM();
template FFT_ROCM<double>::FFT_ROCM();
template FFT_ROCM<double>::~FFT_ROCM();
}// namespace ModuleBase
}// namespace ModuleBase
3 changes: 2 additions & 1 deletion source/source_cell/bcast_cell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
#include "source_io/module_parameter/parameter.h"
#ifdef __EXX
#include "source_lcao/module_ri/serialization_cereal.h"
#include "source_pw/module_pwdft/global.h"
#endif
#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info

namespace unitcell
{
void bcast_atoms_tau(Atom* atoms,
Expand Down
1 change: 0 additions & 1 deletion source/source_cell/klist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "source_base/parallel_global.h"
#include "source_base/parallel_reduce.h"
#include "source_cell/module_symmetry/symmetry.h"
#include "source_pw/module_pwdft/global.h"
#include "source_io/berryphase.h"
#include "source_io/module_parameter/parameter.h"

Expand Down
3 changes: 2 additions & 1 deletion source/source_cell/read_atom_species.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
#include "source_io/module_parameter/parameter.h"
#include "source_base/tool_title.h"
#ifdef __EXX
#include "source_pw/module_pwdft/global.h"
#include "source_lcao/module_ri/serialization_cereal.h"
#endif
#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info

namespace unitcell
{
bool read_atom_species(std::ifstream& ifa,
Expand Down
1 change: 0 additions & 1 deletion source/source_cell/read_atoms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "source_estate/read_orb.h"
#include "source_base/timer.h"
#include "source_base/constants.h"
#include "source_pw/module_pwdft/global.h"
#include "source_base/formatter.h"
#include "source_base/mathzone.h"

Expand Down
1 change: 0 additions & 1 deletion source/source_cell/setup_nonlocal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "source_io/module_parameter/parameter.h"

#ifdef __LCAO
//#include "../source_pw/module_pwdft/global.h"
#include "source_pw/module_pwdft/soc.h"
// mohan add 2013-08-02
// In order to get rid of the read in file .NONLOCAL.
Expand Down
1 change: 0 additions & 1 deletion source/source_esolver/esolver_ks_lcaopw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "source_estate/module_charge/symmetry_rho.h"
#include "source_estate/occupy.h"
#include "source_hamilt/module_ewald/H_Ewald_pw.h"
#include "source_pw/module_pwdft/global.h"
#include "source_io/print_info.h"
//-----force-------------------
#include "source_pw/module_pwdft/forces.h"
Expand Down
2 changes: 2 additions & 0 deletions source/source_esolver/esolver_ks_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include "source_estate/module_charge/chgmixing.h" // use charge mixing, mohan add 20251006
#include "source_estate/update_pot.h" // mohan add 20251016

#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info

namespace ModuleESolver
{

Expand Down
1 change: 0 additions & 1 deletion source/source_esolver/esolver_ks_pw.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "./esolver_ks.h"
#include "source_psi/setup_psi_pw.h" // mohan add 20251012
#include "source_pw/module_pwdft/VSep_in_pw.h"
#include "source_pw/module_pwdft/global.h"
#include "source_pw/module_pwdft/module_exx_helper/exx_helper.h"
#include "source_pw/module_pwdft/operator_pw/velocity_pw.h"

Expand Down
4 changes: 2 additions & 2 deletions source/source_esolver/esolver_of.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#include "source_base/global_function.h"
#include "source_estate/module_charge/symmetry_rho.h"
#include "source_hamilt/module_ewald/H_Ewald_pw.h"
#include "source_pw/module_pwdft/global.h"
#include "source_io/print_info.h"
#include "source_estate/cal_ux.h"
#include "source_pw/module_pwdft/forces.h"
#include "source_pw/module_ofdft/of_stress_pw.h"
// mohan add
#include "source_pw/module_ofdft/of_print_info.h"
#include "source_hamilt/module_xc/xc_functional.h"


namespace ModuleESolver
{
Expand Down
1 change: 0 additions & 1 deletion source/source_esolver/esolver_of_interface.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "esolver_of.h"
#include "source_pw/module_pwdft/global.h"
#include "source_io/module_parameter/parameter.h"

namespace ModuleESolver
Expand Down
1 change: 0 additions & 1 deletion source/source_esolver/esolver_of_tddft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "source_base/global_function.h"
#include "source_estate/module_charge/symmetry_rho.h"
#include "source_hamilt/module_ewald/H_Ewald_pw.h"
#include "source_pw/module_pwdft/global.h"
#include "source_io/print_info.h"
#include "source_estate/cal_ux.h"
//-----force-------------------
Expand Down
1 change: 0 additions & 1 deletion source/source_esolver/esolver_of_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "source_base/memory.h"
#include "source_estate/module_pot/efield.h"
#include "source_estate/module_pot/gatefield.h"
#include "source_pw/module_pwdft/global.h"
#include "source_io/module_parameter/parameter.h"
#include "source_estate/cal_ux.h"

Expand Down
2 changes: 0 additions & 2 deletions source/source_esolver/lcao_others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "source_estate/module_charge/symmetry_rho.h"
#include "source_lcao/hamilt_lcao.h"
#include "source_lcao/module_dftu/dftu.h"
#include "source_pw/module_pwdft/global.h"
//
#include "source_base/formatter.h"
#include "source_base/timer.h"
#include "source_cell/module_neighbor/sltk_atom_arrange.h"
Expand Down
5 changes: 3 additions & 2 deletions source/source_estate/elecstate_exx.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "source_pw/module_pwdft/global.h"
#include "source_estate/elecstate.h"
#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info

namespace elecstate
{
Expand All @@ -16,4 +17,4 @@ void ElecState::set_exx(const double& Eexx)
return;
}

}
}
1 change: 0 additions & 1 deletion source/source_estate/elecstate_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#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_pw/module_pwdft/global.h"
#include "source_io/module_parameter/parameter.h"

#include "source_lcao/module_gint/gint_interface.h"
Expand Down
4 changes: 3 additions & 1 deletion source/source_estate/module_charge/charge_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
#include "source_base/timer.h"
#include "source_base/tool_threading.h"
#include "source_estate/magnetism.h"
#include "source_pw/module_pwdft/global.h"
#include "source_pw/module_pwdft/parallel_grid.h"
#include "source_io/cube_io.h"
#include "source_io/rhog_io.h"
#include "source_io/read_wf2rho_pw.h"
#include "source_io/restart.h"
#include "source_hamilt/module_xc/xc_functional.h"
#include "source_cell/klist.h"

void Charge::init_rho(const UnitCell& ucell,
const Parallel_Grid& pgrid,
Expand Down
2 changes: 1 addition & 1 deletion source/source_estate/module_charge/charge_mixing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "source_base/module_mixing/broyden_mixing.h"
#include "source_base/module_mixing/pulay_mixing.h"
#include "source_base/timer.h"
#include "source_pw/module_pwdft/global.h"
#include "source_hamilt/module_xc/xc_functional.h"

Charge_Mixing::Charge_Mixing()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "source_io/module_parameter/parameter.h"
#include "source_base/timer.h"
#include "source_pw/module_pwdft/global.h"

void Charge_Mixing::Kerker_screen_recip(std::complex<double>* drhog)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#include "charge_mixing.h"

#include "source_io/module_parameter/parameter.h"
#include "source_base/timer.h"
#include "source_pw/module_pwdft/global.h"
#include "source_base/parallel_reduce.h"
#include "source_hamilt/module_xc/xc_functional.h"

double Charge_Mixing::get_drho(Charge* chr, const double nelec)
{
Expand Down
2 changes: 1 addition & 1 deletion source/source_estate/module_charge/charge_mixing_rho.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "charge_mixing.h"
#include "source_io/module_parameter/parameter.h"
#include "source_base/timer.h"
#include "source_pw/module_pwdft/global.h"
#include "source_hamilt/module_xc/xc_functional.h"

void Charge_Mixing::mix_rho_recip(Charge* chr)
{
Expand Down
3 changes: 1 addition & 2 deletions source/source_estate/module_charge/symmetry_rhog.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "symmetry_rho.h"
#include "source_pw/module_pwdft/global.h"
#include "source_base/parallel_global.h"
#include "source_hamilt/module_xc/xc_functional.h"

Expand Down Expand Up @@ -234,4 +233,4 @@ void Symmetry_rho::get_ixyz2ipw(const ModulePW::PW_Basis *rho_basis,
delete[] nstnz_start;
delete[] ipsz2ipw;
return;
}
}
3 changes: 1 addition & 2 deletions source/source_estate/module_pot/H_TDDFT_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "source_io/input_conv.h"
#include "source_io/module_parameter/parameter.h"
#include "source_lcao/module_rt/evolve_elec.h"
#include "source_pw/module_pwdft/global.h"

namespace elecstate
{
Expand Down Expand Up @@ -489,4 +488,4 @@ void H_TDDFT_pw::compute_force(const UnitCell& cell, ModuleBase::matrix& fe)
}
}

} // namespace elecstate
} // namespace elecstate
1 change: 0 additions & 1 deletion source/source_estate/module_pot/pot_ml_exx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "npy.hpp"
#include "source_base/parallel_reduce.h"
#include "source_base/global_function.h"
#include "source_pw/module_pwdft/global.h"

namespace elecstate
{
Expand Down
1 change: 0 additions & 1 deletion source/source_estate/module_pot/pot_xc.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "pot_xc.h"

#include "source_base/timer.h"
#include "source_pw/module_pwdft/global.h"

#ifdef USE_LIBXC
#include "source_hamilt/module_xc/xc_functional_libxc.h"
Expand Down
1 change: 0 additions & 1 deletion source/source_hamilt/module_ewald/H_Ewald_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "source_base/parallel_reduce.h"
#include "source_base/constants.h"
#include "source_base/timer.h"
#include "source_pw/module_pwdft/global.h"

double H_Ewald_pw::alpha=0.0;
int H_Ewald_pw::mxr = 200;
Expand Down
1 change: 0 additions & 1 deletion source/source_hamilt/module_surchem/cal_pseudo.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "source_pw/module_pwdft/global.h"
#include "surchem.h"

// atom_in surchem::GetAtom;
Expand Down
1 change: 0 additions & 1 deletion source/source_hamilt/module_xc/xc_functional.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "xc_functional.h"
#include "source_pw/module_pwdft/global.h"
#include "source_io/module_parameter/parameter.h"
#include "source_base/global_function.h"

Expand Down
4 changes: 2 additions & 2 deletions source/source_hamilt/module_xc/xc_functional_libxc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "source_base/formatter.h"

#ifdef __EXX
#include "source_pw/module_pwdft/global.h" // just for GlobalC::exx_info
#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info
#endif

#include <xc.h>
Expand Down Expand Up @@ -293,4 +293,4 @@ void XC_Functional_Libxc::finish_func(std::vector<xc_func_type> &funcs)
}
}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

#ifdef USE_LIBXC

#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info
#include "source_hamilt/module_xc/xc_functional.h"
#include "xc_functional_libxc.h"
#include "source_pw/module_pwdft/global.h"
#include <array>

//tau_xc and tau_xc_spin: interface for calling xc_mgga_exc_vxc from LIBXC
Expand Down Expand Up @@ -102,4 +103,4 @@ void XC_Functional_Libxc::tau_xc_spin(
XC_Functional_Libxc::finish_func(funcs);
}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "xc_functional.h"
#include <stdexcept>
#include "source_pw/module_pwdft/global.h"
#include "source_base/global_function.h"

#ifdef USE_LIBXC
Expand Down
4 changes: 2 additions & 2 deletions source/source_hsolver/diago_lapack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "source_base/global_variable.h"
#include "source_base/module_external/lapack_connector.h"
#include "source_base/timer.h"
#include <cstring>
#include "source_base/tool_quit.h"
#include "source_pw/module_pwdft/global.h"

typedef hamilt::MatrixBlock<double> matd;
typedef hamilt::MatrixBlock<std::complex<double>> matcd;
Expand Down Expand Up @@ -410,4 +410,4 @@ void DiagoLapack<T>::post_processing(const int info, const std::vector<int>& vec
throw std::runtime_error(str_info_FILE);
}
}
} // namespace hsolver
} // namespace hsolver
1 change: 0 additions & 1 deletion source/source_hsolver/hsolver_lcaopw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "source_base/timer.h"
#include "source_base/tool_quit.h"
#include "source_estate/elecstate_pw.h"
#include "source_pw/module_pwdft/global.h"
#include "source_pw/module_pwdft/hamilt_pw.h"
#include "source_hsolver/diago_iter_assist.h"
#include "source_io/module_parameter/parameter.h"
Expand Down
1 change: 0 additions & 1 deletion source/source_io/berryphase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "source_io/module_parameter/parameter.h"
#include "source_cell/klist.h"
#include "source_pw/module_pwdft/global.h"

bool berryphase::berry_phase_flag = false;

Expand Down
1 change: 0 additions & 1 deletion source/source_io/bessel_basis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "source_base/math_sphbes.h"
#include "source_base/parallel_common.h"
#include "source_base/timer.h"
#include "source_pw/module_pwdft/global.h"
#include <vector>

Bessel_Basis::Bessel_Basis()
Expand Down
2 changes: 1 addition & 1 deletion source/source_io/cal_mlkedf_descriptors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,4 +517,4 @@ void Cal_MLKEDF_Descriptors::getNablaRho(const double * const *prho, const Modul
delete[] recipNablaRho;
}

}
}
Loading
Loading