@@ -108,15 +108,9 @@ void Charge_Mixing::auto_set(const double& bandgap_in, const UnitCell& ucell_)
108108            }
109109        }
110110    }
111-     //  auto set kerker mixing for trans metal system
112-     if  (has_trans_metal)
113-     {
114-         this ->mixing_gg0  = 1.5 ;
115-     }
116-     else 
117-     {
118-         this ->mixing_gg0  = 0.0 ;
119-     }
111+     //  auto set kerker mixing_gg0 = 1.0 as default
112+     this ->mixing_gg0  = 1.0 ;
113+ 
120114    GlobalV::ofs_running << "       Autoset mixing_gg0 to " this ->mixing_gg0  << std::endl;
121115    GlobalV::ofs_running << " -------------------------------------" 
122116    //  auto set for inhomogeneous system
@@ -362,7 +356,7 @@ void Charge_Mixing::mix_rho(Charge* chr)
362356
363357void  Charge_Mixing::Kerker_screen_recip (std::complex <double >* drhog)
364358{
365-     if  (this ->mixing_gg0  <= 0.0 )
359+     if  (this ->mixing_gg0  <= 0.0  ||  this -> mixing_beta  <=  0.1 )
366360        return ;
367361    const  double  fac = this ->mixing_gg0 ;
368362    const  double  gg0 = std::pow (fac * 0.529177  / GlobalC::ucell.tpiba , 2 );
@@ -374,7 +368,7 @@ void Charge_Mixing::Kerker_screen_recip(std::complex<double>* drhog)
374368        for  (int  ig = 0 ; ig < this ->rhopw ->npw ; ++ig)
375369        {
376370            double  gg = this ->rhopw ->gg [ig];
377-             double  filter_g = std::max (gg / (gg + gg0), 0.1 );
371+             double  filter_g = std::max (gg / (gg + gg0), 0.1  /  this -> mixing_beta );
378372            drhog[is * this ->rhopw ->npw  + ig] *= filter_g;
379373        }
380374    }
@@ -383,7 +377,7 @@ void Charge_Mixing::Kerker_screen_recip(std::complex<double>* drhog)
383377
384378void  Charge_Mixing::Kerker_screen_real (double * drhor)
385379{
386-     if  (this ->mixing_gg0  <= 0.0 )
380+     if  (this ->mixing_gg0  <= 0.0  ||  this -> mixing_beta  <=  0.1 )
387381        return ;
388382    std::vector<std::complex <double >> drhog (this ->rhopw ->npw  * GlobalV::NSPIN);
389383    std::vector<double > drhor_filter (this ->rhopw ->nrxx  * GlobalV::NSPIN);
@@ -405,7 +399,7 @@ void Charge_Mixing::Kerker_screen_real(double* drhor)
405399        for  (int  ig = 0 ; ig < this ->rhopw ->npw ; ig++)
406400        {
407401            double  gg = this ->rhopw ->gg [ig];
408-             double  filter_g = std::max (gg / (gg + gg0), 0.1 );
402+             double  filter_g = std::max (gg / (gg + gg0), 0.1  /  this -> mixing_beta );
409403            drhog[is * this ->rhopw ->npw  + ig] *= (1  - filter_g);
410404        }
411405    }
0 commit comments