Skip to content

Commit

Permalink
Fix: deliver obvious warning when cannot finding orb file (#1495)
Browse files Browse the repository at this point in the history
* Fix: deliver obvious warning when cannot find orb file

* rm redundant line
  • Loading branch information
hongriTianqi committed Nov 10, 2022
1 parent c237952 commit ea06d9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/module_cell/read_atoms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,15 +485,15 @@ bool UnitCell_pseudo::read_atom_positions(std::ifstream &ifpos, std::ofstream &o
//===========================================
#ifdef __LCAO
if (GlobalV::BASIS_TYPE == "lcao" || GlobalV::BASIS_TYPE == "lcao_in_pw")
{
{
std::ifstream ifs(orb.orbital_file[it].c_str(), ios::in); // pengfei 2014-10-13

// mohan add return 2021-04-26
if (!ifs)
{
std::cout << " Element index " << it+1 << std::endl;
std::cout << " orbital file: " << orb.orbital_file[it] << std::endl;
ModuleBase::WARNING("read_atom_positions","ABACUS Cannot find the ORBITAL file (basis sets)");
ModuleBase::WARNING_QUIT("read_atom_positions","ABACUS Cannot find the ORBITAL file (basis sets)");
return 0; // means something wrong
}

Expand Down

0 comments on commit ea06d9a

Please sign in to comment.