> I have done some coding on the basis of your suggestion. My present code > gives me the Molecular Weight and Number of bonds present in SMILES. Now I > want to know other vital information like how many rings, double bonds and > triple bonds are present in SMILES. My code is as:
... >> FOR_BONDS_OF_MOL(bond, mol) // iterator access (see OBMolBondIter) >> >> will give you an iterator over the bonds OBBond->GetBO gives you the >> order. Then you can increment your counts per bond order. There's your answer about counting double or triple bonds. > Take a look at > http://openbabel.org/api/2.2.0/classOpenBabel_1_1OBMol.shtml and the > examples at the bottom. Ernst-Georg gave you this link too, which gives you a whole range of methods like counting the number of rings. Please read the documentation. Best regards, -Geoff ------------------------------------------------------------------------------ _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss