55#include " source_base/parallel_common.h"
66#include " source_base/ylm.h"
77#include " source_basis/module_nao/real_gaunt_table.h"
8- #include " source_io/module_parameter/parameter.h"
98
109#include < memory>
1110
12- void TwoCenterBundle::build_orb (int ntype, const std::string* file_orb0)
11+ void TwoCenterBundle::build_orb (int ntype, const std::string* file_orb0, const std::string& orbital_dir )
1312{
1413 std::vector<std::string> file_orb (ntype);
1514 if (GlobalV::MY_RANK == 0 )
1615 {
17- std::transform (file_orb0, file_orb0 + ntype, file_orb.begin (), [](const std::string& file) {
18- return PARAM . inp . orbital_dir + file;
16+ std::transform (file_orb0, file_orb0 + ntype, file_orb.begin (), [&orbital_dir ](const std::string& file) {
17+ return orbital_dir + file;
1918 });
2019 }
2120#ifdef __MPI
@@ -34,7 +33,7 @@ void TwoCenterBundle::build_beta(int ntype, Numerical_Nonlocal* nl)
3433
3534void TwoCenterBundle::build_alpha (int ndesc, std::string* file_desc0)
3635{
37- if (PARAM . globalv . deepks_setorb )
36+ if (ndesc > 0 )
3837 {
3938 std::vector<std::string> file_desc (ndesc);
4039 if (GlobalV::MY_RANK == 0 )
@@ -245,7 +244,7 @@ void TwoCenterBundle::to_LCAO_Orbitals(LCAO_Orbitals& ORB,
245244 (*orb_)(itype).to_numerical_orbital (ORB .Phi [itype], ORB .kmesh , ORB .dk , out_element_info, cal_force);
246245 }
247246
248- if (PARAM . globalv . deepks_setorb )
247+ if (alpha_ )
249248 {
250249 ORB .lmax_d = alpha_->lmax ();
251250 ORB .nchimax_d = alpha_->nzeta_max ();
0 commit comments