Currently, code that handles rigid bodies does it by taking a list consisting of both RigidBody particles and non-rigid body XYZR particles along with a Refiner to turn the rigid bodies into XYZR particles. This has several disadvantages: - it seems to confuse the hell out of everyone - it forces all rigid bodies to use the same refiner - it means that you have to pass a completely different set of particles if some of them happen to be rigid than if none are rigid
I propose a new standard type of interface, namely, simply taking all the XYZR particles of interest, whether or not they happen to be part of a rigid body. That is, if you have some rigid proteins and some non-rigid proteins and are representing everything with all atoms, you simply pass all the atoms.
I think this has the following advantages: - the user no longer has to worry about whether things are rigid bodies or not, certain code just runs faster when they are - the user doesn't have to change the set of particles passed when moving to rigid bodies
It has the following disadvantages - code that takes advantage of rigid bodies is more complicated as it has to group the particles into rigid bodies: this is only a few lines of code and can be factored out, so it doesn't seem too bad - code that takes advantage of rigid body has to do more work. I don't think the extra work will be that large in practice, but am not yet sure
Typical things affected would be - ExcludedVolumeRestraint - RigidClosePairFinder - perhaps FitRestraint
Thoughts?
On 10/6/10 11:16 AM, Daniel Russel wrote: > I propose a new standard type of interface, namely, simply taking all > the XYZR particles of interest, whether or not they happen to be part > of a rigid body. That is, if you have some rigid proteins and some > non-rigid proteins and are representing everything with all atoms, > you simply pass all the atoms.
Sounds reasonable and less confusing for users to me. My only concern is: what happens in the above case if the user passes a list that contains only some atoms from a given rigid body? (e.g. protein A is rigid, protein B is non-rigid, and the user passes in just a few of the atoms from protein A) Any code that currently makes the assumption that an entire rigid body is involved (e.g. I suspect FitRestraint) would have to do the right thing (or maybe throw an exception and require that all members of a rigid body go in).
Ben
On Oct 7, 2010, at 2:04 PM, Ben Webb wrote:
> On 10/6/10 11:16 AM, Daniel Russel wrote: >> I propose a new standard type of interface, namely, simply taking all >> the XYZR particles of interest, whether or not they happen to be part >> of a rigid body. That is, if you have some rigid proteins and some >> non-rigid proteins and are representing everything with all atoms, >> you simply pass all the atoms. > > Sounds reasonable and less confusing for users to me. My only concern > is: what happens in the above case if the user passes a list that > contains only some atoms from a given rigid body? (e.g. protein A is > rigid, protein B is non-rigid, and the user passes in just a few of the > atoms from protein A) Any code that currently makes the assumption that > an entire rigid body is involved (e.g. I suspect FitRestraint) would > have to do the right thing (or maybe throw an exception and require that > all members of a rigid body go in). Any code that currently makes such an assumption is currently broken (since a single rigid body can include multiple representations of the same structure, as the ones created by the IMP::atom::create_rigid_body do).
participants (2)
-
Ben Webb
-
Daniel Russel