diff --git a/source/source_esolver/esolver_fp.h b/source/source_esolver/esolver_fp.h index 501bef9b68..74928c0bb2 100644 --- a/source/source_esolver/esolver_fp.h +++ b/source/source_esolver/esolver_fp.h @@ -9,6 +9,7 @@ #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 +#include "source_pw/module_pwdft/parallel_grid.h" // Parallel_Grid (value member below) #include "source_pw/module_pwdft/vl_pw.h" // local pseudopotential #include "source_pw/module_pwdft/structure_factor.h" // structure factor diff --git a/source/source_hamilt/module_surchem/cal_pseudo.cpp b/source/source_hamilt/module_surchem/cal_pseudo.cpp index e58024d441..6a1547ddd3 100644 --- a/source/source_hamilt/module_surchem/cal_pseudo.cpp +++ b/source/source_hamilt/module_surchem/cal_pseudo.cpp @@ -1,5 +1,7 @@ #include "surchem.h" +#include "source_pw/module_pwdft/structure_factor.h" // Structure_Factor member access (sf->strucFac) + // atom_in surchem::GetAtom; void surchem::gauss_charge(const UnitCell& cell, diff --git a/source/source_hamilt/module_surchem/surchem.h b/source/source_hamilt/module_surchem/surchem.h index c792414ca6..ae1a7db6bb 100644 --- a/source/source_hamilt/module_surchem/surchem.h +++ b/source/source_hamilt/module_surchem/surchem.h @@ -6,8 +6,10 @@ #include "source_base/matrix.h" #include "source_basis/module_pw/pw_basis.h" #include "source_cell/unitcell.h" -#include "source_pw/module_pwdft/parallel_grid.h" -#include "source_pw/module_pwdft/structure_factor.h" + +// forward-declared: used below only as pointer/reference +class Parallel_Grid; +class Structure_Factor; class surchem { diff --git a/source/source_pw/module_pwdft/forces.cpp b/source/source_pw/module_pwdft/forces.cpp index 2f2e1ea3a8..386785cf9c 100644 --- a/source/source_pw/module_pwdft/forces.cpp +++ b/source/source_pw/module_pwdft/forces.cpp @@ -17,6 +17,7 @@ #include "source_estate/module_pot/gatefield.h" #include "source_hamilt/module_ewald/H_Ewald_pw.h" #include "source_hamilt/module_surchem/surchem.h" +#include "source_pw/module_pwdft/structure_factor.h" // Structure_Factor member access (p_sf->strucFac) #include "source_hamilt/module_vdw/vdw.h" #ifdef _OPENMP diff --git a/source/source_pw/module_pwdft/hamilt_pw.h b/source/source_pw/module_pwdft/hamilt_pw.h index 958f82c8e3..ee7d228087 100644 --- a/source/source_pw/module_pwdft/hamilt_pw.h +++ b/source/source_pw/module_pwdft/hamilt_pw.h @@ -4,7 +4,6 @@ #include "source_base/kernels/math_kernel_op.h" #include "source_base/macros.h" #include "source_cell/klist.h" -#include "source_esolver/esolver_ks_pw.h" #include "source_estate/module_pot/potential_new.h" #include "source_hamilt/hamilt.h" #include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-06