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 diff --git a/source/source_hamilt/module_xc/xc_functional.h b/source/source_hamilt/module_xc/xc_functional.h index 86dcb4049d7..a311d28d8a0 100644 --- a/source/source_hamilt/module_xc/xc_functional.h +++ b/source/source_hamilt/module_xc/xc_functional.h @@ -12,7 +12,6 @@ #endif // ifdef USE_LIBXC #include "source_base/macros.h" #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/vector3.h" #include "source_base/matrix.h" #include "source_basis/module_pw/pw_basis_k.h" diff --git a/source/source_hamilt/operator.cpp b/source/source_hamilt/operator.cpp index 86f83827644..dba9367f055 100644 --- a/source/source_hamilt/operator.cpp +++ b/source/source_hamilt/operator.cpp @@ -1,6 +1,7 @@ #include "operator.h" #include "source_base/timer.h" +#include "source_base/tool_quit.h" using namespace hamilt; diff --git a/source/source_hamilt/operator.h b/source/source_hamilt/operator.h index 4198220a020..5264b47ba19 100644 --- a/source/source_hamilt/operator.h +++ b/source/source_hamilt/operator.h @@ -1,8 +1,6 @@ #ifndef OPERATOR_H #define OPERATOR_H -#include "source_base/global_function.h" -#include "source_base/tool_quit.h" #include "source_psi/psi.h" #include diff --git a/source/source_hsolver/diag_hs_para.cpp b/source/source_hsolver/diag_hs_para.cpp index 8feac1a39a0..74dc8da33d6 100644 --- a/source/source_hsolver/diag_hs_para.cpp +++ b/source/source_hsolver/diag_hs_para.cpp @@ -1,5 +1,6 @@ #include "source_hsolver/diag_hs_para.h" +#include "source_base/module_external/blacs_connector.h" #include "source_base/module_external/scalapack_connector.h" #include "source_base/parallel_2d.h" #include "source_hsolver/diago_pxxxgvx.h" diff --git a/source/source_hsolver/diago_bpcg.h b/source/source_hsolver/diago_bpcg.h index 796ae77666b..27f528024ba 100644 --- a/source/source_hsolver/diago_bpcg.h +++ b/source/source_hsolver/diago_bpcg.h @@ -6,7 +6,6 @@ #include "source_base/module_device/types.h" #include "source_base/para_gemm.h" #include "source_hamilt/hamilt.h" -#include "source_pw/module_pwdft/structure_factor.h" #include "source_hsolver/kernels/hegvd_op.h" #include "source_hsolver/para_linear_transform.h" diff --git a/source/source_hsolver/diago_cusolver.cpp b/source/source_hsolver/diago_cusolver.cpp index a819eca7000..b02c4132574 100644 --- a/source/source_hsolver/diago_cusolver.cpp +++ b/source/source_hsolver/diago_cusolver.cpp @@ -1,8 +1,10 @@ #include "diago_cusolver.h" +#include "source_base/module_external/blas_connector.h" #include "source_base/module_external/blacs_connector.h" #include "source_base/global_variable.h" #include "source_base/module_external/scalapack_connector.h" +#include "source_base/tool_title.h" #include "source_base/timer.h" #include "source_io/module_parameter/parameter.h" diff --git a/source/source_hsolver/diago_dav_subspace.h b/source/source_hsolver/diago_dav_subspace.h index 6ad3300b182..43e0304729c 100644 --- a/source/source_hsolver/diago_dav_subspace.h +++ b/source/source_hsolver/diago_dav_subspace.h @@ -8,7 +8,6 @@ #include "source_base/module_container/ATen/kernels/lapack.h" #include "source_hsolver/diag_comm_info.h" -#include "source_hsolver/diag_const_nums.h" #include #include diff --git a/source/source_hsolver/diago_elpa.cpp b/source/source_hsolver/diago_elpa.cpp index 23d19c5aed1..a264a41b9c3 100644 --- a/source/source_hsolver/diago_elpa.cpp +++ b/source/source_hsolver/diago_elpa.cpp @@ -1,4 +1,6 @@ #include "diago_elpa.h" +#include "source_base/global_function.h" +#include "source_base/module_external/blas_connector.h" #include "source_io/module_parameter/parameter.h" #include "module_genelpa/elpa_solver.h" diff --git a/source/source_hsolver/diago_elpa_native.cpp b/source/source_hsolver/diago_elpa_native.cpp index 0ab09f09632..ee003a08e01 100644 --- a/source/source_hsolver/diago_elpa_native.cpp +++ b/source/source_hsolver/diago_elpa_native.cpp @@ -1,5 +1,7 @@ #include "diago_elpa_native.h" +#include "source_base/global_function.h" +#include "source_base/module_external/blas_connector.h" #include "source_base/module_external/blacs_connector.h" #include "source_base/global_variable.h" #include "source_io/module_parameter/parameter.h" diff --git a/source/source_hsolver/diago_iter_assist.cpp b/source/source_hsolver/diago_iter_assist.cpp index a522f580c6f..c68dd4e5afe 100644 --- a/source/source_hsolver/diago_iter_assist.cpp +++ b/source/source_hsolver/diago_iter_assist.cpp @@ -2,6 +2,7 @@ #include "source_io/module_parameter/parameter.h" #include "source_base/complexmatrix.h" #include "source_base/constants.h" +#include "source_base/global_function.h" #include "source_base/global_variable.h" #include "source_base/module_device/device.h" #include "source_base/parallel_reduce.h" diff --git a/source/source_hsolver/diago_iter_assist.h b/source/source_hsolver/diago_iter_assist.h index 2867b50b5c3..e9c4c005201 100644 --- a/source/source_hsolver/diago_iter_assist.h +++ b/source/source_hsolver/diago_iter_assist.h @@ -6,6 +6,8 @@ #include "source_hamilt/hamilt.h" #include "source_psi/psi.h" +#include + namespace hsolver { diff --git a/source/source_hsolver/diago_pexsi.cpp b/source/source_hsolver/diago_pexsi.cpp index 78a32ba9403..e85f78b12b9 100644 --- a/source/source_hsolver/diago_pexsi.cpp +++ b/source/source_hsolver/diago_pexsi.cpp @@ -4,6 +4,7 @@ #include #ifdef __PEXSI #include "diago_pexsi.h" +#include "source_base/tool_title.h" #include "source_base/global_variable.h" #include "source_base/tool_quit.h" #include "source_basis/module_ao/parallel_orbitals.h" diff --git a/source/source_hsolver/diago_pexsi.h b/source/source_hsolver/diago_pexsi.h index 9871935f0f0..9f0e0d1317b 100644 --- a/source/source_hsolver/diago_pexsi.h +++ b/source/source_hsolver/diago_pexsi.h @@ -5,7 +5,6 @@ #include #include "source_base/macros.h" // GetRealType #include "source_hamilt/hamilt.h" -#include "source_base/global_variable.h" #include "source_basis/module_ao/parallel_orbitals.h" #include "module_pexsi/pexsi_solver.h" diff --git a/source/source_hsolver/hsolver.cpp b/source/source_hsolver/hsolver.cpp index 1e8645cd37b..a6d955541ae 100644 --- a/source/source_hsolver/hsolver.cpp +++ b/source/source_hsolver/hsolver.cpp @@ -1,5 +1,6 @@ #include "hsolver.h" +#include "source_base/global_function.h" #include "source_io/module_parameter/parameter.h" namespace hsolver diff --git a/source/source_hsolver/hsolver.h b/source/source_hsolver/hsolver.h index f8eb5992da5..93806e64115 100644 --- a/source/source_hsolver/hsolver.h +++ b/source/source_hsolver/hsolver.h @@ -1,9 +1,8 @@ #ifndef HSOLVER_H #define HSOLVER_H -#include "source_estate/elecstate.h" -#include "source_hamilt/hamilt.h" - +#include +#include namespace hsolver { diff --git a/source/source_hsolver/hsolver_lcaopw.h b/source/source_hsolver/hsolver_lcaopw.h index 13c359b2e91..b13669ca754 100644 --- a/source/source_hsolver/hsolver_lcaopw.h +++ b/source/source_hsolver/hsolver_lcaopw.h @@ -4,7 +4,6 @@ #include "source_estate/elecstate.h" #include "source_hamilt/hamilt.h" #include "source_base/macros.h" -#include "source_base/module_device/types.h" namespace hsolver { diff --git a/source/source_hsolver/hsolver_pw.cpp b/source/source_hsolver/hsolver_pw.cpp index 780dac1eaf9..b88bc3b90dd 100644 --- a/source/source_hsolver/hsolver_pw.cpp +++ b/source/source_hsolver/hsolver_pw.cpp @@ -1,5 +1,6 @@ #include "hsolver_pw.h" +#include "source_base/parallel_comm.h" #include "source_base/global_variable.h" #include "source_base/timer.h" #include "source_base/tool_quit.h" diff --git a/source/source_hsolver/kernels/hegvd_op.h b/source/source_hsolver/kernels/hegvd_op.h index dfe1aaf287b..c88e51bc639 100644 --- a/source/source_hsolver/kernels/hegvd_op.h +++ b/source/source_hsolver/kernels/hegvd_op.h @@ -7,6 +7,11 @@ #ifndef MODULE_HSOLVER_HEGVD_H #define MODULE_HSOLVER_HEGVD_H +#include "source_base/parallel_reduce.h" +#include "source_base/module_device/types.h" + +#include + // Note: // names follow the same style as standard LAPACK APIs: // ----------------------------------- @@ -26,8 +31,6 @@ // And will be moved to a global module(module base) later. #include "source_base/macros.h" -#include "source_base/parallel_reduce.h" -#include "source_base/module_device/types.h" namespace hsolver { diff --git a/source/source_hsolver/module_genelpa/elpa_new.h b/source/source_hsolver/module_genelpa/elpa_new.h index ff1648ed858..cfa724bfc2a 100644 --- a/source/source_hsolver/module_genelpa/elpa_new.h +++ b/source/source_hsolver/module_genelpa/elpa_new.h @@ -37,6 +37,6 @@ extern "C" #endif } - #include "elpa_generic.hpp" // This is a wrapper for `elpa/elpa_generic.h`. + #endif diff --git a/source/source_hsolver/para_linear_transform.cpp b/source/source_hsolver/para_linear_transform.cpp index 4581f0f5b79..1ddcdb78591 100644 --- a/source/source_hsolver/para_linear_transform.cpp +++ b/source/source_hsolver/para_linear_transform.cpp @@ -1,5 +1,8 @@ #include "para_linear_transform.h" +#include "source_base/kernels/math_kernel_op.h" +#include "source_base/parallel_common.h" +#include "source_base/parallel_device.h" #include "source_base/timer.h" #include diff --git a/source/source_hsolver/para_linear_transform.h b/source/source_hsolver/para_linear_transform.h index 5651695e0b3..20d584b30d2 100644 --- a/source/source_hsolver/para_linear_transform.h +++ b/source/source_hsolver/para_linear_transform.h @@ -1,9 +1,7 @@ #ifndef __PARA_LINEAR_TRANSFORM_H__ #define __PARA_LINEAR_TRANSFORM_H__ -#include "source_base/kernels/math_kernel_op.h" #include "source_base/module_device/device.h" #include "source_base/module_device/memory_op.h" -#include "source_base/parallel_device.h" #include #ifdef __MPI diff --git a/source/source_hsolver/test/test_hsolver.cpp b/source/source_hsolver/test/test_hsolver.cpp index 6e9ab260097..02b838aa3d0 100644 --- a/source/source_hsolver/test/test_hsolver.cpp +++ b/source/source_hsolver/test/test_hsolver.cpp @@ -4,6 +4,7 @@ #define protected public #include "hsolver_supplementary_mock.h" +#include "source_hamilt/hamilt.h" #include "source_hsolver/hsolver.h" #include diff --git a/source/source_hsolver/test/test_para_linear_trans.cpp b/source/source_hsolver/test/test_para_linear_trans.cpp index 7d275e97dd4..e7732990e17 100644 --- a/source/source_hsolver/test/test_para_linear_trans.cpp +++ b/source/source_hsolver/test/test_para_linear_trans.cpp @@ -1,5 +1,7 @@ #include "../para_linear_transform.h" +#include "source_base/kernels/math_kernel_op.h" + #include #ifdef __MPI #include diff --git a/source/source_io/module_bessel/bessel_basis.h b/source/source_io/module_bessel/bessel_basis.h index e8307e76256..d46d7390fbd 100644 --- a/source/source_io/module_bessel/bessel_basis.h +++ b/source/source_io/module_bessel/bessel_basis.h @@ -6,7 +6,6 @@ #ifndef BESSEL_BASIS_H #define BESSEL_BASIS_H #include "../../source_base/global_function.h" -#include "../../source_base/global_variable.h" #include "../../source_base/realarray.h" #include "../../source_cell/unitcell.h" diff --git a/source/source_io/module_bessel/numerical_basis.h b/source/source_io/module_bessel/numerical_basis.h index d7ffc62ee18..04dacdc9e45 100644 --- a/source/source_io/module_bessel/numerical_basis.h +++ b/source/source_io/module_bessel/numerical_basis.h @@ -11,7 +11,6 @@ #include "../../source_base/complexarray.h" #include "../../source_base/complexmatrix.h" #include "../../source_base/global_function.h" -#include "../../source_base/global_variable.h" #include "../../source_base/intarray.h" #include "../../source_base/matrix.h" #include "../../source_base/vector3.h" diff --git a/source/source_io/module_bessel/numerical_descriptor.h b/source/source_io/module_bessel/numerical_descriptor.h index 8558779cfd9..6cd76f1d1cc 100644 --- a/source/source_io/module_bessel/numerical_descriptor.h +++ b/source/source_io/module_bessel/numerical_descriptor.h @@ -5,7 +5,6 @@ #ifndef NUMERICAL_DESCRIPTOR_H #define NUMERICAL_DESCRIPTOR_H #include "../../source_base/global_function.h" -#include "../../source_base/global_variable.h" #include "../../source_base/intarray.h" #include "../../source_base/complexmatrix.h" #include "bessel_basis.h" diff --git a/source/source_io/module_chgpot/get_pchg_lcao.h b/source/source_io/module_chgpot/get_pchg_lcao.h index 4b4de152f81..acf9cbbf62e 100644 --- a/source/source_io/module_chgpot/get_pchg_lcao.h +++ b/source/source_io/module_chgpot/get_pchg_lcao.h @@ -3,6 +3,9 @@ #include "source_cell/klist.h" #include "source_estate/module_dm/density_matrix.h" +#include "source_pw/module_pwdft/parallel_grid.h" +#include "source_basis/module_pw/pw_basis.h" +#include "source_psi/psi.h" /** * @brief Manages the computation of the charge densities for different bands (band-decomposed charge densities). diff --git a/source/source_io/module_chgpot/write_init.h b/source/source_io/module_chgpot/write_init.h index 08184931e97..323cbe7af8f 100644 --- a/source/source_io/module_chgpot/write_init.h +++ b/source/source_io/module_chgpot/write_init.h @@ -2,7 +2,6 @@ #define WRITE_INIT_H #include "source_io/module_parameter/input_parameter.h" // use inp -#include "source_cell/parallel_kpoints.h" // use para_grid #include "source_estate/module_charge/charge.h" // use chg #include "source_estate/fp_energy.h" // use efermi #include "source_estate/elecstate.h" // use pelec diff --git a/source/source_io/module_chgpot/write_libxc_r.cpp b/source/source_io/module_chgpot/write_libxc_r.cpp index 32500335acd..e8b20cc13e3 100644 --- a/source/source_io/module_chgpot/write_libxc_r.cpp +++ b/source/source_io/module_chgpot/write_libxc_r.cpp @@ -6,6 +6,7 @@ #ifdef USE_LIBXC #include "write_libxc_r.h" +#include "source_base/parallel_comm.h" #include "source_hamilt/module_xc/xc_functional.h" #include "source_hamilt/module_xc/xc_functional_libxc.h" #include "source_estate/module_charge/charge.h" diff --git a/source/source_io/module_ctrl/ctrl_iter_lcao.cpp b/source/source_io/module_ctrl/ctrl_iter_lcao.cpp index c42616dccae..4701aba2eeb 100644 --- a/source/source_io/module_ctrl/ctrl_iter_lcao.cpp +++ b/source/source_io/module_ctrl/ctrl_iter_lcao.cpp @@ -4,6 +4,7 @@ #include "source_lcao/module_deepks/LCAO_deepks.h" #include "source_lcao/module_deepks/LCAO_deepks_interface.h" #endif +#include "source_io/module_restart/restart.h" namespace ModuleIO { diff --git a/source/source_io/module_ctrl/ctrl_iter_lcao.h b/source/source_io/module_ctrl/ctrl_iter_lcao.h index 64cc0123d21..6297d4f1d03 100644 --- a/source/source_io/module_ctrl/ctrl_iter_lcao.h +++ b/source/source_io/module_ctrl/ctrl_iter_lcao.h @@ -10,7 +10,6 @@ #include "source_lcao/hamilt_lcao.h" // use hamilt::HamiltLCAO #include "source_lcao/setup_exx.h" // mohan add 20251008 #include "source_lcao/setup_deepks.h" // mohan add 20251010 -#include "source_io/module_restart/restart.h" namespace ModuleIO { diff --git a/source/source_io/module_ctrl/ctrl_output_td.h b/source/source_io/module_ctrl/ctrl_output_td.h index 1b57944d87e..8de3ae325bd 100644 --- a/source/source_io/module_ctrl/ctrl_output_td.h +++ b/source/source_io/module_ctrl/ctrl_output_td.h @@ -3,7 +3,6 @@ #include "source_basis/module_ao/ORB_read.h" #include "source_basis/module_ao/parallel_orbitals.h" -#include "source_basis/module_nao/two_center_bundle.h" #include "source_cell/unitcell.h" #include "source_estate/elecstate_lcao.h" #include "source_estate/module_pot/H_TDDFT_pw.h" diff --git a/source/source_io/module_ctrl/ctrl_scf_lcao.cpp b/source/source_io/module_ctrl/ctrl_scf_lcao.cpp index 0271c3daf46..7318a3f2b7b 100644 --- a/source/source_io/module_ctrl/ctrl_scf_lcao.cpp +++ b/source/source_io/module_ctrl/ctrl_scf_lcao.cpp @@ -1,5 +1,6 @@ #include "ctrl_scf_lcao.h" // use ctrl_scf_lcao() +#include "source_base/formatter.h" #include "source_estate/elecstate_lcao.h" // use elecstate::ElecState #include "source_hamilt/hamilt.h" // use Hamilt #include "source_lcao/hamilt_lcao.h" // use hamilt::HamiltLCAO diff --git a/source/source_io/module_current/td_current_io.h b/source/source_io/module_current/td_current_io.h index 9ed7b6a1115..2a64362b032 100644 --- a/source/source_io/module_current/td_current_io.h +++ b/source/source_io/module_current/td_current_io.h @@ -1,7 +1,6 @@ #ifndef TD_CURRENT_IO_H #define TD_CURRENT_IO_H -#include "source_basis/module_nao/two_center_bundle.h" #include "source_estate/elecstate_lcao.h" #include "source_estate/module_dm/density_matrix.h" #include "source_psi/psi.h" diff --git a/source/source_io/module_energy/nscf_fermi_surf.h b/source/source_io/module_energy/nscf_fermi_surf.h index 66cfd44b81d..f2c04e7509e 100644 --- a/source/source_io/module_energy/nscf_fermi_surf.h +++ b/source/source_io/module_energy/nscf_fermi_surf.h @@ -4,7 +4,6 @@ #include "source_base/matrix.h" #include "source_cell/klist.h" #include "source_cell/unitcell.h" -#include "source_cell/parallel_kpoints.h" namespace ModuleIO { diff --git a/source/source_io/module_energy/write_bands.h b/source/source_io/module_energy/write_bands.h index bc1c6942b96..c87e050653f 100644 --- a/source/source_io/module_energy/write_bands.h +++ b/source/source_io/module_energy/write_bands.h @@ -4,7 +4,6 @@ #include "source_io/module_parameter/input_parameter.h" #include "source_base/matrix.h" #include "source_cell/klist.h" -#include "source_cell/parallel_kpoints.h" namespace ModuleIO { diff --git a/source/source_io/module_energy/write_eig_occ.h b/source/source_io/module_energy/write_eig_occ.h index 26b7be7394b..58c9831e5bd 100644 --- a/source/source_io/module_energy/write_eig_occ.h +++ b/source/source_io/module_energy/write_eig_occ.h @@ -2,7 +2,6 @@ #define WRITE_EIG_OCC_H #include "source_base/matrix.h" #include "source_cell/klist.h" -#include "source_cell/parallel_kpoints.h" namespace ModuleIO { diff --git a/source/source_io/module_energy/write_proj_band_lcao.h b/source/source_io/module_energy/write_proj_band_lcao.h index 480d184d5bc..af005ae5712 100644 --- a/source/source_io/module_energy/write_proj_band_lcao.h +++ b/source/source_io/module_energy/write_proj_band_lcao.h @@ -1,8 +1,6 @@ #ifndef WRITE_PROJ_BAND_LCAO_H #define WRITE_PROJ_BAND_LCAO_H -#include "source_basis/module_ao/ORB_read.h" #include "source_cell/klist.h" -#include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_cell/unitcell.h" #include "source_estate/elecstate.h" #include "source_psi/psi.h" diff --git a/source/source_io/module_hs/cal_r_overlap_R.cpp b/source/source_io/module_hs/cal_r_overlap_R.cpp index 2765fd18ef5..f75570a4116 100644 --- a/source/source_io/module_hs/cal_r_overlap_R.cpp +++ b/source/source_io/module_hs/cal_r_overlap_R.cpp @@ -1,5 +1,6 @@ #include "cal_r_overlap_R.h" +#include "single_R_io.h" #include "source_io/module_parameter/parameter.h" #include "source_base/parallel_reduce.h" #include "source_base/timer.h" diff --git a/source/source_io/module_hs/cal_r_overlap_R.h b/source/source_io/module_hs/cal_r_overlap_R.h index 9ae15c92768..2329cd4ea85 100644 --- a/source/source_io/module_hs/cal_r_overlap_R.h +++ b/source/source_io/module_hs/cal_r_overlap_R.h @@ -14,7 +14,6 @@ #include "source_lcao/center2_orb-orb11.h" #include "source_lcao/center2_orb-orb21.h" #include "source_lcao/center2_orb.h" -#include "single_R_io.h" #include #include diff --git a/source/source_io/module_hs/write_HS_R.h b/source/source_io/module_hs/write_HS_R.h index c6489a85b1a..27c059f5875 100644 --- a/source/source_io/module_hs/write_HS_R.h +++ b/source/source_io/module_hs/write_HS_R.h @@ -9,7 +9,6 @@ #include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 #ifdef __EXX -#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info #include "RI/global/Tensor.h" // for RI::Tensor #endif diff --git a/source/source_io/module_hs/write_HS_sparse.h b/source/source_io/module_hs/write_HS_sparse.h index f2e4560369c..8791a6bdafd 100644 --- a/source/source_io/module_hs/write_HS_sparse.h +++ b/source/source_io/module_hs/write_HS_sparse.h @@ -1,8 +1,6 @@ #ifndef WRITE_HS_SPARSE_H #define WRITE_HS_SPARSE_H -#include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_basis/module_ao/parallel_orbitals.h" #include "source_lcao/LCAO_HS_arrays.hpp" diff --git a/source/source_io/module_json/output_info.h b/source/source_io/module_json/output_info.h index 8ab42f73b48..f61c60c0b99 100644 --- a/source/source_io/module_json/output_info.h +++ b/source/source_io/module_json/output_info.h @@ -1,8 +1,6 @@ #ifndef OUTPUT_INFO_H #define OUTPUT_INFO_H -#include "source_cell/module_symmetry/symmetry.h" -#include "source_cell/atom_spec.h" #include "source_cell/unitcell.h" #include "source_base/matrix.h" diff --git a/source/source_io/module_json/readin_info.h b/source/source_io/module_json/readin_info.h index 35a7205487e..c4a598c999d 100644 --- a/source/source_io/module_json/readin_info.h +++ b/source/source_io/module_json/readin_info.h @@ -1,8 +1,5 @@ #ifndef READIN_INFO_H #define READIN_INFO_H -#include "source_cell/module_symmetry/symmetry.h" -#include "source_cell/atom_spec.h" -#include "source_cell/unitcell.h" diff --git a/source/source_io/module_ml/cal_mlkedf_descriptors.h b/source/source_io/module_ml/cal_mlkedf_descriptors.h index 9c28763da5a..2569d091c8a 100644 --- a/source/source_io/module_ml/cal_mlkedf_descriptors.h +++ b/source/source_io/module_ml/cal_mlkedf_descriptors.h @@ -2,7 +2,6 @@ #define CAL_MLKEDF_DESCRIPTORS_H #include -#include "source_base/global_function.h" #include "source_io/module_parameter/parameter.h" #include "source_basis/module_pw/pw_basis.h" #include "source_cell/unitcell.h" diff --git a/source/source_io/module_mulliken/output_mulliken.h b/source/source_io/module_mulliken/output_mulliken.h index 4b58a7a9b8f..2fd1bebd98b 100644 --- a/source/source_io/module_mulliken/output_mulliken.h +++ b/source/source_io/module_mulliken/output_mulliken.h @@ -7,7 +7,6 @@ #include "source_estate/elecstate_lcao.h" #include "source_io/module_mulliken/output_dmk.h" #include "source_io/module_mulliken/output_sk.h" -#include "source_base/formatter.h" #include "source_lcao/module_operator_lcao/dspin_lcao.h" #include "source_estate/module_dm/density_matrix.h" // mohan add 2025-11-04 diff --git a/source/source_io/module_output/print_info.h b/source/source_io/module_output/print_info.h index fcdb90704d8..f7917da9fb9 100644 --- a/source/source_io/module_output/print_info.h +++ b/source/source_io/module_output/print_info.h @@ -1,7 +1,6 @@ #ifndef PRINT_INFO_H #define PRINT_INFO_H -#include "source_base/timer.h" #include "source_basis/module_pw/pw_basis_k.h" #include "source_cell/klist.h" #include "source_cell/unitcell.h" diff --git a/source/source_io/module_parameter/input_conv.cpp b/source/source_io/module_parameter/input_conv.cpp index 41514706138..9d88945d88e 100644 --- a/source/source_io/module_parameter/input_conv.cpp +++ b/source/source_io/module_parameter/input_conv.cpp @@ -7,6 +7,7 @@ #include "source_estate/occupy.h" #include "source_hamilt/module_surchem/surchem.h" #include "source_hamilt/module_xc/exx_info.h" +#include "source_hamilt/module_xc/xc_functional.h" #include "../module_unk/berryphase.h" #include "source_io/module_parameter/parameter.h" #include "source_io/module_restart/restart.h" diff --git a/source/source_io/module_restart/restart.h b/source/source_io/module_restart/restart.h index 06dd5431726..4fe2787ea6c 100644 --- a/source/source_io/module_restart/restart.h +++ b/source/source_io/module_restart/restart.h @@ -3,7 +3,6 @@ #include #include "source_base/global_function.h" -#include "source_lcao/module_ri/abfs-vector3_order.h" #ifdef __EXX #include #endif diff --git a/source/source_io/module_restart/restart_exx_csr.h b/source/source_io/module_restart/restart_exx_csr.h index 2a40192e142..77d804d7f1c 100644 --- a/source/source_io/module_restart/restart_exx_csr.h +++ b/source/source_io/module_restart/restart_exx_csr.h @@ -1,7 +1,6 @@ #pragma once #include "source_lcao/module_ri/abfs-vector3_order.h" #include "source_cell/unitcell.h" -#include "source_lcao/module_ri/serialization_cereal.h" #include #include diff --git a/source/source_io/module_unk/unk_overlap_lcao.h b/source/source_io/module_unk/unk_overlap_lcao.h index 7abc37d3376..6c591f1c672 100644 --- a/source/source_io/module_unk/unk_overlap_lcao.h +++ b/source/source_io/module_unk/unk_overlap_lcao.h @@ -10,6 +10,7 @@ #include "source_basis/module_ao/parallel_orbitals.h" #include "source_cell/klist.h" #include "source_lcao/center2_orb-orb11.h" +#include "source_psi/psi.h" #include "source_lcao/center2_orb-orb21.h" #include "source_lcao/center2_orb.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/source_io/module_unk/unk_overlap_pw.h b/source/source_io/module_unk/unk_overlap_pw.h index fc6ebd9f5e0..37f48be7457 100644 --- a/source/source_io/module_unk/unk_overlap_pw.h +++ b/source/source_io/module_unk/unk_overlap_pw.h @@ -7,8 +7,6 @@ #include #include "source_base/complexmatrix.h" -#include "source_base/global_variable.h" -#include "source_base/parallel_reduce.h" #include "source_base/vector3.h" #include "source_basis/module_pw/pw_basis.h" #include "source_basis/module_pw/pw_basis_k.h" diff --git a/source/source_io/module_wannier/to_wannier90.cpp b/source/source_io/module_wannier/to_wannier90.cpp index e7a291dcfcf..7476710812a 100644 --- a/source/source_io/module_wannier/to_wannier90.cpp +++ b/source/source_io/module_wannier/to_wannier90.cpp @@ -1,5 +1,6 @@ #include "to_wannier90.h" +#include "source_base/parallel_common.h" #include "source_io/module_parameter/parameter.h" #include "source_base/math_integral.h" #include "source_base/math_polyint.h" diff --git a/source/source_io/module_wannier/to_wannier90.h b/source/source_io/module_wannier/to_wannier90.h index e303b88b586..058d3cef4de 100644 --- a/source/source_io/module_wannier/to_wannier90.h +++ b/source/source_io/module_wannier/to_wannier90.h @@ -10,14 +10,9 @@ #include "source_base/complexmatrix.h" #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/matrix3.h" #include "source_cell/klist.h" -#include "source_lcao/wavefunc_in_pw.h" -#include "source_psi/psi.h" -#include "source_base/parallel_common.h" -#include "source_base/parallel_reduce.h" class toWannier90 { diff --git a/source/source_io/module_wannier/to_wannier90_lcao.cpp b/source/source_io/module_wannier/to_wannier90_lcao.cpp index 8c1b8288d94..a26a8ce9033 100644 --- a/source/source_io/module_wannier/to_wannier90_lcao.cpp +++ b/source/source_io/module_wannier/to_wannier90_lcao.cpp @@ -1,5 +1,6 @@ #include "to_wannier90_lcao.h" +#include "source_lcao/module_ri/abfs-vector3_order.h" #include "source_io/module_parameter/parameter.h" #include "fR_overlap.h" #include "source_base/math_integral.h" diff --git a/source/source_io/module_wannier/to_wannier90_lcao.h b/source/source_io/module_wannier/to_wannier90_lcao.h index 38bdcea4ca5..9561fb4d457 100644 --- a/source/source_io/module_wannier/to_wannier90_lcao.h +++ b/source/source_io/module_wannier/to_wannier90_lcao.h @@ -1,13 +1,10 @@ #ifndef TOWannier90_LCAO_H #define TOWannier90_LCAO_H -#include "source_lcao/module_ri/abfs-vector3_order.h" #include "source_base/complexmatrix.h" #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/matrix3.h" -#include "source_base/parallel_reduce.h" #include "source_base/sph_bessel_recursive.h" #include "source_base/timer.h" #include "source_base/tool_quit.h" @@ -22,9 +19,7 @@ #include "source_lcao/center2_orb-orb11.h" #include "source_lcao/center2_orb-orb21.h" #include "source_lcao/center2_orb.h" -#include "source_lcao/wavefunc_in_pw.h" #include "source_psi/psi.h" -#include "../module_hs/single_R_io.h" #include "to_wannier90.h" #include @@ -37,9 +32,7 @@ #ifdef __LCAO #include "fR_overlap.h" -#include "source_lcao/module_ri/abfs-vector3_order.h" #include "source_base/math_lebedev_laikov.h" -#include "source_lcao/module_hcontainer/hcontainer.h" class Coordinate_3D { diff --git a/source/source_io/module_wannier/to_wannier90_lcao_in_pw.h b/source/source_io/module_wannier/to_wannier90_lcao_in_pw.h index fbbdcc80758..a6f204858f1 100644 --- a/source/source_io/module_wannier/to_wannier90_lcao_in_pw.h +++ b/source/source_io/module_wannier/to_wannier90_lcao_in_pw.h @@ -1,23 +1,15 @@ #ifndef TO_WANNIER90_LCAO_IN_PW_H #define TO_WANNIER90_LCAO_IN_PW_H -#include "source_lcao/module_ri/abfs-vector3_order.h" #include "source_base/complexmatrix.h" #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/matrix3.h" -#include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_base/vector3.h" #include "source_base/ylm.h" -#include "source_basis/module_ao/ORB_atomic_lm.h" -#include "source_basis/module_ao/ORB_gaunt_table.h" -#include "source_basis/module_ao/ORB_read.h" #include "source_cell/klist.h" -#include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_psi/psi.h" -#include "../module_hs/single_R_io.h" #include "to_wannier90.h" #include "to_wannier90_pw.h" diff --git a/source/source_io/module_wannier/to_wannier90_pw.h b/source/source_io/module_wannier/to_wannier90_pw.h index 757948b2073..f2f0c09bda5 100644 --- a/source/source_io/module_wannier/to_wannier90_pw.h +++ b/source/source_io/module_wannier/to_wannier90_pw.h @@ -11,7 +11,6 @@ #include "source_base/complexmatrix.h" #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/matrix3.h" #include "source_cell/klist.h" diff --git a/source/source_io/module_wf/get_wf_lcao.cpp b/source/source_io/module_wf/get_wf_lcao.cpp index 139b0364f62..d23dc085950 100644 --- a/source/source_io/module_wf/get_wf_lcao.cpp +++ b/source/source_io/module_wf/get_wf_lcao.cpp @@ -1,5 +1,6 @@ #include "get_wf_lcao.h" +#include "source_base/module_external/blacs_connector.h" #include "source_io/module_output/cube_io.h" #include "source_io/module_wf/write_wfc_pw.h" #include "source_base/memory.h" diff --git a/source/source_io/module_wf/read_wfc_pw.h b/source/source_io/module_wf/read_wfc_pw.h index 7e70b28eae0..fcd3023301d 100644 --- a/source/source_io/module_wf/read_wfc_pw.h +++ b/source/source_io/module_wf/read_wfc_pw.h @@ -1,8 +1,8 @@ #ifndef READ_WFC_PW_H #define READ_WFC_PW_H +#include "source_base/complexmatrix.h" #include "source_basis/module_pw/pw_basis_k.h" -#include "source_estate/module_charge/charge.h" #include diff --git a/source/source_io/test/cal_pLpR_test.cpp b/source/source_io/test/cal_pLpR_test.cpp index 99b394568e9..f9a6a2640a3 100644 --- a/source/source_io/test/cal_pLpR_test.cpp +++ b/source/source_io/test/cal_pLpR_test.cpp @@ -21,6 +21,9 @@ #include #include #include +#ifdef __MPI +#include +#endif #include "source_io/module_hs/cal_pLpR.h" #include "source_basis/module_nao/two_center_integrator.h" diff --git a/source/source_io/test/to_qo_test.cpp b/source/source_io/test/to_qo_test.cpp index 90a2bec960c..fcb9bb9b249 100644 --- a/source/source_io/test/to_qo_test.cpp +++ b/source/source_io/test/to_qo_test.cpp @@ -1,5 +1,6 @@ #include #include "source_io/module_qo/to_qo.h" +#include "source_io/module_output/output.h" #define private public #include "source_io/module_parameter/parameter.h" #undef private diff --git a/source/source_lcao/FORCE.h b/source/source_lcao/FORCE.h index 553cdfad769..e6f5f3735ce 100644 --- a/source/source_lcao/FORCE.h +++ b/source/source_lcao/FORCE.h @@ -2,14 +2,12 @@ #define LCAO_FORCE_H #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_basis/module_nao/two_center_bundle.h" #include "source_estate/elecstate.h" #include "source_estate/module_dm/density_matrix.h" #include "source_estate/module_pot/potential_new.h" #include "source_lcao/force_stress_arrays.h" -#include "source_lcao/module_deepks/LCAO_deepks.h" #include "source_psi/psi.h" #include "source_lcao/setup_deepks.h" diff --git a/source/source_lcao/FORCE_STRESS.cpp b/source/source_lcao/FORCE_STRESS.cpp index a15def000c2..f9f493eaf1d 100644 --- a/source/source_lcao/FORCE_STRESS.cpp +++ b/source/source_lcao/FORCE_STRESS.cpp @@ -1,5 +1,6 @@ #include "FORCE_STRESS.h" +#include "source_base/parallel_reduce.h" #include "source_lcao/module_dftu/dftu.h" //Quxin add for DFT+U on 20201029 #include "source_io/module_output/output_log.h" #include "source_io/module_parameter/parameter.h" @@ -16,6 +17,7 @@ #ifdef __MLALGO #include "source_lcao/module_deepks/LCAO_deepks.h" //caoyu add for deepks 2021-06-03 #include "source_lcao/module_deepks/LCAO_deepks_io.h" // mohan add 2024-07-22 +#include "source_lcao/module_deepks/deepks_force.h" #endif #include "source_lcao/module_operator_lcao/dftu_lcao.h" #include "source_lcao/module_operator_lcao/dspin_lcao.h" diff --git a/source/source_lcao/FORCE_STRESS.h b/source/source_lcao/FORCE_STRESS.h index 1265664996e..f23a03f786a 100644 --- a/source/source_lcao/FORCE_STRESS.h +++ b/source/source_lcao/FORCE_STRESS.h @@ -3,7 +3,6 @@ #include "FORCE.h" #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_pw/module_pwdft/forces.h" #include "source_pw/module_pwdft/stress_func.h" diff --git a/source/source_lcao/FORCE_gamma.cpp b/source/source_lcao/FORCE_gamma.cpp index dc8180a818c..56489287baf 100644 --- a/source/source_lcao/FORCE_gamma.cpp +++ b/source/source_lcao/FORCE_gamma.cpp @@ -7,6 +7,7 @@ #ifdef __MLALGO #include "source_lcao/module_deepks/LCAO_deepks.h" //caoyu add for deepks on 20210813 #include "source_lcao/module_deepks/LCAO_deepks_io.h" +#include "source_lcao/module_deepks/deepks_force.h" #endif #include "source_cell/module_neighbor/sltk_grid_driver.h" //GridD #include "source_estate/elecstate_lcao.h" diff --git a/source/source_lcao/FORCE_k.cpp b/source/source_lcao/FORCE_k.cpp index 7269a685582..ed07782da3c 100644 --- a/source/source_lcao/FORCE_k.cpp +++ b/source/source_lcao/FORCE_k.cpp @@ -18,6 +18,7 @@ #ifdef __MLALGO #include "source_lcao/module_deepks/LCAO_deepks.h" +#include "source_lcao/module_deepks/deepks_force.h" #endif #ifdef _OPENMP diff --git a/source/source_lcao/LCAO_domain.h b/source/source_lcao/LCAO_domain.h index cf4af3ace97..870ea4a4a19 100644 --- a/source/source_lcao/LCAO_domain.h +++ b/source/source_lcao/LCAO_domain.h @@ -2,7 +2,6 @@ #define LCAO_DOMAIN_H #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/vector3.h" #include "source_basis/module_nao/two_center_bundle.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/source_lcao/LCAO_set.h b/source/source_lcao/LCAO_set.h index f086bc50272..7ca4550a9ce 100644 --- a/source/source_lcao/LCAO_set.h +++ b/source/source_lcao/LCAO_set.h @@ -12,7 +12,6 @@ #include "source_basis/module_pw/pw_basis.h" #include "source_hamilt/module_surchem/surchem.h" #include "source_pw/module_pwdft/vl_pw.h" -#include "source_lcao/module_deepks/LCAO_deepks.h" #include "source_lcao/module_dftu/dftu.h" #include "source_lcao/setup_exx.h" #include "source_lcao/setup_deepks.h" diff --git a/source/source_lcao/hamilt_lcao.h b/source/source_lcao/hamilt_lcao.h index c57c284bc81..70f73dfaad6 100644 --- a/source/source_lcao/hamilt_lcao.h +++ b/source/source_lcao/hamilt_lcao.h @@ -3,7 +3,6 @@ #include "source_basis/module_nao/two_center_bundle.h" #include "source_cell/klist.h" -#include "source_cell/module_neighbor/sltk_atom_arrange.h" #include "source_estate/module_dm/density_matrix.h" #include "source_estate/module_pot/potential_new.h" #include "source_hamilt/hamilt.h" diff --git a/source/source_lcao/module_deepks/LCAO_deepks.h b/source/source_lcao/module_deepks/LCAO_deepks.h index a9c022d153d..75daa9ffad1 100644 --- a/source/source_lcao/module_deepks/LCAO_deepks.h +++ b/source/source_lcao/module_deepks/LCAO_deepks.h @@ -4,23 +4,10 @@ #ifdef __MLALGO #include "deepks_basic.h" -#include "deepks_check.h" -#include "deepks_descriptor.h" -#include "deepks_force.h" -#include "deepks_fpre.h" -#include "deepks_orbital.h" -#include "deepks_orbpre.h" #include "deepks_param.h" -#include "deepks_pdm.h" -#include "deepks_phialpha.h" -#include "deepks_spre.h" #include "deepks_vdelta.h" -#include "deepks_vdpre.h" -#include "deepks_vdrpre.h" #include "source_base/complexmatrix.h" -#include "source_base/intarray.h" #include "source_base/matrix.h" -#include "source_base/timer.h" #include "source_basis/module_ao/parallel_orbitals.h" #include "source_basis/module_nao/two_center_integrator.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/source_lcao/module_deepks/LCAO_deepks_interface.cpp b/source/source_lcao/module_deepks/LCAO_deepks_interface.cpp index 10480253e67..928617f4cdb 100644 --- a/source/source_lcao/module_deepks/LCAO_deepks_interface.cpp +++ b/source/source_lcao/module_deepks/LCAO_deepks_interface.cpp @@ -6,6 +6,15 @@ #include "source_base/tool_title.h" #include "source_estate/cal_dm.h" #include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_deepks/deepks_check.h" +#include "source_lcao/module_deepks/deepks_descriptor.h" +#include "source_lcao/module_deepks/deepks_fpre.h" +#include "source_lcao/module_deepks/deepks_orbital.h" +#include "source_lcao/module_deepks/deepks_orbpre.h" +#include "source_lcao/module_deepks/deepks_pdm.h" +#include "source_lcao/module_deepks/deepks_spre.h" +#include "source_lcao/module_deepks/deepks_vdpre.h" +#include "source_lcao/module_deepks/deepks_vdrpre.h" #include "source_lcao/module_hcontainer/hcontainer.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" #include "source_lcao/module_hcontainer/output_hcontainer.h" diff --git a/source/source_lcao/module_deepks/deepks_basic.h b/source/source_lcao/module_deepks/deepks_basic.h index a98db86a4a4..2a1d3180591 100644 --- a/source/source_lcao/module_deepks/deepks_basic.h +++ b/source/source_lcao/module_deepks/deepks_basic.h @@ -2,10 +2,7 @@ #define DEEPKS_BASIC_H #ifdef __MLALGO -#include "LCAO_deepks_io.h" #include "deepks_param.h" -#include "source_base/parallel_reduce.h" -#include "source_base/tool_title.h" #include "source_cell/unitcell.h" #include diff --git a/source/source_lcao/module_deepks/deepks_descriptor.h b/source/source_lcao/module_deepks/deepks_descriptor.h index 93e1e95559d..b6238df3f4c 100644 --- a/source/source_lcao/module_deepks/deepks_descriptor.h +++ b/source/source_lcao/module_deepks/deepks_descriptor.h @@ -4,8 +4,6 @@ #ifdef __MLALGO #include "deepks_param.h" -#include "source_base/intarray.h" -#include "source_base/timer.h" #include "source_cell/unitcell.h" #include diff --git a/source/source_lcao/module_deepks/deepks_force.h b/source/source_lcao/module_deepks/deepks_force.h index 3837d3a6d6d..ef5c0d8a949 100644 --- a/source/source_lcao/module_deepks/deepks_force.h +++ b/source/source_lcao/module_deepks/deepks_force.h @@ -9,9 +9,8 @@ #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_ao/parallel_orbitals.h" -#include "source_basis/module_nao/two_center_integrator.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_estate/module_dm/density_matrix.h" +#include "source_lcao/module_hcontainer/hcontainer.h" namespace DeePKS_domain { diff --git a/source/source_lcao/module_deepks/deepks_iterate.cpp b/source/source_lcao/module_deepks/deepks_iterate.cpp index 6aee04a6359..f5f9b399e51 100644 --- a/source/source_lcao/module_deepks/deepks_iterate.cpp +++ b/source/source_lcao/module_deepks/deepks_iterate.cpp @@ -2,6 +2,7 @@ #ifdef __MLALGO #include "deepks_iterate.h" +#include "source_io/module_parameter/parameter.h" void DeePKS_domain::iterate_ad1(const UnitCell& ucell, const Grid_Driver& GridD, diff --git a/source/source_lcao/module_deepks/deepks_iterate.h b/source/source_lcao/module_deepks/deepks_iterate.h index 69123f65220..887970935a6 100644 --- a/source/source_lcao/module_deepks/deepks_iterate.h +++ b/source/source_lcao/module_deepks/deepks_iterate.h @@ -1,7 +1,6 @@ #ifndef DEEPKS_ITER_H #define DEEPKS_ITER_H -#include "source_io/module_parameter/parameter.h" #ifdef __MLALGO diff --git a/source/source_lcao/module_deepks/deepks_orbital.cpp b/source/source_lcao/module_deepks/deepks_orbital.cpp index 90cfc15cc1c..77759858460 100644 --- a/source/source_lcao/module_deepks/deepks_orbital.cpp +++ b/source/source_lcao/module_deepks/deepks_orbital.cpp @@ -4,6 +4,7 @@ #include "deepks_orbital.h" #include "source_base/parallel_reduce.h" +#include "source_base/tool_title.h" #include "source_base/timer.h" template diff --git a/source/source_lcao/module_deepks/deepks_orbital.h b/source/source_lcao/module_deepks/deepks_orbital.h index 8f77e58fb16..3681838e18b 100644 --- a/source/source_lcao/module_deepks/deepks_orbital.h +++ b/source/source_lcao/module_deepks/deepks_orbital.h @@ -8,7 +8,6 @@ #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_ao/parallel_orbitals.h" -#include "source_estate/module_dm/density_matrix.h" namespace DeePKS_domain { diff --git a/source/source_lcao/module_deepks/deepks_orbpre.h b/source/source_lcao/module_deepks/deepks_orbpre.h index ec9dc1a1237..e1eb988f494 100644 --- a/source/source_lcao/module_deepks/deepks_orbpre.h +++ b/source/source_lcao/module_deepks/deepks_orbpre.h @@ -9,9 +9,7 @@ #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_ao/parallel_orbitals.h" -#include "source_basis/module_nao/two_center_integrator.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_estate/module_dm/density_matrix.h" #include "source_lcao/module_hcontainer/hcontainer.h" #include diff --git a/source/source_lcao/module_deepks/deepks_pdm.h b/source/source_lcao/module_deepks/deepks_pdm.h index 4b395475767..3339dc75e90 100644 --- a/source/source_lcao/module_deepks/deepks_pdm.h +++ b/source/source_lcao/module_deepks/deepks_pdm.h @@ -8,7 +8,6 @@ #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_ao/parallel_orbitals.h" -#include "source_estate/module_dm/density_matrix.h" #include "source_lcao/module_hcontainer/hcontainer.h" #include diff --git a/source/source_lcao/module_deepks/deepks_phialpha.h b/source/source_lcao/module_deepks/deepks_phialpha.h index 457c5f6e406..bd2298e31de 100644 --- a/source/source_lcao/module_deepks/deepks_phialpha.h +++ b/source/source_lcao/module_deepks/deepks_phialpha.h @@ -3,9 +3,6 @@ #ifdef __MLALGO -#include "source_base/complexmatrix.h" -#include "source_base/matrix.h" -#include "source_base/timer.h" #include "source_basis/module_ao/parallel_orbitals.h" #include "source_basis/module_nao/two_center_integrator.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" diff --git a/source/source_lcao/module_deepks/deepks_vdelta.h b/source/source_lcao/module_deepks/deepks_vdelta.h index 9c7649a6338..6df6f9b7832 100644 --- a/source/source_lcao/module_deepks/deepks_vdelta.h +++ b/source/source_lcao/module_deepks/deepks_vdelta.h @@ -2,7 +2,6 @@ #define DEEPKS_VDELTA_H #ifdef __MLALGO -#include "source_base/complexmatrix.h" #include "source_base/matrix.h" #include "source_basis/module_ao/parallel_orbitals.h" diff --git a/source/source_lcao/module_deepks/deepks_vdpre.h b/source/source_lcao/module_deepks/deepks_vdpre.h index bf096a4267d..2b57dc8b3c8 100644 --- a/source/source_lcao/module_deepks/deepks_vdpre.h +++ b/source/source_lcao/module_deepks/deepks_vdpre.h @@ -9,7 +9,6 @@ #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_ao/parallel_orbitals.h" -#include "source_basis/module_nao/two_center_integrator.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_lcao/module_hcontainer/hcontainer.h" diff --git a/source/source_lcao/module_deepks/deepks_vdrpre.h b/source/source_lcao/module_deepks/deepks_vdrpre.h index fc7975ce498..c22eb408fa7 100644 --- a/source/source_lcao/module_deepks/deepks_vdrpre.h +++ b/source/source_lcao/module_deepks/deepks_vdrpre.h @@ -9,7 +9,6 @@ #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_ao/parallel_orbitals.h" -#include "source_basis/module_nao/two_center_integrator.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_lcao/module_hcontainer/hcontainer.h" diff --git a/source/source_lcao/module_deepks/test/LCAO_deepks_test.cpp b/source/source_lcao/module_deepks/test/LCAO_deepks_test.cpp index 517b9f99402..071605bf0a3 100644 --- a/source/source_lcao/module_deepks/test/LCAO_deepks_test.cpp +++ b/source/source_lcao/module_deepks/test/LCAO_deepks_test.cpp @@ -1,4 +1,15 @@ #include "LCAO_deepks_test.h" +#include "source_lcao/module_deepks/deepks_check.h" +#include "source_lcao/module_deepks/deepks_descriptor.h" +#include "source_lcao/module_deepks/deepks_force.h" +#include "source_lcao/module_deepks/deepks_fpre.h" +#include "source_lcao/module_deepks/deepks_orbpre.h" +#include "source_lcao/module_deepks/deepks_orbital.h" +#include "source_lcao/module_deepks/deepks_pdm.h" +#include "source_lcao/module_deepks/deepks_phialpha.h" +#include "source_lcao/module_deepks/deepks_spre.h" +#include "source_lcao/module_deepks/deepks_vdpre.h" +#include "source_lcao/module_deepks/deepks_vdrpre.h" #define private public #include "source_io/module_parameter/parameter.h" diff --git a/source/source_lcao/module_deepks/test/LCAO_deepks_test.h b/source/source_lcao/module_deepks/test/LCAO_deepks_test.h index 6d819898f83..d90d881eff9 100644 --- a/source/source_lcao/module_deepks/test/LCAO_deepks_test.h +++ b/source/source_lcao/module_deepks/test/LCAO_deepks_test.h @@ -5,6 +5,7 @@ #include "source_cell/module_neighbor/sltk_atom_arrange.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_cell/unitcell.h" +#include "source_estate/module_dm/density_matrix.h" //#include "parallel_orbitals.h" #include "../LCAO_deepks.h" diff --git a/source/source_lcao/module_deltaspin/cal_mw.cpp b/source/source_lcao/module_deltaspin/cal_mw.cpp index 0482f8f0709..563f506f3b8 100644 --- a/source/source_lcao/module_deltaspin/cal_mw.cpp +++ b/source/source_lcao/module_deltaspin/cal_mw.cpp @@ -2,6 +2,7 @@ #include "source_base/matrix.h" #include "source_base/name_angular.h" +#include "source_base/parallel_reduce.h" #include "source_base/tool_title.h" #include "source_base/timer.h" #include "source_pw/module_pwdft/onsite_proj.h" diff --git a/source/source_lcao/module_dftu/dftu.h b/source/source_lcao/module_dftu/dftu.h index 56d213386d7..9fa468aca5c 100644 --- a/source/source_lcao/module_dftu/dftu.h +++ b/source/source_lcao/module_dftu/dftu.h @@ -5,7 +5,6 @@ #include "source_cell/unitcell.h" #include "source_basis/module_ao/parallel_orbitals.h" #ifdef __LCAO -#include "source_estate/module_charge/charge_mixing.h" #include "source_hamilt/hamilt.h" #include "source_lcao/module_hcontainer/hcontainer.h" #include "source_estate/module_dm/density_matrix.h" diff --git a/source/source_lcao/module_gint/gint_env_gamma.h b/source/source_lcao/module_gint/gint_env_gamma.h index f0c54d8bb4c..58fc093bb7e 100644 --- a/source/source_lcao/module_gint/gint_env_gamma.h +++ b/source/source_lcao/module_gint/gint_env_gamma.h @@ -2,7 +2,6 @@ #include #include -#include "source_lcao/module_hcontainer/hcontainer.h" #include "gint.h" #include "gint_info.h" diff --git a/source/source_lcao/module_gint/gint_env_k.h b/source/source_lcao/module_gint/gint_env_k.h index afa9b8f8ee0..3627e443d61 100644 --- a/source/source_lcao/module_gint/gint_env_k.h +++ b/source/source_lcao/module_gint/gint_env_k.h @@ -2,7 +2,6 @@ #include #include -#include "source_lcao/module_hcontainer/hcontainer.h" #include "gint.h" #include "gint_info.h" diff --git a/source/source_lcao/module_gint/gint_helper.h b/source/source_lcao/module_gint/gint_helper.h index abbc7c3a27b..e1efce01f11 100644 --- a/source/source_lcao/module_gint/gint_helper.h +++ b/source/source_lcao/module_gint/gint_helper.h @@ -3,7 +3,6 @@ #include #include #include "gint_type.h" -#include "source_base/timer.h" namespace ModuleGint { diff --git a/source/source_lcao/module_gint/gint_info.h b/source/source_lcao/module_gint/gint_info.h index e772c2d797f..fc8b23c59e5 100644 --- a/source/source_lcao/module_gint/gint_info.h +++ b/source/source_lcao/module_gint/gint_info.h @@ -5,8 +5,8 @@ #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_cell/unitcell.h" #include "source_cell/atom_spec.h" -#include "source_io/module_parameter/parameter.h" #include "source_lcao/module_hcontainer/hcontainer.h" +#include "source_io/module_parameter/parameter.h" #include "gint_helper.h" #include "big_grid.h" #include "gint_atom.h" diff --git a/source/source_lcao/module_gint/gint_rho_gpu.h b/source/source_lcao/module_gint/gint_rho_gpu.h index 5e6df025a4c..10e6e9b9dad 100644 --- a/source/source_lcao/module_gint/gint_rho_gpu.h +++ b/source/source_lcao/module_gint/gint_rho_gpu.h @@ -5,7 +5,6 @@ #include "source_lcao/module_hcontainer/hcontainer.h" #include "gint.h" #include "gint_info.h" -#include "source_lcao/module_gint/kernel/cuda_mem_wrapper.h" namespace ModuleGint { diff --git a/source/source_lcao/module_gint/gint_vl_gpu.h b/source/source_lcao/module_gint/gint_vl_gpu.h index 776ef963445..6e90805fe91 100644 --- a/source/source_lcao/module_gint/gint_vl_gpu.h +++ b/source/source_lcao/module_gint/gint_vl_gpu.h @@ -5,7 +5,6 @@ #include "source_lcao/module_hcontainer/hcontainer.h" #include "gint.h" #include "gint_info.h" -#include "source_lcao/module_gint/kernel/cuda_mem_wrapper.h" namespace ModuleGint { diff --git a/source/source_lcao/module_gint/kernel/gint_gpu_vars.h b/source/source_lcao/module_gint/kernel/gint_gpu_vars.h index e37b63ffdbd..c9fb7e3f14c 100644 --- a/source/source_lcao/module_gint/kernel/gint_gpu_vars.h +++ b/source/source_lcao/module_gint/kernel/gint_gpu_vars.h @@ -2,11 +2,8 @@ #include #include "set_const_mem.cuh" -#include "source_base/ylm.h" #include "source_cell/unitcell.h" -#include "source_cell/atom_spec.h" #include "source_lcao/module_gint/biggrid_info.h" -#include "gint_helper.cuh" namespace ModuleGint { diff --git a/source/source_lcao/module_gint/kernel/phi_operator_gpu.h b/source/source_lcao/module_gint/kernel/phi_operator_gpu.h index b24f26527ea..188129db679 100644 --- a/source/source_lcao/module_gint/kernel/phi_operator_gpu.h +++ b/source/source_lcao/module_gint/kernel/phi_operator_gpu.h @@ -3,7 +3,6 @@ #include #include "source_lcao/module_gint/batch_biggrid.h" -#include "gint_helper.cuh" #include "gint_gpu_vars.h" #include "cuda_mem_wrapper.h" diff --git a/source/source_lcao/module_gint/meshgrid_info.h b/source/source_lcao/module_gint/meshgrid_info.h index a8307b10483..6f91278756b 100644 --- a/source/source_lcao/module_gint/meshgrid_info.h +++ b/source/source_lcao/module_gint/meshgrid_info.h @@ -1,7 +1,6 @@ #pragma once #include "gint_type.h" -#include "source_cell/unitcell.h" namespace ModuleGint { diff --git a/source/source_lcao/module_hcontainer/transfer.h b/source/source_lcao/module_hcontainer/transfer.h index 5b274cbad3f..deea0f5d7ce 100644 --- a/source/source_lcao/module_hcontainer/transfer.h +++ b/source/source_lcao/module_hcontainer/transfer.h @@ -4,7 +4,6 @@ #include #include -#include "source_base/vector3.h" #include "./hcontainer.h" #ifdef __MPI diff --git a/source/source_lcao/module_lr/operator_casida/operator_lr_diag.h b/source/source_lcao/module_lr/operator_casida/operator_lr_diag.h index 7f0f656df77..e29ca438b8b 100644 --- a/source/source_lcao/module_lr/operator_casida/operator_lr_diag.h +++ b/source/source_lcao/module_lr/operator_casida/operator_lr_diag.h @@ -1,9 +1,7 @@ #pragma once -#include "source_lcao/module_lr/utils/lr_util.h" #include "source_base/kernels/math_kernel_op.h" #include "source_hamilt/operator.h" #ifdef __MPI -#include "source_base/parallel_common.h" #endif namespace LR { diff --git a/source/source_lcao/module_lr/utils/lr_util.h b/source/source_lcao/module_lr/utils/lr_util.h index fa7dce0b9bf..f2764fe179c 100644 --- a/source/source_lcao/module_lr/utils/lr_util.h +++ b/source/source_lcao/module_lr/utils/lr_util.h @@ -7,7 +7,6 @@ #include "source_base/parallel_2d.h" #include "source_psi/psi.h" #include -#include "source_basis/module_pw/pw_basis.h" using DAT = container::DataType; using DEV = container::DeviceType; diff --git a/source/source_lcao/module_operator_lcao/deepks_lcao.cpp b/source/source_lcao/module_operator_lcao/deepks_lcao.cpp index 040de01e0bd..8c93965cdb0 100644 --- a/source/source_lcao/module_operator_lcao/deepks_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/deepks_lcao.cpp @@ -4,6 +4,8 @@ #include "source_base/tool_title.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_lcao/module_deepks/LCAO_deepks.h" +#include "source_lcao/module_deepks/deepks_descriptor.h" +#include "source_lcao/module_deepks/deepks_pdm.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" #include "source_io/module_parameter/parameter.h" #ifdef _OPENMP diff --git a/source/source_lcao/module_operator_lcao/op_exx_lcao.h b/source/source_lcao/module_operator_lcao/op_exx_lcao.h index 628cfb4a1a0..fdbc3743431 100644 --- a/source/source_lcao/module_operator_lcao/op_exx_lcao.h +++ b/source/source_lcao/module_operator_lcao/op_exx_lcao.h @@ -7,6 +7,7 @@ #include #include "operator_lcao.h" #include "source_cell/klist.h" +#include "source_hamilt/module_xc/exx_info.h" namespace hamilt { diff --git a/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.cpp b/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.cpp index 3836811b6cd..ed841346a37 100644 --- a/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.cpp @@ -8,6 +8,7 @@ #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_estate/module_pot/H_TDDFT_pw.h" #include "source_lcao/center2_orb-orb11.h" +#include "source_lcao/module_rt/td_info.h" #include "source_lcao/spar_hsr.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" diff --git a/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.h b/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.h index 25f3c65c351..f0eba68036a 100644 --- a/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.h +++ b/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.h @@ -5,7 +5,6 @@ #include "source_cell/klist.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_lcao/module_hcontainer/hcontainer.h" -#include "source_lcao/module_rt/td_info.h" #include "operator_lcao.h" #include diff --git a/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.cpp b/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.cpp index 41d72bdf670..a4be96b0b3e 100644 --- a/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.cpp @@ -3,9 +3,11 @@ #include "source_base/timer.h" #include "source_base/tool_title.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" +#include "source_estate/module_pot/H_TDDFT_pw.h" #include "source_io/module_parameter/parameter.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" #include "source_lcao/module_operator_lcao/operator_lcao.h" +#include "source_lcao/module_rt/td_info.h" #include "source_lcao/module_rt/snap_psibeta_half_tddft.h" #ifdef __CUDA #include "source_base/module_device/device.h" diff --git a/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.h b/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.h index 18228b1040e..67a1c11f28d 100644 --- a/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.h +++ b/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.h @@ -3,10 +3,8 @@ #include "source_basis/module_ao/parallel_orbitals.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_cell/unitcell.h" -#include "source_estate/module_pot/H_TDDFT_pw.h" #include "source_lcao/module_operator_lcao/operator_lcao.h" #include "source_lcao/module_hcontainer/hcontainer.h" -#include "source_lcao/module_rt/td_info.h" #include diff --git a/source/source_lcao/module_operator_lcao/td_pot_hybrid.cpp b/source/source_lcao/module_operator_lcao/td_pot_hybrid.cpp index 634ac464cf7..ba16cfa0325 100644 --- a/source/source_lcao/module_operator_lcao/td_pot_hybrid.cpp +++ b/source/source_lcao/module_operator_lcao/td_pot_hybrid.cpp @@ -3,7 +3,9 @@ #include "source_base/timer.h" #include "source_base/tool_title.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" +#include "source_estate/module_pot/H_TDDFT_pw.h" #include "source_lcao/module_operator_lcao/operator_lcao.h" +#include "source_lcao/module_rt/td_info.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" template diff --git a/source/source_lcao/module_operator_lcao/td_pot_hybrid.h b/source/source_lcao/module_operator_lcao/td_pot_hybrid.h index bdb53f3480b..751e94f3fe0 100644 --- a/source/source_lcao/module_operator_lcao/td_pot_hybrid.h +++ b/source/source_lcao/module_operator_lcao/td_pot_hybrid.h @@ -9,8 +9,6 @@ #include "source_lcao/module_hcontainer/hcontainer.h" #include #include "source_io/module_hs/cal_r_overlap_R.h" -#include "source_lcao/module_rt/td_info.h" -#include "source_estate/module_pot/H_TDDFT_pw.h" namespace hamilt { diff --git a/source/source_lcao/module_rdmft/rdmft.h b/source/source_lcao/module_rdmft/rdmft.h index 8e9fb71ced9..c11b504ebd6 100644 --- a/source/source_lcao/module_rdmft/rdmft.h +++ b/source/source_lcao/module_rdmft/rdmft.h @@ -5,7 +5,6 @@ #ifndef RDMFT_H #define RDMFT_H -#include "source_io/module_parameter/parameter.h" #include "source_psi/psi.h" #include "source_base/matrix.h" diff --git a/source/source_lcao/module_rdmft/rdmft_tools.h b/source/source_lcao/module_rdmft/rdmft_tools.h index 01b433f5959..56517ff4dad 100644 --- a/source/source_lcao/module_rdmft/rdmft_tools.h +++ b/source/source_lcao/module_rdmft/rdmft_tools.h @@ -6,7 +6,6 @@ #define RDMFT_TOOLS_H #include "source_cell/klist.h" -#include "source_io/module_parameter/parameter.h" // use PARAM #include "source_psi/psi.h" #include "source_base/matrix.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" @@ -16,7 +15,6 @@ #include "source_base/module_external/scalapack_connector.h" #include "source_base/parallel_2d.h" #include "source_basis/module_ao/parallel_orbitals.h" -#include "source_base/parallel_reduce.h" #include "source_estate/module_dm/cal_dm_psi.h" #include "source_estate/module_dm/density_matrix.h" @@ -26,7 +24,6 @@ #ifdef __EXX -#include "source_lcao/module_ri/RI_2D_Comm.h" #include "source_lcao/module_ri/Exx_LRI.h" // there are some operator reload to print data in different formats #endif diff --git a/source/source_lcao/module_ri/Exx_LRI_interface.h b/source/source_lcao/module_ri/Exx_LRI_interface.h index 7a0cab7a58f..6f6f9569803 100644 --- a/source/source_lcao/module_ri/Exx_LRI_interface.h +++ b/source/source_lcao/module_ri/Exx_LRI_interface.h @@ -2,6 +2,7 @@ #define EXX_LRI_INTERFACE_H #include "Exx_LRI.h" +#include "source_estate/module_charge/charge_mixing.h" #include "source_lcao/module_ri/Mix_DMk_2D.h" #include "source_lcao/module_ri/module_exx_symmetry/symmetry_rotation.h" #include "source_estate/module_dm/density_matrix.h" // mohan add 2025-11-04 diff --git a/source/source_lcao/module_ri/Mix_DMk_2D.h b/source/source_lcao/module_ri/Mix_DMk_2D.h index 2f24471d91c..aefe1b297bd 100644 --- a/source/source_lcao/module_ri/Mix_DMk_2D.h +++ b/source/source_lcao/module_ri/Mix_DMk_2D.h @@ -9,7 +9,6 @@ #include "Mix_Matrix.h" #include "source_base/module_mixing/mixing.h" #include "source_base/matrix.h" -#include "source_base/complexmatrix.h" #include diff --git a/source/source_lcao/module_ri/RI_Util.h b/source/source_lcao/module_ri/RI_Util.h index f683a4f416b..48a6fe196c5 100644 --- a/source/source_lcao/module_ri/RI_Util.h +++ b/source/source_lcao/module_ri/RI_Util.h @@ -6,8 +6,8 @@ #ifndef RI_UTIL_H #define RI_UTIL_H -#include "source_hamilt/module_xc/exx_info.h" #include "source_cell/klist.h" +#include "source_lcao/module_ri/conv_coulomb_pot_k.h" #include #include diff --git a/source/source_lcao/module_ri/RPA_LRI.h b/source/source_lcao/module_ri/RPA_LRI.h index 00792a13e11..7dfbdfdf731 100644 --- a/source/source_lcao/module_ri/RPA_LRI.h +++ b/source/source_lcao/module_ri/RPA_LRI.h @@ -6,7 +6,6 @@ #ifndef RPA_LRI_H #define RPA_LRI_H -#include "source_esolver/esolver_ks_lcao.h" #include "LRI_CV.h" // #include "module_xc/exx_info.h" // #include "source_basis/module_ao/ORB_atomic_lm.h" diff --git a/source/source_lcao/module_ri/abfs.h b/source/source_lcao/module_ri/abfs.h index ecf8977be95..1d80ca0a69c 100644 --- a/source/source_lcao/module_ri/abfs.h +++ b/source/source_lcao/module_ri/abfs.h @@ -2,8 +2,6 @@ #define ABFS_H #include "../../source_base/vector3.h" -#include "../../source_base/matrix.h" -#include "exx_abfs.h" #include #include diff --git a/source/source_lcao/module_ri/ewald_Vq.h b/source/source_lcao/module_ri/ewald_Vq.h index 4f53a80a704..7a125b4bcc3 100644 --- a/source/source_lcao/module_ri/ewald_Vq.h +++ b/source/source_lcao/module_ri/ewald_Vq.h @@ -11,7 +11,7 @@ #include "source_base/element_basis_index.h" #include "source_cell/klist.h" #include "source_hamilt/module_xc/exx_info.h" -#include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_ri/conv_coulomb_pot_k.h" #include #include diff --git a/source/source_lcao/module_ri/exx_abfs-io.h b/source/source_lcao/module_ri/exx_abfs-io.h index 354eb78b183..665d975d61d 100644 --- a/source/source_lcao/module_ri/exx_abfs-io.h +++ b/source/source_lcao/module_ri/exx_abfs-io.h @@ -6,8 +6,6 @@ #include #include #include "../../source_basis/module_ao/ORB_atomic_lm.h" -#include "../../source_base/matrix.h" -#include "../../source_base/element_basis_index.h" #include "source_cell/klist.h" #ifdef __MPI #include "mpi.h" diff --git a/source/source_lcao/module_ri/exx_abfs.h b/source/source_lcao/module_ri/exx_abfs.h index 8a78307b368..0c5c84f1628 100644 --- a/source/source_lcao/module_ri/exx_abfs.h +++ b/source/source_lcao/module_ri/exx_abfs.h @@ -7,10 +7,6 @@ using std::vector; using std::map; #include -#include "../../source_basis/module_ao/ORB_atomic_lm.h" -#include "../../source_base/element_basis_index.h" -#include "../../source_base/matrix.h" -#include "../../source_base/vector3.h" class Exx_Abfs { diff --git a/source/source_lcao/module_ri/exx_rotate_abfs.h b/source/source_lcao/module_ri/exx_rotate_abfs.h index 7f546f4183f..cd53ef7bf68 100644 --- a/source/source_lcao/module_ri/exx_rotate_abfs.h +++ b/source/source_lcao/module_ri/exx_rotate_abfs.h @@ -5,7 +5,6 @@ #include "LRI_CV.h" // #include "module_xc/exx_info.h" // #include "module_basis/module_ao/ORB_atomic_lm.h" -#include "source_base/matrix.h" #include "Exx_LRI.h" // #include "module_ri/Exx_LRI.h" // #include diff --git a/source/source_lcao/module_ri/gaussian_abfs.h b/source/source_lcao/module_ri/gaussian_abfs.h index c6d032e98d5..312598cabf8 100644 --- a/source/source_lcao/module_ri/gaussian_abfs.h +++ b/source/source_lcao/module_ri/gaussian_abfs.h @@ -6,9 +6,7 @@ #ifndef GAUSSIAN_ABFS_H #define GAUSSIAN_ABFS_H -#include "conv_coulomb_pot_k.h" #include "source_basis/module_ao/ORB_atomic_lm.h" -#include "source_basis/module_ao/ORB_gaunt_table.h" //#include "source_basis/module_pw/pw_basis_k.h" #include "source_cell/klist.h" diff --git a/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector.h b/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector.h index e2ff540d734..4563307c3e7 100644 --- a/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector.h +++ b/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector.h @@ -4,7 +4,6 @@ #include #include "source_lcao/module_ri/abfs-vector3_order.h" #include "source_base/matrix3.h" -#include "source_cell/unitcell.h" #include "source_cell/module_symmetry/symmetry.h" #include "source_cell/klist.h" diff --git a/source/source_lcao/module_ri/test/dm_mixing_test.cpp b/source/source_lcao/module_ri/test/dm_mixing_test.cpp index cf0250a0251..3d8f3308a37 100644 --- a/source/source_lcao/module_ri/test/dm_mixing_test.cpp +++ b/source/source_lcao/module_ri/test/dm_mixing_test.cpp @@ -1,5 +1,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "source_base/complexmatrix.h" #include "source_base/module_mixing/broyden_mixing.h" #include "source_lcao/module_ri/Mix_DMk_2D.h" #include "source_lcao/module_ri/Mix_Matrix.h" diff --git a/source/source_lcao/module_rt/evolve_elec.cpp b/source/source_lcao/module_rt/evolve_elec.cpp index ede4365258e..491f5c63e0f 100644 --- a/source/source_lcao/module_rt/evolve_elec.cpp +++ b/source/source_lcao/module_rt/evolve_elec.cpp @@ -10,9 +10,9 @@ namespace module_rt { template -Evolve_elec::Evolve_elec() {}; +Evolve_elec::Evolve_elec(){}; template -Evolve_elec::~Evolve_elec() {}; +Evolve_elec::~Evolve_elec(){}; template ct::DeviceType Evolve_elec::ct_device_type = ct::DeviceTypeToEnum::value; diff --git a/source/source_lcao/module_rt/evolve_elec.h b/source/source_lcao/module_rt/evolve_elec.h index cabd57e947d..bd6420f5ca2 100644 --- a/source/source_lcao/module_rt/evolve_elec.h +++ b/source/source_lcao/module_rt/evolve_elec.h @@ -4,10 +4,8 @@ #include "source_base/global_function.h" #include "source_base/global_variable.h" #include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor -#include "source_base/module_container/ATen/core/tensor_map.h" // TensorMap #include "source_base/module_device/device.h" // base_device #include "source_base/module_device/memory_op.h" // memory operations -#include "source_base/module_external/scalapack_connector.h" // Cpxgemr2d #include "source_esolver/esolver_ks_lcao.h" #include "source_esolver/esolver_ks_lcao_tddft.h" #include "source_lcao/hamilt_lcao.h" diff --git a/source/source_lcao/module_rt/evolve_psi.cpp b/source/source_lcao/module_rt/evolve_psi.cpp index 5f3b1556057..162f64e4574 100644 --- a/source/source_lcao/module_rt/evolve_psi.cpp +++ b/source/source_lcao/module_rt/evolve_psi.cpp @@ -87,14 +87,14 @@ void evolve_psi(const int nband, { /// @brief solve the propagation equation /// @input Stmp, Htmp, psi_k_laststep - /// @output psi_k + /// @output psi_k if (use_td_moving_gauge) { solve_propagation(pv, nband, nlocal, PARAM.inp.td_dt, Stmp, Htmp, P_k, psi_k_laststep, psi_k); } else { - solve_propagation(pv, nband, nlocal, PARAM.inp.td_dt, Stmp, Htmp, psi_k_laststep, psi_k); + solve_propagation(pv, nband, nlocal, PARAM.inp.td_dt, Stmp, Htmp, psi_k_laststep, psi_k); } } diff --git a/source/source_lcao/module_rt/evolve_psi.h b/source/source_lcao/module_rt/evolve_psi.h index 287b47e10c0..c723b6fba75 100644 --- a/source/source_lcao/module_rt/evolve_psi.h +++ b/source/source_lcao/module_rt/evolve_psi.h @@ -7,7 +7,6 @@ #define ELEC_PSI_H #include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor -#include "source_base/module_container/ATen/core/tensor_map.h" // TensorMap #include "source_basis/module_ao/parallel_orbitals.h" #include "source_lcao/hamilt_lcao.h" #include "source_lcao/module_rt/evolve_elec.h" diff --git a/source/source_lcao/module_rt/solve_propagation.cpp b/source/source_lcao/module_rt/solve_propagation.cpp index f17837bf9a7..aa0a9f38371 100644 --- a/source/source_lcao/module_rt/solve_propagation.cpp +++ b/source/source_lcao/module_rt/solve_propagation.cpp @@ -11,13 +11,13 @@ namespace module_rt { #ifdef __MPI void solve_propagation(const Parallel_Orbitals* pv, - const int nband, - const int nlocal, - const double dt, - const std::complex* Stmp, - const std::complex* Htmp, - const std::complex* psi_k_laststep, - std::complex* psi_k) + const int nband, + const int nlocal, + const double dt, + const std::complex* Stmp, + const std::complex* Htmp, + const std::complex* psi_k_laststep, + std::complex* psi_k) { // (1) init A,B and copy Htmp to A & B std::complex* operator_A = new std::complex[pv->nloc]; @@ -29,7 +29,7 @@ void solve_propagation(const Parallel_Orbitals* pv, BlasConnector::copy(pv->nloc, Htmp, 1, operator_B, 1); const double dt_au = dt / ModuleBase::AU_to_FS; - + // ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> // (2) compute operator_A & operator_B by GEADD // operator_A = Stmp + i*para * Htmp; beta2 = para = 0.25 * dt @@ -44,25 +44,25 @@ void solve_propagation(const Parallel_Orbitals* pv, // (3) b = operator_B @ psi_k_laststep std::complex* tmp_b = new std::complex[pv->nloc_wfc]; ScalapackConnector::gemm('N', - 'N', - nlocal, - nband, - nlocal, - 1.0, - operator_B, - 1, - 1, - pv->desc, - psi_k_laststep, - 1, - 1, - pv->desc_wfc, - 0.0, - tmp_b, - 1, - 1, - pv->desc_wfc); - // get ipiv + 'N', + nlocal, + nband, + nlocal, + 1.0, + operator_B, + 1, + 1, + pv->desc, + psi_k_laststep, + 1, + 1, + pv->desc_wfc, + 0.0, + tmp_b, + 1, + 1, + pv->desc_wfc); + //get ipiv int* ipiv = new int[pv->nloc]; int info = 0; // (4) solve Ac=b @@ -119,21 +119,21 @@ void solve_propagation(const Parallel_Orbitals* pv, ScalapackConnector::gemm('N', 'N', nlocal, - nband, + nband, nlocal, 1.0, operator_B, - 1, - 1, - pv->desc, + 1, + 1, + pv->desc, psi_k_laststep, 1, 1, pv->desc_wfc, 0.0, - tmp_b, - 1, - 1, + tmp_b, + 1, + 1, pv->desc_wfc); // get ipiv @@ -143,13 +143,13 @@ void solve_propagation(const Parallel_Orbitals* pv, // (4) solve Ac=b ScalapackConnector::gesv(nlocal, nband, operator_A, 1, 1, pv->desc, ipiv, tmp_b, 1, 1, pv->desc_wfc, &info); - // copy solution to psi_k + //copy solution to psi_k BlasConnector::copy(pv->nloc_wfc, tmp_b, 1, psi_k, 1); - delete[] tmp_b; - delete[] ipiv; - delete[] operator_A; - delete[] operator_B; + delete []tmp_b; + delete []ipiv; + delete []operator_A; + delete []operator_B; } #endif // __MPI } // namespace module_rt diff --git a/source/source_lcao/module_rt/solve_propagation.h b/source/source_lcao/module_rt/solve_propagation.h index 23a38ac25c0..d39c8e1210d 100644 --- a/source/source_lcao/module_rt/solve_propagation.h +++ b/source/source_lcao/module_rt/solve_propagation.h @@ -2,32 +2,31 @@ #define TD_SOLVE_PROPAGATION_H #include "source_basis/module_ao/parallel_orbitals.h" - #include namespace module_rt { #ifdef __MPI /** - * @brief solve propagation equation A@c(t+dt) = B@c(t) - * - * @param[in] pv information of parallel - * @param[in] nband number of bands - * @param[in] nlocal number of orbitals - * @param[in] dt time interval - * @param[in] Stmp overlap matrix S(t+dt/2) - * @param[in] Htmp H(t+dt/2) - * @param[in] psi_k_laststep psi of last step - * @param[out] psi_k psi of this step - */ +* @brief solve propagation equation A@c(t+dt) = B@c(t) +* +* @param[in] pv information of parallel +* @param[in] nband number of bands +* @param[in] nlocal number of orbitals +* @param[in] dt time interval +* @param[in] Stmp overlap matrix S(t+dt/2) +* @param[in] Htmp H(t+dt/2) +* @param[in] psi_k_laststep psi of last step +* @param[out] psi_k psi of this step +*/ void solve_propagation(const Parallel_Orbitals* pv, - const int nband, - const int nlocal, - const double dt, - const std::complex* Stmp, - const std::complex* Htmp, - const std::complex* psi_k_laststep, - std::complex* psi_k); + const int nband, + const int nlocal, + const double dt, + const std::complex* Stmp, + const std::complex* Htmp, + const std::complex* psi_k_laststep, + std::complex* psi_k); /** * @brief solve propagation equation A@c(t+dt) = B@c(t) with moving spatial gauge P_k diff --git a/source/source_lcao/module_rt/td_folding.h b/source/source_lcao/module_rt/td_folding.h index a086c56f9a8..486b65af5c8 100644 --- a/source/source_lcao/module_rt/td_folding.h +++ b/source/source_lcao/module_rt/td_folding.h @@ -1,7 +1,6 @@ #ifndef TD_FOLDING_H #define TD_FOLDING_H #include "source_lcao/module_hcontainer/hcontainer.h" -#include "source_lcao/module_ri/abfs-vector3_order.h" namespace module_rt{ // folding HR to hk, for hybrid gauge diff --git a/source/source_lcao/pulay_fs.h b/source/source_lcao/pulay_fs.h index ea25e9186a2..a2f1d1ee1a0 100644 --- a/source/source_lcao/pulay_fs.h +++ b/source/source_lcao/pulay_fs.h @@ -1,5 +1,4 @@ #pragma once -#include "source_basis/module_nao/two_center_bundle.h" #include "source_estate/module_dm/density_matrix.h" #include "source_estate/module_pot/potential_new.h" #include "source_cell/unitcell.h" diff --git a/source/source_lcao/setup_deepks.cpp b/source/source_lcao/setup_deepks.cpp index 190571661cf..88f84bbc8ad 100644 --- a/source/source_lcao/setup_deepks.cpp +++ b/source/source_lcao/setup_deepks.cpp @@ -2,6 +2,12 @@ #include "source_io/module_parameter/parameter.h" // use parameter #include "source_lcao/LCAO_domain.h" +#ifdef __MLALGO +#include "source_lcao/module_deepks/LCAO_deepks_io.h" +#include "source_lcao/module_deepks/deepks_basic.h" +#include "source_lcao/module_deepks/deepks_pdm.h" +#include "source_lcao/module_deepks/deepks_phialpha.h" +#endif template Setup_DeePKS::Setup_DeePKS() diff --git a/source/source_lcao/setup_exx.h b/source/source_lcao/setup_exx.h index 9805ff8c91a..badf9d14c7c 100644 --- a/source/source_lcao/setup_exx.h +++ b/source/source_lcao/setup_exx.h @@ -11,7 +11,6 @@ // for EXX #ifdef __EXX #include "source_lcao/module_ri/Exx_LRI_interface.h" -#include "source_lcao/module_ri/Mix_DMk_2D.h" #endif template diff --git a/source/source_lcao/spar_dh.h b/source/source_lcao/spar_dh.h index 3df85fefc99..4ed94e52c5d 100644 --- a/source/source_lcao/spar_dh.h +++ b/source/source_lcao/spar_dh.h @@ -5,7 +5,6 @@ #include "source_basis/module_ao/parallel_orbitals.h" #include "source_basis/module_nao/two_center_bundle.h" #include "source_basis/module_ao/ORB_read.h" -#include "source_cell/module_neighbor/sltk_atom_arrange.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_lcao/LCAO_HS_arrays.hpp" #include "source_lcao/force_stress_arrays.h" diff --git a/source/source_lcao/spar_hsr.h b/source/source_lcao/spar_hsr.h index 09e41a614af..5a1f1f743d3 100644 --- a/source/source_lcao/spar_hsr.h +++ b/source/source_lcao/spar_hsr.h @@ -4,7 +4,6 @@ #include "source_lcao/LCAO_HS_arrays.hpp" #include "source_lcao/module_hcontainer/hcontainer.h" #include "source_hamilt/hamilt.h" -#include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 #ifdef __EXX #include diff --git a/source/source_lcao/spar_u.h b/source/source_lcao/spar_u.h index 8e070334961..4ecfa25c012 100644 --- a/source/source_lcao/spar_u.h +++ b/source/source_lcao/spar_u.h @@ -2,8 +2,6 @@ #define SPARSE_FORMAT_U_H #include "source_lcao/module_ri/abfs-vector3_order.h" -#include "source_cell/module_neighbor/sltk_atom_arrange.h" -#include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 namespace sparse_format diff --git a/source/source_lcao/wavefunc_in_pw.h b/source/source_lcao/wavefunc_in_pw.h index e46f4151ae3..eb72962fced 100644 --- a/source/source_lcao/wavefunc_in_pw.h +++ b/source/source_lcao/wavefunc_in_pw.h @@ -3,7 +3,6 @@ #include "source_base/complexmatrix.h" #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/realarray.h" #include "source_base/vector3.h" #include "source_basis/module_pw/pw_basis_k.h" diff --git a/source/source_main/driver.h b/source/source_main/driver.h index 9bdcf1d2851..e0204d079ca 100644 --- a/source/source_main/driver.h +++ b/source/source_main/driver.h @@ -1,7 +1,6 @@ #ifndef DRIVER_H #define DRIVER_H -#include "source_cell/unitcell.h" class Driver { diff --git a/source/source_md/md_func.cpp b/source/source_md/md_func.cpp index 933b3c3f4c2..6bd1b60dd59 100644 --- a/source/source_md/md_func.cpp +++ b/source/source_md/md_func.cpp @@ -2,6 +2,7 @@ #include "source_base/global_variable.h" #include "source_base/timer.h" +#include "source_io/module_parameter/parameter.h" namespace MD_func diff --git a/source/source_md/md_func.h b/source/source_md/md_func.h index 28ae5101b97..be433ffe4ac 100644 --- a/source/source_md/md_func.h +++ b/source/source_md/md_func.h @@ -3,6 +3,8 @@ #include "source_esolver/esolver.h" +class Parameter; + #ifdef __MPI #include // MPI functions #endif diff --git a/source/source_psi/psi_init_atomic_random.h b/source/source_psi/psi_init_atomic_random.h index 46a79ff0e62..2c8e49fc8d6 100644 --- a/source/source_psi/psi_init_atomic_random.h +++ b/source/source_psi/psi_init_atomic_random.h @@ -1,6 +1,5 @@ #ifndef PSI_INIT_ATOMIC_RANDOM_H #define PSI_INIT_ATOMIC_RANDOM_H -#include "source_cell/parallel_kpoints.h" #include "source_pw/module_pwdft/vnl_pw.h" #include "psi_init_atomic.h" diff --git a/source/source_psi/psi_init_nao.h b/source/source_psi/psi_init_nao.h index b965c72e3ef..bb05962ec07 100644 --- a/source/source_psi/psi_init_nao.h +++ b/source/source_psi/psi_init_nao.h @@ -2,6 +2,7 @@ #define PSI_INIT_NAO_H #include "source_base/cubic_spline.h" #include "source_base/realarray.h" +#include "source_base/spherical_bessel_transformer.h" #include "psi_initializer.h" #include diff --git a/source/source_psi/psi_init_nao_random.h b/source/source_psi/psi_init_nao_random.h index dbe07d8c771..d6b38bb5568 100644 --- a/source/source_psi/psi_init_nao_random.h +++ b/source/source_psi/psi_init_nao_random.h @@ -1,6 +1,5 @@ #ifndef PSI_INIT_NAO_RANDOM_H #define PSI_INIT_NAO_RANDOM_H -#include "source_cell/parallel_kpoints.h" #include "source_pw/module_pwdft/vnl_pw.h" #include "psi_init_nao.h" diff --git a/source/source_psi/psi_initializer.cpp b/source/source_psi/psi_initializer.cpp index 59b52e29b53..e5dda9af381 100644 --- a/source/source_psi/psi_initializer.cpp +++ b/source/source_psi/psi_initializer.cpp @@ -1,6 +1,7 @@ #include "psi_initializer.h" #include "source_base/memory.h" +#include "source_base/parallel_global.h" // basic functions support #include "source_base/timer.h" #include "source_base/tool_quit.h" diff --git a/source/source_psi/psi_initializer.h b/source/source_psi/psi_initializer.h index a8126562097..589355d2710 100644 --- a/source/source_psi/psi_initializer.h +++ b/source/source_psi/psi_initializer.h @@ -8,12 +8,10 @@ // smart pointer for auto-memory management #include // numerical algorithm support -#include "source_base/spherical_bessel_transformer.h" // for spherical bessel transform #ifdef __MPI #include #endif #include "source_base/macros.h" -#include "source_base/parallel_global.h" #include "source_cell/klist.h" #include diff --git a/source/source_psi/psi_prepare.cpp b/source/source_psi/psi_prepare.cpp index a20d5f2f222..2f0530d8b96 100644 --- a/source/source_psi/psi_prepare.cpp +++ b/source/source_psi/psi_prepare.cpp @@ -3,6 +3,7 @@ #include "source_base/macros.h" #include "source_base/memory.h" #include "source_base/parallel_device.h" +#include "source_base/parallel_global.h" #include "source_base/timer.h" #include "source_base/tool_quit.h" #include "source_hsolver/diago_iter_assist.h" diff --git a/source/source_psi/test/psi_initializer_unit_test.cpp b/source/source_psi/test/psi_initializer_unit_test.cpp index 3ae38cbc218..6ede4ce8928 100644 --- a/source/source_psi/test/psi_initializer_unit_test.cpp +++ b/source/source_psi/test/psi_initializer_unit_test.cpp @@ -10,6 +10,7 @@ #include "../psi_init_random.h" #include "source_pw/module_pwdft/vl_pw.h" #include "source_cell/klist.h" +#include "source_io/module_output/output.h" /* ========================= diff --git a/source/source_pw/module_ofdft/evolve_ofdft.h b/source/source_pw/module_ofdft/evolve_ofdft.h index 8d592a56a42..63b6b4f86f7 100644 --- a/source/source_pw/module_ofdft/evolve_ofdft.h +++ b/source/source_pw/module_ofdft/evolve_ofdft.h @@ -4,7 +4,6 @@ #include #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_pw/pw_basis.h" diff --git a/source/source_pw/module_ofdft/kedf_extwt.h b/source/source_pw/module_ofdft/kedf_extwt.h index e968fc51868..f084e5731a4 100644 --- a/source/source_pw/module_ofdft/kedf_extwt.h +++ b/source/source_pw/module_ofdft/kedf_extwt.h @@ -4,7 +4,6 @@ #include #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_pw/pw_basis.h" diff --git a/source/source_pw/module_ofdft/kedf_lkt.h b/source/source_pw/module_ofdft/kedf_lkt.h index 963bb6c3405..730ceb54dd3 100644 --- a/source/source_pw/module_ofdft/kedf_lkt.h +++ b/source/source_pw/module_ofdft/kedf_lkt.h @@ -4,7 +4,6 @@ #include #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_pw/pw_basis.h" diff --git a/source/source_pw/module_ofdft/kedf_manager.cpp b/source/source_pw/module_ofdft/kedf_manager.cpp index 9c589fa9a95..8aaec2a8a4f 100644 --- a/source/source_pw/module_ofdft/kedf_manager.cpp +++ b/source/source_pw/module_ofdft/kedf_manager.cpp @@ -1,5 +1,7 @@ #include "kedf_manager.h" +#include "source_io/module_parameter/parameter.h" + /** * @brief [Interface to kedf] * Initialize the KEDFs. diff --git a/source/source_pw/module_ofdft/kedf_manager.h b/source/source_pw/module_ofdft/kedf_manager.h index 8cd556d7868..cbebe2ccbb4 100644 --- a/source/source_pw/module_ofdft/kedf_manager.h +++ b/source/source_pw/module_ofdft/kedf_manager.h @@ -1,9 +1,7 @@ #ifndef KEDF_MANAGER_H #define KEDF_MANAGER_H -#include "source_io/module_parameter/parameter.h" #include "source_basis/module_pw/pw_basis.h" -#include "source_estate/elecstate.h" #include "kedf_lkt.h" #include "kedf_tf.h" #include "kedf_vw.h" @@ -12,6 +10,8 @@ #include "kedf_xwm.h" #include "kedf_ml.h" +struct Input_para; + class KEDF_Manager { public: diff --git a/source/source_pw/module_ofdft/kedf_tf.h b/source/source_pw/module_ofdft/kedf_tf.h index e3a0f58a5f9..a5c2f300639 100644 --- a/source/source_pw/module_ofdft/kedf_tf.h +++ b/source/source_pw/module_ofdft/kedf_tf.h @@ -4,7 +4,6 @@ #include #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/timer.h" diff --git a/source/source_pw/module_ofdft/kedf_vw.h b/source/source_pw/module_ofdft/kedf_vw.h index d394ed7d796..b370aa5018f 100644 --- a/source/source_pw/module_ofdft/kedf_vw.h +++ b/source/source_pw/module_ofdft/kedf_vw.h @@ -4,7 +4,6 @@ #include #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_pw/pw_basis.h" diff --git a/source/source_pw/module_ofdft/kedf_wt.h b/source/source_pw/module_ofdft/kedf_wt.h index 52f998d9462..e41f3836f56 100644 --- a/source/source_pw/module_ofdft/kedf_wt.h +++ b/source/source_pw/module_ofdft/kedf_wt.h @@ -4,7 +4,6 @@ #include #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/timer.h" #include "source_basis/module_pw/pw_basis.h" diff --git a/source/source_pw/module_pwdft/deltaspin_pw.cpp b/source/source_pw/module_pwdft/deltaspin_pw.cpp index caf8ea7852f..680ec26afc2 100644 --- a/source/source_pw/module_pwdft/deltaspin_pw.cpp +++ b/source/source_pw/module_pwdft/deltaspin_pw.cpp @@ -1,6 +1,7 @@ #include "source_pw/module_pwdft/deltaspin_pw.h" #include "source_lcao/module_deltaspin/spin_constrain.h" #include "source_estate/module_charge/charge_mixing.h" +#include "source_io/module_parameter/parameter.h" namespace pw { diff --git a/source/source_pw/module_pwdft/deltaspin_pw.h b/source/source_pw/module_pwdft/deltaspin_pw.h index 0509b61bb89..b965dda53e4 100644 --- a/source/source_pw/module_pwdft/deltaspin_pw.h +++ b/source/source_pw/module_pwdft/deltaspin_pw.h @@ -1,9 +1,9 @@ #ifndef DELTASPIN_PW_H #define DELTASPIN_PW_H -#include "source_io/module_parameter/parameter.h" class Charge_Mixing; +struct Input_para; namespace pw { diff --git a/source/source_pw/module_pwdft/dftu_pw.cpp b/source/source_pw/module_pwdft/dftu_pw.cpp index 475a34620a8..7d74449bfb3 100644 --- a/source/source_pw/module_pwdft/dftu_pw.cpp +++ b/source/source_pw/module_pwdft/dftu_pw.cpp @@ -1,5 +1,6 @@ #include "source_pw/module_pwdft/dftu_pw.h" #include "source_lcao/module_dftu/dftu.h" +#include "source_io/module_parameter/parameter.h" namespace pw { diff --git a/source/source_pw/module_pwdft/dftu_pw.h b/source/source_pw/module_pwdft/dftu_pw.h index 8a30b04e766..db67834a188 100644 --- a/source/source_pw/module_pwdft/dftu_pw.h +++ b/source/source_pw/module_pwdft/dftu_pw.h @@ -1,10 +1,10 @@ #ifndef DFTU_PW_H #define DFTU_PW_H -#include "source_io/module_parameter/parameter.h" #include "source_cell/unitcell.h" #include "source_base/matrix.h" +struct Input_para; class Plus_U; namespace pw diff --git a/source/source_pw/module_pwdft/elecond.cpp b/source/source_pw/module_pwdft/elecond.cpp index e7862538abe..a362a3088a9 100644 --- a/source/source_pw/module_pwdft/elecond.cpp +++ b/source/source_pw/module_pwdft/elecond.cpp @@ -3,7 +3,9 @@ #include "source_base/global_function.h" #include "source_base/global_variable.h" #include "source_base/kernels/math_kernel_op.h" +#include "source_base/parallel_comm.h" #include "source_base/parallel_device.h" +#include "source_base/parallel_reduce.h" #include "source_estate/occupy.h" #include "source_io/module_output/binstream.h" #include "source_io/module_parameter/parameter.h" diff --git a/source/source_pw/module_pwdft/forces.cpp b/source/source_pw/module_pwdft/forces.cpp index 6888d89dacc..2f2e1ea3a86 100644 --- a/source/source_pw/module_pwdft/forces.cpp +++ b/source/source_pw/module_pwdft/forces.cpp @@ -1,5 +1,8 @@ #include "forces.h" +#include "source_base/global_variable.h" +#include "source_base/parallel_reduce.h" +#include "source_pw/module_pwdft/kernels/force_op.h" #include "source_io/module_parameter/parameter.h" #include "source_io/module_output/output_log.h" // new diff --git a/source/source_pw/module_pwdft/forces.h b/source/source_pw/module_pwdft/forces.h index 97301090712..b71e9c6a385 100644 --- a/source/source_pw/module_pwdft/forces.h +++ b/source/source_pw/module_pwdft/forces.h @@ -2,7 +2,6 @@ #define FORCES_H #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_base/module_device/memory_op.h" #include "source_basis/module_pw/pw_basis_k.h" @@ -10,12 +9,13 @@ #include "source_cell/module_symmetry/symmetry.h" #include "source_estate/elecstate.h" #include "source_pw/module_pwdft/vl_pw.h" -#include "source_pw/module_pwdft/kernels/force_op.h" #include "source_base/kernels/math_kernel_op.h" #include "source_psi/psi.h" #include "structure_factor.h" #include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-06 +class pseudopot_cell_vnl; + template class Forces { diff --git a/source/source_pw/module_pwdft/forces_cc.cpp b/source/source_pw/module_pwdft/forces_cc.cpp index 3a2cc737744..51cc2c04c6c 100644 --- a/source/source_pw/module_pwdft/forces_cc.cpp +++ b/source/source_pw/module_pwdft/forces_cc.cpp @@ -1,5 +1,6 @@ #include "forces.h" #include "stress_func.h" +#include "source_base/parallel_reduce.h" #include "source_io/module_parameter/parameter.h" #include "source_io/module_output/output_log.h" // new diff --git a/source/source_pw/module_pwdft/forces_nl.cpp b/source/source_pw/module_pwdft/forces_nl.cpp index 930a1ce21ff..599121591c8 100644 --- a/source/source_pw/module_pwdft/forces_nl.cpp +++ b/source/source_pw/module_pwdft/forces_nl.cpp @@ -1,4 +1,5 @@ #include "forces.h" +#include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_base/tool_title.h" #include "source_pw/module_pwdft/fs_nonlocal_tools.h" diff --git a/source/source_pw/module_pwdft/forces_onsite.cpp b/source/source_pw/module_pwdft/forces_onsite.cpp index afa5cfcfe94..2429a015515 100644 --- a/source/source_pw/module_pwdft/forces_onsite.cpp +++ b/source/source_pw/module_pwdft/forces_onsite.cpp @@ -1,4 +1,5 @@ #include "forces.h" +#include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_base/tool_title.h" #include "source_pw/module_pwdft/onsite_proj.h" diff --git a/source/source_pw/module_pwdft/forces_scc.cpp b/source/source_pw/module_pwdft/forces_scc.cpp index cd1215cd1b0..3d454cf9a09 100644 --- a/source/source_pw/module_pwdft/forces_scc.cpp +++ b/source/source_pw/module_pwdft/forces_scc.cpp @@ -1,4 +1,5 @@ #include "forces.h" +#include "source_base/parallel_reduce.h" #include "source_io/module_output/output_log.h" #include "stress_func.h" // new diff --git a/source/source_pw/module_pwdft/forces_us.cpp b/source/source_pw/module_pwdft/forces_us.cpp index 8fbc110c458..ea2efeb50a2 100644 --- a/source/source_pw/module_pwdft/forces_us.cpp +++ b/source/source_pw/module_pwdft/forces_us.cpp @@ -1,4 +1,6 @@ #include "forces.h" +#include "source_base/parallel_reduce.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_base/libm/libm.h" #include "source_io/module_parameter/parameter.h" #include "source_base/math_ylmreal.h" diff --git a/source/source_pw/module_pwdft/hamilt_pw.cpp b/source/source_pw/module_pwdft/hamilt_pw.cpp index 152e3451428..3b0f2b8ca7b 100644 --- a/source/source_pw/module_pwdft/hamilt_pw.cpp +++ b/source/source_pw/module_pwdft/hamilt_pw.cpp @@ -3,6 +3,7 @@ #include "source_io/module_parameter/parameter.h" #include "source_base/global_function.h" #include "source_base/global_variable.h" +#include "source_base/parallel_reduce.h" #include "op_pw_veff.h" #include "op_pw_ekin.h" diff --git a/source/source_pw/module_pwdft/kernels/ekinetic_op.h b/source/source_pw/module_pwdft/kernels/ekinetic_op.h index 5da3e340186..e4d2eaca126 100644 --- a/source/source_pw/module_pwdft/kernels/ekinetic_op.h +++ b/source/source_pw/module_pwdft/kernels/ekinetic_op.h @@ -1,7 +1,7 @@ #ifndef MODULE_HAMILT_EKINETIC_H #define MODULE_HAMILT_EKINETIC_H -#include "source_psi/psi.h" +#include "source_base/module_device/types.h" #include namespace hamilt { diff --git a/source/source_pw/module_pwdft/kernels/force_op.h b/source/source_pw/module_pwdft/kernels/force_op.h index e31721913c7..0e1d51666bf 100644 --- a/source/source_pw/module_pwdft/kernels/force_op.h +++ b/source/source_pw/module_pwdft/kernels/force_op.h @@ -1,8 +1,7 @@ #ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_KERNELS_FORCE_OP_H #define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_KERNELS_FORCE_OP_H -#include "source_io/module_parameter/parameter.h" -#include "source_psi/psi.h" +#include "source_base/module_device/types.h" #include diff --git a/source/source_pw/module_pwdft/kernels/meta_op.h b/source/source_pw/module_pwdft/kernels/meta_op.h index 745abd625db..408f1dfb123 100644 --- a/source/source_pw/module_pwdft/kernels/meta_op.h +++ b/source/source_pw/module_pwdft/kernels/meta_op.h @@ -1,6 +1,7 @@ #ifndef MODULE_HAMILT_META_H #define MODULE_HAMILT_META_H +#include "source_base/module_device/types.h" #include "source_psi/psi.h" #include diff --git a/source/source_pw/module_pwdft/kernels/mul_potential_op.h b/source/source_pw/module_pwdft/kernels/mul_potential_op.h index b1cd647b196..2f34d9bdf61 100644 --- a/source/source_pw/module_pwdft/kernels/mul_potential_op.h +++ b/source/source_pw/module_pwdft/kernels/mul_potential_op.h @@ -1,6 +1,5 @@ #ifndef MUL_POTENTIAL_OP_H #define MUL_POTENTIAL_OP_H -#include "source_psi/psi.h" #include "source_base/macros.h" namespace hamilt { diff --git a/source/source_pw/module_pwdft/kernels/nonlocal_op.h b/source/source_pw/module_pwdft/kernels/nonlocal_op.h index 6e60957a006..340b0f0c9b7 100644 --- a/source/source_pw/module_pwdft/kernels/nonlocal_op.h +++ b/source/source_pw/module_pwdft/kernels/nonlocal_op.h @@ -1,7 +1,7 @@ #ifndef MODULE_HAMILT_NONLOCAL_H #define MODULE_HAMILT_NONLOCAL_H -#include "source_psi/psi.h" +#include "source_base/module_device/types.h" #include namespace hamilt { diff --git a/source/source_pw/module_pwdft/kernels/onsite_op.h b/source/source_pw/module_pwdft/kernels/onsite_op.h index cc7e8d9cc25..83f3790d6bd 100644 --- a/source/source_pw/module_pwdft/kernels/onsite_op.h +++ b/source/source_pw/module_pwdft/kernels/onsite_op.h @@ -1,7 +1,7 @@ #ifndef MODULE_HAMILT_OPERATOR_KERNELS_ONSITE_H #define MODULE_HAMILT_OPERATOR_KERNELS_ONSITE_H -#include "source_psi/psi.h" +#include "source_base/module_device/types.h" #include namespace hamilt { diff --git a/source/source_pw/module_pwdft/kernels/stress_op.h b/source/source_pw/module_pwdft/kernels/stress_op.h index fc81f355e41..995557ffa05 100644 --- a/source/source_pw/module_pwdft/kernels/stress_op.h +++ b/source/source_pw/module_pwdft/kernels/stress_op.h @@ -1,7 +1,7 @@ #ifndef SRC_PW_STRESS_MULTI_DEVICE_H #define SRC_PW_STRESS_MULTI_DEVICE_H -#include "source_io/module_parameter/parameter.h" +#include "source_base/module_device/types.h" #include "source_psi/psi.h" #include diff --git a/source/source_pw/module_pwdft/kernels/veff_op.h b/source/source_pw/module_pwdft/kernels/veff_op.h index cda82d9a9a4..9611c84303c 100644 --- a/source/source_pw/module_pwdft/kernels/veff_op.h +++ b/source/source_pw/module_pwdft/kernels/veff_op.h @@ -1,6 +1,7 @@ #ifndef MODULE_HAMILT_VEFF_H #define MODULE_HAMILT_VEFF_H +#include "source_base/module_device/types.h" #include "source_psi/psi.h" #include diff --git a/source/source_pw/module_pwdft/kernels/vnl_op.h b/source/source_pw/module_pwdft/kernels/vnl_op.h index 16b01b2e491..13f9c12da18 100644 --- a/source/source_pw/module_pwdft/kernels/vnl_op.h +++ b/source/source_pw/module_pwdft/kernels/vnl_op.h @@ -1,6 +1,7 @@ #ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_KERNELS_VNL_OP_H #define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_KERNELS_VNL_OP_H +#include "source_base/module_device/types.h" #include "source_psi/psi.h" #include diff --git a/source/source_pw/module_pwdft/kernels/wf_op.h b/source/source_pw/module_pwdft/kernels/wf_op.h index 6fab25bcc60..98c9249cfb0 100644 --- a/source/source_pw/module_pwdft/kernels/wf_op.h +++ b/source/source_pw/module_pwdft/kernels/wf_op.h @@ -1,6 +1,7 @@ #ifndef SRC_PW_WF_MULTI_DEVICE_H #define SRC_PW_WF_MULTI_DEVICE_H +#include "source_base/module_device/types.h" #include "source_psi/psi.h" #include diff --git a/source/source_pw/module_pwdft/onsite_proj.cpp b/source/source_pw/module_pwdft/onsite_proj.cpp index 82bd3516fd4..f9bd19dee03 100644 --- a/source/source_pw/module_pwdft/onsite_proj.cpp +++ b/source/source_pw/module_pwdft/onsite_proj.cpp @@ -9,8 +9,8 @@ #include "source_base/projgen.h" #include "source_base/kernels/math_kernel_op.h" -#ifdef __MPI #include "source_base/parallel_reduce.h" +#ifdef __MPI #include "source_base/parallel_common.h" #endif #include "source_io/module_parameter/parameter.h" diff --git a/source/source_pw/module_pwdft/onsite_proj_print.h b/source/source_pw/module_pwdft/onsite_proj_print.h index 12e5a977432..5ff40bdbda7 100644 --- a/source/source_pw/module_pwdft/onsite_proj_print.h +++ b/source/source_pw/module_pwdft/onsite_proj_print.h @@ -2,7 +2,6 @@ #define MODULEHAMILTPW_ONSITE_PROJ_PRINT_H #include "source_cell/unitcell.h" -#include "source_base/global_variable.h" #include #include #include diff --git a/source/source_pw/module_pwdft/onsite_proj_tools.cpp b/source/source_pw/module_pwdft/onsite_proj_tools.cpp index fec5f0a9fb2..488b6e76177 100644 --- a/source/source_pw/module_pwdft/onsite_proj_tools.cpp +++ b/source/source_pw/module_pwdft/onsite_proj_tools.cpp @@ -3,9 +3,11 @@ #include "source_base/math_polyint.h" #include "source_base/math_ylmreal.h" #include "source_base/memory.h" +#include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_base/tool_title.h" #include "source_pw/module_pwdft/kernels/force_op.h" +#include "source_io/module_parameter/parameter.h" #include "nonlocal_maths.hpp" #include diff --git a/source/source_pw/module_pwdft/op_pw_exx_ace.cpp b/source/source_pw/module_pwdft/op_pw_exx_ace.cpp index ef19285a361..4a47b2ac030 100644 --- a/source/source_pw/module_pwdft/op_pw_exx_ace.cpp +++ b/source/source_pw/module_pwdft/op_pw_exx_ace.cpp @@ -1,5 +1,6 @@ #include "op_pw_exx.h" #include "source_base/parallel_comm.h" +#include "source_base/parallel_reduce.h" #include "source_io/module_parameter/parameter.h" #include "source_hamilt/module_xc/exx_info.h" diff --git a/source/source_pw/module_pwdft/op_pw_exx_pot.cpp b/source/source_pw/module_pwdft/op_pw_exx_pot.cpp index 0116cfe7c3b..9f31bf642e4 100644 --- a/source/source_pw/module_pwdft/op_pw_exx_pot.cpp +++ b/source/source_pw/module_pwdft/op_pw_exx_pot.cpp @@ -1,4 +1,5 @@ #include "op_pw_exx.h" +#include "source_base/parallel_reduce.h" #include "source_io/module_parameter/parameter.h" #include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info diff --git a/source/source_pw/module_pwdft/parallel_grid.cpp b/source/source_pw/module_pwdft/parallel_grid.cpp index ff20f40d73d..dc59f2528d9 100644 --- a/source/source_pw/module_pwdft/parallel_grid.cpp +++ b/source/source_pw/module_pwdft/parallel_grid.cpp @@ -1,4 +1,6 @@ #include "parallel_grid.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include "source_io/module_parameter/parameter.h" #ifdef __MPI diff --git a/source/source_pw/module_pwdft/parallel_grid.h b/source/source_pw/module_pwdft/parallel_grid.h index 6cee615a347..ffa81d83f50 100644 --- a/source/source_pw/module_pwdft/parallel_grid.h +++ b/source/source_pw/module_pwdft/parallel_grid.h @@ -1,8 +1,7 @@ #ifndef PARALLEL_GRID_H #define PARALLEL_GRID_H -#include "source_base/global_function.h" -#include "source_base/global_variable.h" +#include class Parallel_Grid { diff --git a/source/source_pw/module_pwdft/radial_proj.h b/source/source_pw/module_pwdft/radial_proj.h index e1af25cc3df..b19590be8e4 100644 --- a/source/source_pw/module_pwdft/radial_proj.h +++ b/source/source_pw/module_pwdft/radial_proj.h @@ -22,7 +22,6 @@ #include #include "source_cell/unitcell.h" -#include "source_psi/psi.h" #include "source_basis/module_pw/pw_basis_k.h" namespace RadialProjection diff --git a/source/source_pw/module_pwdft/setup_pot.cpp b/source/source_pw/module_pwdft/setup_pot.cpp index 4a194bc0483..1073774b38c 100644 --- a/source/source_pw/module_pwdft/setup_pot.cpp +++ b/source/source_pw/module_pwdft/setup_pot.cpp @@ -3,6 +3,7 @@ #include "source_estate/module_charge/symmetry_rho.h" #include "source_lcao/module_deltaspin/spin_constrain.h" #include "source_pw/module_pwdft/onsite_proj.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_lcao/module_dftu/dftu.h" #include "source_pw/module_pwdft/vsep_pw.h" diff --git a/source/source_pw/module_pwdft/setup_pot.h b/source/source_pw/module_pwdft/setup_pot.h index de0b4e8f4c8..a292579a6c2 100644 --- a/source/source_pw/module_pwdft/setup_pot.h +++ b/source/source_pw/module_pwdft/setup_pot.h @@ -1,7 +1,6 @@ #ifndef SETUP_POT_H #define SETUP_POT_H -#include "source_base/module_device/device.h" // use Device #include "source_cell/unitcell.h" #include "source_cell/klist.h" #include "source_pw/module_pwdft/structure_factor.h" @@ -10,6 +9,8 @@ #include "source_hamilt/hamilt.h" #include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-06 +class pseudopot_cell_vnl; + namespace pw { diff --git a/source/source_pw/module_pwdft/setup_pwrho.h b/source/source_pw/module_pwdft/setup_pwrho.h index 4e11848d627..7a6ad1bfd33 100644 --- a/source/source_pw/module_pwdft/setup_pwrho.h +++ b/source/source_pw/module_pwdft/setup_pwrho.h @@ -2,7 +2,6 @@ #define SETUP_PWRHO_H #include "source_cell/unitcell.h" // use UnitCell -#include "source_pw/module_pwdft/structure_factor.h" // use Structure_Factor #include "source_basis/module_pw/pw_basis.h" // use PW_Basis #include "source_io/module_parameter/input_parameter.h" // use Input_para diff --git a/source/source_pw/module_pwdft/setup_pwwfc.cpp b/source/source_pw/module_pwdft/setup_pwwfc.cpp index 995e7b7f42a..5ed26ba397f 100644 --- a/source/source_pw/module_pwdft/setup_pwwfc.cpp +++ b/source/source_pw/module_pwdft/setup_pwwfc.cpp @@ -2,6 +2,7 @@ #include "source_base/parallel_comm.h" // POOL_WORLD #include "source_base/parallel_reduce.h" // Parallel_Reduce #include "source_io/module_output/print_info.h" // print information +#include "source_io/module_parameter/parameter.h" void pw::teardown_pwwfc(ModulePW::PW_Basis_K* &pw_wfc) { diff --git a/source/source_pw/module_pwdft/setup_pwwfc.h b/source/source_pw/module_pwdft/setup_pwwfc.h index db39e289412..d52c0426e0d 100644 --- a/source/source_pw/module_pwdft/setup_pwwfc.h +++ b/source/source_pw/module_pwdft/setup_pwwfc.h @@ -1,12 +1,13 @@ #ifndef SETUP_PWWFC_H #define SETUP_PWWFC_H -#include "source_io/module_parameter/parameter.h" // input parameters #include "source_cell/unitcell.h" // cell information #include "source_cell/klist.h" // k-points #include "source_basis/module_pw/pw_basis.h" // pw_rho #include "source_basis/module_pw/pw_basis_k.h" // pw_wfc +struct Input_para; + namespace pw { diff --git a/source/source_pw/module_pwdft/soc.h b/source/source_pw/module_pwdft/soc.h index 25a56a6429d..40a3b2e41ac 100644 --- a/source/source_pw/module_pwdft/soc.h +++ b/source/source_pw/module_pwdft/soc.h @@ -2,7 +2,9 @@ #define SOC_H #include "source_base/global_function.h" -#include "source_base/global_variable.h" + +#include +#include class Fcoef { diff --git a/source/source_pw/module_pwdft/stress_cc.cpp b/source/source_pw/module_pwdft/stress_cc.cpp index 8b38d34c5f1..2ee46650b00 100644 --- a/source/source_pw/module_pwdft/stress_cc.cpp +++ b/source/source_pw/module_pwdft/stress_cc.cpp @@ -1,4 +1,5 @@ #include "stress_func.h" +#include "source_base/parallel_reduce.h" #include "source_hamilt/module_xc/xc_functional.h" #include "source_io/module_parameter/parameter.h" #include "source_base/math_integral.h" diff --git a/source/source_pw/module_pwdft/stress_ewa.cpp b/source/source_pw/module_pwdft/stress_ewa.cpp index 594bd05d3b8..69c64075f8d 100644 --- a/source/source_pw/module_pwdft/stress_ewa.cpp +++ b/source/source_pw/module_pwdft/stress_ewa.cpp @@ -1,8 +1,10 @@ #include "stress_func.h" +#include "source_base/parallel_reduce.h" #include "source_hamilt/module_ewald/H_Ewald_pw.h" #include "source_base/timer.h" #include "source_base/tool_threading.h" #include "source_base/libm/libm.h" +#include "source_io/module_parameter/parameter.h" #ifdef _OPENMP #include diff --git a/source/source_pw/module_pwdft/stress_exx.cpp b/source/source_pw/module_pwdft/stress_exx.cpp index 73e7f7e2143..29900f92f67 100644 --- a/source/source_pw/module_pwdft/stress_exx.cpp +++ b/source/source_pw/module_pwdft/stress_exx.cpp @@ -1,6 +1,7 @@ #include "source_hamilt/module_xc/exx_info.h" #include "op_pw_exx.h" #include "source_base/parallel_common.h" +#include "source_base/parallel_reduce.h" #include "stress_pw.h" template diff --git a/source/source_pw/module_pwdft/stress_func.h b/source/source_pw/module_pwdft/stress_func.h index 0a144e3c81d..383329e8ae2 100644 --- a/source/source_pw/module_pwdft/stress_func.h +++ b/source/source_pw/module_pwdft/stress_func.h @@ -3,9 +3,7 @@ #include "source_base/complexmatrix.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_base/realarray.h" #include "source_base/vector3.h" #include "source_basis/module_pw/pw_basis_k.h" diff --git a/source/source_pw/module_pwdft/stress_gga.cpp b/source/source_pw/module_pwdft/stress_gga.cpp index d4b218d584d..0c23f58ef05 100644 --- a/source/source_pw/module_pwdft/stress_gga.cpp +++ b/source/source_pw/module_pwdft/stress_gga.cpp @@ -1,4 +1,5 @@ #include "stress_func.h" +#include "source_base/parallel_reduce.h" #include "source_hamilt/module_xc/xc_functional.h" #include "source_base/timer.h" diff --git a/source/source_pw/module_pwdft/stress_har.cpp b/source/source_pw/module_pwdft/stress_har.cpp index 7729e0202b7..cc22a31d9b0 100644 --- a/source/source_pw/module_pwdft/stress_har.cpp +++ b/source/source_pw/module_pwdft/stress_har.cpp @@ -1,4 +1,5 @@ #include "stress_func.h" +#include "source_base/parallel_reduce.h" #include "source_estate/module_pot/H_Hartree_pw.h" #include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" diff --git a/source/source_pw/module_pwdft/stress_loc.cpp b/source/source_pw/module_pwdft/stress_loc.cpp index 820cce38b0d..29fa1ee0900 100644 --- a/source/source_pw/module_pwdft/stress_loc.cpp +++ b/source/source_pw/module_pwdft/stress_loc.cpp @@ -1,4 +1,5 @@ #include "stress_func.h" +#include "source_base/parallel_reduce.h" #include "source_base/math_integral.h" #include "source_io/module_parameter/parameter.h" #include "source_base/tool_threading.h" diff --git a/source/source_pw/module_pwdft/stress_mgga.cpp b/source/source_pw/module_pwdft/stress_mgga.cpp index cfdcd12099a..1ee187a4e41 100644 --- a/source/source_pw/module_pwdft/stress_mgga.cpp +++ b/source/source_pw/module_pwdft/stress_mgga.cpp @@ -2,6 +2,7 @@ #include "source_hamilt/module_xc/xc_functional.h" #include "source_io/module_parameter/parameter.h" #include "stress_func.h" +#include "source_base/parallel_reduce.h" #include #include diff --git a/source/source_pw/module_pwdft/stress_nl.cpp b/source/source_pw/module_pwdft/stress_nl.cpp index 10a225ef17d..ae421d7b16c 100644 --- a/source/source_pw/module_pwdft/stress_nl.cpp +++ b/source/source_pw/module_pwdft/stress_nl.cpp @@ -1,4 +1,5 @@ #include "source_base/math_polyint.h" +#include "source_base/parallel_reduce.h" #include "source_io/module_parameter/parameter.h" #include "source_base/math_ylmreal.h" #include "source_base/memory.h" diff --git a/source/source_pw/module_pwdft/stress_onsite.cpp b/source/source_pw/module_pwdft/stress_onsite.cpp index 1b9a08bb882..3e8fac403fa 100644 --- a/source/source_pw/module_pwdft/stress_onsite.cpp +++ b/source/source_pw/module_pwdft/stress_onsite.cpp @@ -1,4 +1,5 @@ #include "source_base/module_device/device.h" +#include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_pw/module_pwdft/onsite_proj.h" #include "source_io/module_parameter/parameter.h" diff --git a/source/source_pw/module_pwdft/stress_us.cpp b/source/source_pw/module_pwdft/stress_us.cpp index bf7c9f1ad7a..82a0f16eb73 100644 --- a/source/source_pw/module_pwdft/stress_us.cpp +++ b/source/source_pw/module_pwdft/stress_us.cpp @@ -1,4 +1,5 @@ #include "source_base/libm/libm.h" +#include "source_base/parallel_reduce.h" #include "source_io/module_parameter/parameter.h" #include "source_base/math_polyint.h" #include "source_base/math_ylmreal.h" diff --git a/source/source_pw/module_pwdft/structure_factor.h b/source/source_pw/module_pwdft/structure_factor.h index ae10a8d8a9b..8aadb3511fc 100644 --- a/source/source_pw/module_pwdft/structure_factor.h +++ b/source/source_pw/module_pwdft/structure_factor.h @@ -5,7 +5,6 @@ #include "source_basis/module_pw/pw_basis_k.h" #include "source_cell/unitcell.h" #include "source_pw/module_pwdft/parallel_grid.h" -#include "source_psi/psi.h" class Structure_Factor { diff --git a/source/source_pw/module_pwdft/update_cell_pw.cpp b/source/source_pw/module_pwdft/update_cell_pw.cpp index a027884cc2f..172d7cb61a2 100644 --- a/source/source_pw/module_pwdft/update_cell_pw.cpp +++ b/source/source_pw/module_pwdft/update_cell_pw.cpp @@ -1,6 +1,7 @@ #include "source_pw/module_pwdft/update_cell_pw.h" #include "source_base/global_variable.h" #include "source_base/global_function.h" +#include "source_io/module_parameter/parameter.h" namespace pw { diff --git a/source/source_pw/module_pwdft/update_cell_pw.h b/source/source_pw/module_pwdft/update_cell_pw.h index 704d5b6f804..77320e52702 100644 --- a/source/source_pw/module_pwdft/update_cell_pw.h +++ b/source/source_pw/module_pwdft/update_cell_pw.h @@ -1,12 +1,13 @@ #ifndef UPDATE_CELL_PW_H #define UPDATE_CELL_PW_H -#include "source_io/module_parameter/parameter.h" #include "source_cell/unitcell.h" #include "source_cell/klist.h" #include "source_basis/module_pw/pw_basis_k.h" #include "source_pw/module_pwdft/vnl_pw.h" +struct Input_para; + namespace pw { diff --git a/source/source_pw/module_pwdft/vl_pw.h b/source/source_pw/module_pwdft/vl_pw.h index 0a0f0789dba..1a85c4e077a 100644 --- a/source/source_pw/module_pwdft/vl_pw.h +++ b/source/source_pw/module_pwdft/vl_pw.h @@ -2,7 +2,6 @@ #define VL_IN_PW_H #include "source_base/global_function.h" -#include "source_base/global_variable.h" #include "source_base/matrix.h" #include "source_basis/module_pw/pw_basis.h" #include "source_cell/unitcell.h" diff --git a/source/source_pw/module_pwdft/vnl_pw.cpp b/source/source_pw/module_pwdft/vnl_pw.cpp index 83c42adac89..ac149130a9d 100644 --- a/source/source_pw/module_pwdft/vnl_pw.cpp +++ b/source/source_pw/module_pwdft/vnl_pw.cpp @@ -6,6 +6,7 @@ #include "source_base/global_variable.h" #include "source_base/math_integral.h" #include "source_base/math_polyint.h" +#include "source_io/module_output/output.h" #include "source_base/math_sphbes.h" #include "source_base/math_ylmreal.h" #include "source_base/memory.h" @@ -218,9 +219,9 @@ void pseudopot_cell_vnl::init(const UnitCell& ucell, if (nkb > 0 && allocate_vkb) { if (!this->use_gpu_) - { - vkb.create(nkb, npwx); - ModuleBase::Memory::record("VNL::vkb", nkb * npwx * sizeof(std::complex)); + { + vkb.create(nkb, npwx); + ModuleBase::Memory::record("VNL::vkb", nkb * npwx * sizeof(std::complex)); } // GPU path: vkb ComplexMatrix is not allocated. // Column dimension is stored in vkbnc for gemm/gemv leading dimension. diff --git a/source/source_pw/module_pwdft/vsep_pw.h b/source/source_pw/module_pwdft/vsep_pw.h index 2c05b26491a..49d24e019f1 100644 --- a/source/source_pw/module_pwdft/vsep_pw.h +++ b/source/source_pw/module_pwdft/vsep_pw.h @@ -1,6 +1,7 @@ #ifndef VSEP_IN_PW #define VSEP_IN_PW +#include "source_base/complexmatrix.h" #include "source_base/matrix.h" #include "source_basis/module_pw/pw_basis.h" #include "source_cell/sep_cell.h" diff --git a/source/source_pw/module_stodft/kernels/hpsi_norm_op.h b/source/source_pw/module_stodft/kernels/hpsi_norm_op.h index 1d6bff3eb66..c707c3f3e5b 100644 --- a/source/source_pw/module_stodft/kernels/hpsi_norm_op.h +++ b/source/source_pw/module_stodft/kernels/hpsi_norm_op.h @@ -1,5 +1,6 @@ #ifndef HPSI_NORM_OP_H #define HPSI_NORM_OP_H +#include "source_base/module_device/types.h" #include #include "source_base/module_device/device.h" namespace hamilt diff --git a/source/source_pw/module_stodft/sto_dos.cpp b/source/source_pw/module_stodft/sto_dos.cpp index fccf4f2ba12..245a23f8fd4 100644 --- a/source/source_pw/module_stodft/sto_dos.cpp +++ b/source/source_pw/module_stodft/sto_dos.cpp @@ -1,5 +1,6 @@ #include "sto_dos.h" +#include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_base/tool_title.h" #include "source_io/module_parameter/parameter.h" diff --git a/source/source_pw/module_stodft/sto_elecond.cpp b/source/source_pw/module_stodft/sto_elecond.cpp index be3ae0c4404..59117dcbaec 100644 --- a/source/source_pw/module_stodft/sto_elecond.cpp +++ b/source/source_pw/module_stodft/sto_elecond.cpp @@ -5,6 +5,7 @@ #include "source_base/memory.h" #include "source_base/module_container/ATen/tensor.h" #include "source_base/parallel_device.h" +#include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_base/vector3.h" #include "source_io/module_parameter/parameter.h" diff --git a/source/source_pw/module_stodft/sto_elecond.h b/source/source_pw/module_stodft/sto_elecond.h index 78cb5fcfb6f..540e9880c4c 100644 --- a/source/source_pw/module_stodft/sto_elecond.h +++ b/source/source_pw/module_stodft/sto_elecond.h @@ -2,9 +2,9 @@ #define STOELECOND_H #include "source_hamilt/hamilt.h" +#include "source_hsolver/hsolver_pw_sdft.h" #include "source_pw/module_pwdft/elecond.h" #include "source_pw/module_stodft/sto_wf.h" -#include "source_hsolver/hsolver_pw_sdft.h" template class Sto_EleCond : protected EleCond diff --git a/source/source_pw/module_stodft/sto_stress_pw.cpp b/source/source_pw/module_stodft/sto_stress_pw.cpp index ace6162357d..de0dd9279de 100644 --- a/source/source_pw/module_stodft/sto_stress_pw.cpp +++ b/source/source_pw/module_stodft/sto_stress_pw.cpp @@ -1,5 +1,6 @@ #include "sto_stress_pw.h" +#include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_pw/module_pwdft/fs_kin_tools.h" #include "source_pw/module_pwdft/fs_nonlocal_tools.h" diff --git a/source/source_relax/bfgs.cpp b/source/source_relax/bfgs.cpp index f535f4a5377..13b87f55097 100644 --- a/source/source_relax/bfgs.cpp +++ b/source/source_relax/bfgs.cpp @@ -2,6 +2,7 @@ #include "source_base/module_external/lapack_connector.h" #include "source_io/module_parameter/parameter.h" #include "ions_move_basic.h" +#include "matrix_methods.h" #include "source_cell/update_cell.h" #include "source_cell/print_cell.h" // lanshuyue add 2025-06-19 diff --git a/source/source_relax/bfgs.h b/source/source_relax/bfgs.h index a483551a517..8484fa5a782 100644 --- a/source/source_relax/bfgs.h +++ b/source/source_relax/bfgs.h @@ -9,7 +9,6 @@ #include "source_base/matrix3.h" #include "source_cell/unitcell.h" -#include "matrix_methods.h" class BFGS { diff --git a/source/source_relax/ions_move_methods.h b/source/source_relax/ions_move_methods.h index 746b5ed0005..cdddc4fdd61 100644 --- a/source/source_relax/ions_move_methods.h +++ b/source/source_relax/ions_move_methods.h @@ -7,8 +7,6 @@ #include "ions_move_sd.h" #include "bfgs.h" #include "lbfgs.h" -#include "source_esolver/esolver.h" -#include "source_esolver/esolver_ks.h" class Ions_Move_Methods { diff --git a/source/source_relax/lbfgs.cpp b/source/source_relax/lbfgs.cpp index b347fe86fb8..9eb2c7ccda0 100644 --- a/source/source_relax/lbfgs.cpp +++ b/source/source_relax/lbfgs.cpp @@ -1,4 +1,5 @@ #include "lbfgs.h" +#include "matrix_methods.h" #include "source_io/module_parameter/parameter.h" #include "ions_move_basic.h" #include "source_cell/update_cell.h" diff --git a/source/source_relax/lbfgs.h b/source/source_relax/lbfgs.h index 94e33fec704..b931b528415 100644 --- a/source/source_relax/lbfgs.h +++ b/source/source_relax/lbfgs.h @@ -5,7 +5,6 @@ #include #include #include -#include "matrix_methods.h" //#include "line_search.h" #include "source_base/matrix.h" #include "source_base/matrix3.h" diff --git a/source/source_relax/relax_nsync.h b/source/source_relax/relax_nsync.h index 7c424753835..33eca958020 100644 --- a/source/source_relax/relax_nsync.h +++ b/source/source_relax/relax_nsync.h @@ -4,8 +4,6 @@ #include "ions_move_methods.h" #include "lattice_change_methods.h" #include "source_cell/unitcell.h" -#include "source_esolver/esolver.h" -#include "source_esolver/esolver_ks.h" class Relax_old { diff --git a/toolchain/scripts/lib/config_manager.sh b/toolchain/scripts/lib/config_manager.sh index 71ec05780ad..7e1afcef6e5 100644 --- a/toolchain/scripts/lib/config_manager.sh +++ b/toolchain/scripts/lib/config_manager.sh @@ -1242,4 +1242,4 @@ config_apply_modes() { ;; esac fi -} +} \ No newline at end of file