Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/source_cell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ add_library(
unitcell.cpp
read_atoms.cpp
read_atoms_helper.cpp
read_orb.cpp
setup_nonlocal.cpp
klist.cpp
parallel_kpoints.cpp
Expand Down
6 changes: 3 additions & 3 deletions source/source_cell/read_atoms_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "source_base/mathzone.h"
#include "read_stru.h"
#include "print_cell.h"
#include "source_estate/read_orb.h"
#include "read_orb.h"
#include <cmath>
#include <iostream>
#include <sstream>
Expand Down Expand Up @@ -519,7 +519,7 @@ bool read_atom_type_header(int it, UnitCell& ucell,
if ((PARAM.inp.basis_type == "lcao")||(PARAM.inp.basis_type == "lcao_in_pw"))
{
std::string orbital_file = PARAM.inp.orbital_dir + ucell.orbital_fn[it];
bool normal = elecstate::read_orb_file(it, orbital_file, ofs_running, &(ucell.atoms[it]));
bool normal = unitcell::read_orb_file(it, orbital_file, ofs_running, &(ucell.atoms[it]));
if(!normal)
{
return false;
Expand All @@ -530,7 +530,7 @@ bool read_atom_type_header(int it, UnitCell& ucell,
if ((PARAM.inp.init_wfc.substr(0, 3) == "nao") || PARAM.inp.onsite_radius > 0.0)
{
std::string orbital_file = PARAM.inp.orbital_dir + ucell.orbital_fn[it];
bool normal = elecstate::read_orb_file(it, orbital_file, ofs_running, &(ucell.atoms[it]));
bool normal = unitcell::read_orb_file(it, orbital_file, ofs_running, &(ucell.atoms[it]));
if(!normal)
{
return false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "read_orb.h"
#include "source_base/formatter.h"

namespace elecstate {
namespace unitcell {
bool read_orb_file(int it, std::string &orb_file, std::ofstream &ofs_running, Atom* atom)
{
// the maximum L is 9 like cc-pV9Z, according to the
Expand All @@ -14,7 +14,7 @@ namespace elecstate {
{
std::cout << " Element index " << it+1 << std::endl;
std::cout << " orbital file: " << orb_file << std::endl;
ModuleBase::WARNING("elecstate::read_orb_file",
ModuleBase::WARNING("unitcell::read_orb_file",
"cannot open the ORBITAL file (NAO basis sets)");
return false;
}
Expand Down Expand Up @@ -55,7 +55,7 @@ namespace elecstate {
}
if (!valid)
{
ModuleBase::WARNING("elecstate::read_orb_file",
ModuleBase::WARNING("unitcell::read_orb_file",
"ABACUS does not support NAO with L > 9, "
"or an invalid orbital label is found in the ORBITAL file.");
return false;
Expand All @@ -65,7 +65,7 @@ namespace elecstate {
ifs.close();
if(!atom->nw)
{
ModuleBase::WARNING("elecstate::read_orb_file","get nw = 0, check the ORBITAL file");
ModuleBase::WARNING("unitcell::read_orb_file","get nw = 0, check the ORBITAL file");
return false;
}
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef READ_ORB_H
#define READ_ORB_H

#include "source_cell/unitcell.h"
#include "unitcell.h"

namespace elecstate
namespace unitcell
{

/**
Expand Down
3 changes: 2 additions & 1 deletion source/source_cell/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ list(APPEND cell_simple_srcs
../../source_estate/read_pseudo.cpp
../../source_estate/cal_wfc.cpp
../../source_estate/cal_nelec_nband.cpp
../../source_estate/read_orb.cpp
../read_orb.cpp
../sep.cpp
../sep_cell.cpp
)
Expand Down Expand Up @@ -108,6 +108,7 @@ AddTest(
LIBS parameter base device
SOURCES read_atoms_helper_test.cpp
../read_atoms_helper.cpp
../read_orb.cpp
../read_stru.cpp
../print_cell.cpp
../atom_spec.cpp
Expand Down
6 changes: 3 additions & 3 deletions source/source_cell/test/unitcell_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "source_io/module_parameter/parameter.h"
#undef private
#include "source_estate/cal_ux.h"
#include "source_estate/read_orb.h"
#include "source_cell/read_orb.h"
#include "source_estate/read_pseudo.h"
#include "source_cell/read_stru.h"
#include "source_cell/print_cell.h"
Expand Down Expand Up @@ -1088,7 +1088,7 @@ TEST_F(UcellTest, ReadOrbFile)
std::string orb_file = "./support/C.orb";
std::ofstream ofs_running;
ofs_running.open("tmp_readorbfile");
bool result = elecstate::read_orb_file(0, orb_file, ofs_running, &(ucell->atoms[0]));
bool result = unitcell::read_orb_file(0, orb_file, ofs_running, &(ucell->atoms[0]));
ofs_running << " result=" << result << std::endl;
EXPECT_TRUE(result);
ofs_running.close();
Expand Down Expand Up @@ -1828,7 +1828,7 @@ TEST_F(UcellTest, ReadOrbFileWarning)
std::ofstream ofs_running;
ofs_running.open("tmp_readorbfilewarning");
testing::internal::CaptureStdout();
bool result = elecstate::read_orb_file(0, orb_file, ofs_running, &(ucell->atoms[0]));
bool result = unitcell::read_orb_file(0, orb_file, ofs_running, &(ucell->atoms[0]));
output = testing::internal::GetCapturedStdout();
ofs_running << output << std::endl;
EXPECT_FALSE(result);
Expand Down
2 changes: 1 addition & 1 deletion source/source_cell/test_pw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ AddTest(
../read_stru.cpp ../read_atom_species.cpp
../read_pp_vwr.cpp ../read_pp_blps.cpp
../../source_estate/read_pseudo.cpp ../../source_estate/cal_nelec_nband.cpp
../../source_estate/read_orb.cpp ../print_cell.cpp
../../source_cell/read_orb.cpp ../print_cell.cpp
../../source_estate/cal_wfc.cpp ../sep.cpp ../sep_cell.cpp
)

Expand Down
1 change: 0 additions & 1 deletion source/source_estate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ list(APPEND objects
fp_energy.cpp
occupy.cpp
cal_ux.cpp
read_orb.cpp
cal_nelec_nband.cpp
read_pseudo.cpp
cal_wfc.cpp
Expand Down
2 changes: 1 addition & 1 deletion source/source_lcao/module_deepks/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ set(DEEPKS_UNIT_COMMON_SOURCES
../../../source_io/module_output/sparse_matrix.cpp
../../../source_estate/read_pseudo.cpp
../../../source_estate/cal_wfc.cpp
../../../source_estate/read_orb.cpp
../../../source_cell/read_orb.cpp
../../../source_estate/cal_nelec_nband.cpp
../../../source_estate/module_dm/density_matrix.cpp
../../../source_estate/module_dm/density_matrix_io.cpp
Expand Down
2 changes: 1 addition & 1 deletion source/source_md/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ list(APPEND depend_files
../../source_estate/read_pseudo.cpp
../../source_estate/cal_wfc.cpp
../../source_estate/cal_nelec_nband.cpp
../../source_estate/read_orb.cpp
../../source_cell/read_orb.cpp
../../source_cell/sep.cpp
../../source_cell/sep_cell.cpp
)
Expand Down
2 changes: 1 addition & 1 deletion source/source_pw/module_pwdft/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ AddTest(
../../../source_estate/read_pseudo.cpp
../../../source_estate/cal_wfc.cpp
../../../source_estate/cal_nelec_nband.cpp
../../../source_estate/read_orb.cpp
../../../source_cell/read_orb.cpp
)
Loading