Skip to content

Commit e36bb3e

Browse files
Critsium-xyclaude
andcommitted
refactor: remove dead cross-module includes on reverse-dependency edges
Static scan + per-target compile verification identified 9 unused includes that create reverse/lateral dependency edges between modules. Removing them weakens the coupling without any behavior change: io -> md input_conv.cpp (md_func.h) estate -> lcao elecstate_energy_terms.cpp, elecstate_print.cpp (module_deepks/LCAO_deepks.h) lcao -> pw rdmft_tools.cpp (structure_factor.h), wavefunc_in_pw.cpp (soc.h) lcao -> io FORCE_gamma.cpp, FORCE_k.cpp (module_hs/write_HS.h) pw -> io forces_cc.cpp, forces_scc.cpp (module_output/output_log.h) Verified by building io_basic, elecstate, rdmft, hamilt_lcao and module_pwdft (ENABLE_LCAO=ON) after removal; all link targets compile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5d93510 commit e36bb3e

9 files changed

Lines changed: 0 additions & 9 deletions

File tree

source/source_estate/elecstate_energy_terms.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "source_estate/module_pot/H_Hartree_pw.h"
44
#include "source_estate/module_pot/efield.h"
55
#include "source_estate/module_pot/gatefield.h"
6-
#include "source_lcao/module_deepks/LCAO_deepks.h"
76
#include "source_lcao/module_deltaspin/spin_constrain.h"
87
#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-06
98

source/source_estate/elecstate_print.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "source_estate/module_pot/efield.h"
77
#include "source_estate/module_pot/gatefield.h"
88
#include "source_hamilt/module_xc/xc_functional.h"
9-
#include "source_lcao/module_deepks/LCAO_deepks.h"
109
#include "source_io/module_parameter/parameter.h"
1110
#include "occupy.h"
1211
namespace elecstate

source/source_io/module_parameter/input_conv.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include "source_estate/module_pot/gatefield.h"
4343
#include "source_hsolver/hsolver_lcao.h"
4444
#include "source_hsolver/hsolver_pw.h"
45-
#include "source_md/md_func.h"
4645
#include "source_relax/bfgs_basic.h"
4746
#include "source_relax/ions_move_cg.h"
4847

source/source_lcao/FORCE_gamma.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "source_estate/elecstate_lcao.h"
1414
#include "source_lcao/LCAO_domain.h"
1515
#include "source_lcao/pulay_fs.h"
16-
#include "source_io/module_hs/write_HS.h"
1716

1817
template <>
1918
void Force_LCAO<double>::allocate(const UnitCell& ucell,

source/source_lcao/FORCE_k.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "source_estate/module_dm/cal_dm_psi.h"
1111
#include "source_lcao/LCAO_domain.h"
1212
#include "source_lcao/pulay_fs.h"
13-
#include "source_io/module_hs/write_HS.h"
1413
#include "source_io/module_parameter/parameter.h"
1514

1615
#include <map>

source/source_lcao/module_rdmft/rdmft_tools.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "source_estate/module_pot/H_Hartree_pw.h"
1111
#include "source_estate/module_pot/pot_local.h"
1212
#include "source_estate/module_pot/pot_xc.h"
13-
#include "source_pw/module_pwdft/structure_factor.h"
1413
#include "source_lcao/module_gint/gint_interface.h"
1514
#include "source_io/module_parameter/parameter.h"
1615

source/source_lcao/wavefunc_in_pw.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "source_base/math_sphbes.h"
66
#include "source_base/math_polyint.h"
77
#include "source_base/math_ylmreal.h"
8-
#include "source_pw/module_pwdft/soc.h"
98

109
void Wavefunc_in_pw::make_table_q(
1110
const UnitCell &ucell,

source/source_pw/module_pwdft/forces_cc.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include "stress_func.h"
33
#include "source_base/parallel_reduce.h"
44
#include "source_io/module_parameter/parameter.h"
5-
#include "source_io/module_output/output_log.h"
65
// new
76
#include "source_base/complexmatrix.h"
87
#include "source_base/libm/libm.h"

source/source_pw/module_pwdft/forces_scc.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "forces.h"
22
#include "source_base/parallel_reduce.h"
3-
#include "source_io/module_output/output_log.h"
43
#include "stress_func.h"
54
// new
65
#include "source_base/complexmatrix.h"

0 commit comments

Comments
 (0)