Re: [Open Babel] netcharge of a molecule

2018-01-26 Thread Andrew Dalke
On Jan 26, 2018, at 07:27, Sundar wrote: > How to calculate the net charge of a molecule in openbabel? The OBMolecule object has a method called "GetTotalCharge()": http://openbabel.org/api/2.3.0/classOpenBabel_1_1OBMol.shtml#ab78d46b60f04702fa6f450ef6f8dae62 Or, if you are using the pybel

[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

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] Error in file conversion

2018-01-26 Thread Sundar
Dear all, I see that when I convert a file from sdf to pdb or pdbqt. Obabel guesses a few atoms as ALA (could be an amino acid Alanine). Does anyone know any possible cause? Attached are the files. Thanks, Jubilant 443884.sdf Description: Binary data 443884.pdb Description: Protein Databank