[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IMP-dev] Proposed modification of how code accepts rigid bodies



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?