Hi Mike,

as I promised I'll put together something for you to capture warnings; I'll try to get it done tonight.

p.


On 10/09/19 18:10, Mike Mazanetz wrote:

Hi,

Many thanks this, it is very helpful to see some code.

Yes, as it stands, I am yet to get warnings which are seen in stdout being sent to a file, only errors seem to find their way to my files.

Usually Warnings about stereochemistry don’t get captured.  Anyone see this, I’m guessing it’s the same for failed InChI’s too?

Thanks,

mike

*From:*Scalfani, Vincent <vfscalf...@ua.edu>
*Sent:* 09 October 2019 14:40
*To:* Maciek Wójcikowski <mac...@wojcikowski.pl>; Greg Landrum <greg.land...@gmail.com>
*Cc:* RDKit Discuss <rdkit-discuss@lists.sourceforge.net>
*Subject:* Re: [Rdkit-discuss] Inchi which flavour??

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 <mailto:mac...@wojcikowski.pl>>
*Sent:* Wednesday, October 9, 2019 3:41 AM
*To:* Greg Landrum <greg.land...@gmail.com <mailto:greg.land...@gmail.com>> *Cc:* RDKit Discuss <rdkit-discuss@lists.sourceforge.net <mailto: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

_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to