Whatever way the maths primitives are implemented in OB, they are not suited to use from any of the language bindings. I always just call GetX(), GetY() and GetZ(), do my thing, and then stick the result back in a vector.
See functions t() and u() at http://baoilleach.blogspot.com/2012/02/on-reflection-transforming-molecules-is.html I'll put this on my list of things to look into, but given that you can work around it, to be honest it's not going to be a priority. If there's anyone else out there who fancy's a shot, feel free... - Noel On 27 March 2012 16:41, Hannes Loeffler <[email protected]> wrote: > Hi there, > > I have a problem with the Python script at the end of this email (the > attachment contains this script and the two input files needed). > Trying to use the -= operator obviously triggers a memory corruption > bug: > > *** glibc detected *** python: double free or corruption (out): > 0x09d122a0 *** > > Thanks a lot, > Hannes. > > > import openbabel as ob > > ob.obErrorLog.SetOutputLevel(0) > > conv = ob.OBConversion() > conv.SetInAndOutFormats('pdb', 'pdb') > > r = ob.OBMol() > t = ob.OBMol() > > conv.ReadFile(r, 'r.pdb') > conv.ReadFile(t, 't.pdb') > > shift = r.GetAtom(1).GetVector() > > # the following line triggers the bug > shift -= t.GetAtom(1).GetVector() > -- > Scanned by iCritical. > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > OpenBabel-scripting mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ OpenBabel-scripting mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
