ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ReadAtomsMalformedTest Class Reference
Inheritance diagram for ReadAtomsMalformedTest:
Collaboration diagram for ReadAtomsMalformedTest:

Protected Member Functions

void SetUp () override
void init_types (const int ntype)
void TearDown () override
std::string read_warn_file ()
bool read_positions (const std::string &content)

Protected Attributes

UnitCell ucell
std::ofstream ofs_running
std::ofstream ofs_warning
std::string log_path
std::string warn_path
std::vector< std::string > stru_paths
std::unique_ptr< Atom[]> owned_atoms

Detailed Description

  • Tested Functions:
    • NonNumericCoordinateRejected
      • read_atom_positions(): a coordinate line with non-numeric content (e.g. "1.0 1.0 x") is now rejected at the extraction point; a line truncated at EOF still goes to the existing mismatch-in-atom-number exit in parse_atom_properties() (issue #8356)
    • NonNumericAtomCountRejected
      • read_atom_type_header(): a non-numeric atom count after a valid first species left na = 0 while the total atom count stayed positive, so the old reader accepted it; it is now rejected at the extraction point and the warning text is asserted
    • LiteralZeroCountAccepted
      • a species with a literal zero atom count is intentionally supported
    • ValidFinalTripletAtExactEofAccepted
      • a complete final coordinate triplet ending exactly at EOF must not be misreported as a count mismatch
    • ValidPositionsAccepted
      • a well-formed ATOMIC_POSITIONS section still reads normally

Member Function Documentation

◆ init_types()

void ReadAtomsMalformedTest::init_types ( const int ntype)
inlineprotected

◆ read_positions()

bool ReadAtomsMalformedTest::read_positions ( const std::string & content)
inlineprotected
Here is the call graph for this function:

◆ read_warn_file()

std::string ReadAtomsMalformedTest::read_warn_file ( )
inlineprotected

◆ SetUp()

void ReadAtomsMalformedTest::SetUp ( )
inlineoverrideprotected

◆ TearDown()

void ReadAtomsMalformedTest::TearDown ( )
inlineoverrideprotected

Member Data Documentation

◆ log_path

std::string ReadAtomsMalformedTest::log_path
protected

◆ ofs_running

std::ofstream ReadAtomsMalformedTest::ofs_running
protected

◆ ofs_warning

std::ofstream ReadAtomsMalformedTest::ofs_warning
protected

◆ owned_atoms

std::unique_ptr<Atom[]> ReadAtomsMalformedTest::owned_atoms
protected

◆ stru_paths

std::vector<std::string> ReadAtomsMalformedTest::stru_paths
protected

◆ ucell

UnitCell ReadAtomsMalformedTest::ucell
protected

◆ warn_path

std::string ReadAtomsMalformedTest::warn_path
protected

The documentation for this class was generated from the following file: