diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index ec3b1a91f60..941f739d5d6 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -662,7 +662,7 @@ list( source_pw/module_pwdft/kernels/force_op.cpp source_pw/module_pwdft/kernels/stress_op.cpp source_pw/module_pwdft/kernels/onsite_op.cpp - source_pw/module_pwdft/kernels/wf_op.cpp + source_cell/kernels/wf_op.cpp source_pw/module_pwdft/kernels/vnl_op.cpp source_base/kernels/math_ylm_op.cpp source_hamilt/module_xc/kernels/xc_functional_op.cpp @@ -690,7 +690,7 @@ if(USE_CUDA) source_base/module_device/cuda/memory_op.cu source_pw/module_pwdft/kernels/cuda/force_op.cu source_pw/module_pwdft/kernels/cuda/stress_op.cu - source_pw/module_pwdft/kernels/cuda/wf_op.cu + source_cell/kernels/cuda/wf_op.cu source_pw/module_pwdft/kernels/cuda/vnl_op.cu source_base/module_device/cuda_compat.cpp source_base/kernels/cuda/math_ylm_op.cu @@ -729,7 +729,7 @@ if(USE_ROCM) source_base/module_device/rocm/memory_op.hip.cu source_pw/module_pwdft/kernels/rocm/force_op.hip.cu source_pw/module_pwdft/kernels/rocm/stress_op.hip.cu - source_pw/module_pwdft/kernels/rocm/wf_op.hip.cu + source_cell/kernels/rocm/wf_op.hip.cu source_pw/module_pwdft/kernels/rocm/vnl_op.hip.cu source_base/kernels/rocm/math_kernel_op.hip.cu source_base/kernels/rocm/math_kernel_op_vec.hip.cu @@ -793,6 +793,7 @@ target_link_libraries( planewave symmetry cell + structure_factor parameter psi_overall_init psi_init diff --git a/source/Makefile.Objects b/source/Makefile.Objects index 9145af6c2cd..77add8f43b9 100644 --- a/source/Makefile.Objects +++ b/source/Makefile.Objects @@ -19,6 +19,7 @@ VPATH=./src_global:\ ./source_cell/module_neighlist:\ ./source_cell/module_symmetry:\ ./source_cell:\ +./source_cell/kernels:\ ./source_base:\ ./source_base/kernels:\ ./source_base/module_external:\ diff --git a/source/source_cell/CMakeLists.txt b/source/source_cell/CMakeLists.txt index e35cb1025dc..3d83e0a783d 100644 --- a/source/source_cell/CMakeLists.txt +++ b/source/source_cell/CMakeLists.txt @@ -49,10 +49,16 @@ add_library( cal_wfc.cpp cal_ux.cpp cif_io.cpp + soc.cpp ucell_io.cpp) +# Kept out of `cell` because it needs the plane-wave basis (planewave), which +# the cell-only unit tests do not link. +add_library(structure_factor OBJECT stru_fac.cpp stru_fac_k.cpp) + if(ENABLE_COVERAGE) add_coverage(cell) + add_coverage(structure_factor) endif() if(BUILD_TESTING) diff --git a/source/source_pw/module_pwdft/kernels/cuda/wf_op.cu b/source/source_cell/kernels/cuda/wf_op.cu similarity index 99% rename from source/source_pw/module_pwdft/kernels/cuda/wf_op.cu rename to source/source_cell/kernels/cuda/wf_op.cu index 8b176340da7..1cf71563de9 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/wf_op.cu +++ b/source/source_cell/kernels/cuda/wf_op.cu @@ -1,4 +1,4 @@ -#include "source_pw/module_pwdft/kernels/wf_op.h" +#include "source_cell/kernels/wf_op.h" #include diff --git a/source/source_pw/module_pwdft/kernels/rocm/wf_op.hip.cu b/source/source_cell/kernels/rocm/wf_op.hip.cu similarity index 99% rename from source/source_pw/module_pwdft/kernels/rocm/wf_op.hip.cu rename to source/source_cell/kernels/rocm/wf_op.hip.cu index c7bb7f9a056..d15338c4610 100644 --- a/source/source_pw/module_pwdft/kernels/rocm/wf_op.hip.cu +++ b/source/source_cell/kernels/rocm/wf_op.hip.cu @@ -1,4 +1,4 @@ -#include "source_pw/module_pwdft/kernels/wf_op.h" +#include "source_cell/kernels/wf_op.h" #include diff --git a/source/source_pw/module_pwdft/kernels/wf_op.cpp b/source/source_cell/kernels/wf_op.cpp similarity index 98% rename from source/source_pw/module_pwdft/kernels/wf_op.cpp rename to source/source_cell/kernels/wf_op.cpp index c942e484326..8670c6d6b72 100644 --- a/source/source_pw/module_pwdft/kernels/wf_op.cpp +++ b/source/source_cell/kernels/wf_op.cpp @@ -1,4 +1,4 @@ -#include "source_pw/module_pwdft/kernels/wf_op.h" +#include "source_cell/kernels/wf_op.h" #include #include "source_base/libm/libm.h" diff --git a/source/source_pw/module_pwdft/kernels/wf_op.h b/source/source_cell/kernels/wf_op.h similarity index 99% rename from source/source_pw/module_pwdft/kernels/wf_op.h rename to source/source_cell/kernels/wf_op.h index 98c9249cfb0..9c219d24ab9 100644 --- a/source/source_pw/module_pwdft/kernels/wf_op.h +++ b/source/source_cell/kernels/wf_op.h @@ -2,7 +2,6 @@ #define SRC_PW_WF_MULTI_DEVICE_H #include "source_base/module_device/types.h" -#include "source_psi/psi.h" #include namespace hamilt { diff --git a/source/source_pw/module_pwdft/soc.cpp b/source/source_cell/soc.cpp similarity index 100% rename from source/source_pw/module_pwdft/soc.cpp rename to source/source_cell/soc.cpp diff --git a/source/source_pw/module_pwdft/soc.h b/source/source_cell/soc.h similarity index 100% rename from source/source_pw/module_pwdft/soc.h rename to source/source_cell/soc.h diff --git a/source/source_pw/module_pwdft/stru_fac.cpp b/source/source_cell/stru_fac.cpp similarity index 100% rename from source/source_pw/module_pwdft/stru_fac.cpp rename to source/source_cell/stru_fac.cpp diff --git a/source/source_pw/module_pwdft/stru_fac.h b/source/source_cell/stru_fac.h similarity index 100% rename from source/source_pw/module_pwdft/stru_fac.h rename to source/source_cell/stru_fac.h diff --git a/source/source_pw/module_pwdft/stru_fac_k.cpp b/source/source_cell/stru_fac_k.cpp similarity index 98% rename from source/source_pw/module_pwdft/stru_fac_k.cpp rename to source/source_cell/stru_fac_k.cpp index 063d2d1ce36..d07d8b5a94f 100644 --- a/source/source_pw/module_pwdft/stru_fac_k.cpp +++ b/source/source_cell/stru_fac_k.cpp @@ -1,6 +1,7 @@ #include "source_base/module_device/device.h" +#include "source_base/module_device/memory_op.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/kernels/wf_op.h" +#include "source_cell/kernels/wf_op.h" #include "stru_fac.h" #include diff --git a/source/source_esolver/esolver_fp.h b/source/source_esolver/esolver_fp.h index 8d409b9d83b..39612979a9a 100644 --- a/source/source_esolver/esolver_fp.h +++ b/source/source_esolver/esolver_fp.h @@ -8,7 +8,7 @@ #include "source_estate/module_charge/chg_extra.h" // charge extrapolation #include "source_hamilt/module_surchem/surchem.h" // solvation model #include "source_base/parallel_grid.h" // Parallel_Grid (value member below) -#include "source_pw/module_pwdft/stru_fac.h" // structure factor +#include "source_cell/stru_fac.h" // structure factor #include "source_pw/module_pwdft/vl_pw.h" // local pseudopotential #include diff --git a/source/source_estate/elecstate_pw_sdft.cpp b/source/source_estate/elecstate_pw_sdft.cpp index f4061f733a5..4f21c9c310e 100644 --- a/source/source_estate/elecstate_pw_sdft.cpp +++ b/source/source_estate/elecstate_pw_sdft.cpp @@ -3,7 +3,6 @@ #include "source_base/global_function.h" #include "source_base/global_variable.h" #include "source_base/timer.h" -#include "source_hamilt/module_xc/xc_functional.h" #include "source_io/module_parameter/parameter.h" namespace elecstate { diff --git a/source/source_estate/module_charge/chg_extra.h b/source/source_estate/module_charge/chg_extra.h index 0efa5a13012..68b95a1ba06 100644 --- a/source/source_estate/module_charge/chg_extra.h +++ b/source/source_estate/module_charge/chg_extra.h @@ -5,8 +5,8 @@ #include "charge.h" #include "source_basis/module_pw/pw_basis.h" +#include "source_cell/stru_fac.h" #include "source_cell/unitcell.h" -#include "source_pw/module_pwdft/stru_fac.h" #ifdef __MPI #include "source_base/parallel_grid.h" #endif diff --git a/source/source_estate/module_dm/edm_tddft.cpp b/source/source_estate/module_dm/edm_tddft.cpp index 765017de3a3..ae7179c7e26 100644 --- a/source/source_estate/module_dm/edm_tddft.cpp +++ b/source/source_estate/module_dm/edm_tddft.cpp @@ -7,8 +7,6 @@ #include "source_base/module_device/memory_op.h" // memory operations #include "source_base/module_external/lapack_connector.h" #include "source_base/module_external/scalapack_connector.h" -#include "source_lcao/module_rt/gather_mat.h" // gatherMatrix and distributeMatrix -#include "source_lcao/module_rt/propagator.h" // Include header for create_identity_matrix namespace module_dm { diff --git a/source/source_estate/module_pot/potential_new.h b/source/source_estate/module_pot/potential_new.h index fdfaa190f08..e459864f11c 100644 --- a/source/source_estate/module_pot/potential_new.h +++ b/source/source_estate/module_pot/potential_new.h @@ -3,8 +3,8 @@ #include "pot_base.h" #include "source_base/complexmatrix.h" +#include "source_cell/stru_fac.h" #include "source_hamilt/module_surchem/surchem.h" -#include "source_pw/module_pwdft/stru_fac.h" #include "source_pw/module_pwdft/vsep_pw.h" #include diff --git a/source/source_estate/setup_estate_pw.h b/source/source_estate/setup_estate_pw.h index bde637028a2..6e8fd7a7ce8 100644 --- a/source/source_estate/setup_estate_pw.h +++ b/source/source_estate/setup_estate_pw.h @@ -3,7 +3,7 @@ #include "source_cell/unitcell.h" #include "source_cell/klist.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include "source_basis/module_pw/pw_basis_sup.h" #include "source_estate/elecstate.h" #include "source_pw/module_pwdft/vl_pw.h" diff --git a/source/source_estate/unittests/test_elecstate_pw.cpp b/source/source_estate/unittests/test_elecstate_pw.cpp index 1c47c8356b8..84dee22586c 100644 --- a/source/source_estate/unittests/test_elecstate_pw.cpp +++ b/source/source_estate/unittests/test_elecstate_pw.cpp @@ -8,7 +8,7 @@ #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_cell/soc.h" #include "source_io/module_parameter/parameter.h" /// @brief Friend helper to mutate PARAM private members in unit tests. diff --git a/source/source_hamilt/module_surchem/cal_pseudo.cpp b/source/source_hamilt/module_surchem/cal_pseudo.cpp index d1866c0e9a4..bd50dddc034 100644 --- a/source/source_hamilt/module_surchem/cal_pseudo.cpp +++ b/source/source_hamilt/module_surchem/cal_pseudo.cpp @@ -1,6 +1,6 @@ #include "surchem.h" -#include "source_pw/module_pwdft/stru_fac.h" // Structure_Factor member access (sf->strucFac) +#include "source_cell/stru_fac.h" // Structure_Factor member access (sf->strucFac) // atom_in surchem::GetAtom; diff --git a/source/source_hamilt/module_surchem/test/CMakeLists.txt b/source/source_hamilt/module_surchem/test/CMakeLists.txt index ddd30ce6d42..344b7da611d 100644 --- a/source/source_hamilt/module_surchem/test/CMakeLists.txt +++ b/source/source_hamilt/module_surchem/test/CMakeLists.txt @@ -15,7 +15,7 @@ AddTest( AddTest( TARGET MODULE_HAMILT_surchem_cal_pseudo LIBS parameter planewave device base psi - SOURCES cal_pseudo_test.cpp ../cal_pseudo.cpp ../surchem.cpp ../cal_epsilon.cpp ../../../source_pw/module_pwdft/stru_fac.cpp + SOURCES cal_pseudo_test.cpp ../cal_pseudo.cpp ../surchem.cpp ../cal_epsilon.cpp ../../../source_cell/stru_fac.cpp ) AddTest( diff --git a/source/source_hamilt/module_surchem/test/setcell.h b/source/source_hamilt/module_surchem/test/setcell.h index 9136552ae5d..6eaed1a2e39 100644 --- a/source/source_hamilt/module_surchem/test/setcell.h +++ b/source/source_hamilt/module_surchem/test/setcell.h @@ -8,7 +8,7 @@ #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_cell/unitcell.h" #include "source_base/parallel_grid.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" UnitCell::UnitCell(){}; UnitCell::~UnitCell(){}; diff --git a/source/source_io/module_bessel/numerical_basis.h b/source/source_io/module_bessel/numerical_basis.h index 62e6cb07b1b..f7a13c7e531 100644 --- a/source/source_io/module_bessel/numerical_basis.h +++ b/source/source_io/module_bessel/numerical_basis.h @@ -16,7 +16,7 @@ #include "../../source_base/vector3.h" #include "../../source_basis/module_pw/pw_basis_k.h" #include "../../source_cell/klist.h" -#include "../../source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include "../../source_psi/psi.h" //========================================================== // CLASS : diff --git a/source/source_io/module_ctrl/ctrl_scf_lcao.h b/source/source_io/module_ctrl/ctrl_scf_lcao.h index 013a25901da..29bc527ba5a 100644 --- a/source/source_io/module_ctrl/ctrl_scf_lcao.h +++ b/source/source_io/module_ctrl/ctrl_scf_lcao.h @@ -14,7 +14,7 @@ #include "source_lcao/setup_deepks.h" // for deepks, mohan add 20251008 #include "source_lcao/setup_exx.h" // for exx, mohan add 20251008 #include "source_psi/psi.h" // use Psi -#include "source_pw/module_pwdft/stru_fac.h" // use Structure_Factor +#include "source_cell/stru_fac.h" // use Structure_Factor #include #include diff --git a/source/source_io/module_energy/write_eband_terms.cpp b/source/source_io/module_energy/write_eband_terms.cpp index b7474b68023..b67094449cc 100644 --- a/source/source_io/module_energy/write_eband_terms.cpp +++ b/source/source_io/module_energy/write_eband_terms.cpp @@ -14,7 +14,7 @@ #include "source_basis/module_nao/two_center_bundle.h" #include "source_basis/module_ao/parallel_orbitals.h" #include "source_estate/module_charge/charge.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include "source_hamilt/module_surchem/surchem.h" #include "source_basis/module_pw/pw_basis.h" diff --git a/source/source_lcao/force_stress_lcao.h b/source/source_lcao/force_stress_lcao.h index 827dfc3db7a..251fd24268b 100644 --- a/source/source_lcao/force_stress_lcao.h +++ b/source/source_lcao/force_stress_lcao.h @@ -10,7 +10,7 @@ #include "source_base/matrix.h" #include "source_pw/module_pwdft/force_pw.h" #include "source_pw/module_pwdft/stress_func.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include "source_io/module_parameter/input_conv.h" #include "source_psi/psi.h" #ifdef __EXX diff --git a/source/source_lcao/lcao_set.h b/source/source_lcao/lcao_set.h index 114246be22a..8707156f1d1 100644 --- a/source/source_lcao/lcao_set.h +++ b/source/source_lcao/lcao_set.h @@ -8,7 +8,7 @@ #include "source_estate/module_dm/density_matrix.h" #include "source_hamilt/hamilt.h" #include "source_lcao/allocate_dm.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include "source_basis/module_pw/pw_basis.h" #include "source_hamilt/module_surchem/surchem.h" #include "source_pw/module_pwdft/vl_pw.h" diff --git a/source/source_lcao/module_deepks/test/CMakeLists.txt b/source/source_lcao/module_deepks/test/CMakeLists.txt index 0602f8ac755..859d7f14564 100644 --- a/source/source_lcao/module_deepks/test/CMakeLists.txt +++ b/source/source_lcao/module_deepks/test/CMakeLists.txt @@ -36,7 +36,7 @@ set(DEEPKS_UNIT_COMMON_SOURCES ../../../source_cell/read_pp_blps.cpp ../../../source_cell/sep.cpp ../../../source_cell/sep_cell.cpp - ../../../source_pw/module_pwdft/soc.cpp + ../../../source_cell/soc.cpp ../../../source_cell/read_pp_ucell.cpp ../../../source_estate/param_update.cpp ../../../source_cell/cal_wfc.cpp diff --git a/source/source_lcao/module_rt/test/CMakeLists.txt b/source/source_lcao/module_rt/test/CMakeLists.txt index e4a2c5e0efb..61fdf9edf6a 100644 --- a/source/source_lcao/module_rt/test/CMakeLists.txt +++ b/source/source_lcao/module_rt/test/CMakeLists.txt @@ -141,7 +141,7 @@ addtest( ../../../source_io/module_hs/pos_op_writer.cpp ../../../source_io/module_hs/lat_r_csr.cpp ../../../source_io/module_hs/pos_op_csr.cpp - ../../../source_pw/module_pwdft/soc.cpp + ../../../source_cell/soc.cpp ${SNAP_PSIBETA_CUDA_TEST_SOURCES}) addtest( diff --git a/source/source_lcao/setup_nonlocal.cpp b/source/source_lcao/setup_nonlocal.cpp index 936c16516cf..2c8bd59d73d 100644 --- a/source/source_lcao/setup_nonlocal.cpp +++ b/source/source_lcao/setup_nonlocal.cpp @@ -3,7 +3,7 @@ #include "source_base/parallel_common.h" #ifdef __LCAO -#include "source_pw/module_pwdft/soc.h" +#include "source_cell/soc.h" #include "../source_base/complexmatrix.h" // mohan add 2013-08-02 // In order to get rid of the read in file .NONLOCAL. diff --git a/source/source_psi/psi_base.cpp b/source/source_psi/psi_base.cpp index 045366c54d7..0dd81083197 100644 --- a/source/source_psi/psi_base.cpp +++ b/source/source_psi/psi_base.cpp @@ -2,8 +2,8 @@ #include "source_base/parallel_global.h" #include "source_basis/module_pw/pw_basis_k.h" +#include "source_cell/stru_fac.h" #include "source_cell/unitcell.h" -#include "source_pw/module_pwdft/stru_fac.h" #include #include diff --git a/source/source_psi/psi_init_atomic.cpp b/source/source_psi/psi_init_atomic.cpp index 020cb409d0d..564c5d7c2d2 100644 --- a/source/source_psi/psi_init_atomic.cpp +++ b/source/source_psi/psi_init_atomic.cpp @@ -8,10 +8,10 @@ #include "source_base/timer.h" #include "source_base/tool_quit.h" #include "source_basis/module_pw/pw_basis_k.h" +#include "source_cell/soc.h" +#include "source_cell/stru_fac.h" #include "source_cell/unitcell.h" #include "source_io/module_output/write_pao.h" -#include "source_pw/module_pwdft/soc.h" -#include "source_pw/module_pwdft/stru_fac.h" template void psi_init_atomic::allocate_ps_table() diff --git a/source/source_psi/psi_init_nao.cpp b/source/source_psi/psi_init_nao.cpp index 91705de86e2..2c1c2154293 100644 --- a/source/source_psi/psi_init_nao.cpp +++ b/source/source_psi/psi_init_nao.cpp @@ -1,8 +1,8 @@ #include "psi_init_nao.h" #include "source_basis/module_pw/pw_basis_k.h" +#include "source_cell/stru_fac.h" #include "source_cell/unitcell.h" -#include "source_pw/module_pwdft/stru_fac.h" #include // numerical algorithm support diff --git a/source/source_psi/psi_prepare.cpp b/source/source_psi/psi_prepare.cpp index 27d9f2bd4c7..d44a8c2049c 100644 --- a/source/source_psi/psi_prepare.cpp +++ b/source/source_psi/psi_prepare.cpp @@ -9,6 +9,7 @@ #include "source_base/timer.h" #include "source_base/tool_quit.h" #include "source_basis/module_pw/pw_basis_k.h" +#include "source_cell/stru_fac.h" #include "source_cell/unitcell.h" #include "source_hamilt/hamilt_hs_adapter.h" #include "source_hsolver/diag_comm_info.h" @@ -20,7 +21,6 @@ #include "source_psi/psi_init_nao.h" #include "source_psi/psi_init_nao_random.h" #include "source_psi/psi_init_random.h" -#include "source_pw/module_pwdft/stru_fac.h" namespace psi { diff --git a/source/source_psi/setup_psi_pw.cpp b/source/source_psi/setup_psi_pw.cpp index a07296676fb..237f0350dd2 100644 --- a/source/source_psi/setup_psi_pw.cpp +++ b/source/source_psi/setup_psi_pw.cpp @@ -2,9 +2,9 @@ #include "source_basis/module_pw/pw_basis_k.h" #include "source_cell/klist.h" +#include "source_cell/stru_fac.h" #include "source_cell/unitcell.h" #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/stru_fac.h" Setup_Psi_pw::Setup_Psi_pw() { diff --git a/source/source_psi/setup_psi_pw.h b/source/source_psi/setup_psi_pw.h index 27ba4ad1f88..251480785f6 100644 --- a/source/source_psi/setup_psi_pw.h +++ b/source/source_psi/setup_psi_pw.h @@ -4,11 +4,11 @@ #include "source_base/module_device/device.h" #include "source_basis/module_pw/pw_basis_k.h" #include "source_cell/klist.h" +#include "source_cell/stru_fac.h" #include "source_cell/unitcell.h" #include "source_hamilt/hamilt.h" #include "source_io/module_parameter/input_parameter.h" #include "source_psi/psi_prepare.h" -#include "source_pw/module_pwdft/stru_fac.h" class Setup_Psi_pw { diff --git a/source/source_psi/test/CMakeLists.txt b/source/source_psi/test/CMakeLists.txt index 2177a5a072b..510a8c846bf 100644 --- a/source/source_psi/test/CMakeLists.txt +++ b/source/source_psi/test/CMakeLists.txt @@ -12,7 +12,7 @@ AddTest( LIBS parameter base device psi psi_init planewave SOURCES psi_init_unit_test.cpp - ../../source_pw/module_pwdft/soc.cpp + ../../source_cell/soc.cpp ../../source_cell/atom_spec.cpp ../../source_cell/test/support/mock_unitcell.cpp diff --git a/source/source_psi/test/psi_init_unit_test.cpp b/source/source_psi/test/psi_init_unit_test.cpp index 6b0de01d97a..8a97e1f7b02 100644 --- a/source/source_psi/test/psi_init_unit_test.cpp +++ b/source/source_psi/test/psi_init_unit_test.cpp @@ -10,8 +10,8 @@ #include "source_cell/atom_pseudo.h" #include "source_cell/magnetism.h" #include "source_cell/pseudo.h" +#include "source_cell/stru_fac.h" #include "source_cell/unitcell.h" -#include "source_pw/module_pwdft/stru_fac.h" #include "source_pw/module_pwdft/vl_pw.h" #include diff --git a/source/source_pw/module_dfpt/dfpt_pert.cpp b/source/source_pw/module_dfpt/dfpt_pert.cpp index c2dc7640892..159252d4cd7 100644 --- a/source/source_pw/module_dfpt/dfpt_pert.cpp +++ b/source/source_pw/module_dfpt/dfpt_pert.cpp @@ -11,7 +11,7 @@ #include "source_base/truncated_func.h" #include "source_cell/atom_pseudo.h" #include "source_cell/atom_spec.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include #include diff --git a/source/source_pw/module_dfpt/dfpt_pw.cpp b/source/source_pw/module_dfpt/dfpt_pw.cpp index 4a00e89b803..78c723cdab1 100644 --- a/source/source_pw/module_dfpt/dfpt_pw.cpp +++ b/source/source_pw/module_dfpt/dfpt_pw.cpp @@ -15,7 +15,7 @@ #include "source_base/timer.h" #include "source_base/tool_title.h" #include "source_cell/qlist.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include #include diff --git a/source/source_pw/module_dfpt/test/dfpt_test_mocks.cpp b/source/source_pw/module_dfpt/test/dfpt_test_mocks.cpp index e4b45c89d1d..83757fc9ed1 100644 --- a/source/source_pw/module_dfpt/test/dfpt_test_mocks.cpp +++ b/source/source_pw/module_dfpt/test/dfpt_test_mocks.cpp @@ -21,7 +21,7 @@ #include "source_cell/unitcell.h" #include "source_estate/module_charge/chg_mix.h" #include "source_pw/module_pwdft/dftu_base.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" pseudo::pseudo() { diff --git a/source/source_pw/module_dfpt/test_serial/dfpt_pert_serial_test.cpp b/source/source_pw/module_dfpt/test_serial/dfpt_pert_serial_test.cpp index 06a2f76b145..a50fa7e9613 100644 --- a/source/source_pw/module_dfpt/test_serial/dfpt_pert_serial_test.cpp +++ b/source/source_pw/module_dfpt/test_serial/dfpt_pert_serial_test.cpp @@ -21,7 +21,7 @@ #include "source_cell/unitcell.h" #include "source_psi/psi.h" #include "source_pw/module_dfpt/dfpt_pert.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include "source_pw/module_pwdft/dftu_base.h" // ctor/dtor stubs for the cell/spepot/stru_fac link closures live in the diff --git a/source/source_pw/module_dfpt/test_serial/dfpt_phon_serial_test.cpp b/source/source_pw/module_dfpt/test_serial/dfpt_phon_serial_test.cpp index 085de1a93da..aadaa8e91e0 100644 --- a/source/source_pw/module_dfpt/test_serial/dfpt_phon_serial_test.cpp +++ b/source/source_pw/module_dfpt/test_serial/dfpt_phon_serial_test.cpp @@ -23,7 +23,7 @@ #include "source_pw/module_dfpt/dfpt_kq_basis.h" #include "source_pw/module_dfpt/dfpt_pert.h" #include "source_pw/module_dfpt/dfpt_phon.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" // ctor/dtor stubs for the cell/spepot/stru_fac link closures live in the // shared test/dfpt_test_mocks.cpp compiled into every DFPT test binary. diff --git a/source/source_pw/module_dfpt/test_serial/dfpt_q0_serial_test.cpp b/source/source_pw/module_dfpt/test_serial/dfpt_q0_serial_test.cpp index a02dd2a66c1..1c52a86e558 100644 --- a/source/source_pw/module_dfpt/test_serial/dfpt_q0_serial_test.cpp +++ b/source/source_pw/module_dfpt/test_serial/dfpt_q0_serial_test.cpp @@ -22,7 +22,7 @@ #include "source_psi/psi.h" #include "source_pw/module_dfpt/dfpt_pert.h" #include "source_pw/module_dfpt/dfpt_q0.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" // ctor/dtor stubs for the cell/spepot/stru_fac link closures live in the // shared test/dfpt_test_mocks.cpp compiled into every DFPT test binary. diff --git a/source/source_pw/module_proj/onsite_proj.h b/source/source_pw/module_proj/onsite_proj.h index f9618c427bc..f0a5e427603 100644 --- a/source/source_pw/module_proj/onsite_proj.h +++ b/source/source_pw/module_proj/onsite_proj.h @@ -2,7 +2,7 @@ #define MODULEHAMILTPW_ONSITEPROJECTOR_H #include "source_base/module_device/device.h" #include "source_base/kernels/math_kernel_op.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include "source_basis/module_pw/pw_basis_k.h" #include "source_psi/psi.h" #include "source_pw/module_proj/onsite_proj_tools.h" diff --git a/source/source_pw/module_pwdft/CMakeLists.txt b/source/source_pw/module_pwdft/CMakeLists.txt index fbe33d10327..81e1cf5347e 100644 --- a/source/source_pw/module_pwdft/CMakeLists.txt +++ b/source/source_pw/module_pwdft/CMakeLists.txt @@ -70,9 +70,6 @@ list( vnl_pw_init_vnl.cpp vnl_pw_qrad.cpp vnl_pw_table.cpp - stru_fac.cpp - stru_fac_k.cpp - soc.cpp elecond.cpp fs_nonlocal_tools.cpp fs_nonlocal_tools_vkb.cpp diff --git a/source/source_pw/module_pwdft/force_pw.h b/source/source_pw/module_pwdft/force_pw.h index 0cc4b56cdeb..f06138e8fd8 100644 --- a/source/source_pw/module_pwdft/force_pw.h +++ b/source/source_pw/module_pwdft/force_pw.h @@ -11,7 +11,7 @@ #include "source_pw/module_pwdft/vl_pw.h" #include "source_base/kernels/math_kernel_op.h" #include "source_psi/psi.h" -#include "stru_fac.h" +#include "source_cell/stru_fac.h" #include "source_pw/module_pwdft/dftu_base.h" class pseudopot_cell_vnl; diff --git a/source/source_pw/module_pwdft/kernels/test/wf_op_test.cpp b/source/source_pw/module_pwdft/kernels/test/wf_op_test.cpp index 1f7bca363ae..ec359585ecd 100644 --- a/source/source_pw/module_pwdft/kernels/test/wf_op_test.cpp +++ b/source/source_pw/module_pwdft/kernels/test/wf_op_test.cpp @@ -1,4 +1,4 @@ -#include "source_pw/module_pwdft/kernels/wf_op.h" +#include "source_cell/kernels/wf_op.h" #include "source_base/module_device/memory_op.h" diff --git a/source/source_pw/module_pwdft/setup_pot.h b/source/source_pw/module_pwdft/setup_pot.h index d865f163b07..dfdff2ddaf9 100644 --- a/source/source_pw/module_pwdft/setup_pot.h +++ b/source/source_pw/module_pwdft/setup_pot.h @@ -3,7 +3,7 @@ #include "source_cell/unitcell.h" #include "source_cell/klist.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include "source_estate/elecstate.h" #include "source_pw/module_pwdft/vl_pw.h" #include "source_hamilt/hamilt.h" diff --git a/source/source_pw/module_pwdft/stress_func.h b/source/source_pw/module_pwdft/stress_func.h index 4eb758999b8..4e786c67cac 100644 --- a/source/source_pw/module_pwdft/stress_func.h +++ b/source/source_pw/module_pwdft/stress_func.h @@ -11,7 +11,7 @@ #include "source_estate/module_charge/charge.h" #include "source_pw/module_pwdft/vnl_pw.h" #include "source_pw/module_pwdft/kernels/stress_op.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include "source_base/kernels/math_kernel_op.h" #include "source_psi/psi.h" #include "source_pw/module_pwdft/dftu_base.h" diff --git a/source/source_pw/module_pwdft/unittests/CMakeLists.txt b/source/source_pw/module_pwdft/unittests/CMakeLists.txt index 6404f938a7e..e013ad118b2 100644 --- a/source/source_pw/module_pwdft/unittests/CMakeLists.txt +++ b/source/source_pw/module_pwdft/unittests/CMakeLists.txt @@ -11,7 +11,7 @@ addtest( parameter SOURCES test_soc.cpp - ../soc.cpp + ../../../source_cell/soc.cpp ../../../source_base/global_variable.cpp ../../../source_base/global_function.cpp ../../../source_base/global_file.cpp @@ -85,7 +85,7 @@ addtest( planewave SOURCES test_stru_fac.cpp - ../stru_fac.cpp + ../../../source_cell/stru_fac.cpp ../../../source_cell/unitcell.cpp ../../../source_cell/unitcell_index.cpp ../../../source_cell/unitcell_stats.cpp diff --git a/source/source_pw/module_pwdft/unittests/test_soc.cpp b/source/source_pw/module_pwdft/unittests/test_soc.cpp index e870b744654..a1b09b45097 100644 --- a/source/source_pw/module_pwdft/unittests/test_soc.cpp +++ b/source/source_pw/module_pwdft/unittests/test_soc.cpp @@ -24,7 +24,7 @@ void EXPECT_COMPLEX_DOUBLE_EQ(const std::complex& a,const std::complex #ifdef __LCAO diff --git a/source/source_pw/module_rt/unittests/CMakeLists.txt b/source/source_pw/module_rt/unittests/CMakeLists.txt index 7bc58db6f3a..747636e7667 100644 --- a/source/source_pw/module_rt/unittests/CMakeLists.txt +++ b/source/source_pw/module_rt/unittests/CMakeLists.txt @@ -31,7 +31,7 @@ if(ENABLE_MPI) ../../module_pwdft/op_pw_vel.cpp ../../module_pwdft/projector_gradient.cpp ../../module_pwdft/velocity_workspace.cpp ../../module_pwdft/nonlocal_workspace.cpp ../../module_pwdft/vnl_pw.cpp ../../module_pwdft/vnl_pw_init_vnl.cpp ../../module_pwdft/vnl_pw_getvnl.cpp ../../module_pwdft/vnl_pw_deeq.cpp ../../module_pwdft/vnl_pw_grad.cpp ../../module_pwdft/vnl_pw_table.cpp ../../module_pwdft/vnl_pw_qrad.cpp - ../../module_pwdft/stru_fac.cpp ../../module_pwdft/stru_fac_k.cpp ../../module_pwdft/soc.cpp ../../module_pwdft/nonlocal_maths.cpp + ../../../source_cell/stru_fac.cpp ../../../source_cell/stru_fac_k.cpp ../../../source_cell/soc.cpp ../../module_pwdft/nonlocal_maths.cpp ../../module_proj/onsite_proj.cpp ../../module_proj/onsite_proj_init.cpp ../../module_proj/onsite_proj_overlap.cpp ../../module_proj/onsite_proj_tools.cpp ../../module_proj/onsite_proj_tools_becp.cpp ../../module_proj/radial_proj.cpp diff --git a/source/source_pw/module_stodft/sto_stress_pw.cpp b/source/source_pw/module_stodft/sto_stress_pw.cpp index 68a42d67006..1bb5fd6ecb6 100644 --- a/source/source_pw/module_stodft/sto_stress_pw.cpp +++ b/source/source_pw/module_stodft/sto_stress_pw.cpp @@ -4,7 +4,7 @@ #include "source_base/timer.h" #include "source_pw/module_pwdft/fs_kin_tools.h" #include "source_pw/module_pwdft/fs_nonlocal_tools.h" -#include "source_pw/module_pwdft/stru_fac.h" +#include "source_cell/stru_fac.h" #include "source_io/module_output/output_log.h" #include "source_io/module_parameter/parameter.h" diff --git a/source/source_relax/ions_move_lbfgs.h b/source/source_relax/ions_move_lbfgs.h index edf7a585f6a..f3f5634f7c1 100644 --- a/source/source_relax/ions_move_lbfgs.h +++ b/source/source_relax/ions_move_lbfgs.h @@ -13,7 +13,6 @@ #include "source_base/matrix3.h" #include "source_cell/unitcell.h" #include "source_esolver/esolver.h" -#include "source_esolver/esolver_ks.h" /** * @class Ions_Move_LBFGS