Re: [Open Babel] charge wrongly calculated

2012-08-15 Thread Hannes Loeffler
Is this list still alive? On Wed, 8 Aug 2012 10:26:57 +0100 Hannes Loeffler wrote: > Hi, > > the following script reads the attached mol2 file but wrongly outputs > 0 for the charge. Openbabel is version 2.3. > > import pybel > mol = pybel.readfile('mol2&#x

[Open Babel] How to do this with Python?

2012-10-09 Thread Hannes Loeffler
Hi, how would I do the following in Python? babel -imol2 a.mol2 b.mol2 -osdf ab.sdf Obviously I need to convert two mol2 files and combined them in a single sdf. Thanks, Hannes. -- Scanned by iCritical. -- Don't let

Re: [Open Babel] How to do this with Python?

2012-10-09 Thread Hannes Loeffler
d Outputfile class > for writing. If you cannot figure it out, post some code here and I > will correct it. > > - Noel > > On 8 October 2012 11:08, Hannes Loeffler > wrote: > > Hi, > > > > how would I do the following in Python? > > > > babel -

[Open Babel] missing attributes in 2.3.2 (Python)

2013-03-12 Thread Hannes Loeffler
Hi, I compiled 2.3.2 but find that some classes, e.g. OBAlign, and possibly other stuff is absent from openbabel.py. I passed -DRUN_SWIG=ON to cmake and swig does create openbabel.py. The other odd thing is that 'make install' copies openbabel.py, pybel.py and _openbabel.so into $CMAKE_INSTALL_P

Re: [Open Babel] missing attributes in 2.3.2 (Python)

2013-03-15 Thread Hannes Loeffler
und the real issue. SWIG is not called with -DHAVE_EIGEN -DHAVE_EIGEN3 when making the Python bindings because scripts/CMakeLists.txt tries to expand ${eigen2_define}, which appears to be not defined anywhere, instead of ${eigen_define} as in the Java case. Cheers, Hannes. > On 12 March 2013 13

[Open Babel] SetName appends residue number to residue name in MOL2

2013-11-08 Thread Hannes Loeffler
Hi, I have the following Python code to rename the first residue in a PDB file. The renaming works except that OpenBabel appends a '1', obviously the residue number, to the new name in the mol2 output. How can I force OpenBabel to stop altering my residue name? import pybel mol = pybel.readfi

[Open Babel] mol2 writer adds residue number to residue name

2014-07-14 Thread Hannes Loeffler
Hi, here is something that has bugged me for some time now and is quite an annoying misfeature of MOL2Format::WriteMolecule(). In line 591 of src/formats/mol2format.cpp (checked out just a minute ago) the residue name is appended with its number (res->GetNum()). The practical problem is that whe

Re: [Open Babel] mol2 writer adds residue number to residue name

2014-07-23 Thread Hannes Loeffler
In case anybody is willing I have attached a patch. This introduces a new option 'r' which, when set, switches off residue number appending unless 'l' is also set and residue name is simply '<1>'. The defaults are as they used to be. On Mon, 14 Jul 2014 1

[Open Babel] accessing and manipulating GAFF atom types?

2015-02-25 Thread Hannes Loeffler
Hi, I was wondering if there is currently a mechanism to read out and manipulate GAFF atom types. It looks to me that OBForceFieldGaff handles those types only internally while to the outside the internal force fields are presented. for atom in ob.OBMolAtomIter(mol): idx = atom.GetIdx() # c

[Open Babel] get all matches with OBSmartsPattern?

2015-03-31 Thread Hannes Loeffler
Hi, I am trying to get all substructure matches with OBSmartsPattern but this doesn't seem to work as expected when explicit hydrogens are involved. The attached Python script calculates a MCS with the help of RDKit's implementation of fmcs. The MCS is created as SMARTS pattern (script uses pre-