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.
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() **** >>> You can see that I used the same closure number twice for the second atom: once to close the open closure, and once to start a new one. This is legitimate, and RDKit supports it >>> from rdkit import Chem >>> mol = Chem.MolFromSmiles("C1CCC11CCC1") but once I put the dot disconnect in, blam! >>> mol = Chem.MolFromSmiles("C1C.CC11CCC1") [04:19:31] **** 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() **** while of course >>> mol = Chem.MolFromSmiles("C1C.CC12CCC2") has no problem. Andrew da...@dalkescientific.com ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss