#include // Peize Lin fix bug about strcmp 2016-08-02
#include
#include
#include
#include "unitcell.h"
#include "source_io/module_parameter/parameter.h"
#include "source_cell/print_cell.h"
#include "source_cell/read_stru.h"
#include "source_estate/read_orb.h"
#include "source_base/timer.h"
#include "source_base/constants.h"
#include "source_pw/module_pwdft/global.h"
#include "source_base/formatter.h"
#include "source_base/mathzone.h"
#ifdef __LCAO
#include "source_basis/module_ao/ORB_read.h" // to use 'ORB' -- mohan 2021-01-30
#endif
bool unitcell::read_atom_positions(UnitCell& ucell,
std::ifstream &ifpos,
std::ofstream &ofs_running,
std::ofstream &ofs_warning)
{
ModuleBase::TITLE("UnitCell","read_atom_positions");
std::string& Coordinate = ucell.Coordinate;
const int ntype = ucell.ntype;
if( ModuleBase::GlobalFunc::SCAN_LINE_BEGIN(ifpos, "ATOMIC_POSITIONS"))
{
ModuleBase::GlobalFunc::READ_VALUE(ifpos, Coordinate);
if(Coordinate != "Cartesian"
&& Coordinate != "Direct"
&& Coordinate != "Cartesian_angstrom"
&& Coordinate != "Cartesian_au"
&& Coordinate != "Cartesian_angstrom_center_xy"
&& Coordinate != "Cartesian_angstrom_center_xz"
&& Coordinate != "Cartesian_angstrom_center_yz"
&& Coordinate != "Cartesian_angstrom_center_xyz"
)
{
ModuleBase::WARNING("read_atom_position","Cartesian or Direct?");
ofs_warning