@@ -63,7 +63,7 @@ void TwoCenterBundle::tabulate()
6363{
6464 ModuleBase::SphericalBesselTransformer sbt (true );
6565 orb_->set_transformer (sbt);
66- beta_->set_transformer (sbt);
66+ if ( beta_) { beta_ ->set_transformer (sbt); }
6767 if (alpha_) {
6868 alpha_->set_transformer (sbt);
6969}
@@ -75,22 +75,17 @@ void TwoCenterBundle::tabulate()
7575 // build two-center integration tables
7676 // ================================================================
7777 // set up a universal radial grid
78- double rmax = std::max (orb_->rcut_max (), beta_->rcut_max ());
79- if (alpha_) {
80- rmax = std::max (rmax, alpha_->rcut_max ());
81- }
78+ double rmax = orb_->rcut_max ();
79+ if (beta_) { rmax = std::max (rmax, beta_->rcut_max ()); }
80+ if (alpha_) { rmax = std::max (rmax, alpha_->rcut_max ()); }
8281 double dr = 0.01 ;
8382 double cutoff = 2.0 * rmax;
8483 int nr = static_cast <int >(rmax / dr) + 1 ;
8584
8685 orb_->set_uniform_grid (true , nr, cutoff, ' i' , true );
87- beta_->set_uniform_grid (true , nr, cutoff, ' i' , true );
88- if (alpha_) {
89- alpha_->set_uniform_grid (true , nr, cutoff, ' i' , true );
90- }
91- if (orb_onsite_) {
92- orb_onsite_->set_uniform_grid (true , nr, cutoff, ' i' , true );
93- }
86+ if (beta_) { beta_->set_uniform_grid (true , nr, cutoff, ' i' , true ); }
87+ if (alpha_) { alpha_->set_uniform_grid (true , nr, cutoff, ' i' , true );}
88+ if (orb_onsite_) { orb_onsite_->set_uniform_grid (true , nr, cutoff, ' i' , true );}
9489
9590 // build TwoCenterIntegrator objects
9691 kinetic_orb = std::unique_ptr<TwoCenterIntegrator>(new TwoCenterIntegrator);
@@ -101,9 +96,12 @@ void TwoCenterBundle::tabulate()
10196 overlap_orb->tabulate (*orb_, *orb_, ' S' , nr, cutoff);
10297 ModuleBase::Memory::record (" TwoCenterTable: Overlap" , overlap_orb->table_memory ());
10398
104- overlap_orb_beta = std::unique_ptr<TwoCenterIntegrator>(new TwoCenterIntegrator);
105- overlap_orb_beta->tabulate (*orb_, *beta_, ' S' , nr, cutoff);
106- ModuleBase::Memory::record (" TwoCenterTable: Nonlocal" , overlap_orb_beta->table_memory ());
99+ if (beta_)
100+ {
101+ overlap_orb_beta = std::unique_ptr<TwoCenterIntegrator>(new TwoCenterIntegrator);
102+ overlap_orb_beta->tabulate (*orb_, *beta_, ' S' , nr, cutoff);
103+ ModuleBase::Memory::record (" TwoCenterTable: Nonlocal" , overlap_orb_beta->table_memory ());
104+ }
107105
108106 if (alpha_)
109107 {
0 commit comments