|
Rosetta 3.5
|
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 Types inherited from core::optimization::Multifunc | |
| typedef utility::pointer::ReferenceCount | parent |
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 | ~Multifunc () |
| 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 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_ |
Additional Inherited Members | |
Protected Member Functions inherited from core::optimization::Multifunc | |
| Multifunc () | |
| Default constructor. More... | |
| Multifunc (Multifunc const &) | |
| Copy constructor. More... | |
| Multifunc const & | operator= (Multifunc const &) |
| Copy assignment. More... | |
OptE mode multifunction class.
Definition at line 54 of file OptEMultifunc.hh.
Definition at line 58 of file OptEMultifunc.hh.
Definition at line 59 of file OptEMultifunc.hh.
Definition at line 60 of file OptEMultifunc.hh.
Definition at line 57 of file OptEMultifunc.hh.
Definition at line 61 of file OptEMultifunc.hh.
| 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 | ||
| ) |
Definition at line 80 of file OptEMultifunc.cc.
References distribute_over_mpi_, mpi_nprocs_, and mpi_rank_.
| 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 | ||
| ) |
Definition at line 116 of file OptEMultifunc.cc.
References distribute_over_mpi_, mpi_nprocs_, and mpi_rank_.
|
inlinevirtual |
Destructor.
Definition at line 88 of file OptEMultifunc.hh.
| 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).
Definition at line 412 of file OptEMultifunc.cc.
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.
Definition at line 241 of file OptEMultifunc.cc.
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_list_, starting_reference_energies_, and protocols::optimize_weights::TR().
Referenced by wait_for_remote_vars().
|
inline |
Definition at line 144 of file OptEMultifunc.hh.
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?
Definition at line 149 of file OptEMultifunc.hh.
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()
Definition at line 308 of file OptEMultifunc.cc.
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()
Definition at line 333 of file OptEMultifunc.cc.
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 |
Definition at line 357 of file OptEMultifunc.cc.
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.
Definition at line 444 of file OptEMultifunc.cc.
References protocols::optimize_weights::EVAL_DFUNC, and mpi_broadcast_send_vars().
Referenced by dfunc().
|
private |
send out messages over MPI for remote nodes to evaluate their func given the input vars.
Definition at line 423 of file OptEMultifunc.cc.
References protocols::optimize_weights::EVAL_FUNC, and mpi_broadcast_send_vars().
Referenced by operator()().
|
private |
Definition at line 482 of file OptEMultifunc.cc.
Referenced by wait_for_remote_vars().
|
private |
Definition at line 461 of file OptEMultifunc.cc.
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.
Definition at line 525 of file OptEMultifunc.cc.
References mpi_nprocs_.
Referenced by dfunc().
|
private |
collect func values from remote nodes and return their sum.
Definition at line 508 of file OptEMultifunc.cc.
References mpi_nprocs_.
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.
Definition at line 160 of file OptEMultifunc.cc.
References component_weights_, distribute_over_mpi_, fix_reference_energies_, fixed_score_list_, fixed_terms_, 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(), protocols::optimize_weights::OptEData::position_data_begin(), protocols::optimize_weights::OptEData::position_data_end(), score_list_, starting_reference_energies_, and protocols::optimize_weights::TR().
Referenced by wait_for_remote_vars().
|
inline |
Definition at line 131 of file OptEMultifunc.hh.
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.
Definition at line 374 of file OptEMultifunc.cc.
References dfunc(), protocols::optimize_weights::END_OF_MINIMIZATION, protocols::optimize_weights::EVAL_DFUNC, protocols::optimize_weights::EVAL_FUNC, mpi_broadcast_receive_vars(), and operator()().
Referenced by protocols::optimize_weights::IterativeOptEDriver::optimize_weights().
|
private |
Definition at line 186 of file OptEMultifunc.hh.
Referenced by dfunc(), and operator()().
|
private |
Definition at line 190 of file OptEMultifunc.hh.
Referenced by dfunc(), operator()(), and OptEMultifunc().
|
private |
Definition at line 183 of file OptEMultifunc.hh.
Referenced by dfunc(), fix_reference_energies(), get_dofs_from_energy_map(), get_reference_energies_from_dofs(), and operator()().
|
private |
Definition at line 180 of file OptEMultifunc.hh.
Referenced by dfunc(), get_energy_map_from_dofs(), and operator()().
|
private |
Definition at line 178 of file OptEMultifunc.hh.
Referenced by dfunc(), get_energy_map_from_dofs(), and operator()().
|
private |
Definition at line 189 of file OptEMultifunc.hh.
Referenced by mpi_receive_dfunc(), mpi_receive_func(), and OptEMultifunc().
|
private |
Definition at line 188 of file OptEMultifunc.hh.
Referenced by dfunc(), operator()(), and OptEMultifunc().
|
private |
Definition at line 172 of file OptEMultifunc.hh.
Referenced by dfunc(), get_dofs_from_energy_map(), get_reference_energies_from_dofs(), and operator()().
|
private |
Definition at line 173 of file OptEMultifunc.hh.
Referenced by dfunc(), get_reference_energies_from_dofs(), and operator()().
|
private |
Definition at line 174 of file OptEMultifunc.hh.
Referenced by dfunc(), get_dofs_from_energy_map(), and operator()().
|
private |
Rotamer energy components for all positions.
Definition at line 177 of file OptEMultifunc.hh.
Referenced by dfunc(), and operator()().
|
private |
Definition at line 179 of file OptEMultifunc.hh.
Referenced by dfunc(), get_dofs_from_energy_map(), get_energy_map_from_dofs(), and operator()().
|
private |
Definition at line 184 of file OptEMultifunc.hh.
Referenced by dfunc(), get_dofs_from_energy_map(), get_reference_energies_from_dofs(), operator()(), and set_starting_reference_energies().
1.8.4