On further thought, I have a slightly different suggestion for spherical restraint.
SphericalRestraint(Model*, ParticleIndex, FloatKeys keys, Floats center, ScoreFunc*);
The advantage of this is that you can use whatever coordinates you want for the restraint and however many you want. So you can also use it to restraint a single coordinate or a pair of coordinates.
I would suggest the constructor for DistanceRestraint be made to be similar.
On Dec 14, 2007, at 9:46 AM, Ben Webb wrote:
> Daniel Russel wrote: >> It seems entirely useless to me as written as it can only restrict >> coordinates relative to the origin. > > Hmm, you're absolutely right. I'd assumed that it could actually do > something useful, like restrict coordinates to a fixed value. So it's > entirely useless to me too. > > I guess it was written to use the origin because systems like the NPC > are centered at the origin. But that's hardly very general. > >> I propose getting rid of it and >> instead providing, as needed, SphericalDistanceRestraint (restraint >> the distance from a fixed point), CoordinateRestraint (which >> restricts >> a coordinate relative to a fixed value) etc. The names could use some >> work. >> >> My suggestion for SphericalDistanceRestraint (which is what I want) >> is: >> SphericalDistanceRestraint(Model*, ParticleIndex (or Particle*), >> Float >> x, Float y, Float z, ScoreFunc *f); > > Sounds fine to me. > > Ben > -- > ben@salilab.org http://salilab.org/~ben/ > "It is a capital mistake to theorize before one has data." > - Sir Arthur Conan Doyle > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev