[IMP-dev] proposal to simplify implementation of collections of decorators and particles
To: List for IMP development <>
Subject: [IMP-dev] proposal to simplify implementation of collections of decorators and particles
From: Daniel Russel <>
Date: Mon, 25 Jul 2011 11:54:27 -0700
Reply-to: List for IMP development <>
Currently, lists of decorators and particles in IMP are implemented using some rather complicated an brittle custom containers and a reasonable runtime cost for iterating through Particles and Decorators. I would like to remove this code and replace the implementations by plain std::vectors (and std::vector<Pointer> when reference counting is needed). This would result in no difference to the python API, which does not use these containers at all. On the C++ side, there would be some significant changes, in particular
- atom::Hierarchies would no longer inherit from core::Hierarchies and core::XYZRs would no longer inherit from core::XYZs, so certain code which assumes an implicit conversion from one to the other would break. Fixing the code would require addding IMP::get_as calls and a copy, or, ultimately better, just storing Particles and ParticlesTemp objects and constructing the decorators on demand
- Particles no longer would inhertit from ParticlesTemp, so similar implicit conversions from one to the other would need get_as calls (which would result in a copy). From perusing the code, most of these conversions are occur in places when a Particles could be replaced by a ParticlesTemp with no loss of functionality (and a marginal speedup).
These changes are likely to require many straight forward changes to existing code. So I'm a bit ambivalent.