![]() |
Rosetta Protocols
2014.16.56682
|
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 | |
| OptEMultifunc (OptEData &opte_data_in, EnergyMap const &fixed_terms_in, int num_free_in, ScoreTypes &score_list_in, ScoreTypes &fixed_score_list_in, Multivec const &component_weights) | |
| OptEMultifunc (OptEData &opte_data_in, EnergyMap const &fixed_terms_in, int num_free_in, ScoreTypes const &score_list_in, ScoreTypes const &fixed_score_list_in, utility::vector1< Real > const &reference_energies_in, Multivec const &component_weights) | |
| virtual | ~OptEMultifunc () |
| Destructor. More... | |
| virtual Real | operator() (Multivec const &vars) const |
| The objective function for optE. Called in IterativeOptEDriver when optimizing the weights. Sums over all of the PositionData objects in the OptEData object, and calls get_score() on each of them. Each PositionData object implements print_score() and get_score() methods that print/return how good a weight set is for optimizing the metric that PositionData object represents. More... | |
| virtual void | dfunc (Multivec const &vars, Multivec &dE_dvars) const |
| OptE dfunc. More... | |
| Multivec | get_dofs_from_energy_map (EnergyMap const &start_vals) const |
| Does actual work for OptE minimization. More... | |
| EnergyMap | get_energy_map_from_dofs (Multivec const &dofs) const |
| Expand free variables and combine with fixed to make an Energy Map. More... | |
| utility::vector1< Real > | get_reference_energies_from_dofs (Multivec const &dofs) const |
| void | set_starting_reference_energies (utility::vector1< Real > const &values) |
| void | wait_for_remote_vars () const |
| Non-driver node wait for MPI vars to evaluate either the func or the dfunc. More... | |
| void | declare_minimization_over () const |
| For driver node: inform the non-driver nodes that minimization is over. Must be called before object is destructed (Should not be called in the destructor, as dstors should not throw exceptions, and MPI communication can absolutely result in exceptions). More... | |
| void | fix_reference_energies (bool setting) |
| bool | fix_reference_energies () const |
| Are the reference energies being optimized at all, or are they being held fixed? More... | |
Public Member Functions inherited from core::optimization::Multifunc | |
| virtual void | dump (Multivec const &, Multivec const &) const |
Private Member Functions | |
| void | mpi_broadcast_eval_func (Multivec const &vars) const |
| send out messages over MPI for remote nodes to evaluate their func given the input vars. More... | |
| void | mpi_broadcast_eval_dfunc (Multivec const &vars) const |
| send out messages over MPI for remote nodes to evaluate their dfunc given the input vars. More... | |
| void | mpi_broadcast_send_vars (Multivec const &vars) const |
| void | mpi_broadcast_receive_vars (Multivec &vars) const |
| Real | mpi_receive_func () const |
| collect func values from remote nodes and return their sum. More... | |
| void | mpi_receive_dfunc (Multivec &dE_vars) const |
| collect dfunc valresultsues from remote nodes and increment the values in the dE_dvars input array. More... | |
Private Attributes | |
| Size const | num_energy_dofs_ |
| int const | num_ref_dofs_ |
| int const | num_total_dofs_ |
| OptEData const & | opte_data_ |
| Rotamer energy components for all positions. More... | |
| EnergyMap const & | fixed_terms_ |
| ScoreTypes const & | score_list_ |
| ScoreTypes const & | fixed_score_list_ |
| bool | fix_reference_energies_ |
| utility::vector1< Real > | starting_reference_energies_ |
| Multivec | component_weights_ |
| int | mpi_rank_ |
| int | mpi_nprocs_ |
| bool | distribute_over_mpi_ |
OptE mode multifunction class.
| protocols::optimize_weights::OptEMultifunc::OptEMultifunc | ( | OptEData & | opte_data_in, |
| EnergyMap const & | fixed_terms_in, | ||
| int | num_free_in, | ||
| ScoreTypes & | score_list_in, | ||
| ScoreTypes & | fixed_score_list_in, | ||
| Multivec const & | component_weights | ||
| ) |
| protocols::optimize_weights::OptEMultifunc::OptEMultifunc | ( | OptEData & | opte_data_in, |
| EnergyMap const & | fixed_terms_in, | ||
| int | num_free_in, | ||
| ScoreTypes const & | score_list_in, | ||
| ScoreTypes const & | fixed_score_list_in, | ||
| utility::vector1< Real > const & | reference_energies_in, | ||
| Multivec const & | component_weights | ||
| ) |
|
inlinevirtual |
Destructor.
| void protocols::optimize_weights::OptEMultifunc::declare_minimization_over | ( | ) | const |
For driver node: inform the non-driver nodes that minimization is over. Must be called before object is destructed (Should not be called in the destructor, as dstors should not throw exceptions, and MPI communication can absolutely result in exceptions).
References protocols::optimize_weights::END_OF_MINIMIZATION.
Referenced by protocols::optimize_weights::IterativeOptEDriver::optimize_weights().
|
virtual |
OptE dfunc.
OptE dfunc – gets the partial derivatives of func for each dimension being minimized.
Implements core::optimization::Multifunc.
References component_weights_, distribute_over_mpi_, fix_reference_energies_, fixed_score_list_, fixed_terms_, mpi_broadcast_eval_dfunc(), mpi_rank_, mpi_receive_dfunc(), num_energy_dofs_, num_ref_dofs_, num_total_dofs_, opte_data_, protocols::optimize_weights::OptEPositionDataFactory::optE_type_name(), protocols::optimize_weights::OptEData::position_data_begin(), protocols::optimize_weights::OptEData::position_data_end(), score, score_list_, starting_reference_energies_, and protocols::optimize_weights::TR.
Referenced by wait_for_remote_vars().
|
inline |
References fix_reference_energies_.
Referenced by protocols::optimize_weights::IterativeOptEDriver::optimize_weights().
|
inline |
Are the reference energies being optimized at all, or are they being held fixed?
References fix_reference_energies_.
| Multivec protocols::optimize_weights::OptEMultifunc::get_dofs_from_energy_map | ( | EnergyMap const & | start_vals | ) | const |
Does actual work for OptE minimization.
Extract variable weights from an Energy Map.
Extract variable weights from an Energy Map
OptEMultifunc::get_dofs_from_energy_map()
References fix_reference_energies_, num_energy_dofs_, num_total_dofs_, score_list_, and starting_reference_energies_.
Referenced by protocols::optimize_weights::IterativeOptEDriver::optimize_weights().
| EnergyMap protocols::optimize_weights::OptEMultifunc::get_energy_map_from_dofs | ( | Multivec const & | dofs | ) | const |
Expand free variables and combine with fixed to make an Energy Map.
Expand free variables and combine with fixed to make an Energy Map. Used by the IterativeOptEDriver at the end of weight minimization to create an EnergyMap that uses the new weight set. This EnergyMap then gets output into a optE log file.
OptEMultifunc::get_energy_map_from_dofs()
References fixed_score_list_, fixed_terms_, and score_list_.
Referenced by protocols::optimize_weights::IterativeOptEDriver::optimize_weights().
| utility::vector1< Real > protocols::optimize_weights::OptEMultifunc::get_reference_energies_from_dofs | ( | Multivec const & | dofs | ) | const |
References fix_reference_energies_, num_energy_dofs_, num_ref_dofs_, and starting_reference_energies_.
Referenced by protocols::optimize_weights::IterativeOptEDriver::optimize_weights().
|
private |
send out messages over MPI for remote nodes to evaluate their dfunc given the input vars.
References protocols::optimize_weights::EVAL_DFUNC, mpi_broadcast_send_vars(), and vars.
Referenced by dfunc().
|
private |
send out messages over MPI for remote nodes to evaluate their func given the input vars.
References protocols::optimize_weights::EVAL_FUNC, mpi_broadcast_send_vars(), and vars.
Referenced by operator()().
|
private |
References vars.
Referenced by wait_for_remote_vars().
|
private |
References vars.
Referenced by mpi_broadcast_eval_dfunc(), and mpi_broadcast_eval_func().
|
private |
collect dfunc valresultsues from remote nodes and increment the values in the dE_dvars input array.
References mpi_nprocs_.
Referenced by dfunc().
|
private |
collect func values from remote nodes and return their sum.
References mpi_nprocs_, and protocols::analysis::total.
Referenced by operator()().
The objective function for optE. Called in IterativeOptEDriver when optimizing the weights. Sums over all of the PositionData objects in the OptEData object, and calls get_score() on each of them. Each PositionData object implements print_score() and get_score() methods that print/return how good a weight set is for optimizing the metric that PositionData object represents.
OptEMultifunc::operator()
Implements core::optimization::Multifunc.
References component_weights_, distribute_over_mpi_, utility::exit(), fix_reference_energies_, fixed_score_list_, fixed_terms_, basic::options::OptionKeys::optE::limit_bad_scores, mpi_broadcast_eval_func(), mpi_rank_, mpi_receive_func(), num_energy_dofs_, num_ref_dofs_, num_total_dofs_, opte_data_, protocols::optimize_weights::OptEPositionDataFactory::optE_type_name(), basic::options::option, protocols::optimize_weights::OptEData::position_data_begin(), protocols::optimize_weights::OptEData::position_data_end(), s, score, score_list_, starting_reference_energies_, protocols::optimize_weights::TR, and user.
Referenced by wait_for_remote_vars().
|
inline |
References starting_reference_energies_.
| void protocols::optimize_weights::OptEMultifunc::wait_for_remote_vars | ( | ) | const |
Non-driver node wait for MPI vars to evaluate either the func or the dfunc.
References dfunc(), protocols::optimize_weights::END_OF_MINIMIZATION, protocols::optimize_weights::EVAL_DFUNC, protocols::optimize_weights::EVAL_FUNC, mpi_broadcast_receive_vars(), operator()(), and vars.
Referenced by protocols::optimize_weights::IterativeOptEDriver::optimize_weights().
|
private |
Referenced by dfunc(), and operator()().
|
private |
Referenced by dfunc(), operator()(), and OptEMultifunc().
|
private |
Referenced by dfunc(), fix_reference_energies(), get_dofs_from_energy_map(), get_reference_energies_from_dofs(), and operator()().
|
private |
Referenced by dfunc(), get_energy_map_from_dofs(), and operator()().
|
private |
Referenced by dfunc(), get_energy_map_from_dofs(), and operator()().
|
private |
Referenced by mpi_receive_dfunc(), mpi_receive_func(), and OptEMultifunc().
|
private |
Referenced by dfunc(), operator()(), and OptEMultifunc().
|
private |
Referenced by dfunc(), get_dofs_from_energy_map(), get_reference_energies_from_dofs(), and operator()().
|
private |
Referenced by dfunc(), get_reference_energies_from_dofs(), and operator()().
|
private |
Referenced by dfunc(), get_dofs_from_energy_map(), and operator()().
|
private |
Rotamer energy components for all positions.
Referenced by dfunc(), and operator()().
|
private |
Referenced by dfunc(), get_dofs_from_energy_map(), get_energy_map_from_dofs(), and operator()().
|
private |
1.8.7