Sorry, it looks like I had gotten confused about your code. The code below looks correct.
BTW, lists of decorators and particles are automatically inter-converted, so you can just to
IMP.container.ListSingletonContainer(rigidChains.values())
On Aug 9, 2010, at 7:43 AM, Benjamin SCHWARZ wrote:
Hi Daniel,
I am sorry, but your answer remains a bit cryptic to me.
first, I don't understand this statement :
Your sample code below won't do much of interest since there are only internal pairs.
I have 4 rigid bodies, one for each chain in my pdb structure, thus I should have all atom pairs between distinct chains, should I not ?
second :
Add all the rigid bodies to one container and set up a ExcludedVolumeRestraint on that will do better.
I thought I was doing exactly this with
for rb in rigidChains.values() :
lsc.add_particle(rb.get_particle())
Moreover
lsc=IMP.container.ListSingetonContainer(rigidChains.values)
Does not seem to work, since rigidChains contains RigidBody Decorators (which are not particles), and ListSingletonContainer can only be initialized with Particles...
rigidChains = {}
for chain in IMP.atom.Chains(IMP.atom.get_by_type(mh, IMP.atom.CHAIN_TYPE)) :
rigidChains[chain.get_id()] = IMP.atom.setup_as_rigid_body(chain)
[..]
lsc = IMP.container.ListSingletonContainer()
for rb in rigidChains.values() :
lsc.add_particle(rb.get_particle())
m.add_restraint(
IMP.core.ExcludedVolumeRestraint(
lsc,
IMP.core.LeavesRefiner(refChains.values()[0 ].get_traits())
)
)
_______________________________________________ IMP-users mailing listIMP-usersATsalilab.org ">IMP-usersATsalilab.org https://salilab.org/mailman/listinfo/imp-users