Re: [IMP-users] Problems with installing IMP on Ubuntu 15.04
To: Help and discussion for users of IMP <>
Subject: Re: [IMP-users] Problems with installing IMP on Ubuntu 15.04
From: Ben Webb <>
Date: Wed, 03 Jun 2015 17:41:07 -0700
Reply-to: Help and discussion for users of IMP <>
On 6/3/15 3:37 PM, harianto tjong wrote:
I found the tutorial IMP2.4 that still use add_restraint attribute:
While you could probably make things work using add_restraint(), I would
advise against it. Both add_restraint() and remove_restraint() were
deprecated in IMP a long time ago, and will be removed in the upcoming
2.5 release. See
http://integrativemodeling.org/nightly/doc/ref/kernel_2basic_optimization_8py-example.htmlfor the latest recommended way to run that example. Just keep your
restraints in a Python data structure (such as a list), or in a
RestraintSet, and pass them to a RestraintsScoringFunction. To remove a
restraint, just remove it from that list or RestraintSet.
Given the m.add_restraint(r), how can I achieve m.remove_restraint(r) in
IMP 2.4?
If you really want to stick with add_restraint() for now,
m.remove_restraint(r) is equivalent to
m.get_root_restraint_set().remove_restraint(r) (which will also stop
working when IMP 2.5 is released).
Ben
--
http://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
- Sir Arthur Conan Doyle