The ExcludedVolume scoring function is a sum over all pairs of refined particles. Pairs where both members are in the same rigid body are dropped as they can never change during optimization. The rigidbodyclosepairsfinder is responsible for enumerating all such pairs which are then put in a ClosePairContainer, which is in turn fed to a PairsRestraint. See the constructor implementation in svn (I think I simplified the implementation since 1.0, but maybe the simplification preceded 1.0).

The reason it is not documented in detail is that the plan has been to replace it with an alternate mechanism which better handles high resolution rigid bodies. But the improved implementation is not finished and tested yet.

Your sample code below won't do much of interest since there are only internal pairs. Add all the rigid bodies to one container and set up a ExcludedVolumeRestraint on that will do better.
lsc=IMP.container.ListSingetonContainer(rigidChains.values)
m.add_restraint(IMP.core.ExcludedVolumeRestraint(lsc, IMP.core.LeavesRefiner(...))

I'll add a warning if only one particle is passed and a reminder to get better rigid body handling.

On Aug 2, 2010, at 2:33 AM, Benjamin SCHWARZ wrote:

Hi list,

I was wondering about the exact meaning of the ExcludedVolumeRestraint score, and how this score was computed. So I took my virtual shovel and had a few hours digging in IMP code, but I still have questions.

For what I understood, the score is computed as the sum of harmonic functions over a set of pairs of intersecting spheres (this score being 0.0 for non interacting spheres), but the way these pairs are built is still a little fuzzy for me. 

Here is the sample python code I wrote using that restraint :

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())
)

I intuitively expected IMP to consider all pairs of intersecting atom-spheres between any two different chains, but reading the code I could not convince me this is actually what is computed.
I could not decide for instance if pairs of atoms in a same chain were considered or not, and in fact I could not even see where exactly atoms were extracted out of my rigid body hierarchies…

Could you explain me in a few words if my sample code does what I expect from it, and if not, how to change it to obtain the desired behavior.

  Thanks a lot




Dr. Benjamin SCHWARZ
Biocomputing group
 Voice : +33 (0)3 68 85 47 30
 FAX : +33 (0)3 68 85 47 18

<logo-uds-signature.gif>


Structural Biology & Genomics Dept. - IGBMC 
1 rue Laurent Fries
BP 10142
F - 67404 Illkirch CEDEX

_______________________________________________
IMP-users mailing list
IMP-users@salilab.org
https://salilab.org/mailman/listinfo/imp-users