Skip to content

Commit 6506177

Browse files
committed
Remove ALL!
1 parent 2892931 commit 6506177

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

source/source_basis/module_nao/two_center_bundle.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
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

3534
void 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();

source/source_basis/module_nao/two_center_bundle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class TwoCenterBundle
1515
TwoCenterBundle& operator=(TwoCenterBundle&&) = default;
1616

1717
// NOTE: some variables might be set only on RANK-0
18-
void build_orb(int ntype, const std::string* file_orb0);
18+
void build_orb(int ntype, const std::string* file_orb0, const std::string& orbital_dir);
1919
void build_beta(int ntype, Numerical_Nonlocal* nl);
2020
void build_alpha(int ndesc = 0, std::string* file_desc0 = nullptr);
2121
void build_orb_onsite(const double& radius);

source/source_lcao/LCAO_init_basis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void init_basis_lcao(Parallel_Orbitals& pv,
4141
// * reading the localized orbitals/projectors
4242
// * construct the interpolation tables.
4343

44-
two_center_bundle.build_orb(ucell.ntype, ucell.orbital_fn.data());
44+
two_center_bundle.build_orb(ucell.ntype, ucell.orbital_fn.data(), PARAM.inp.orbital_dir);
4545
two_center_bundle.build_alpha(PARAM.globalv.deepks_setorb, &ucell.descriptor_file);
4646
two_center_bundle.build_orb_onsite(onsite_radius);
4747
// currently deepks only use one descriptor file, so cast bool to int is

source/source_lcao/module_lr/esolver_lrtd_lcao.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ LR::ESolver_LR<T, TR>::ESolver_LR(const Input_para& inp, UnitCell& ucell) : inpu
305305
this->parameter_check();
306306

307307
/// read orbitals and build the interpolation table
308-
two_center_bundle_.build_orb(ucell.ntype, ucell.orbital_fn.data());
308+
two_center_bundle_.build_orb(ucell.ntype, ucell.orbital_fn.data(), inp.orbital_dir);
309309

310310
LCAO_Orbitals orb;
311311
two_center_bundle_.to_LCAO_Orbitals(orb, inp.lcao_ecut, inp.lcao_dk, inp.lcao_dr, inp.lcao_rmax,

0 commit comments

Comments
 (0)