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