@@ -29,7 +29,7 @@ void force_cor_one(const UnitCell& cell, const ModulePW::PW_Basis* rho_basis, Mo
2929 vloc_at[ig] = GlobalC::ppcell.vloc (it, rho_basis->ig2igg [ig]) * phase;
3030 if (rho_basis->ig_gge0 == ig)
3131 {
32- N[ig] = GlobalC::ucell .atoms [it].ncpp .zv / GlobalC::ucell .omega ;
32+ N[ig] = cell .atoms [it].ncpp .zv / cell .omega ;
3333 }
3434 else
3535 {
@@ -45,9 +45,9 @@ void force_cor_one(const UnitCell& cell, const ModulePW::PW_Basis* rho_basis, Mo
4545 forcesol (iat, 2 ) += rho_basis->gcar [ig][2 ] * imag (conj (delta_phi_g[ig]) * N[ig]);
4646 }
4747
48- forcesol (iat, 0 ) *= (GlobalC::ucell .tpiba * GlobalC::ucell .omega );
49- forcesol (iat, 1 ) *= (GlobalC::ucell .tpiba * GlobalC::ucell .omega );
50- forcesol (iat, 2 ) *= (GlobalC::ucell .tpiba * GlobalC::ucell .omega );
48+ forcesol (iat, 0 ) *= (cell .tpiba * cell .omega );
49+ forcesol (iat, 1 ) *= (cell .tpiba * cell .omega );
50+ forcesol (iat, 2 ) *= (cell .tpiba * cell .omega );
5151 // unit Ry/Bohr
5252 forcesol (iat, 0 ) *= 2 ;
5353 forcesol (iat, 1 ) *= 2 ;
@@ -125,9 +125,9 @@ void force_cor_two(const UnitCell& cell, const ModulePW::PW_Basis* rho_basis, Mo
125125 forcesol (iat, 2 ) -= rho_basis->gcar [ig][2 ] * imag (conj (Vcav_g[ig]+Vel_g[ig]) * n_pseudo[ig]);
126126 }
127127
128- forcesol (iat, 0 ) *= (GlobalC::ucell .tpiba * GlobalC::ucell .omega );
129- forcesol (iat, 1 ) *= (GlobalC::ucell .tpiba * GlobalC::ucell .omega );
130- forcesol (iat, 2 ) *= (GlobalC::ucell .tpiba * GlobalC::ucell .omega );
128+ forcesol (iat, 0 ) *= (cell .tpiba * cell .omega );
129+ forcesol (iat, 1 ) *= (cell .tpiba * cell .omega );
130+ forcesol (iat, 2 ) *= (cell .tpiba * cell .omega );
131131 // eV/Ang
132132 forcesol (iat, 0 ) *= 2 ;
133133 forcesol (iat, 1 ) *= 2 ;
@@ -151,17 +151,17 @@ void surchem::cal_force_sol(const UnitCell& cell, const ModulePW::PW_Basis* rho_
151151 ModuleBase::TITLE (" surchem" , " cal_force_sol" );
152152 ModuleBase::timer::tick (" surchem" , " cal_force_sol" );
153153
154- int nat = GlobalC::ucell .nat ;
154+ int nat = cell .nat ;
155155 ModuleBase::matrix force1 (nat, 3 );
156156 ModuleBase::matrix force2 (nat, 3 );
157157
158158 force_cor_one (cell, rho_basis,force1);
159159 force_cor_two (cell, rho_basis,force2);
160160
161161 int iat = 0 ;
162- for (int it = 0 ;it < GlobalC::ucell .ntype ;it++)
162+ for (int it = 0 ;it < cell .ntype ;it++)
163163 {
164- for (int ia = 0 ;ia < GlobalC::ucell .atoms [it].na ;ia++)
164+ for (int ia = 0 ;ia < cell .atoms [it].na ;ia++)
165165 {
166166 for (int ipol = 0 ; ipol < 3 ; ipol++)
167167 {
0 commit comments