Dear IMP users or developers,
I run the code example http://salilab.org/imp/2.1.1/doc/html/core_2restrain_diameter_8py-example.ht... It runs smoothly.
But when I add at the end of the code: m.remove_restraint(r) then it will be Segmentation fault.
Anyone knows how to remove this restraint appropriately? Thank you.
Best, Harianto.
Hi Harianto,
one simple solution would be to turn the restraint off by setting its weight to zero:
r.set_weight(0.0)
Riccardo
On Sat, Mar 15, 2014 at 2:35 AM, harianto tjong htjong@usc.edu wrote:
> Dear IMP users or developers, > > I run the code example > http://salilab.org/imp/2.1.1/doc/html/core_2restrain_diameter_8py-example.ht... > It runs smoothly. > > But when I add at the end of the code: > m.remove_restraint(r) > then it will be Segmentation fault. > > Anyone knows how to remove this restraint appropriately? > Thank you. > > Best, > Harianto. > > _______________________________________________ > IMP-users mailing list > IMP-users@salilab.org > https://salilab.org/mailman/listinfo/imp-users > >
On 3/14/14, 6:35 PM, harianto tjong wrote: > But when I add at the end of the code: > m.remove_restraint(r) > then it will be Segmentation fault.
Sounds like a bug to me - we'll investigate. I've opened an issue for it at https://github.com/salilab/imp/issues/767 - you can follow that to see the resolution.
Ben
Thanks, Ben! I will check for the resolution.
Ricardo, in my installation it is terminated with: AttributeError: set_weight. Thanks for trying out, Ricardo!
Best, Harianto.
On Sat, Mar 15, 2014 at 1:20 PM, Ben Webb ben@salilab.org wrote:
> On 3/14/14, 6:35 PM, harianto tjong wrote: > >> But when I add at the end of the code: >> m.remove_restraint(r) >> then it will be Segmentation fault. >> > > Sounds like a bug to me - we'll investigate. I've opened an issue for it > at https://github.com/salilab/imp/issues/767 - you can follow that to see > the resolution. > > Ben > -- > ben@salilab.org http://salilab.org/~ben/ > "It is a capital mistake to theorize before one has data." > - Sir Arthur Conan Doyle > > _______________________________________________ > IMP-users mailing list > IMP-users@salilab.org > https://salilab.org/mailman/listinfo/imp-users >
I'd suggest not adding restraints to the model at all. Instead, Gather your restraints as you want and create different ScoringFynction objects for the different purposes.
It keeps code a bit simpler and can be faster. Also, I think Model::remove_restraint is undocumented. — Sent from Mailbox for iPhone
On Sat, Mar 15, 2014 at 6:33 PM, harianto tjong htjong@usc.edu wrote:
> Thanks, Ben! > I will check for the resolution. > Ricardo, in my installation it is terminated with: AttributeError: > set_weight. > Thanks for trying out, Ricardo! > Best, > Harianto. > On Sat, Mar 15, 2014 at 1:20 PM, Ben Webb ben@salilab.org wrote: >> On 3/14/14, 6:35 PM, harianto tjong wrote: >> >>> But when I add at the end of the code: >>> m.remove_restraint(r) >>> then it will be Segmentation fault. >>> >> >> Sounds like a bug to me - we'll investigate. I've opened an issue for it >> at https://github.com/salilab/imp/issues/767 - you can follow that to see >> the resolution. >> >> Ben >> -- >> ben@salilab.org http://salilab.org/~ben/ >> "It is a capital mistake to theorize before one has data." >> - Sir Arthur Conan Doyle >> >> _______________________________________________ >> IMP-users mailing list >> IMP-users@salilab.org >> https://salilab.org/mailman/listinfo/imp-users >>