Evgueni, On Tue, Oct 20, 2009 at 7:56 PM, Evgueni Kolossov <ekolos...@gmail.com> wrote: > > Just try to copy any aromatic ring the way I described it and at the end do: > fragMol->updatePropertyCache(); > MolOps::sanitizeMol(fragMol); > I believe aromaticity suppose to be set in sanitize and I do not need to > call MolOps::setAromaticity....
Here's a test case I just did that copies one molecule atom-for-atom and bond-for-bond into another: ---------------------------- std::string smi="c1ccccc1"; RWMol *m = SmilesToMol(smi,0,false); RWMol m2; for(unsigned int i=0;i<6;++i){ m2.addAtom(m->getAtomWithIdx(i)->copy(),false,true); } for(unsigned int i=0;i<6;++i){ Bond *newBond=m->getBondWithIdx(i)->copy(); newBond->setOwningMol(m2); newBond->setBeginAtomIdx(m->getBondWithIdx(i)->getBeginAtomIdx()); newBond->setEndAtomIdx(m->getBondWithIdx(i)->getEndAtomIdx()); m2.addBond(newBond,true); } m2.updatePropertyCache(); MolOps::sanitizeMol(m2); for(unsigned int i=0;i<6;++i){ TEST_ASSERT(m2.getAtomWithIdx(i)->getIsAromatic()); TEST_ASSERT(m2.getBondWithIdx(i)->getIsAromatic()); TEST_ASSERT(m2.getBondWithIdx(i)->getBondType()==Bond::AROMATIC); } delete m; ---------------------------- This runs without problems and does more or less what you seem to be doing. In order to be able to figure out what the problem is with your approach (or if it's caused by a bug in the RDKit), I need code that I can compile and run that shows the problem. Send that along and I'll take a look at it. -greg ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss