ScoreStates allow code to be injected before and after the restraint evaluation process. Such code can be used to, for example:
ScoreStates have two methods which are called during the Model::evaluate() function
Public Member Functions | |
def | __disown__ |
void | after_evaluate (DerivativeAccumulator *accpt) |
void | before_evaluate () |
Model * | get_model () const |
ScoreState (std::string name=std::string()) | |
Interactions | |
Certain sorts of operations, such as evaluation of restraints in isolation, benefit from being able to determine which containers and particles are needed by which restraints.
Input and output particles are ones whose attributes are read. | |
virtual ContainersTemp | get_input_containers () const =0 |
virtual ParticlesTemp | get_input_particles () const =0 |
virtual ParticlesList | get_interacting_particles () const =0 |
virtual ContainersTemp | get_output_containers () const =0 |
virtual ParticlesTemp | get_output_particles () const =0 |
Protected Member Functions | |
virtual void | do_after_evaluate (DerivativeAccumulator *accpt)=0 |
virtual void | do_before_evaluate ()=0 |
virtual void | set_model (Model *model) |
Friends | |
template<class T > | |
void | IMP::internal::unref (T *) |
virtual ParticlesTemp IMP::ScoreState::get_input_particles | ( | ) | const [pure virtual] |
Given that the containers are up to date.
Model* IMP::ScoreState::get_model | ( | ) | const |
virtual ParticlesTemp IMP::ScoreState::get_output_particles | ( | ) | const [pure virtual] |
Given that the containers are up to date.
virtual void IMP::ScoreState::set_model | ( | Model * | model | ) | [protected, virtual] |
Override this method to take action when the score stated is added to a model.