Skip to content
Snippets Groups Projects
Commit caa6e1f6 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

mmcif writer: bugfix

parent a12381d6
No related branches found
No related tags found
No related merge requests found
...@@ -1418,15 +1418,18 @@ MMCifWriterEntity MMCifWriterEntity::FromPolymer(const String& entity_poly_type, ...@@ -1418,15 +1418,18 @@ MMCifWriterEntity MMCifWriterEntity::FromPolymer(const String& entity_poly_type,
ent.branch_type = ""; ent.branch_type = "";
ent.mon_ids = mon_ids; ent.mon_ids = mon_ids;
for(auto mon_id: mon_ids) { for(auto mon_id: mon_ids) {
// one letter codes rely on compound library ent.seq_olcs.push_back(MonIDToOLC(mon_id));
ost::conop::CompoundPtr compound = if(ent.seq_olcs.back().size() == 1) {
compound_lib->FindCompound(mon_id, ost::conop::Compound::PDB); ent.seq_can_olcs.push_back(ent.seq_olcs.back());
if(compound) {
ent.seq_olcs.push_back(MonIDToOLC(mon_id));
ent.seq_can_olcs.push_back(String(1, compound->GetOneLetterCode()));
} else { } else {
ent.seq_olcs.push_back("(" + mon_id + ")"); ost::conop::CompoundPtr compound =
ent.seq_can_olcs.push_back("(" + mon_id + ")"); compound_lib->FindCompound(mon_id, ost::conop::Compound::PDB);
char olc = compound->GetOneLetterCode();
if(olc < 'A' || olc > 'Z') {
ent.seq_can_olcs.push_back("(" + mon_id + ")");
} else {
ent.seq_can_olcs.push_back(String(1, olc));
}
} }
} }
return ent; return ent;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment