Dear Francis,
On Fri, Jan 25, 2013 at 6:21 PM, Francis Atkinson <[email protected]> wrote:
>
> I have noticed an issue with InChI generation, in a rather specific
> situation...
>
> There are cases where the following generates different InChIs, whereas they
> ought to be identical....
>
>
> new_mol = reduce(Chem.CombineMols, Chem.GetMolFrags(old_mol, asMols=True))
>
> old_inchi = Chem.MolToInchi(old_mol)
> new_inchi = Chem.MolToInchi(new_mol)
>
> I've attached an SD file containing some molecules (actually different
> versions of the same compound) that exhibit the problem, and some code to
> demonstrate it. The actual application is from a custom-desalting procedure,
> but I hope this serves as an illustration. I can provide other examples if
> necessary.
I tracked this down and fix it yesterday. The changes are in svn.
For those interested, here's some detail about the problem.
The InChI generation code requires information about stereochemistry.
If "R" and "S" labels are available on atoms, it uses those to set the
chirality, otherwise it tries to use the atom's chiral tag. The code
seems to work fine if the CIP labels are there, but there is a
difficult to fix bug in the way the chiral tags are used. In the
example from Francis the starting molecule ("old_mol") above has CIP
labels (they are generated by default as part of the sanitization
process), but "new_mol" does not (that information is removed when
DeleteSubstructs is called). The fix I just added is to compute the
CIP labels from within the InChI generation code if they are not
present already. At some point we should go back and fix the use of
the RDKit chiral tags (it would be more efficient), but this
workaround should not cause any problems in the meantime.
-greg
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss