8 #ifndef IMPKERNEL_OPTIMIZER_H
9 #define IMPKERNEL_OPTIMIZER_H
11 #include <IMP/kernel/kernel_config.h>
24 IMPKERNEL_BEGIN_NAMESPACE
47 bool stop_on_good_score_;
55 void set_is_optimizing_states(
bool tf)
const;
59 return get_optimizer_state_inputs();
77 double optimize(
unsigned int max_steps);
82 bool get_stop_on_good_score()
const {
return stop_on_good_score_; }
88 if (scoring_function_)
89 return scoring_function_;
93 return cache_ = get_model()->create_model_scoring_function();
105 set_optimizer_state_optimizer(obj,
this);
107 { Optimizer::set_optimizer_state_optimizer(obj,
nullptr); });
113 virtual void set_scoring_function(ScoringFunctionAdaptor sf);
120 virtual double do_optimize(
unsigned int ns) = 0;
124 void update_states()
const;
129 IMPKERNEL_END_NAMESPACE
void set_stop_on_good_score(bool tf)
virtual ModelObjectsTemp do_get_outputs() const
don't return anything here to avoid pointless dependencies
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
Shared optimizer state that is invoked upon commitment of new coordinates.
A smart pointer to a reference counted object.
IMP::kernel::Optimizer Optimizer
Represents a scoring function on the model.
Single variable function.
virtual ModelObjectsTemp do_get_inputs() const
A class for storing lists of IMP items.
Storage of a model, its restraints, constraints and particles.
Base class for all optimizers.
Classes to handle individual model particles. (Note that implementation of inline functions in in int...
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
A nullptr-initialized pointer to an IMP Object.
A shared base class to help in debugging and things.
For backwards compatibility.
ScoringFunction * get_scoring_function() const
Return the scoring function that is being used.
#define IMP_REF_COUNTED_NONTRIVIAL_DESTRUCTOR(Name)
double get_last_score() const
Return the score found in the last evaluate.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for storing model, its restraints, constraints, and particles.