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_;
yes - since we need to iterate over the list of restraints. On May 9, 2008, at 5:00 PM, Friedrich Foerster wrote:
> lude/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_;
I think the best answer that had come up when Keren and I talked about this was to add a virtual method get_restrained_particles which returns the internal particles list by default, but could return something else in the case of restraint sets or nonbonded lists or such.
We also may want to thing about making the restraints simpler (and setup more complicated), by, for example, making the chain restraints only handle one chain. Currently they introduce fake connections between multiple chains.
On May 9, 2008, at 5:05 PM, Keren Lasker wrote:
> yes - since we need to iterate over the list of restraints. > On May 9, 2008, at 5:00 PM, Friedrich Foerster wrote: > >> lude/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
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
participants (3)
-
Daniel Russel
-
Friedrich Foerster
-
Keren Lasker