Re: [Rdkit-discuss] unexpected "attempt to add self-bond" error
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Greg L. <gre...@gm...> - 2010-12-27 04:41:45
|
Hi Andrew,
On Sat, Dec 25, 2010 at 4:24 AM, Andrew Dalke <da...@da...> wrote:
> Here's a fun one.
>
> I was writing up an article about how to generate a SMILES with an arbitrary atom ordering by using a lot of dot disconnects.
Heh, I was wondering if you were going to take that one up. Knowing
how much you enjoy (ab)using dot diconnects it seemed likely. :-)
> I had to work around what I think is a problem with RDKit's SMILES parser
>
> Here's a minimal example of the failure
>
>>>> mol = Chem.MolFromSmiles("C1.C12.C2")
>>>> mol = Chem.MolFromSmiles("C1.C11.C1")
> [04:17:18]
>
> ****
> Pre-condition Violation
> attempt to add self-bond
> Violation occurred on line 349 in file /Users/dalke/ftps/RDKit_Q22010_1/Code/GraphMol/ROMol.cpp
> Failed Expression: bond_pin->getBeginAtomIdx()!=bond_pin->getEndAtomIdx()
> ****
Yep, that's a bug
(https://sourceforge.net/tracker/?func=detail&aid=3145697&group_id=160139&atid=814650);
I will get it fixed.
Thanks for the detailed report,
-greg
|