Skip to content

Commit

Permalink
bugfix for parsing redo files with deviating SSBOND records
Browse files Browse the repository at this point in the history
  • Loading branch information
Coos Baakman committed Jul 26, 2019
1 parent e96274b commit 261d642
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1158,15 +1158,21 @@ void MProtein::ReadPDB(std::istream& is, bool cAlphaOnly)
{
//SSBOND 1 CYS A 6 CYS A 11 1555 1555 2.03
std::pair<MResidueID,MResidueID> ssbond;

ssbond.first.chain = line[15];
ssbond.first.seqNumber = boost::lexical_cast<uint16>(
ba::trim_copy(line.substr(16, 5)));
ssbond.first.insertionCode = line[21];

ssbond.second.chain = line[29];
ssbond.second.seqNumber = boost::lexical_cast<uint16>(
ba::trim_copy(line.substr(30, 5)));
ssbond.second.insertionCode = line[35];

// (for parsing the REDO files)
if (line[35] == 0)
ssbond.second.insertionCode = " ";

ssbonds.push_back(ssbond);
continue;
}
Expand Down

0 comments on commit 261d642

Please sign in to comment.