Skip to content
Snippets Groups Projects
Commit 053d1c31 authored by Marcin Kirsz's avatar Marcin Kirsz
Browse files

Return number of atoms in a structure

parent 0f0f428e
No related branches found
No related tags found
No related merge requests found
Pipeline #37213 passed
...@@ -213,9 +213,9 @@ int Structure::next_structure(std::ifstream &ifs) { ...@@ -213,9 +213,9 @@ int Structure::next_structure(std::ifstream &ifs) {
int natoms=0; int natoms=0;
while(std::getline(ifs,line)) { while(std::getline(ifs,line)) {
natoms++;
if(line.empty()) break; if(line.empty()) break;
if(line == "\r") break; // detects windows newline if(line == "\r") break; // detects windows newline
natoms++;
} }
return natoms; return natoms;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment