Re: [Open Babel] Using OBPairData in python

2018-01-29 Thread Xianghai Sheng
Hi Noel, Your answers solved my problem. Thank you! Xianghai On Fri, Jan 26, 2018 at 7:42 AM, Noel O'Boyle wrote: > Hi there, > > Regarding 1, yes, but have you instead considered using a Python > dictionary or list to store the information? If I were you, I would avoid > crossing over to C++

Re: [Open Babel] Using OBPairData in python

2018-01-26 Thread Noel O'Boyle
Hi there, Regarding 1, yes, but have you instead considered using a Python dictionary or list to store the information? If I were you, I would avoid crossing over to C++ to store this information. Regarding 2, see https://openbabel.org/docs/dev/UseTheLibrary/PythonDoc.html#accessing-obpairdata-ob

[Open Babel] Using OBPairData in python

2018-01-26 Thread Xianghai Sheng
Dear developers, I was wondering what is the proper way to use OBPairData in python. For example, I want to store an OBPairData with attribute 'nLonePair' in an OBAtom. I managed to do this with the following code but don't know if it is the best way. d = ob.OBPairData() d