Hello everybody,

I just started using openbabel, so sorry if it's just a misunderstanding on
my part.

I'm trying to make a python script which finds the rotatable bonds of a
molecule and "breaks" the molecule in these parts (something like the
Rosetta exercise
http://ctr.wikia.com/wiki/Break_rotatable_bonds_and_report_the_fragments).

So, I read the molecule from a xyz to an OBMol object and found the
rotatable bonds, but when I try to use anything from a OBRotor object I'm
warned of a memory leak:
swig/python detected a memory leak of type 'std::vector< OpenBabel::OBRotor
*,std::allocator< OpenBabel::OBRotor * > >::iterator *', no destructor
found.

My code is something like (here I'm just using the Size method of the
OBRotor class):
    rbonds = openbabel.OBRotorList()
    rbonds.Setup(mol)

    rotor = rbonds.BeginRotor(rbonds.BeginRotors())
    for i in range(rbonds.Size()):
        print rotor.Size()
        rotor = rbonds.NextRotor(rbonds.BeginRotors())

Am I doing something wrong or is this a bug?

Thanks,
Henrique
------------------------------------------------------------------------------
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to