Menu

#1295 INCHIKEY for structures with single/double bonds with undefined/unknown stereo

cdk-1.4.x
closed
nobody
INCHIKEY (1)
1
2013-04-20
2013-03-26
No

The structures having "single/double bonds with undefined/unknown stereo" gave us some headaches because the generated INCHIKEYs using cdk 1.4.16 (Relative stereo) were different from the INCHIKEYs generated with inchi-1(same Relative Stereo). The undefined/unknown bonds were considered as plain single/double bonds, practically the stereo was ignored.
So we dug into cdk and we found that in InChIGenerator.generateInchiFromCDKAtomContainer the stereo was ignored for next cases:

  • single bond and stereo = 4
  • double bond and stereo = 3.

We're not chemists, just software developer, so we hope this change is the good one and that it might help others to skip the headache part. Let us know your opinion.

1 Attachments

Related

Bugs: #1295

Discussion

  • John May

    John May - 2013-04-12

    Hi Magda,

    Do you have an example of the molecules. I'm struggling to get 'inchi-1' to give unspecified stereo chemistry - I can't find how to turn on the output (InChI Tech Manual).

    Warning (Omitted undefined stereo) structure #1.
    

    Also, the E_OR_Z will not work for all cases - you can also draw unspecified like this

     
    • John May

      John May - 2013-04-12
      • actually the unspecified with wiggly bonds might get resolved correctly... either way an example for the unspecified/undefined double and tetrahedral with the expected InChI would make this easier to patch.
       
      • John May

        John May - 2013-04-12

        Also thanks for spotting this, will be good to have it fixed. :-)

         
  • Magda Oprian

    Magda Oprian - 2013-04-12

    Hi,
    I attached one the file containing a molecule of this kind.. Hope this helps.

    Magda


    From: John May jwmay@users.sf.net
    To: [cdk:bugs] 1295@bugs.cdk.p.re.sf.net
    Sent: Friday, April 12, 2013 11:34 AM
    Subject: [cdk:bugs] Re: #1295 INCHIKEY for structures with single/double bonds with undefined/unknown stereo

    * actually the unspecified with wiggly bonds might get resolved correctly... either way an example for the unspecified/undefined double and tetrahedral with the expected InChI would make this easier to patch.
    

    [bugs:#1295] INCHIKEY for structures with single/double bonds with undefined/unknown stereo
    Status: open
    Labels: INCHIKEY
    Created: Tue Mar 26, 2013 01:49 PM UTC by Magda Oprian
    Last Updated: Fri Apr 12, 2013 08:32 AM UTC
    Owner: nobody
    The structures having "single/double bonds with undefined/unknown stereo" gave us some headaches because the generated INCHIKEYs using cdk 1.4.16 (Relative stereo) were different from the INCHIKEYs generated with inchi-1(same Relative Stereo). The undefined/unknown bonds were considered as plain single/double bonds, practically the stereo was ignored.
    So we dug into cdk and we found that in InChIGenerator.generateInchiFromCDKAtomContainer the stereo was ignored for next cases:

    • single bond and stereo = 4
    • double bond and stereo = 3.
      We're not chemists, just software developer, so we hope this change is the good one and that it might help others to skip the headache part. Let us know your opinion.

    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdk/bugs/1295/
    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #1295

  • Magda Oprian

    Magda Oprian - 2013-04-12

    Or not... This time it is attached.

    Magda


    From: Magda Oprian moprian@users.sf.net
    To: [cdk:bugs] 1295@bugs.cdk.p.re.sf.net
    Sent: Friday, April 12, 2013 11:51 AM
    Subject: [cdk:bugs] Re: #1295 INCHIKEY for structures with single/double bonds with undefined/unknown stereo

    Hi,
    I attached one the file containing a molecule of this kind.. Hope this helps.
    Magda


    From: John May jwmay@users.sf.net
    To: [cdk:bugs] 1295@bugs.cdk.p.re.sf.net
    Sent: Friday, April 12, 2013 11:34 AM
    Subject: [cdk:bugs] Re: #1295 INCHIKEY for structures with single/double bonds with undefined/unknown stereo

    • actually the unspecified with wiggly bonds might get resolved correctly... either way an example for the unspecified/undefined double and tetrahedral with the expected InChI would make this easier to patch.

    [bugs:#1295] INCHIKEY for structures with single/double bonds with undefined/unknown stereo
    Status: open
    Labels: INCHIKEY
    Created: Tue Mar 26, 2013 01:49 PM UTC by Magda Oprian
    Last Updated: Fri Apr 12, 2013 08:32 AM UTC
    Owner: nobody
    The structures having "single/double bonds with undefined/unknown stereo" gave us some headaches because the generated INCHIKEYs using cdk 1.4.16 (Relative stereo) were different from the INCHIKEYs generated with inchi-1(same Relative Stereo). The undefined/unknown bonds were considered as plain single/double bonds, practically the stereo was ignored.
    So we dug into cdk and we found that in InChIGenerator.generateInchiFromCDKAtomContainer the stereo was ignored for next cases:

    • single bond and stereo = 4
    • double bond and stereo = 3.
      We're not chemists, just software developer, so we hope this change is the good one and that it might help others to skip the headache part. Let us know your opinion.

    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdk/bugs/1295/
    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/


    [bugs:#1295] INCHIKEY for structures with single/double bonds with undefined/unknown stereo
    Status: open
    Labels: INCHIKEY
    Created: Tue Mar 26, 2013 01:49 PM UTC by Magda Oprian
    Last Updated: Fri Apr 12, 2013 08:32 AM UTC
    Owner: nobody
    The structures having "single/double bonds with undefined/unknown stereo" gave us some headaches because the generated INCHIKEYs using cdk 1.4.16 (Relative stereo) were different from the INCHIKEYs generated with inchi-1(same Relative Stereo). The undefined/unknown bonds were considered as plain single/double bonds, practically the stereo was ignored.
    So we dug into cdk and we found that in InChIGenerator.generateInchiFromCDKAtomContainer the stereo was ignored for next cases:

    • single bond and stereo = 4
    • double bond and stereo = 3.
      We're not chemists, just software developer, so we hope this change is the good one and that it might help others to skip the headache part. Let us know your opinion.

    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdk/bugs/1295/
    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #1295

  • John May

    John May - 2013-04-12

    Unfortunately I think SourceForge won't add the attachments from emails. Could you add it via the tracker?

    Many thanks,
    J

     
  • Magda Oprian

    Magda Oprian - 2013-04-12

    Well, I hope this time it's ok.

    Magda

     
  • John May

    John May - 2013-04-12

    Which of thes where you trying to get? 'inchi-1' gives me the first, but I know it is possible to get the second with some options configured.

    InChI=1/C7H15NO/c1-4-7(3)6-8-9-5-2/h6-7H,4-5H2,1-3H3
    

    or

    InChI=1S/C7H15NO/c1-4-7(3)6-8-9-5-2/h6-7H,4-5H2,1-3H3/b8-6?
    
     
  • Magda Oprian

    Magda Oprian - 2013-04-12

    I was trying to get the INCHIKEY :
    -> 'inchi-1' gave me WESHONOLEWERCR-UHFFFAOYNA-N
    -> cdk gave me a non standard inchikey WESHONOLEWERCR-SOFGYWHQNA-N

     
  • John May

    John May - 2013-04-12

    Yep, the hash is just SHA of some part of the InChI. Formated patch and added unit test: https://sourceforge.net/p/cdk/patches/620/

     
  • Egon Willighagen

    • status: open --> closed
     
  • Egon Willighagen

    The patch has been applied to the cdk-1.4.x branch, and will be part of the 1.4.18 release.

     
MongoDB Logo MongoDB