Where do beginAtom and endAtom come from in your code snippet.

The best thing would be if you can you create a simple and short
self-contained script that exhibits the problem.

- Noel

On 11 March 2010 03:59, Jason Power <[email protected]> wrote:
> Hi all,
>
> I am currently developing a pure-python 2-D molecule editor for use within
> another project I am currently working on. To begin with I decided to use the
> OBMol object as a model, thinking it would save me time and effort. However, I
> have run into a variety of issues that I'm not sure are due to my own
> misunderstandings, limitations of the python bindings, or bugs.
>
> I am building the OBMol object slowly over time as the user adds atoms and
> bonds. So I have a numerous places where I basically call
>
> self.mol.BeginModify()
> bond = self.mol.NewBond()
> bond.SetBegin(beginAtom)
> bond.SetEnd(endAtom)
> self.mol.EndModify()
>
> and
>
> self.mol.BeginModify()
> newAtom = self.mol.NewAtom()
> newAtom.SetVector(self.translateToAtomCoords(pos))
> newAtom.SetAtomicNum(atomicNum)
> self.mol.EndModify()
>
> and similar to delete. I find that with these calls when I go on to do other
> interesting things it fails, often as a segfault. Also, if I try to make a
> call like self.mol.GetSSSR() even though there is a ring, (I can trace the
> indices of the ends of the bonds myself), it returns a zero length list.
>
> I have found that if I call self.builder.Do(self.mol) before I run GetSSSR()
> it will return the right numbers, but I do not want to build the full 3-D
> coords, and worse, self.builder.Do(self.mol) randomly segfaults.
>
> Am I doing something wrong? Is there something that I am missing while
> building the molecule?
>
> Thanks for you help!
> Jason
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; 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-scripting mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
>

------------------------------------------------------------------------------
Download Intel&#174; 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-scripting mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting

Reply via email to