diff --git a/Dockerfile.intel b/Dockerfile.intel
index bda0458d2f3..ee0d0171ed9 100644
--- a/Dockerfile.intel
+++ b/Dockerfile.intel
@@ -146,7 +146,7 @@ RUN wget --no-check-certificate --quiet --tries=3 --timeout=30 \
-DCMAKE_C_FLAGS="-O3 -fopenmp" \
-DCMAKE_CXX_FLAGS="-O3 -fopenmp" \
-DXSDK_ENABLE_Fortran=ON \
- -DCMAKE_Fortran_COMPILER=mpiifx && \
+ -DCMAKE_Fortran_COMPILER=mpiifx && \
make -j$(nproc) && \
make install && \
cd / && rm -rf superlu_dist-${SUPERLU_DIST_VERSION} v${SUPERLU_DIST_VERSION}.tar.gz
diff --git a/source/source_base/complexmatrix.h b/source/source_base/complexmatrix.h
index ac09c3ddb0b..df1585e4c18 100644
--- a/source/source_base/complexmatrix.h
+++ b/source/source_base/complexmatrix.h
@@ -6,7 +6,6 @@
#include "matrix.h"
#ifdef _MCD_CHECK
-#include "mcd.h"
#endif
namespace ModuleBase
{
diff --git a/source/source_base/inverse_matrix.h b/source/source_base/inverse_matrix.h
index d49e109e157..bac2e5b979a 100644
--- a/source/source_base/inverse_matrix.h
+++ b/source/source_base/inverse_matrix.h
@@ -2,7 +2,6 @@
#define INVERSE_MATRIX_H
#include "global_function.h"
-#include "global_variable.h"
#include "complexmatrix.h"
namespace ModuleBase
{
diff --git a/source/source_base/kernels/cuda/math_kernel_op_vec.cu b/source/source_base/kernels/cuda/math_kernel_op_vec.cu
index 4cf756c5794..f0edc47d101 100644
--- a/source/source_base/kernels/cuda/math_kernel_op_vec.cu
+++ b/source/source_base/kernels/cuda/math_kernel_op_vec.cu
@@ -1,6 +1,7 @@
#include "source_base/kernels/math_kernel_op.h"
#include
+#include "source_base/parallel_reduce.h"
#include
template <>
diff --git a/source/source_base/kernels/dsp/dsp_connector.h b/source/source_base/kernels/dsp/dsp_connector.h
index 3dcc3d125df..2b21eb70357 100644
--- a/source/source_base/kernels/dsp/dsp_connector.h
+++ b/source/source_base/kernels/dsp/dsp_connector.h
@@ -4,7 +4,6 @@
#include "source_base/module_device/device.h"
#include "source_base/module_device/memory_op.h"
-#include "source_hsolver/diag_comm_info.h"
namespace mtfunc
{
diff --git a/source/source_base/kernels/math_kernel_op.h b/source/source_base/kernels/math_kernel_op.h
index 120844f3f9a..3bff00f9e9f 100644
--- a/source/source_base/kernels/math_kernel_op.h
+++ b/source/source_base/kernels/math_kernel_op.h
@@ -5,7 +5,6 @@
#include "source_base/macros.h"
-#include "source_base/parallel_reduce.h"
#include "source_base/module_device/memory_op.h"
#include "source_base/module_device/types.h"
diff --git a/source/source_base/kernels/math_kernel_op_vec.cpp b/source/source_base/kernels/math_kernel_op_vec.cpp
index da3fdb8f06e..8957a96ba11 100644
--- a/source/source_base/kernels/math_kernel_op_vec.cpp
+++ b/source/source_base/kernels/math_kernel_op_vec.cpp
@@ -1,5 +1,6 @@
#include "source_base/kernels/math_kernel_op.h"
#include "source_base/module_external/blas_connector.h"
+#include "source_base/parallel_reduce.h"
namespace ModuleBase
diff --git a/source/source_base/matrix.h b/source/source_base/matrix.h
index 0a117b4ca1a..62196113b29 100644
--- a/source/source_base/matrix.h
+++ b/source/source_base/matrix.h
@@ -4,7 +4,6 @@
// Peize Lin update 2018-07-29
#ifdef _MCD_CHECK
-#include "mcd.h"
#endif
#include
diff --git a/source/source_base/parallel_2d.cpp b/source/source_base/parallel_2d.cpp
index 43a6c321064..b5bab96694b 100644
--- a/source/source_base/parallel_2d.cpp
+++ b/source/source_base/parallel_2d.cpp
@@ -1,5 +1,6 @@
#include "parallel_2d.h"
+#include "source_base/module_external/blacs_connector.h"
#include "source_base/module_external/scalapack_connector.h"
#include
diff --git a/source/source_base/parallel_2d.h b/source/source_base/parallel_2d.h
index ea027e58d04..c179dd18e79 100644
--- a/source/source_base/parallel_2d.h
+++ b/source/source_base/parallel_2d.h
@@ -4,7 +4,7 @@
#include
#include
-#include "source_base/module_external/blacs_connector.h"
+#include "source_base/parallel_comm.h"
/// @brief This class packs the basic information of
/// 2D-block-cyclic parallel distribution of an arbitrary matrix.
diff --git a/source/source_base/parallel_device.cpp b/source/source_base/parallel_device.cpp
index 933064e2486..97bf68f13b6 100644
--- a/source/source_base/parallel_device.cpp
+++ b/source/source_base/parallel_device.cpp
@@ -1,4 +1,6 @@
#include "parallel_device.h"
+#include "source_base/module_device/memory_op.h"
+#include "source_base/module_device/types.h"
#ifdef __MPI
namespace Parallel_Common
{
diff --git a/source/source_base/parallel_device.h b/source/source_base/parallel_device.h
index 7293b375d74..9e9f755edf7 100644
--- a/source/source_base/parallel_device.h
+++ b/source/source_base/parallel_device.h
@@ -2,8 +2,6 @@
#define __PARALLEL_DEVICE_H__
#ifdef __MPI
#include "mpi.h"
-#include "source_base/module_device/device.h"
-#include "source_base/module_device/memory_op.h"
#include
namespace Parallel_Common
{
diff --git a/source/source_base/vector3.h b/source/source_base/vector3.h
index 5e28357496d..5fb2bf3f7e1 100644
--- a/source/source_base/vector3.h
+++ b/source/source_base/vector3.h
@@ -8,7 +8,6 @@
#include
#ifdef _MCD_CHECK
-#include "mcd.h"
#endif
namespace ModuleBase
diff --git a/source/source_basis/module_ao/ORB_atomic_lm.h b/source/source_basis/module_ao/ORB_atomic_lm.h
index 9b2be4f01a3..4d013d04453 100644
--- a/source/source_basis/module_ao/ORB_atomic_lm.h
+++ b/source/source_basis/module_ao/ORB_atomic_lm.h
@@ -9,7 +9,6 @@
#include
using std::vector;
#include "source_base/global_function.h"
-#include "source_base/global_variable.h"
/**
* CLASS Num_orbital_lm
diff --git a/source/source_basis/module_ao/ORB_nonlocal.h b/source/source_basis/module_ao/ORB_nonlocal.h
index 4c4007a796c..1204dd86912 100644
--- a/source/source_basis/module_ao/ORB_nonlocal.h
+++ b/source/source_basis/module_ao/ORB_nonlocal.h
@@ -1,7 +1,6 @@
#ifndef NUMERICAL_NONLOCAL_H
#define NUMERICAL_NONLOCAL_H
-#include "source_base/complexarray.h"
#include "source_base/complexmatrix.h"
#include "ORB_nonlocal_lm.h"
/**
diff --git a/source/source_basis/module_ao/ORB_read.h b/source/source_basis/module_ao/ORB_read.h
index efb4d532b16..6ee794c080a 100644
--- a/source/source_basis/module_ao/ORB_read.h
+++ b/source/source_basis/module_ao/ORB_read.h
@@ -3,7 +3,6 @@
#include "ORB_atomic.h"
#include "ORB_atomic_lm.h"
-#include "ORB_nonlocal.h"
////////////////////////////////////////////////////////////
/// advices for reconstructions:
diff --git a/source/source_basis/module_nao/two_center_table.h b/source/source_basis/module_nao/two_center_table.h
index 6240ce84292..dc977872194 100644
--- a/source/source_basis/module_nao/two_center_table.h
+++ b/source/source_basis/module_nao/two_center_table.h
@@ -2,7 +2,6 @@
#define TWO_CENTER_TABLE_H
#include
-#include "source_base/spherical_bessel_transformer.h"
#include "source_basis/module_nao/radial_collection.h"
class TwoCenterTable
diff --git a/source/source_basis/module_pw/pw_basis_sup.h b/source/source_basis/module_pw/pw_basis_sup.h
index 9e6ada0054a..b77dfa6bec0 100644
--- a/source/source_basis/module_pw/pw_basis_sup.h
+++ b/source/source_basis/module_pw/pw_basis_sup.h
@@ -1,7 +1,6 @@
#ifndef PWBASIS_SUP_H
#define PWBASIS_SUP_H
-#include "source_base/complexmatrix.h"
namespace ModulePW
{
diff --git a/source/source_basis/module_pw/test/test-other.cpp b/source/source_basis/module_pw/test/test-other.cpp
index b81787f16d8..e6efa90654a 100644
--- a/source/source_basis/module_pw/test/test-other.cpp
+++ b/source/source_basis/module_pw/test/test-other.cpp
@@ -140,7 +140,6 @@ TEST_F(PWTEST,test_other)
fftwf_cleanup();
#endif
}
-
TEST_F(PWTEST, test_no_plane_wave_message_global_empty_k)
{
ModulePW::PW_Basis_K pwktest(device_flag, precision_flag);
@@ -201,4 +200,4 @@ TEST_F(PWTEST, test_no_plane_wave_message_parallel_local_empty)
testing::HasSubstr("Current core has no plane waves! Please reduce the cores."));
}
#endif
-}
\ No newline at end of file
+}
diff --git a/source/source_cell/atom_pseudo.h b/source/source_cell/atom_pseudo.h
index 9f04e0861a3..8f78a64dff2 100644
--- a/source/source_cell/atom_pseudo.h
+++ b/source/source_cell/atom_pseudo.h
@@ -1,9 +1,7 @@
#ifndef ATOM_PSEUDO_H
#define ATOM_PSEUDO_H
-#include "source_base/global_variable.h"
#include "source_base/vector3.h"
-#include "source_io/module_output/output.h"
#include "source_base/complexarray.h"
#include "source_base/complexmatrix.h"
#include "pseudo.h"
diff --git a/source/source_cell/atom_spec.cpp b/source/source_cell/atom_spec.cpp
index 82645d079e0..5c989191620 100644
--- a/source/source_cell/atom_spec.cpp
+++ b/source/source_cell/atom_spec.cpp
@@ -1,5 +1,6 @@
#include "atom_spec.h"
#include "source_io/module_parameter/parameter.h"
+#include "source_io/module_output/output.h"
#include
Atom::Atom()
diff --git a/source/source_cell/atom_spec.h b/source/source_cell/atom_spec.h
index 3ee18d39716..96730b00de1 100644
--- a/source/source_cell/atom_spec.h
+++ b/source/source_cell/atom_spec.h
@@ -1,7 +1,6 @@
#ifndef ATOM_H
#define ATOM_H
-#include "../source_io/module_output/output.h"
#include "atom_pseudo.h"
class Atom
{
diff --git a/source/source_cell/k_vector_utils.h b/source/source_cell/k_vector_utils.h
index 188a621523f..624012b7d31 100644
--- a/source/source_cell/k_vector_utils.h
+++ b/source/source_cell/k_vector_utils.h
@@ -5,7 +5,6 @@
#ifndef K_VECTOR_UTILS_H
#define K_VECTOR_UTILS_H
-#include "source_base/global_variable.h"
#include "source_base/matrix3.h"
#include "source_cell/unitcell.h"
diff --git a/source/source_cell/klist.h b/source/source_cell/klist.h
index 46fa51be499..4960ac68463 100644
--- a/source/source_cell/klist.h
+++ b/source/source_cell/klist.h
@@ -2,7 +2,6 @@
#define K_VECTORS_H
#include "source_base/global_function.h"
-#include "source_base/global_variable.h"
#include "source_base/matrix3.h"
#include "source_cell/unitcell.h"
#include "parallel_kpoints.h"
diff --git a/source/source_cell/module_neighbor/sltk_atom.h b/source/source_cell/module_neighbor/sltk_atom.h
index 94406417ae2..a21055f3f5c 100644
--- a/source/source_cell/module_neighbor/sltk_atom.h
+++ b/source/source_cell/module_neighbor/sltk_atom.h
@@ -2,8 +2,6 @@
#define INCLUDE_FATOM
#include
-#include "sltk_util.h"
-#include "source_base/timer.h"
#include
// a class contains the atom position,
diff --git a/source/source_cell/module_neighbor/sltk_atom_arrange.h b/source/source_cell/module_neighbor/sltk_atom_arrange.h
index 5dd1c94f98c..2fdd5fc469e 100644
--- a/source/source_cell/module_neighbor/sltk_atom_arrange.h
+++ b/source/source_cell/module_neighbor/sltk_atom_arrange.h
@@ -1,7 +1,6 @@
#ifndef ATOM_ARRANGE_H
#define ATOM_ARRANGE_H
-#include "sltk_grid.h"
#include "sltk_grid_driver.h"
diff --git a/source/source_cell/module_neighbor/sltk_grid.h b/source/source_cell/module_neighbor/sltk_grid.h
index b5c3e836295..4b2da582800 100644
--- a/source/source_cell/module_neighbor/sltk_grid.h
+++ b/source/source_cell/module_neighbor/sltk_grid.h
@@ -3,7 +3,6 @@
#include "source_cell/unitcell.h"
#include "sltk_atom.h"
-#include "sltk_util.h"
#include
#include
diff --git a/source/source_cell/module_neighbor/sltk_grid_driver.h b/source/source_cell/module_neighbor/sltk_grid_driver.h
index 9576617f59d..95db2d85c29 100644
--- a/source/source_cell/module_neighbor/sltk_grid_driver.h
+++ b/source/source_cell/module_neighbor/sltk_grid_driver.h
@@ -2,11 +2,8 @@
#define GRID_DRIVER_H
#include "source_base/global_function.h"
-#include "source_base/global_variable.h"
#include "source_base/vector3.h"
#include "source_cell/unitcell.h"
-#include "source_pw/module_pwdft/structure_factor.h"
-#include "sltk_atom.h"
#include "sltk_grid.h"
#include
diff --git a/source/source_cell/module_symmetry/symm_analysis.cpp b/source/source_cell/module_symmetry/symm_analysis.cpp
index 208efa53084..16bd470ff33 100644
--- a/source/source_cell/module_symmetry/symm_analysis.cpp
+++ b/source/source_cell/module_symmetry/symm_analysis.cpp
@@ -1,5 +1,6 @@
#include "symmetry.h"
#include "source_io/module_parameter/parameter.h"
+#include "source_io/module_output/output.h"
using namespace ModuleSymmetry;
diff --git a/source/source_cell/module_symmetry/symmetry.h b/source/source_cell/module_symmetry/symmetry.h
index 7fe03cb5390..cd95d3ce011 100644
--- a/source/source_cell/module_symmetry/symmetry.h
+++ b/source/source_cell/module_symmetry/symmetry.h
@@ -6,7 +6,6 @@
#include "source_base/timer.h"
#include "source_base/mathzone.h"
#include "source_base/constants.h"
-#include "source_io/module_output/output.h"
#include "symmetry_basic.h"
namespace ModuleSymmetry
diff --git a/source/source_cell/module_symmetry/test/symmetry_test_analysis.cpp b/source/source_cell/module_symmetry/test/symmetry_test_analysis.cpp
index c2947eb3bee..1ca197c032d 100644
--- a/source/source_cell/module_symmetry/test/symmetry_test_analysis.cpp
+++ b/source/source_cell/module_symmetry/test/symmetry_test_analysis.cpp
@@ -1,4 +1,5 @@
#include "symmetry_test_cases.h"
+#include "source_io/module_output/output.h"
#include "mpi.h"
/************************************************
* unit test of class Symmetry
diff --git a/source/source_cell/module_symmetry/test/symmetry_test_symtrz.cpp b/source/source_cell/module_symmetry/test/symmetry_test_symtrz.cpp
index 08ee783972d..45ea873e3f7 100644
--- a/source/source_cell/module_symmetry/test/symmetry_test_symtrz.cpp
+++ b/source/source_cell/module_symmetry/test/symmetry_test_symtrz.cpp
@@ -1,4 +1,5 @@
#include "symmetry_test_cases.h"
+#include "source_io/module_output/output.h"
#include "mpi.h"
/************************************************
diff --git a/source/source_cell/pseudo.cpp b/source/source_cell/pseudo.cpp
index d2025768212..70785839f2d 100644
--- a/source/source_cell/pseudo.cpp
+++ b/source/source_cell/pseudo.cpp
@@ -1,5 +1,6 @@
#include "pseudo.h"
#include "source_base/tool_title.h"
+#include "source_io/module_output/output.h"
#include
pseudo::pseudo()
diff --git a/source/source_cell/pseudo.h b/source/source_cell/pseudo.h
index abd5be8475b..11dee21af36 100644
--- a/source/source_cell/pseudo.h
+++ b/source/source_cell/pseudo.h
@@ -3,7 +3,8 @@
#include
#include "source_base/global_function.h"
-#include "source_io/module_output/output.h"
+#include "source_base/matrix.h"
+#include "source_base/realarray.h"
//-----------------------------------------
// read in pseudopotentials
diff --git a/source/source_cell/setup_nonlocal.h b/source/source_cell/setup_nonlocal.h
index 4ac214c97e2..b9a3ad9ea4b 100644
--- a/source/source_cell/setup_nonlocal.h
+++ b/source/source_cell/setup_nonlocal.h
@@ -2,8 +2,6 @@
#define INFONONLOCAL_H
#include "atom_spec.h"
-#include "../source_base/global_function.h"
-#include "../source_base/global_variable.h"
#include "../source_basis/module_ao/ORB_nonlocal.h"
#include "../source_basis/module_ao/ORB_read.h"
class InfoNonlocal
diff --git a/source/source_cell/test/read_atoms_helper_test.cpp b/source/source_cell/test/read_atoms_helper_test.cpp
index 1cd80847840..39336cd4a0c 100644
--- a/source/source_cell/test/read_atoms_helper_test.cpp
+++ b/source/source_cell/test/read_atoms_helper_test.cpp
@@ -3,6 +3,7 @@
#include "../read_atoms_helper.h"
#include "source_base/vector3.h"
#include "source_base/matrix3.h"
+#include "source_io/module_output/output.h"
#include
#include
diff --git a/source/source_cell/test/unitcell_test_readpp.cpp b/source/source_cell/test/unitcell_test_readpp.cpp
index f0cf7c35390..77ab7a21a8b 100644
--- a/source/source_cell/test/unitcell_test_readpp.cpp
+++ b/source/source_cell/test/unitcell_test_readpp.cpp
@@ -8,6 +8,7 @@
#include "source_base/mathzone.h"
#include "source_cell/check_atomic_stru.h"
#include "source_cell/unitcell.h"
+#include "source_estate/cal_nelec_nband.h"
#include "source_estate/read_pseudo.h"
#include
#include
diff --git a/source/source_cell/unitcell.cpp b/source/source_cell/unitcell.cpp
index a4966530074..f2c15102748 100644
--- a/source/source_cell/unitcell.cpp
+++ b/source/source_cell/unitcell.cpp
@@ -7,6 +7,7 @@
#include "unitcell.h"
#include "bcast_cell.h"
#include "source_base/tool_quit.h"
+#include "source_io/module_output/output.h"
#include "source_io/module_parameter/parameter.h"
#include "source_cell/read_stru.h"
#include "source_base/atom_in.h"
diff --git a/source/source_cell/unitcell.h b/source/source_cell/unitcell.h
index 3292a40a065..e2256b78363 100644
--- a/source/source_cell/unitcell.h
+++ b/source/source_cell/unitcell.h
@@ -2,14 +2,11 @@
#define UNITCELL_H
#include "source_base/global_function.h"
-#include "source_base/global_variable.h"
#include "source_cell/sep_cell.h"
#include "source_estate/magnetism.h"
-#include "source_io/module_output/output.h"
#include "module_symmetry/symmetry.h"
#ifdef __LCAO
-#include "source_basis/module_ao/ORB_read.h"
#include "setup_nonlocal.h"
#endif
diff --git a/source/source_cell/update_cell.cpp b/source/source_cell/update_cell.cpp
index 8e2efaa04e2..4da4013d6af 100644
--- a/source/source_cell/update_cell.cpp
+++ b/source/source_cell/update_cell.cpp
@@ -1,6 +1,7 @@
#include "update_cell.h"
#include "bcast_cell.h"
#include "source_base/global_function.h"
+#include "source_io/module_output/output.h"
namespace unitcell
{
diff --git a/source/source_esolver/esolver.cpp b/source/source_esolver/esolver.cpp
index 4809c6df776..e22b2f911e3 100644
--- a/source/source_esolver/esolver.cpp
+++ b/source/source_esolver/esolver.cpp
@@ -12,10 +12,7 @@
#include "esolver_ks_lcao_tddft.h"
#include "esolver_ks_lcaopw.h"
#include "source_lcao/module_lr/esolver_lrtd_lcao.h"
-extern "C"
-{
#include "source_base/module_external/blacs_connector.h"
-}
#endif
#include "esolver_dp.h"
#include "esolver_nep.h"
diff --git a/source/source_esolver/esolver.h b/source/source_esolver/esolver.h
index dd621cfe155..d1f2b1ae782 100644
--- a/source/source_esolver/esolver.h
+++ b/source/source_esolver/esolver.h
@@ -3,7 +3,8 @@
#include "source_base/matrix.h"
#include "source_cell/unitcell.h"
-#include "source_io/module_parameter/parameter.h"
+
+struct Input_para;
namespace ModuleESolver
{
diff --git a/source/source_esolver/esolver_double_xc.cpp b/source/source_esolver/esolver_double_xc.cpp
index d1acaf83f03..14a86779edc 100644
--- a/source/source_esolver/esolver_double_xc.cpp
+++ b/source/source_esolver/esolver_double_xc.cpp
@@ -5,6 +5,7 @@
#ifdef __MLALGO
#include "source_lcao/module_deepks/LCAO_deepks.h"
#include "source_lcao/module_deepks/LCAO_deepks_interface.h"
+#include "source_lcao/module_deepks/LCAO_deepks_io.h"
#endif
#include "source_lcao/FORCE_STRESS.h"
diff --git a/source/source_esolver/esolver_dp.cpp b/source/source_esolver/esolver_dp.cpp
index b59769f3ef5..879193e668b 100644
--- a/source/source_esolver/esolver_dp.cpp
+++ b/source/source_esolver/esolver_dp.cpp
@@ -18,6 +18,7 @@
* @date 2023-05-15
*/
#include "esolver_dp.h"
+#include "source_io/module_parameter/parameter.h"
#include "source_base/parallel_common.h"
#include "source_base/timer.h"
diff --git a/source/source_esolver/esolver_fp.h b/source/source_esolver/esolver_fp.h
index 59fd79a9943..501bef9b681 100644
--- a/source/source_esolver/esolver_fp.h
+++ b/source/source_esolver/esolver_fp.h
@@ -6,7 +6,6 @@
#include "source_base/timer_wrapper.h"
#include "source_basis/module_pw/pw_basis.h" // plane wave basis
-#include "source_cell/module_symmetry/symmetry.h" // symmetry analysis
#include "source_estate/elecstate.h" // electronic states
#include "source_estate/module_charge/charge_extra.h" // charge extrapolation
#include "source_hamilt/module_surchem/surchem.h" // solvation model
diff --git a/source/source_esolver/esolver_ks.h b/source/source_esolver/esolver_ks.h
index b6affc7b0c7..c480d238ad1 100644
--- a/source/source_esolver/esolver_ks.h
+++ b/source/source_esolver/esolver_ks.h
@@ -8,6 +8,7 @@
#include "source_hamilt/hamilt.h" // use Hamiltonian
#include "source_hamilt/hamilt_base.h" // use Hamiltonian base class
#include "source_lcao/module_dftu/dftu.h" // mohan add 20251107
+#include "source_pw/module_pwdft/vnl_pw.h"
namespace ModuleESolver
{
diff --git a/source/source_esolver/esolver_ks_lcao.cpp b/source/source_esolver/esolver_ks_lcao.cpp
index dd6201bd0b7..9d3906d6ebf 100644
--- a/source/source_esolver/esolver_ks_lcao.cpp
+++ b/source/source_esolver/esolver_ks_lcao.cpp
@@ -1,4 +1,6 @@
#include "esolver_ks_lcao.h"
+#include "source_base/module_external/blacs_connector.h"
+#include "source_cell/module_neighbor/sltk_atom_arrange.h"
#include "source_estate/elecstate_tools.h"
#include "source_lcao/module_deltaspin/spin_constrain.h"
#include "source_lcao/module_deltaspin/deltaspin_lcao.h"
diff --git a/source/source_esolver/esolver_ks_lcao_tddft.cpp b/source/source_esolver/esolver_ks_lcao_tddft.cpp
index 130fc94139f..61e43797e13 100644
--- a/source/source_esolver/esolver_ks_lcao_tddft.cpp
+++ b/source/source_esolver/esolver_ks_lcao_tddft.cpp
@@ -1,4 +1,5 @@
#include "esolver_ks_lcao_tddft.h"
+#include "source_lcao/module_rt/boundary_fix.h"
//----------------IO-----------------
#include "source_io/module_ctrl/ctrl_output_td.h"
diff --git a/source/source_esolver/esolver_ks_lcao_tddft.h b/source/source_esolver/esolver_ks_lcao_tddft.h
index b4227a9ab7d..07b049b9fbb 100644
--- a/source/source_esolver/esolver_ks_lcao_tddft.h
+++ b/source/source_esolver/esolver_ks_lcao_tddft.h
@@ -3,8 +3,6 @@
#include "esolver_ks.h"
#include "esolver_ks_lcao.h"
#include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor
-#include "source_lcao/module_rt/boundary_fix.h"
-#include "source_lcao/module_rt/gather_mat.h" // MPI gathering and distributing functions
#include "source_lcao/module_rt/kernels/cublasmp_context.h"
#include "source_lcao/module_rt/td_info.h"
#include "source_lcao/module_rt/td_moving_gauge.h"
diff --git a/source/source_esolver/esolver_ks_pw.h b/source/source_esolver/esolver_ks_pw.h
index 227aaeea254..9fd2600ce37 100644
--- a/source/source_esolver/esolver_ks_pw.h
+++ b/source/source_esolver/esolver_ks_pw.h
@@ -4,7 +4,6 @@
#include "source_psi/setup_psi_pw.h" // mohan add 20251012
#include "source_pw/module_pwdft/vsep_pw.h"
#include "source_pw/module_pwdft/exx_helper_base.h"
-#include "source_pw/module_pwdft/op_pw_vel.h"
#include
#include
diff --git a/source/source_esolver/esolver_nep.cpp b/source/source_esolver/esolver_nep.cpp
index 1f9605b6207..8944776aaa6 100644
--- a/source/source_esolver/esolver_nep.cpp
+++ b/source/source_esolver/esolver_nep.cpp
@@ -16,6 +16,7 @@
* @date 2025-10-10
*/
#include "esolver_nep.h"
+#include "source_io/module_parameter/parameter.h"
#include "source_base/parallel_common.h"
#include "source_base/timer.h"
diff --git a/source/source_esolver/test/esolver_dp_test.cpp b/source/source_esolver/test/esolver_dp_test.cpp
index 5010c9ccf42..f25b89ab755 100644
--- a/source/source_esolver/test/esolver_dp_test.cpp
+++ b/source/source_esolver/test/esolver_dp_test.cpp
@@ -5,6 +5,7 @@
#define private public
#define protected public
#include "../esolver_dp.h"
+#include "source_io/module_parameter/input_parameter.h"
#undef private
/************************************************
* unit tests of class ESolver_DP
diff --git a/source/source_estate/cal_wfc.cpp b/source/source_estate/cal_wfc.cpp
index ff069397a03..846ac965bb0 100644
--- a/source/source_estate/cal_wfc.cpp
+++ b/source/source_estate/cal_wfc.cpp
@@ -1,5 +1,7 @@
#include "read_pseudo.h"
+#include "source_io/module_parameter/parameter.h"
+
namespace elecstate
{
void cal_nwfc(std::ofstream& log,UnitCell& ucell,Atom* atoms)
diff --git a/source/source_estate/elecstate_energy.cpp b/source/source_estate/elecstate_energy.cpp
index a0bc403cd5a..3c58360b902 100644
--- a/source/source_estate/elecstate_energy.cpp
+++ b/source/source_estate/elecstate_energy.cpp
@@ -1,5 +1,6 @@
#include "elecstate.h"
#include "source_base/global_variable.h"
+#include "source_base/parallel_comm.h"
#include "source_base/parallel_reduce.h"
#include "source_hamilt/module_xc/xc_functional.h"
#include "source_io/module_parameter/parameter.h"
diff --git a/source/source_estate/elecstate_energy_terms.cpp b/source/source_estate/elecstate_energy_terms.cpp
index c7bb4b55a51..ebe0068c27b 100644
--- a/source/source_estate/elecstate_energy_terms.cpp
+++ b/source/source_estate/elecstate_energy_terms.cpp
@@ -1,4 +1,5 @@
#include "elecstate.h"
+#include "source_base/parallel_reduce.h"
#include "source_estate/module_pot/H_Hartree_pw.h"
#include "source_estate/module_pot/efield.h"
#include "source_estate/module_pot/gatefield.h"
diff --git a/source/source_estate/elecstate_pw.cpp b/source/source_estate/elecstate_pw.cpp
index 19047491194..de05d441b58 100644
--- a/source/source_estate/elecstate_pw.cpp
+++ b/source/source_estate/elecstate_pw.cpp
@@ -8,6 +8,7 @@
#include "source_base/timer.h"
#include "source_hamilt/module_xc/xc_functional.h"
#include "source_io/module_parameter/parameter.h"
+#include "source_pw/module_pwdft/vnl_pw.h"
namespace elecstate {
diff --git a/source/source_estate/elecstate_pw.h b/source/source_estate/elecstate_pw.h
index f674beed892..e8e4b95af36 100644
--- a/source/source_estate/elecstate_pw.h
+++ b/source/source_estate/elecstate_pw.h
@@ -9,6 +9,8 @@
#include "source_pw/module_pwdft/kernels/meta_op.h"
#include "source_base/kernels/math_kernel_op.h"
+class pseudopot_cell_vnl;
+
namespace elecstate
{
diff --git a/source/source_estate/elecstate_tools.cpp b/source/source_estate/elecstate_tools.cpp
index 4a4c24e3cfc..3076c6b437e 100644
--- a/source/source_estate/elecstate_tools.cpp
+++ b/source/source_estate/elecstate_tools.cpp
@@ -1,5 +1,6 @@
#include "elecstate_tools.h"
#include "occupy.h"
+#include "source_base/parallel_reduce.h"
namespace elecstate
{
void calEBand(const ModuleBase::matrix& ekb,const ModuleBase::matrix& wg,fenergy& f_en)
diff --git a/source/source_estate/kernels/elecstate_op.h b/source/source_estate/kernels/elecstate_op.h
index 70cfcbb2ed2..f7b8d48c2ee 100644
--- a/source/source_estate/kernels/elecstate_op.h
+++ b/source/source_estate/kernels/elecstate_op.h
@@ -1,6 +1,5 @@
// TODO: This is a temperary location for these functions.
// And will be moved to a global module(module base) later.
-#include "source_io/module_parameter/parameter.h"
#ifndef source_estate_ELECSTATE_MULTI_DEVICE_H
#define source_estate_ELECSTATE_MULTI_DEVICE_H
#include
diff --git a/source/source_estate/magnetism.h b/source/source_estate/magnetism.h
index 061ec415e79..b2cee2d6a95 100644
--- a/source/source_estate/magnetism.h
+++ b/source/source_estate/magnetism.h
@@ -2,7 +2,6 @@
#define MAGNETISM_H
#include "source_base/global_function.h"
-#include "source_base/global_variable.h"
#include "source_base/vector3.h"
class Magnetism
diff --git a/source/source_estate/module_charge/charge.h b/source/source_estate/module_charge/charge.h
index 79a5f5ca9e5..e50f5eed535 100644
--- a/source/source_estate/module_charge/charge.h
+++ b/source/source_estate/module_charge/charge.h
@@ -4,7 +4,6 @@
#include "source_base/complexmatrix.h"
#include "source_base/global_function.h"
#include "source_base/global_variable.h"
-#include "source_base/parallel_global.h"
#include "source_basis/module_pw/pw_basis.h"
#include "source_cell/module_symmetry/symmetry.h"
// #include "source_estate/fp_energy.h"
diff --git a/source/source_estate/module_charge/charge_mpi.cpp b/source/source_estate/module_charge/charge_mpi.cpp
index e9c229897b8..02271f54d6c 100644
--- a/source/source_estate/module_charge/charge_mpi.cpp
+++ b/source/source_estate/module_charge/charge_mpi.cpp
@@ -1,6 +1,7 @@
#include "charge.h"
#include "source_base/global_function.h"
#include "source_base/global_variable.h"
+#include "source_base/parallel_comm.h"
#include "source_base/parallel_reduce.h"
#include "source_base/timer.h"
#include "source_hamilt/module_xc/xc_functional.h"
diff --git a/source/source_estate/module_dm/cal_dm_psi.h b/source/source_estate/module_dm/cal_dm_psi.h
index da78fc179d7..09ab3d3974a 100644
--- a/source/source_estate/module_dm/cal_dm_psi.h
+++ b/source/source_estate/module_dm/cal_dm_psi.h
@@ -2,6 +2,7 @@
#define CAL_DM_PSI_H
#include "source_base/matrix.h"
+#include "source_psi/psi.h"
#include "density_matrix.h"
namespace elecstate
diff --git a/source/source_estate/module_pot/H_Hartree_pw.h b/source/source_estate/module_pot/H_Hartree_pw.h
index 7973966033b..c5ca6bdd0b5 100644
--- a/source/source_estate/module_pot/H_Hartree_pw.h
+++ b/source/source_estate/module_pot/H_Hartree_pw.h
@@ -2,7 +2,6 @@
#define HHARTREEPW_H
#include "source_base/global_function.h"
-#include "source_base/global_variable.h"
#include "source_base/matrix.h"
#include "source_cell/unitcell.h"
#include "source_basis/module_pw/pw_basis.h"
diff --git a/source/source_estate/module_pot/H_TDDFT_pw.h b/source/source_estate/module_pot/H_TDDFT_pw.h
index fc25f510bd5..4565cd000ff 100644
--- a/source/source_estate/module_pot/H_TDDFT_pw.h
+++ b/source/source_estate/module_pot/H_TDDFT_pw.h
@@ -2,8 +2,7 @@
#define H_TDDFT_PW_H
#include "pot_base.h"
-#include "source_io/module_parameter/input_conv.h"
-#include "source_io/module_parameter/parameter.h" // PARAM.globalv.global_readin_dir, PARAM.inp.mdp.md_restart
+#include "source_io/module_parameter/parameter.h"
namespace elecstate
{
diff --git a/source/source_estate/module_pot/pot_ml_exx.h b/source/source_estate/module_pot/pot_ml_exx.h
index fa95bb90d07..5936add9050 100644
--- a/source/source_estate/module_pot/pot_ml_exx.h
+++ b/source/source_estate/module_pot/pot_ml_exx.h
@@ -1,11 +1,9 @@
#ifndef POT_ML_EXX_H
#define POT_ML_EXX_H
-#include "source_io/module_parameter/parameter.h"
#ifdef __MLALGO
#include "pot_base.h"
-#include "source_pw/module_ofdft/nn_of.h"
#include "source_io/module_ml/cal_mlkedf_descriptors.h"
#include "source_pw/module_ofdft/ml_base.h"
diff --git a/source/source_estate/module_pot/pot_xc.h b/source/source_estate/module_pot/pot_xc.h
index bf1cf837d85..47243c633d7 100644
--- a/source/source_estate/module_pot/pot_xc.h
+++ b/source/source_estate/module_pot/pot_xc.h
@@ -1,7 +1,6 @@
#ifndef POTXC_H
#define POTXC_H
-#include "source_hamilt/module_xc/xc_functional.h"
#include "pot_base.h"
namespace elecstate
diff --git a/source/source_estate/module_pot/potential_new.h b/source/source_estate/module_pot/potential_new.h
index 5b888e7d8ba..ca79ca02f63 100644
--- a/source/source_estate/module_pot/potential_new.h
+++ b/source/source_estate/module_pot/potential_new.h
@@ -3,7 +3,6 @@
#include "source_base/complexmatrix.h"
#include "source_hamilt/module_surchem/surchem.h"
-#include "source_pw/module_pwdft/vnl_pw.h"
#include "source_pw/module_pwdft/vsep_pw.h"
#include "source_pw/module_pwdft/structure_factor.h"
#include "pot_base.h"
diff --git a/source/source_estate/occupy.h b/source/source_estate/occupy.h
index 627103fcab6..24626e0d161 100644
--- a/source/source_estate/occupy.h
+++ b/source/source_estate/occupy.h
@@ -2,7 +2,6 @@
#define OCCUPY_H
#include "source_base/global_function.h"
-#include "source_base/global_variable.h"
#include "source_base/matrix.h"
#include "source_base/vector3.h"
diff --git a/source/source_estate/read_pseudo.cpp b/source/source_estate/read_pseudo.cpp
index 05c4c0f649c..c348635dde9 100644
--- a/source/source_estate/read_pseudo.cpp
+++ b/source/source_estate/read_pseudo.cpp
@@ -1,6 +1,7 @@
#include "read_pseudo.h"
#include "source_io/module_parameter/parameter.h"
#include "source_base/global_file.h"
+#include "source_cell/cal_atoms_info.h"
#include "source_cell/read_pp.h"
#include "source_cell/bcast_cell.h"
#include "source_base/element_elec_config.h"
diff --git a/source/source_estate/read_pseudo.h b/source/source_estate/read_pseudo.h
index e244697eb32..b42d81d439b 100644
--- a/source/source_estate/read_pseudo.h
+++ b/source/source_estate/read_pseudo.h
@@ -2,7 +2,6 @@
#define READ_PSEUDO_H
#include "source_cell/unitcell.h"
-#include "source_cell/cal_atoms_info.h"
namespace elecstate {
diff --git a/source/source_estate/setup_estate_pw.cpp b/source/source_estate/setup_estate_pw.cpp
index 3ca02d79e67..654969faa9f 100644
--- a/source/source_estate/setup_estate_pw.cpp
+++ b/source/source_estate/setup_estate_pw.cpp
@@ -2,6 +2,7 @@
#include "source_estate/elecstate_pw.h"
#include "source_estate/elecstate_pw_sdft.h"
#include "source_estate/elecstate_tools.h"
+#include "source_pw/module_pwdft/vnl_pw.h"
namespace elecstate
{
diff --git a/source/source_estate/setup_estate_pw.h b/source/source_estate/setup_estate_pw.h
index cd1a388a743..03e994369ae 100644
--- a/source/source_estate/setup_estate_pw.h
+++ b/source/source_estate/setup_estate_pw.h
@@ -1,7 +1,6 @@
#ifndef SETUP_ESTATE_PW_H
#define SETUP_ESTATE_PW_H
-#include "source_base/module_device/device.h"
#include "source_cell/unitcell.h"
#include "source_cell/klist.h"
#include "source_pw/module_pwdft/structure_factor.h"
@@ -9,6 +8,8 @@
#include "source_pw/module_pwdft/vl_pw.h"
#include "source_pw/module_pwdft/vsep_pw.h"
+class pseudopot_cell_vnl;
+
namespace elecstate
{
diff --git a/source/source_estate/test/elecstate_pw_test.cpp b/source/source_estate/test/elecstate_pw_test.cpp
index c71a38002e1..c4e57298409 100644
--- a/source/source_estate/test/elecstate_pw_test.cpp
+++ b/source/source_estate/test/elecstate_pw_test.cpp
@@ -5,8 +5,13 @@
#define private public
#define protected public
#include "source_estate/elecstate_pw.h"
+#ifdef __LCAO
+#include "source_basis/module_ao/ORB_gaunt_table.h"
+#endif
#include "source_hamilt/module_xc/xc_functional.h"
#include "source_pw/module_pwdft/vl_pw.h"
+#include "source_pw/module_pwdft/vnl_pw.h"
+#include "source_pw/module_pwdft/soc.h"
#include "source_io/module_parameter/parameter.h"
// mock functions for testing
int XC_Functional::func_type = 1;
diff --git a/source/source_hamilt/module_ewald/H_Ewald_pw.cpp b/source/source_hamilt/module_ewald/H_Ewald_pw.cpp
index 488a74ef0be..0f4c7776d70 100644
--- a/source/source_hamilt/module_ewald/H_Ewald_pw.cpp
+++ b/source/source_hamilt/module_ewald/H_Ewald_pw.cpp
@@ -1,4 +1,5 @@
#include "H_Ewald_pw.h"
+#include "source_base/parallel_comm.h"
#include "source_io/module_parameter/parameter.h"
#include "source_base/mymath.h" // use heapsort
#include "source_io/module_parameter/parameter.h"
diff --git a/source/source_hamilt/module_ewald/H_Ewald_pw.h b/source/source_hamilt/module_ewald/H_Ewald_pw.h
index 42a931e10aa..64143c8aa83 100644
--- a/source/source_hamilt/module_ewald/H_Ewald_pw.h
+++ b/source/source_hamilt/module_ewald/H_Ewald_pw.h
@@ -2,11 +2,8 @@
#define H_EWALD_PW_H
#include "source_base/global_function.h"
-#include "source_base/global_variable.h"
#include "source_cell/unitcell.h"
#include "source_basis/module_pw/pw_basis.h"
-#include "source_pw/module_pwdft/forces.h"
-#include "source_pw/module_pwdft/stress_func.h"
class H_Ewald_pw
{
diff --git a/source/source_hamilt/module_surchem/cal_vcav.cpp b/source/source_hamilt/module_surchem/cal_vcav.cpp
index 46bea1d8b45..9a56953b6a3 100644
--- a/source/source_hamilt/module_surchem/cal_vcav.cpp
+++ b/source/source_hamilt/module_surchem/cal_vcav.cpp
@@ -1,4 +1,5 @@
#include "source_base/timer.h"
+#include "source_base/parallel_reduce.h"
#include "source_hamilt/module_xc/xc_functional.h"
#include "source_io/module_parameter/parameter.h"
#include "surchem.h"
diff --git a/source/source_hamilt/module_surchem/cal_vel.cpp b/source/source_hamilt/module_surchem/cal_vel.cpp
index d7281172d46..14b148a0f0d 100644
--- a/source/source_hamilt/module_surchem/cal_vel.cpp
+++ b/source/source_hamilt/module_surchem/cal_vel.cpp
@@ -1,4 +1,5 @@
#include "source_base/timer.h"
+#include "source_base/parallel_reduce.h"
#include "source_hamilt/module_xc/xc_functional.h"
#include "source_io/module_parameter/parameter.h"
#include "surchem.h"
diff --git a/source/source_hamilt/module_surchem/sol_force.cpp b/source/source_hamilt/module_surchem/sol_force.cpp
index 4c032328048..8c5e6b6096b 100644
--- a/source/source_hamilt/module_surchem/sol_force.cpp
+++ b/source/source_hamilt/module_surchem/sol_force.cpp
@@ -1,4 +1,5 @@
#include "surchem.h"
+#include "source_base/parallel_reduce.h"
#include "source_base/timer.h"
#include "source_io/module_parameter/parameter.h"
diff --git a/source/source_hamilt/module_surchem/surchem.h b/source/source_hamilt/module_surchem/surchem.h
index b272d0f70e5..c792414ca61 100644
--- a/source/source_hamilt/module_surchem/surchem.h
+++ b/source/source_hamilt/module_surchem/surchem.h
@@ -3,9 +3,7 @@
#include "source_base/atom_in.h"
#include "source_base/global_function.h"
-#include "source_base/global_variable.h"
#include "source_base/matrix.h"
-#include "source_base/parallel_reduce.h"
#include "source_basis/module_pw/pw_basis.h"
#include "source_cell/unitcell.h"
#include "source_pw/module_pwdft/parallel_grid.h"
diff --git a/source/source_hamilt/module_xc/exx_info.h b/source/source_hamilt/module_xc/exx_info.h
index 1d5c5ede4e8..66e4a9d4f67 100644
--- a/source/source_hamilt/module_xc/exx_info.h
+++ b/source/source_hamilt/module_xc/exx_info.h
@@ -2,7 +2,6 @@
#define EXX_INFO_H
#include "source_lcao/module_ri/conv_coulomb_pot_k.h"
-#include "xc_functional.h"
#include
#include