Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
protocols::optimize_weights::WrapperOptEMultifunc Class Reference

OptE mode multifunction class. More...

#include <OptEMultifunc.hh>

Inheritance diagram for protocols::optimize_weights::WrapperOptEMultifunc:
Inheritance graph

Public Types

typedef core::scoring::ScoreTypes ScoreTypes
typedef core::scoring::EnergyMap EnergyMap
typedef core::Real Real
typedef core::Size Size
- Public Types inherited from core::optimization::Multifunc
typedef utility::VirtualBase parent

Public Member Functions

 WrapperOptEMultifunc ()
void init (ScoreTypes const &free_score_list, core::Size free_count, ScoreTypes const &fixed_score_list, EnergyMap const &fixed_scores, OptEMultifuncOP optEfunc)
 ~WrapperOptEMultifunc () override
WrapperOptEMultifuncCOP get_self_ptr () const
 self pointers More...
WrapperOptEMultifuncOP get_self_ptr ()
WrapperOptEMultifuncCAP get_self_weak_ptr () const
WrapperOptEMultifuncAP get_self_weak_ptr ()
Real operator() (Multivec const &vars) const override
void dfunc (Multivec const &vars, Multivec &dE_dvars) const override
 OptE dfunc. More...
core::Size n_real_dofs () const
utility::vector1< Realderived_dofs (Multivec const &vars) const
void print_dofs (Multivec const &vars, std::ostream &ostr) const
numeric::expression_parser::VariableExpressionOP register_variable_expression (std::string varname)
void set_multifunc (OptEMultifuncOP multifunc)
- Public Member Functions inherited from core::optimization::Multifunc
 ~Multifunc () override=default
 Destructor. More...
virtual bool abort_min (Multivec const &) const
 Christophe added the following to allow premature end of minimization If you want to abort the minimizer under specific circonstances overload this function and return true if you want to stop, false if you want to continue. FOR THE MOMENT, ONLY IN DFPMIN! More...
virtual void dump (Multivec const &, Multivec const &) const
 Error state reached – derivative does not match gradient Derived classes have the oportunity to now output and or analyze the two vars assignments vars, vars+delta where the derivatives are incorrect. More...

Private Attributes

ScoreTypes free_score_list_
ScoreTypes fixed_score_list_
EnergyMap fixed_scores_
std::set< std::string > free_score_names_
std::set< std::string > fixed_score_names_
std::set< std::string > new_dof_names_
 Dofs added by "NEW_DOF" lines in the wrapper input file. More...
std::set< std::string > dependent_dof_names_
 Dofs marked as dependent by "DEPENDENT_DOF" lines in the wrapper input file. More...
std::set< std::string > valid_variable_names_
 union of ( free_score_names_ - dependent_dof_names_ ) + fixed_score_names_ + new_dof_names More...
std::set< std::string > active_variables_this_dependent_dof_
std::map< std::string,
std::map< std::string, core::SizeoptEmultifunc_dof_order_
< numeric::expression_parser::ExpressionCOP > 
utility::vector1< std::set
< std::string > > 
 Which variables influence each optE-percieved-dofs? More...
utility::vector1< std::list
< std::pair< core::Size,
numeric::expression_parser::ExpressionCOP > > > 
 For each real dof, a list of each derivative expression and associated optE-percieved-dof id. More...
OptEMultifuncOP multifunc_
core::Size n_real_dofs_

Additional Inherited Members

- Protected Member Functions inherited from core::optimization::Multifunc
 Multifunc ()
 Default constructor. More...
 Multifunc (Multifunc const &)
 Copy constructor. More...
Multifuncoperator= (Multifunc const &)
 Copy assignment. More...

Detailed Description

OptE mode multifunction class.

DANGER DANGER DANGER This class must never be allocated on the stack. Instead, it should be allocated (with "new") on the heap. This class hands an owning-pointer to itself to another class to create a call-back mechanism; this owning pointer will be invalid and result in stack corruption if this class is allocated on the stack.

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::optimize_weights::WrapperOptEMultifunc::WrapperOptEMultifunc ( )
protocols::optimize_weights::WrapperOptEMultifunc::~WrapperOptEMultifunc ( )

Member Function Documentation

utility::vector1< Real > protocols::optimize_weights::WrapperOptEMultifunc::derived_dofs ( Multivec const &  vars) const

References dof_variables_, and optE_dof_expressions_.

Referenced by dfunc(), and operator()().

void protocols::optimize_weights::WrapperOptEMultifunc::dfunc ( Multivec const &  vars,
Multivec dE_dvars 
) const
WrapperOptEMultifuncCOP protocols::optimize_weights::WrapperOptEMultifunc::get_self_ptr ( ) const

