1414#include " module_hamilt_lcao/hamilt_lcaodft/operator_lcao/ekinetic_new.h" // use hamilt::EkineticNew
1515#include " module_io/cal_pLpR.h" // use AngularMomentumCalculator()
1616#include " module_hamilt_lcao/module_deltaspin/spin_constrain.h" // use spinconstrain::SpinConstrain<TK>
17+ #include " module_io/berryphase.h" // use berryphase
1718#include " module_io/to_qo.h" // use toQO
1819
1920namespace ModuleIO
@@ -30,6 +31,9 @@ void ctrl_output_lcao(UnitCell& ucell,
3031 TwoCenterBundle &two_center_bundle,
3132 Gint_k &gk,
3233 LCAO_Orbitals &orb,
34+ const ModulePW::PW_Basis_K* pw_wfc, // for berryphase
35+ const ModulePW::PW_Basis* pw_rho, // for berryphase
36+ Grid_Technique >, // for berryphase
3337 const int istep)
3438{
3539 ModuleBase::TITLE (" ModuleIO" , " ctrl_output_lcao" );
@@ -244,20 +248,20 @@ void ctrl_output_lcao(UnitCell& ucell,
244248 sc.print_Mag_Force (GlobalV::ofs_running);
245249 }
246250
247- /*
248251 // ------------------------------------------------------------------
249252 // ! 11) Output Berry phase
250253 // ------------------------------------------------------------------
251254 if (PARAM.inp .calculation == " nscf" && berryphase::berry_phase_flag && ModuleSymmetry::Symmetry::symm_flag != 1 )
252255 {
253256 std::cout << FmtCore::format (" \n * * * * * *\n << Start %s.\n " , " Berry phase calculation" );
254257 berryphase bp (&pv);
255- bp.lcao_init(ucell, gd, kv, GridT, orb_ );
258+ bp.lcao_init (ucell, gd, kv, gt, orb );
256259 // additional step before calling macroscopic_polarization
257260 bp.Macroscopic_polarization (ucell, pw_wfc->npwk_max , psi, pw_rho, pw_wfc, kv);
258261 std::cout << FmtCore::format (" >> Finish %s.\n * * * * * *\n " , " Berry phase calculation" );
259262 }
260263
264+ /*
261265 //------------------------------------------------------------------
262266 //! 12) Output quasi orbitals
263267 //------------------------------------------------------------------
@@ -417,6 +421,9 @@ template void ModuleIO::ctrl_output_lcao<double, double>(UnitCell& ucell,
417421 TwoCenterBundle &two_center_bundle,
418422 Gint_k &gk,
419423 LCAO_Orbitals &orb,
424+ const ModulePW::PW_Basis_K* pw_wfc, // for berryphase
425+ const ModulePW::PW_Basis* pw_rho, // for berryphase
426+ Grid_Technique >, // for berryphase
420427 const int istep);
421428
422429// For multiple k-points
@@ -430,6 +437,9 @@ template void ModuleIO::ctrl_output_lcao<std::complex<double>, double>(UnitCell&
430437 TwoCenterBundle &two_center_bundle,
431438 Gint_k &gk,
432439 LCAO_Orbitals &orb,
440+ const ModulePW::PW_Basis_K* pw_wfc, // for berryphase
441+ const ModulePW::PW_Basis* pw_rho, // for berryphase
442+ Grid_Technique >, // for berryphase
433443 const int istep);
434444
435445template void ModuleIO::ctrl_output_lcao<std::complex <double >, std::complex <double >>(UnitCell& ucell,
@@ -442,5 +452,8 @@ template void ModuleIO::ctrl_output_lcao<std::complex<double>, std::complex<doub
442452 TwoCenterBundle &two_center_bundle,
443453 Gint_k &gk,
444454 LCAO_Orbitals &orb,
455+ const ModulePW::PW_Basis_K* pw_wfc, // for berryphase
456+ const ModulePW::PW_Basis* pw_rho, // for berryphase
457+ Grid_Technique >, // for berryphase
445458 const int istep);
446459
0 commit comments