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

mmcif writer: correctly guess _entity.type "branched"

If all residues in a chain are saccharides in some form, the
respective _entity.type should be "branched"
parent 8891537e
No related branches found
No related tags found
No related merge requests found
......@@ -199,9 +199,7 @@ namespace {
// - polymer
// - water
// this function is overly simplistic and won't identify macrolid or
// branched => explicitely checks for water, everything else is either
// non-polymer or polymer depending on number of residues
// this function is overly simplistic and won't identify macrolid
std::set<char> chem_classes;
for(auto res: res_list) {
......@@ -221,6 +219,15 @@ namespace {
return "non-polymer";
}
std::set<char> branched_set;
branched_set.insert(ost::mol::ChemClass::L_SACCHARIDE);
branched_set.insert(ost::mol::ChemClass::D_SACCHARIDE);
branched_set.insert(ost::mol::ChemClass::SACCHARIDE);
branched_set.insert(chem_classes.begin(), chem_classes.end());
if(branched_set.size() == 3) {
return "branched";
}
return "polymer";
}
......
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