self pointers

WrapperOptEMultifuncOP protocols::optimize_weights::WrapperOptEMultifunc::get_self_ptr ( )
WrapperOptEMultifuncCAP protocols::optimize_weights::WrapperOptEMultifunc::get_self_weak_ptr ( ) const

Referenced by init().

WrapperOptEMultifuncAP protocols::optimize_weights::WrapperOptEMultifunc::get_self_weak_ptr ( )
void protocols::optimize_weights::WrapperOptEMultifunc::init ( ScoreTypes const &  free_score_list,
core::Size  free_count,
ScoreTypes const &  fixed_score_list,
EnergyMap const &  fixed_scores,
OptEMultifuncOP  optEfunc 
Size protocols::optimize_weights::WrapperOptEMultifunc::n_real_dofs ( ) const

References n_real_dofs_.

core::Real protocols::optimize_weights::WrapperOptEMultifunc::operator() ( Multivec const &  vars) const
void protocols::optimize_weights::WrapperOptEMultifunc::print_dofs ( Multivec const &  vars,
std::ostream &  ostr 
) const

References dof_variables_.

numeric::expression_parser::VariableExpressionOP protocols::optimize_weights::WrapperOptEMultifunc::register_variable_expression ( std::string  varname)
void protocols::optimize_weights::WrapperOptEMultifunc::set_multifunc ( OptEMultifuncOP  multifunc)

References multifunc_.

Member Data Documentation

utility::vector1< std::set< std::string > > protocols::optimize_weights::WrapperOptEMultifunc::active_variables_

Which variables influence each optE-percieved-dofs?

Referenced by init().

std::set< std::string > protocols::optimize_weights::WrapperOptEMultifunc::active_variables_this_dependent_dof_

During expression creation; keep track of which variables are active. This set Eventually ends up in the active_varibles_ array, and will be used to create derivative expressions.

Referenced by init(), and register_variable_expression().

std::set< std::string > protocols::optimize_weights::WrapperOptEMultifunc::dependent_dof_names_

Dofs marked as dependent by "DEPENDENT_DOF" lines in the wrapper input file.

Referenced by register_variable_expression().

std::map< std::string, OptEVariableExpressionOP > protocols::optimize_weights::WrapperOptEMultifunc::dof_variables_

Not every VariableExpression object registered by the ExpressionVisitor will end up in this map – variables for fixed_score terms are not kept here, they are simply given a fixed value and never asked to update that value. Every vaiable in this list has its value updated at the beginning of scoring.

Referenced by derived_dofs(), init(), print_dofs(), and register_variable_expression().

ScoreTypes protocols::optimize_weights::WrapperOptEMultifunc::fixed_score_list_

Referenced by init().

std::set< std::string > protocols::optimize_weights::WrapperOptEMultifunc::fixed_score_names_
EnergyMap protocols::optimize_weights::WrapperOptEMultifunc::fixed_scores_
ScoreTypes protocols::optimize_weights::WrapperOptEMultifunc::free_score_list_

Referenced by init().

std::set< std::string > protocols::optimize_weights::WrapperOptEMultifunc::free_score_names_
OptEMultifuncOP protocols::optimize_weights::WrapperOptEMultifunc::multifunc_

Referenced by dfunc(), init(), and set_multifunc().

core::Size protocols::optimize_weights::WrapperOptEMultifunc::n_real_dofs_

Referenced by init(), and n_real_dofs().

std::set< std::string > protocols::optimize_weights::WrapperOptEMultifunc::new_dof_names_

Dofs added by "NEW_DOF" lines in the wrapper input file.

Referenced by init(), and register_variable_expression().

utility::vector1< numeric::expression_parser::ExpressionCOP > protocols::optimize_weights::WrapperOptEMultifunc::optE_dof_expressions_

non-depdendent dofs are handled by VariableExpressions that map from the real_dof id to the optE-percieved-dof id.

Referenced by derived_dofs(), and init().

std::map< std::string, core::Size > protocols::optimize_weights::WrapperOptEMultifunc::optEmultifunc_dof_order_

Referenced by init().

utility::vector1< std::list< std::pair< core::Size, numeric::expression_parser::ExpressionCOP > > > protocols::optimize_weights::WrapperOptEMultifunc::real_dof_deriviative_expressions_

For each real dof, a list of each derivative expression and associated optE-percieved-dof id.

Referenced by dfunc(), and init().

std::set< std::string > protocols::optimize_weights::WrapperOptEMultifunc::valid_variable_names_

union of ( free_score_names_ - dependent_dof_names_ ) + fixed_score_names_ + new_dof_names

Referenced by init(), and register_variable_expression().

The documentation for this class was generated from the following files: