Skip to content

Commit

Permalink
fixed incorrect use of parseStringAsHybrid36 #118
Browse files Browse the repository at this point in the history
  • Loading branch information
agrossfield committed Mar 4, 2024
1 parent 7de8928 commit f2191ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/psf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ namespace loos {
if (!(s >> buf1 >> buf2))
throw(FileReadError(_filename, "PSF error parsing bonds.\n> " + input));

ind1 = parseStringAsHybrid36(buf1);
ind2 = parseStringAsHybrid36(buf2);
ind1 = std::stoi(buf1);
ind2 = std::stoi(buf2);

if (ind1 > num_atoms || ind2 > num_atoms)
throw(FileReadError(_filename, "PSF bond error: bound atomid exceeds number of atoms.\n> " + input));
Expand Down Expand Up @@ -163,7 +163,7 @@ namespace loos {

if (!(ss >> buf))
throw(FileReadError(_filename, "PSF parse error.\n> " + s));
index = parseStringAsHybrid36(buf);
index = std::stoi(buf);
pa->id(index);

if (!(ss >> segname))
Expand All @@ -173,7 +173,7 @@ namespace loos {

if (!(ss >> buf))
throw(FileReadError(_filename, "PSF parse error.\n> " + s));
resid = parseStringAsHybrid36(buf);
resid = std::stoi(buf);
pa->resid(resid);

if (!(ss >> resname))
Expand Down

0 comments on commit f2191ba

Please sign in to comment.