Skip to content
Snippets Groups Projects
Unverified Commit 3fbddfce authored by Xavier Robin's avatar Xavier Robin
Browse files

fix: InChI code includes the InChI= part

parent 45f188de
No related branches found
No related tags found
No related merge requests found
......@@ -156,14 +156,14 @@ build the compound library manually.
.. attribute:: inchi
The InChI code of this compound, without the 'InChI=' part, e.g
'1S/H2O/h1H2' for water. Read-only.
The InChI code of this compound, e.g '1S/H2O/h1H2' for water.
Read-only.
:type: :class:`str`
.. attribute:: inchi_key
The InChIKey of this compound without the 'InChIKey=' part, e.g.
The InChIKey of this compound, e.g.
'XLYOFNOQVPJJNP-UHFFFAOYSA-N' for water. Read-only.
:type: :class:`str`
......
......@@ -85,7 +85,7 @@ void ChemdictParser::OnDataRow(const StarLoopDesc& header,
"'InChI=' prefix." << std::endl;
return;
}
compound_->SetInchi(columns[indices_[DESC]].substr(6).str());
compound_->SetInchi(columns[indices_[DESC]].str());
} else if (columns[indices_[DESC_TYPE]] == StringRef("InChIKey", 8)) {
compound_->SetInchiKey(columns[indices_[DESC]].str());
} else if (columns[indices_[DESC_TYPE]] == StringRef("SMILES_CANONICAL", 16) &&
......
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