Skip to content
Snippets Groups Projects
Commit 26556eef authored by Tobias Schmidt's avatar Tobias Schmidt
Browse files

chemdict parser marks all residues with formula H2O as waters (necessary for charmm dialect)

parent cc33bc33
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,10 @@ void ChemdictParser::OnDataItem(const StarDataItem& item)
} else if (item.GetName()==StringRef("formula", 7)) {
compound_->SetFormula(item.GetValue().str());
if (compound_->GetFormula()=="H2 O") {
compound_->SetChemClass(mol::ChemClass(mol::ChemClass::WATER));
compound_->SetOneLetterCode('.');
}
} else if (item.GetName()==StringRef("one_letter_code", 15)) {
if (item.GetValue().length()==1) {
compound_->SetOneLetterCode(item.GetValue()[0]);
......@@ -164,4 +168,4 @@ void ChemdictParser::InitTypeMap()
tm_["WATER"]=mol::ChemClass(mol::ChemClass::WATER);
}
}}
\ No newline at end of file
}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment