//preprocess molecule into a standardized state for heavy atom rmsd computation static void processMol(OBMol& mol) { //isomorphismmapper wants isomorphic atoms to have the same aromatic and ring state, //but these proporties aren't reliable enough to be trusted in evaluating molecules //should be considered the same based solely on connectivity mol.DeleteHydrogens(); //heavy atom rmsd for(OBAtomIterator aitr = mol.BeginAtoms(); aitr != mol.EndAtoms(); aitr++) { OBAtom *a = *aitr; a->UnsetAromatic(); a->SetInRing(); } for(OBBondIterator bitr = mol.BeginBonds(); bitr != mol.EndBonds(); bitr++) { OBBond *b = *bitr; b->UnsetAromatic(); b->SetBondOrder(1); b->SetInRing(); } //avoid recomputations mol.SetHybridizationPerceived(); mol.SetRingAtomsAndBondsPerceived(); mol.SetAromaticPerceived(); }