#614 Non chiral hydrogen removal

Accepted
closed
nobody
None
master
1
2013-04-29
2013-03-06
SBeisken
No

Attached an addition to the AtomContainerManipulator to remove non stereo-relevant hydrogens. This method does not remove all hydrogens. Currently it checks the heteroatom connected to the hydrogen for stereo parity and the bond between both atoms for stereo information. If either is present, the hydrogen is not removed. Additionally, if an IStereoElement is associated with that hydrogen, it is not removed.

Any comments or suggestions would be greatly appreciated.

1 Attachments

Related

Patches: #614

Discussion

  • I like the point you bring up... I have not checked the patch, but should the stereo nature of the bond not also be extending to all bonds around the chiral atom? That is, it may not necessarily be the bond to the hydrogen to be 'up' or 'down'... right?

     
  • SBeisken
    SBeisken
    2013-03-06

    Absolutely, my working assumption is that if the bond to the hydrogen is
    neither 'up' or 'down', it can be removed even if the connected atom is
    indeed chiral with 'up' and 'down' bonds going to other atoms. In such a
    case the hydrogen does not need to be explicit because it is not 'relevant'.
    Is that sensible?

    My problem is that once I start to check all neighbouring bonds for stereo
    information, I work on the wrong assumption. I.e., that an 'up' and 'down'
    bond indicates a chiral center, which is not necessarily true. Instead it
    might be simpler to convert explicit Hs to implicit Hs in those cases
    because no information is lost anyway. I hope my thoughts are clear enough.
    I am not too sure myself in this case. Any other suggestions are welcome.

    From: Egon Willighagen [mailto:egonw@users.sf.net]
    Sent: 06 March 2013 22:05
    To: [cdk:patches]
    Subject: [cdk:patches] #614 Non chiral hydrogen removal

    I like the point you bring up... I have not checked the patch, but should
    the stereo nature of the bond not also be extending to all bonds around the
    chiral atom? That is, it may not necessarily be the bond to the hydrogen to
    be 'up' or 'down'... right?


    [patches:#614] http://sourceforge.net/p/cdk/patches/614/ Non chiral
    hydrogen removal

    Status: open
    Created: Wed Mar 06, 2013 09:55 PM UTC by SBeisken
    Last Updated: Wed Mar 06, 2013 09:55 PM UTC
    Owner: nobody

    Attached an addition to the AtomContainerManipulator to remove non
    stereo-relevant hydrogens. This method does not remove all hydrogens.
    Currently it checks the heteroatom connected to the hydrogen for stereo
    parity and the bond between both atoms for stereo information. If either is
    present, the hydrogen is not removed. Additionally, if an IStereoElement is
    associated with that hydrogen, it is not removed.

    Any comments or suggestions would be greatly appreciated.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/cdk/patches/614/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

     

    Related

    Patches: #614

  • Up and down bonds are hard. The IUPAC guidelines on that are a lovely read :) I think that there are situations where the explicit H is needed to explain the up and down bonds to other atoms... at least, it would not hurt to check it. It's cheminformatics, so there are bound to be examples where the assumptions will fail... that's my bitter experience anyway :)

    And you're right that up and down is also used for non-chiral 3D geometry indication.

    I also hope others will comment...

     
  • John May
    John May
    2013-03-06

    Absolutely, my working assumption is that if the bond to the hydrogen is
    neither 'up' or 'down', it can be removed even if the connected atom is
    indeed chiral with 'up' and 'down' bonds going to other atoms. In such a
    case the hydrogen does not need to be explicit because it is not 'relevant'.
    Is that sensible?

    Unfortunately i've written too much stereo-perception code to know that won't work, check out the attached example. I totally agree that the hydrogens are optional but I would take the easy route and as Egon says check for other stereo bonds on the hetro atom. I didn't spot this earlier but iterate over the bonds list and not the atoms... otherwise is quadratic opposed to linear performance.

    J

     
  • John May
    John May
    2013-03-06

    The only time i've seen the H required is for fisher projection.

     
  • SBeisken
    SBeisken
    2013-03-07

    Okay, attached you will find a modified version of the first patch. The method now checks for other stereo bonds on the hetero atom. If it encounters another H attached to the hetero atom, it will remove the hydrogen for sure.

    Thanks for the example John. That is a very ‘naughty’ case. I am not sure though if everyone would agree that the left molecule is S. :)

     
  • John May
    John May
    2013-03-07

    Hehe, I only know it because I've found such a case in analysis. I think it was possibly in MetaCyc but not sure.

     
    • status: open --> closed
    • Group: Needs_Review --> Accepted
     
  • Thanx for the update. I have applied and pushed the patch.