[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] AngleRestraint



Hmmm, that code looks fine. Can you get a stack trace for a core dump? When does the core dump occur, in that loop?

BTW, you can pull the Harmonic out of the loop and share one harmonic between many angle restraints.


On Fri, Jan 10, 2014 at 3:52 AM, Davide Baà <" target="_blank">> wrote:
Hi,

I'm having some (random) errors with the AngleRestraint function.

I get a Segmentation fault (core dumped) error when applying an AngleRestraint restraint like:

i = 0
while (i <= particles-3):
   p1 = ps.get_particle(i)
   p2 = ps.get_particle(i+2)
   p3 = ps.get_particle(i+3)
   ar = IMP.core.AngleRestraint(IMP.core.Harmonic(0, 1), p1, p2, p3)
   m.add_restraint(ar)
   i += 3

The error is not persistent, meaning that if I run the code severe times, the error disappear and the code ends normally.

Is there any specify reason for such an error?

Thanks!
Davide


_______________________________________________
IMP-dev mailing list
">
https://salilab.org/mailman/listinfo/imp-dev