I'd like to clean up the Monte Carlo mover support in a relatively minor but non-backwards-compatible way. This is motivated by - the current interface is a significant fraction occupied by stuff that is just there for backwards compatibility (eg the size parameter for propose_move()) - there is interest in supporting asymmetrical movers, which requires that propose_move() return an additional value (which would be 1.0 for all existing movers)
I don't think there are too many movers outside of ISD, ISD2 and membrane, all of which I can update, and use of the movers would be unchanged, so I don't expect that such a change would be painful. If it is problematic, then I can provide a backwards compatibility layer, but that adds complexity and confuses the API and so would be nice to avoid. Comments?
The new mover would look like: class Mover: public ModelObject { public: MoverResult propose_move(); void reject_proposed_move(); void accept_proposed_move(); protected: virtual MoverResult do_propose_move()=0; virtual void do_reject_proposed_move()=0; virtual void do_accept_proposed_move()=0; };
class MoverResult { ParticlesTemp get_moved_particles() const; double get_move_probability() const; /* Yannick has a better name for this */ };
participants (1)
-
Daniel Russel