You need create an OBPairData (a subclass of OBGenericData), and apply it to the molecule using OBMol.SetData. I usually grep the OpenBabel source for examples of things.
- Noel On 7 June 2010 19:12, Rob Soe <kym3p...@gmail.com> wrote: > Hi all, > > I have one molecule read from SDF and I can successfully store it and > extract its information using standard OpenBabel function such as > GetTitle(), etc. > > I'd like to add information to this molecule, let's say, an arbitrary > floating number as its random ID. > > I saw OBMol class has SetData (OBGenericData *d) and GetData() function but > I couldn't find an example how to use such function. > > May I know if there is a working example using such functions? > > Thanks so much! > Rob > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss