Hi Nick,

On Wed, Jun 6, 2012 at 12:27 PM, Nicholas Firth
<[email protected]> wrote:
>
> Hi All,
> I'm having some issues with getting some more 'interesting' ring systems to 
> kekulize. I'm creating the molecule in RDKit by individually adding all the 
> atoms and bonds from a graph. However I have found similar issue when trying 
> to initialise a molecule from smiles.
> Two examples of molecules which won't kekulize are:
> n1nnnn1
> c1cccp1
> however, when adding hydrogens to these smiles, so
> n1n[nH]nn1
> c1ccc[pH]1
> These will work perfectly fine. This is a problem as the graph structure I 
> have does not include any hydrogens. For a fix I have tried to addHs to my 
> molecule, however I'm having issue with these functions because I'm writing 
> in C++ and want to return this value, so don't have any pointers as this 
> results in a memory leak.
>
> Any help, whether it be programming advice or RDKit function advice would be 
> very helpful.

This is related to a question that came up a while ago about
automatically fixing kekulization problems:
http://www.mail-archive.com/[email protected]/msg01901.html
That code, which is Python, is probably a good start. If you're using
C++, you will need to translate a bit, but it should be
"straightforward". Note that you can skip the whole thing with the
EditableMol in C++.

-greg

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to