Proposed change to rigid body helpers
Currently the rigid body helpers and cover helpers return a score state which must be added to the model to have rigid bodies work properly. I think this is confusing and error prone and doesn't offer real benefit. I would propose that the decorators or create functions simply add the score state themselves. We can add a function to tear down the rigid body/cover if people want to be able to turn them off later.
The change would result in a compilation error in C++ and an mismatched type error in python, both of which can be fixed by simply removing the "score_state_variable=" from the "score_state_variable= create...." and the "model->add_score_state(score_state_variable)", so easy enough.
Thoughts? Objections?
The high level object is to make score states something that users are unlikely to have to be aware of: that is, you just create a rigid body and it works.
On 10/28/2009 12:57 PM, Daniel Russel wrote: > Currently the rigid body helpers and cover helpers return a score state > which must be added to the model to have rigid bodies work properly. I > think this is confusing and error prone and doesn't offer real benefit.
I agree - what else are people going to do with the score state, after all?
Ben
As a user I was trying that yesterday and made no sense. I was expecting it to return a rigid body, or the decorator RigidBody to do something similar, but not this functions.
2009/10/28 Ben Webb ben@salilab.org
> On 10/28/2009 12:57 PM, Daniel Russel wrote: > >> Currently the rigid body helpers and cover helpers return a score state >> which must be added to the model to have rigid bodies work properly. I >> think this is confusing and error prone and doesn't offer real benefit. >> > > I agree - what else are people going to do with the score state, after all? > > Ben > -- > ben@salilab.org http://salilab.org/~ben/http://salilab.org/%7Eben/ > "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 >
Sorry, crappy English. I try again: Yesterday I was using that functions and they made no sense. I was expecting the decorator to do what they do, or to return a rigid body particle.
that is :)
El 29 de octubre de 2009 10:43, Javier Ángel Velázquez Muriel < javi@salilab.org> escribió:
> > As a user I was trying that yesterday and made no sense. I was expecting it > to return a rigid body, or the decorator RigidBody to do something similar, > but not this functions. > > 2009/10/28 Ben Webb ben@salilab.org > > On 10/28/2009 12:57 PM, Daniel Russel wrote: >> >>> Currently the rigid body helpers and cover helpers return a score state >>> which must be added to the model to have rigid bodies work properly. I >>> think this is confusing and error prone and doesn't offer real benefit. >>> >> >> I agree - what else are people going to do with the score state, after >> all? >> >> Ben >> -- >> ben@salilab.org http://salilab.org/~ben/http://salilab.org/%7Eben/ >> "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 >> > >
Upon some experimenting, I definitely thing this is a big improvement. To elaborate further: - RigidBody::setup_particle would create a score state and add it to the model so you never see the score state at all - new decorators Cover and Centroid would do similar things for covers and centroids. - the decorators can have a method added later called, say teardown_particle which would remove the score state - there are some options with the create_x methods: 1) if no one says anything, I will just remove them 2) I can instead deprecate them and implement them in terms of the new decorators 3) if someone really wants I can even have them return the score state and make the caller add the score state as is currently the case (again, if someone asks).
On Oct 29, 2009, at 10:45 AM, Javier Ángel Velázquez Muriel wrote:
> > Sorry, crappy English. I try again: > Yesterday I was using that functions and they made no sense. I was > expecting the decorator to do what they do, or to return a rigid > body particle. > > that is :) > > El 29 de octubre de 2009 10:43, Javier Ángel Velázquez Muriel <javi@salilab.org > > escribió: > > As a user I was trying that yesterday and made no sense. I was > expecting it to return a rigid body, or the decorator RigidBody to > do something similar, but not this functions. > > 2009/10/28 Ben Webb ben@salilab.org > > On 10/28/2009 12:57 PM, Daniel Russel wrote: > Currently the rigid body helpers and cover helpers return a score > state > which must be added to the model to have rigid bodies work properly. I > think this is confusing and error prone and doesn't offer real > benefit. > > I agree - what else are people going to do with the score state, > after all? > > 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 > > > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev
participants (3)
-
Ben Webb
-
Daniel Russel
-
Javier Ángel Velázquez Muriel