![](https://secure.gravatar.com/avatar/5c395809b2b55cec34dc7bcbb7c1e04b.jpg?s=120&d=mm&r=g)
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.
![](https://secure.gravatar.com/avatar/1611320353c0e4022c1003f10e3ae6ae.jpg?s=120&d=mm&r=g)
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 > >
![](https://secure.gravatar.com/avatar/cfe8857a24d561e8e700ab18e3ba7ec8.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/5c395809b2b55cec34dc7bcbb7c1e04b.jpg?s=120&d=mm&r=g)
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 >
![](https://secure.gravatar.com/avatar/1294d100c1f5fcd24f7ba4dc0349cfac.jpg?s=120&d=mm&r=g)
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 >>
participants (4)
-
Ben Webb
-
Daniel Russel
-
harianto tjong
-
Riccardo Pellarin