Rosetta Protocols  2014.35
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>

Public Types

typedef core::scoring::ScoreTypes ScoreTypes
 
typedef core::scoring::EnergyMap EnergyMap
 
typedef
core::optimization::Multivec 
Multivec
 
typedef core::Real Real
 
typedef core::Size Size
 

Public Member Functions

 WrapperOptEMultifunc (ScoreTypes const &free_score_list, Size free_count, ScoreTypes const &fixed_score_list, EnergyMap const &fixed_scores, OptEMultifuncOP optEfunc)
 
 ~WrapperOptEMultifunc ()
 
virtual Real operator() (Multivec const &vars) const
 
virtual void dfunc (Multivec const &vars, Multivec &dE_dvars) const
 OptE dfunc. More...
 
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
virtual void dump (Multivec const &, Multivec const &) const
 

Private Attributes

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

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 ( ScoreTypes const &  free_score_list,
Size  free_count,
ScoreTypes const &  fixed_score_list,
EnergyMap const &  fixed_scores,
OptEMultifuncOP  optEfunc 
)
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
virtual
Size protocols::optimize_weights::WrapperOptEMultifunc::n_real_dofs ( ) const

References n_real_dofs_.

core::Real protocols::optimize_weights::WrapperOptEMultifunc::operator() ( Multivec const &  vars) const
virtual
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_
private

Which variables influence each optE-percieved-dofs?

Referenced by WrapperOptEMultifunc().

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

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 register_variable_expression(), and WrapperOptEMultifunc().

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

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_
private

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(), print_dofs(), register_variable_expression(), and WrapperOptEMultifunc().

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

Referenced by WrapperOptEMultifunc().

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

Referenced by dfunc(), and set_multifunc().

Size protocols::optimize_weights::WrapperOptEMultifunc::n_new_dofs_
private
Size protocols::optimize_weights::WrapperOptEMultifunc::n_real_dofs_
private
std::set< std::string > protocols::optimize_weights::WrapperOptEMultifunc::new_dof_names_
private

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

Referenced by register_variable_expression(), and WrapperOptEMultifunc().

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

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 WrapperOptEMultifunc().

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

Referenced by WrapperOptEMultifunc().

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

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

Referenced by dfunc(), and WrapperOptEMultifunc().

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

union of ( free_score_names_ - dependent_dof_names_ ) + fixed_score_names_ + new_dof_names

Referenced by register_variable_expression(), and WrapperOptEMultifunc().


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