Rosetta
Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::ligand_evolution::EvolutionManager Class Reference

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< SelectorOPselectors_
 Holds all selectors. More...
 
std::map< std::string, core::Sizeselector_map_
 Maps selector names to indices in selector list. More...
 
utility::vector1< OffspringFactoryOPfactories_
 Holds all offspring factories. More...
 
std::map< std::string, core::Sizefactory_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::Realquantiles = { 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...
 

Detailed Description

The EvolutionManager combines all required resources for the evolutionary ligand optimization and handles them as needed.

Constructor & Destructor Documentation

◆ EvolutionManager()

protocols::ligand_evolution::EvolutionManager::EvolutionManager ( int  rank)
explicit

If rank is different than 0 a mpi system is expected.

Member Function Documentation

◆ calculate_quantiles()

void protocols::ligand_evolution::EvolutionManager::calculate_quantiles ( )
private

◆ external_scoring()

void protocols::ligand_evolution::EvolutionManager::external_scoring ( int  mpi_size)
private

◆ init()

void protocols::ligand_evolution::EvolutionManager::init ( void  )

◆ init_evolution_protocol()

void protocols::ligand_evolution::EvolutionManager::init_evolution_protocol ( EvolutionOptionsCOP  options)
private

◆ init_workmanager()

void protocols::ligand_evolution::EvolutionManager::init_workmanager ( )
private

◆ run()

void protocols::ligand_evolution::EvolutionManager::run ( int  mpi_size = 1)

◆ score()

void protocols::ligand_evolution::EvolutionManager::score ( )
private

Scores the entire population.

References population_, scorer_, and work_manager_.

Referenced by run().

◆ scores_to_str()

std::string protocols::ligand_evolution::EvolutionManager::scores_to_str ( ) const

◆ write_population_information()

void protocols::ligand_evolution::EvolutionManager::write_population_information ( ) const
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().

Member Data Documentation

◆ external_scoring_

core::Size protocols::ligand_evolution::EvolutionManager::external_scoring_ = 0
private

Used to distinguish between scoring of external molecules and internal evolutionary optimization.

Referenced by external_scoring(), init(), and run().

◆ factories_

utility::vector1< OffspringFactoryOP > protocols::ligand_evolution::EvolutionManager::factories_
private

Holds all offspring factories.

Referenced by init_evolution_protocol(), and run().

◆ factory_map_

std::map< std::string, core::Size > protocols::ligand_evolution::EvolutionManager::factory_map_
private

Maps factory names to indices in factory list.

Referenced by init_evolution_protocol().

◆ library_

FragmentLibrary protocols::ligand_evolution::EvolutionManager::library_
private

Holds all molecular information about the protein and the ligands.

Referenced by external_scoring(), init(), init_evolution_protocol(), and init_workmanager().

◆ main_selector_

core::Size protocols::ligand_evolution::EvolutionManager::main_selector_
private

The selector which will be applied to advance the generation.

Referenced by init_evolution_protocol(), and run().

◆ max_generations_

core::Size protocols::ligand_evolution::EvolutionManager::max_generations_
private

Defines after how many generations optimization will stop.

Referenced by init(), and run().

◆ offspring_options_

utility::vector1< utility::vector1< core::Size > > protocols::ligand_evolution::EvolutionManager::offspring_options_
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().

◆ population_

Population protocols::ligand_evolution::EvolutionManager::population_
private

Contains and manages all evolutionary information for all ligands.

Referenced by calculate_quantiles(), init(), run(), score(), scores_to_str(), and write_population_information().

◆ quantiles

utility::vector1< core::Real > protocols::ligand_evolution::EvolutionManager::quantiles = { 9999.9, 9999.9, 9999.9, 9999.9 }
private

Stores statistical information about score distribution within the population.

Referenced by calculate_quantiles(), and run().

◆ rank_

int protocols::ligand_evolution::EvolutionManager::rank_ = 0
private

Referenced by external_scoring(), init(), and run().

◆ scorer_

ScorerOP protocols::ligand_evolution::EvolutionManager::scorer_ = nullptr
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().

◆ selector_map_

std::map< std::string, core::Size > protocols::ligand_evolution::EvolutionManager::selector_map_
private

Maps selector names to indices in selector list.

Referenced by init_evolution_protocol().

◆ selectors_

utility::vector1< SelectorOP > protocols::ligand_evolution::EvolutionManager::selectors_
private

Holds all selectors.

Referenced by init_evolution_protocol(), and run().

◆ work_manager_

WorkManagerOP protocols::ligand_evolution::EvolutionManager::work_manager_ = nullptr
private

Handles mpi communication to distribute the scoring work.

Referenced by init_workmanager(), run(), and score().


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