> I'm working on an OBFormat for parsing SMILES using my new Smiley parser. The
> initial tests look good but there is a specific problem regarding aromatic
> nitrogens. When I read a molecule using the new format and write out the
> caonical smiles, all aromatic nitrogens are written out as "[nH]". Does
> anyone know how the original SMILES parser handles this or how I should fix
> this issue?
I assume you mean that, say, pyridine "c1ccccn1" becomes [nH], correct?
I believe the existing SMILES code handles this so:
> if (arom)
> {
> atom->SetAromatic();
> atom->SetSpinMultiplicity(2); // CM 18 Sept 2003
> }
> else
> atom->ForceImplH();//ensures atom is never hydrogen deficient
>
>
> // Untrue, but necessary to avoid perception being called in
> OBAtom::IsAromatic()
> // on incomplete molecule. Undone at end of function.
> mol.SetAromaticPerceived();
This is done to handle the "lowercase SMILES might be radical" extension.
Hope that helps,
-Geoff
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
OpenBabel-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel