I really don't like it since a number of the restraints depend on the ordering of the particles in the list and the change would allow anyone to mess with that. We could add a method to Restraint to get a list of all the particles (although this is slightly tricky). If you just want to get the list of particles in python, probably the best thing to do is to %extend the class in IMP.i (this gets around the fact that there already is a protected get_particles method).
On May 9, 2008, at 5:00 PM, Friedrich Foerster wrote:
> would anybody object the below patch? > we (keren and me) need it for magic sphimp (i don't remember why, but > keren will know). > > thanks > > frido > > > > Index: kernel/include/IMP/Restraint.h > =================================================================== > --- kernel/include/IMP/Restraint.h (revision 539) > +++ kernel/include/IMP/Restraint.h (working copy) > @@ -94,7 +94,8 @@ > return model_.get(); > } > > - IMP_LIST(protected, Particle, particle, Particle*) > + //IMP_LIST(protected, Particle, particle, Particle*) > + IMP_LIST(public, Particle, particle, Particle*) > > private: > internal::ObjectPointer<Model, false> model_; > > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev