This is the part of program, which also crashes in the same way:

#!/usr/bin/python -d
import openbabel, sys, math, random
import numpy

try:
        def add(x, y): return x+y
        obC = openbabel.OBConversion()
        obC.SetInAndOutFormats("pdb", "pdb")

        mols = []
        verts = []
        probs = []

        # initializing structures
        if True:
          nmol = openbabel.OBMol()
          obC.ReadFile(nmol, "dppsnew.pdb")
          mols.append( nmol )
          nmol = openbabel.OBMol()
          obC.ReadFile( nmol, "chlnew.pdb")
          mols.append( nmol )

        # init values for grid
        numconformers = 50

# =================================================
#           crashes because of this block!!!
# =================================================
        for mol in mols:
                for i in range(0,numconformers):
                        nmol = openbabel.OBMol(mol)
                        for torl in openbabel.OBMolTorsionIter(nmol):
                                atlist = [nmol.GetAtom(torl[0]+1),
nmol.GetAtom(torl[1]+1), nmol.GetAtom(torl[2]+1),
nmol.GetAtom(torl[3]+1)]
                                if (atlist[1].IsInRing() and
atlist[2].IsInRing() ):
                                        continue
                                tor = nmol.GetTorsion(atlist[0],
atlist[1], atlist[2], atlist[3])
                                tor = random.gauss(tor, 3)*math.pi/180
                                nmol.SetTorsion(atlist[0], atlist[1],
atlist[2], atlist[3], tor)
                        mol.AddConformer(nmol.GetConformer(0))
# =================================================
#           end of block
# =================================================
finally:
        print 'Bue!'



crash message:

*** glibc detected *** /usr/bin/python2.6: double free or corruption
(out): 0x0000000000d4bd20 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f5f621f14ce]
/lib/libc.so.6(cfree+0x75)[0x7f5f621f2dbb]
/usr/local/lib/libopenbabel.so.3(_ZN9OpenBabel5OBMolD0Ev+0xd0)[0x7f5f61a135e0]


Program crashes at end everywhere - in debian, gento and cygwin.
Program works absolutely normally. The only error - is the crush on
the end, while destructing. What I does wrong with conformers?

Thank you.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to