[Open Babel] Adding extra information to OBMol

2010-06-07 Thread Rob Soe
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

Re: [Open Babel] Adding extra information to OBMol

2010-06-07 Thread Noel O'Boyle
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 wrote: > Hi all, > > I have one molecule read from SDF and I can successfully store it a

Re: [Open Babel] Adding extra information to OBMol

2010-06-07 Thread Geoffrey Hutchison
> 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. There are also working examples in the API documentation, e.g. (see the Detailed Description): http://openbabel.org/api

Re: [Open Babel] Adding extra information to OBMol

2010-06-07 Thread Chris Morley
On 07/06/2010 19:12, Rob Soe wrote: > > 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 >

Re: [Open Babel] Adding extra information to OBMol

2010-06-07 Thread Rob Soe
Hi, Thanks a lot for the suggestions. I have this plan that I am trying to work out. I am planning to use OBSetData() and use SetAttribute() to set a string (converted from a float number that I want to associate the molecule with). Here is the code: //Float to String conversion ostringstream

[Open Babel] state of OB features

2010-06-07 Thread Andrew Dalke
Hi all, I've been asked by a company to evaluate different toolkits for them to use in-house. Geoff thought it might be better to ask on the list than ask him directly and privately, so I'm doing that. I've gone through their internal requirements now I'm seeing how it matched up to OB. So