diff --git a/modules/io/src/mol/chemdict_parser.cc b/modules/io/src/mol/chemdict_parser.cc index e493b79341767ac2ae4f58be016b177c09238a75..5934b8341cf3220addbca4eaccd313984c7ecb39 100644 --- a/modules/io/src/mol/chemdict_parser.cc +++ b/modules/io/src/mol/chemdict_parser.cc @@ -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 +}}