|
Rosetta
|
The EvolutionManager combines all required resources for the evolutionary ligand optimization and handles them as needed. More...
#include <EvolutionManager.hh>
Public Member Functions | |
| EvolutionManager (int rank) | |
| If rank is different than 0 a mpi system is expected. More... | |
| void | run (int mpi_size=1) |
| Main function that handles evolutionary optimization. More... | |
| void | init () |
| std::string | scores_to_str () const |
| Prints scores of all individuals. More... | |
Private Member Functions | |
| void | score () |
| Scores the entire population. More... | |
| void | init_workmanager () |
| void | calculate_quantiles () |
| Calculates the current quantiles. More... | |
| void | write_population_information () const |
| Saves information about the population and its history to disk. For debugging and benchmarking purposes. More... | |
| void | init_evolution_protocol (EvolutionOptionsCOP options) |
| void | external_scoring (int mpi_size) |
Private Attributes | |
| core::Size | max_generations_ |
| Defines after how many generations optimization will stop. More... | |
| Population | population_ |
| Contains and manages all evolutionary information for all ligands. More... | |
| ScorerOP | scorer_ = nullptr |
| Manages the scoring of ligands as well as keeping track of scores. More... | |
| WorkManagerOP | work_manager_ = nullptr |
| Handles mpi communication to distribute the scoring work. More... | |
| FragmentLibrary | library_ |
| Holds all molecular information about the protein and the ligands. More... | |
| core::Size | main_selector_ |
| The selector which will be applied to advance the generation. More... | |
| utility::vector1< SelectorOP > | selectors_ |
| Holds all selectors. More... | |
| std::map< std::string, core::Size > | selector_map_ |
| Maps selector names to indices in selector list. More... | |
| utility::vector1< OffspringFactoryOP > | factories_ |
| Holds all offspring factories. More... | |
| std::map< std::string, core::Size > | factory_map_ |
| Maps factory names to indices in factory list. More... | |
| utility::vector1< utility::vector1< core::Size > > | offspring_options_ |
| Holds arrays of size 5, defining index of selector, index of factory, selection size, offspring size, if parent will be kept in pool. More... | |
| int | rank_ = 0 |
| utility::vector1< core::Real > | quantiles = { 9999.9, 9999.9, 9999.9, 9999.9 } |
| Stores statistical information about score distribution within the population. More... | |
| core::Size | external_scoring_ = 0 |
| Used to distinguish between scoring of external molecules and internal evolutionary optimization. More... | |
The EvolutionManager combines all required resources for the evolutionary ligand optimization and handles them as needed.
|
explicit |
If rank is different than 0 a mpi system is expected.
|
private |
Calculates the current quantiles.
References protocols::ligand_evolution::Population::individual(), population_, quantiles, protocols::ligand_evolution::Individual::score(), protocols::ligand_evolution::Population::size(), and protocols::ligand_evolution::Population::sort().
Referenced by run().
|
private |
References external_scoring_, library_, protocols::ligand_evolution::FragmentLibrary::n_unscored_smiles(), rank_, and scorer_.
Referenced by run().
| void protocols::ligand_evolution::EvolutionManager::init | ( | void | ) |
References protocols::rosetta_scripts::XmlObjects::create_from_file(), external_scoring_, init_evolution_protocol(), init_workmanager(), protocols::ligand_evolution::Population::initialize_from_evotoptions(), protocols::ligand_evolution::FragmentLibrary::initialize_from_options(), library_, max_generations_, population_, rank_, scorer_, and protocols::TR().
|
private |
References factories_, factory_map_, library_, main_selector_, offspring_options_, selector_map_, selectors_, and protocols::TR().
Referenced by init().
|
private |
References library_, protocols::ligand_evolution::FragmentLibrary::max_positions(), scorer_, and work_manager_.
Referenced by init().
| void protocols::ligand_evolution::EvolutionManager::run | ( | int | mpi_size = 1 | ) |
Main function that handles evolutionary optimization.
References protocols::ligand_evolution::Selector::apply(), protocols::ligand_evolution::OffspringFactory::apply(), calculate_quantiles(), external_scoring(), external_scoring_, factories_, protocols::ligand_evolution::Population::individual(), main_selector_, max_generations_, protocols::ligand_evolution::OffspringFactory::name(), protocols::ligand_evolution::Selector::name(), protocols::ligand_evolution::Population::next_generation(), offspring_options_, population_, quantiles, rank_, protocols::ligand_evolution::Population::replace_population(), score(), protocols::ligand_evolution::Individual::score(), scorer_, scores_to_str(), selectors_, protocols::ligand_evolution::Population::sort(), protocols::TR(), work_manager_, and write_population_information().
|
private |
Scores the entire population.
References population_, scorer_, and work_manager_.
Referenced by run().
| std::string protocols::ligand_evolution::EvolutionManager::scores_to_str | ( | ) | const |
Prints scores of all individuals.
References protocols::ligand_evolution::Population::individuals(), population_, protocols::kinmatch::str(), and core::id::to_string().
Referenced by run().
|
private |
Saves information about the population and its history to disk. For debugging and benchmarking purposes.
References protocols::ligand_evolution::Population::expose_generation_log(), protocols::ligand_evolution::Population::expose_inheritance_graph(), core::conformation::membrane::out, population_, and scorer_.
Referenced by run().
|
private |
Used to distinguish between scoring of external molecules and internal evolutionary optimization.
Referenced by external_scoring(), init(), and run().
|
private |
Holds all offspring factories.
Referenced by init_evolution_protocol(), and run().
|
private |
Maps factory names to indices in factory list.
Referenced by init_evolution_protocol().
|
private |
Holds all molecular information about the protein and the ligands.
Referenced by external_scoring(), init(), init_evolution_protocol(), and init_workmanager().
|
private |
The selector which will be applied to advance the generation.
Referenced by init_evolution_protocol(), and run().
|
private |
|
private |
Holds arrays of size 5, defining index of selector, index of factory, selection size, offspring size, if parent will be kept in pool.
Factories will be called in order of this array
Referenced by init_evolution_protocol(), and run().
|
private |
Contains and manages all evolutionary information for all ligands.
Referenced by calculate_quantiles(), init(), run(), score(), scores_to_str(), and write_population_information().
|
private |
Stores statistical information about score distribution within the population.
Referenced by calculate_quantiles(), and run().
|
private |
Referenced by external_scoring(), init(), and run().
|
private |
Manages the scoring of ligands as well as keeping track of scores.
Referenced by external_scoring(), init(), init_workmanager(), run(), score(), and write_population_information().
|
private |
Maps selector names to indices in selector list.
Referenced by init_evolution_protocol().
|
private |
Holds all selectors.
Referenced by init_evolution_protocol(), and run().
|
private |
Handles mpi communication to distribute the scoring work.
Referenced by init_workmanager(), run(), and score().