Hi Craig,

On Wed, Nov 18, 2009 at 4:56 PM, Craig A. James <cja...@emolecules.com> wrote:
> Tim,
>
> I've run into a problem: OpenBabel add a hydrogen to any potentially-chiral 
> carbon that doesn't have four bonds, for example, when it parses "ClC(Br)I" 
> (but not "ClC(Cl)Br" since it can't be chiral).  I'm pretty sure it's the new 
> stereo code that's doing this, but I haven't dug into it yet.

The new stereo code doesn't need these extra hydrogens. The added
hydrogens you are seeing are probably added in
OBMol2Cansmi::AddHydrogenToChiralCenters (smilesformat.cpp) However,
using trunk with the new stereo code, I don't see added hydrogens like
Noel.

> In our web interface, we allow the chemist to draw explicit "blocking" 
> hydrogens using Rich's ChemWriter program, and when we parse these molecules 
> and generate a SMILES, the SMILES writer's "keep hydrogens" option writes the 
> hydrogens explicitely.  Any hydrogen in your drawing will also be in the 
> SMILES, so that when it's used as a SMARTS, the hydrogen blocks substituents 
> at that position.
>
> Unfortunately, when OpenBabel parses "ClC(Br)I", the "keep hydrogens option 
> writes out "Cl[CH](Br)I" because OpenBabel has added a H to the carbon, 
> resulting in a SMARTS that doesn't match what you intended.
>
> Assuming my analysis is correct, is there some way to mark or otherwise find 
> these added hydrogens?  We don't have to remove them, I just need to know 
> which ones were in the user's original drawing (SD file).
>
> This is actually an example of a deeper question: What is the meaning of an 
> SD file, or any connection-table file?  We often say, "It represents a 
> molecule."  But in some cases, the correct answer is, "It represents what the 
> user drew," which is quite a different thing.
>
> Thanks,
> Craig
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> OpenBabel-Devel mailing list
> OpenBabel-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to