@@ -585,8 +585,8 @@ void ESolver_KS_PW<T, Device>::after_scf(UnitCell& ucell, const int istep)
585585 PARAM.inp .out_wannier_wvfn_formatted ,
586586 PARAM.inp .nnkpfile ,
587587 PARAM.inp .wannier_spin );
588-
589- wan.calculate (this ->pelec ->ekb , this ->pw_wfc , this ->pw_big , this ->kv , this ->psi );
588+ wan. set_tpiba_omega (ucell. tpiba , ucell. omega );
589+ wan.calculate (ucell, this ->pelec ->ekb , this ->pw_wfc , this ->pw_big , this ->kv , this ->psi );
590590 std::cout << FmtCore::format (" >> Finish %s.\n * * * * * *\n " , " Wannier functions calculation" );
591591 }
592592
@@ -595,7 +595,7 @@ void ESolver_KS_PW<T, Device>::after_scf(UnitCell& ucell, const int istep)
595595 {
596596 std::cout << FmtCore::format (" \n * * * * * *\n << Start %s.\n " , " Berry phase polarization" );
597597 berryphase bp;
598- bp.Macroscopic_polarization (this ->pw_wfc ->npwk_max , this ->psi , this ->pw_rho , this ->pw_wfc , this ->kv );
598+ bp.Macroscopic_polarization (ucell, this ->pw_wfc ->npwk_max , this ->psi , this ->pw_rho , this ->pw_wfc , this ->kv );
599599 std::cout << FmtCore::format (" >> Finish %s.\n * * * * * *\n " , " Berry phase polarization" );
600600 }
601601}
@@ -783,7 +783,7 @@ void ESolver_KS_PW<T, Device>::after_all_runners(UnitCell& ucell)
783783 // ! 6) Print out electronic wave functions in real space
784784 if (PARAM.inp .out_wfc_r == 1 ) // Peize Lin add 2021.11.21
785785 {
786- ModuleIO::write_psi_r_1 (this ->psi [0 ], this ->pw_wfc , " wfc_realspace" , true , this ->kv );
786+ ModuleIO::write_psi_r_1 (ucell, this ->psi [0 ], this ->pw_wfc , " wfc_realspace" , true , this ->kv );
787787 }
788788
789789 // ! 7) Use Kubo-Greenwood method to compute conductivities
0 commit comments