On Jan 7, 2011, at 3:22 AM, TJ O'Donnell wrote: > [Cl-].CC(C)(C)c1[Te+]c(C(C)(C)C)cc(/C=C/C=C2C=C(C(C)(C)C)OC(C(C)(C)C)=C2)c1 > [18:13:52] Can't kekulize mol
Looks like it's the [Te] which should be written [te+]. >>> Chem.CanonSmiles("c1cc[te+]cc1") 'c1cc[Te+]cc1' >>> Chem.MolFromSmiles(Chem.CanonSmiles("c1cc[te+]cc1")) [03:49:42] Can't kekulize mol Another problem is with >>> Chem.CanonSmiles("c1cccc[se+]1") 'c1cc[Se+]cc1' >>> A scan of the code suggests the problem is in SmilesParse/SmilesWrite.cpp The only branch for generating a lowercase atom symbol in the SMILES is if(inOrganicSubset(num)){ // it's a member of the organic subset if(!doKekule && atom->getIsAromatic() && symb[0] < 'a') symb[0] -= ('A'-'a'); but Te and Se aren't in the organic subset. A fix might be to change *** rdkit/Code/GraphMol/SmilesParse/SmilesWrite.cpp 2010-12-04 18:30:00.000000000 +0100 --- rdkit/Code/GraphMol/SmilesParse/SmilesWrite.cpp.new 2011-01-07 03:57:17.000000000 +0100 *************** *** 102,107 **** --- 102,108 ---- int iMass=static_cast<int>(atom->getMass()+.1); res <<iMass; } + if(!doKekule && atom->getIsAromatic() && symb[0] < 'a') symb[0] -= ('A'-'a'); res << symb; bool chiralityIncluded=false; but I haven't tested it out. Andrew da...@dalkescientific.com ------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss