Hi Macjek and Mike,

If I understand your question correctly, you can specify InChI option 
parameters when calculating InChIs. Here is an example:

m = Chem.MolFromSmiles('CCC1=CN=C(NC1=O)NC')
Chem.MolToInchi(m)
'InChI=1S/C7H11N3O/c1-3-5-4-9-7(8-2)10-6(5)11/h4H,3H2,1-2H3,(H2,8,9,10,11)'

Now, try with one of the non-standard options such as FixedH:

Chem.MolToInchi(m,'/FixedH')
'InChI=1/C7H11N3O/c1-3-5-4-9-7(8-2)10-6(5)11/h4H,3H2,1-2H3,(H2,8,9,10,11)/f/h8,10H'

To answer the question of what happens when the InChI calculation fails, I get 
an empty string.

m = 
Chem.MolFromSmiles('[C@H]1([C@H](C1C2[C@@H]([C@@H]2C(=O)O)C(=O)O)C(=O)O)C(=O)O')
Chem.MolToInchi(m)
'  '

There is also an InChI option that can warn on empty structures, and calculate 
an empty InChI, which I am assuming is supposed to be ‘InChI=1S//’, however, 
when trying this option I get the same result as above.

Chem.MolToInchi(m,'/WarnOnEmptyStructure')
'  '

I hope that helps.

Vin

From: Maciek Wójcikowski <mac...@wojcikowski.pl>
Sent: Wednesday, October 9, 2019 3:41 AM
To: Greg Landrum <greg.land...@gmail.com>
Cc: RDKit Discuss <rdkit-discuss@lists.sourceforge.net>
Subject: Re: [Rdkit-discuss] Inchi which flavour??

Mike,

On top of what Greg said what might be particularly useful is an options 
parameter where you can pass some non default params to InChI call.

śr., 9 paź 2019, 07:22 użytkownik Greg Landrum 
<greg.land...@gmail.com<mailto:greg.land...@gmail.com>> napisał:
Hi Mike,

The InChI API itself is not exposed. The contents of the module are in the 
documentation along with some explanations of how to call it:
http://rdkit.org/docs/source/rdkit.Chem.rdinchi.html

If something is missing there, please let us know.
-greg


On Tue, Oct 8, 2019 at 5:20 PM 
<mi...@novadatasolutions.co.uk<mailto:mi...@novadatasolutions.co.uk>> wrote:
Dear RdKit users,
I was reading the inchi module docs and I couldn't find methods to call the 
InChI API.  Are these exposed in RDKit?
It says the default is the standard Inchi.  What happens when this conversion 
fails?

Thanks,
Mike
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to