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

Takes two individuals and produces a set amount of offspring using a crossover. More...

#include <Crossover.hh>

Inheritance diagram for protocols::ligand_evolution::Crossover:
Inheritance graph
[legend]

Public Member Functions

 Crossover (FragmentLibrary const &library)
 
utility::vector1< Individualapply (utility::vector1< Individual > const &parents, core::Size n_offspring) const override
 Selects randomly two parents to create offspring until n_offspring is available @detail One random parent donates the reaction and both donate minimum one reagent. If they come from different reactions, the alien reagent is mapped to the most similar counterpart. More...
 
std::string const & name () const override
 Returns the name of this factory. More...
 

Private Member Functions

Individual cross (Individual const &reaction_parent, Individual const &other_parent) const
 Crosses two individuals into one offspring. More...
 

Private Attributes

FragmentLibrary const & library_
 Since this function regularly produces offspring and consults a FragmentLibrary for this, it keeps ownership to one. More...
 
std::string name_ = "Crossover"
 

Detailed Description

Takes two individuals and produces a set amount of offspring using a crossover.

Constructor & Destructor Documentation

◆ Crossover()

protocols::ligand_evolution::Crossover::Crossover ( FragmentLibrary const &  library)
explicit

Member Function Documentation

◆ apply()

utility::vector1< Individual > protocols::ligand_evolution::Crossover::apply ( utility::vector1< Individual > const &  parents,
core::Size  n_offspring 
) const
overridevirtual

Selects randomly two parents to create offspring until n_offspring is available @detail One random parent donates the reaction and both donate minimum one reagent. If they come from different reactions, the alien reagent is mapped to the most similar counterpart.

Implements protocols::ligand_evolution::OffspringFactory.

References cross(), and protocols::TR().

◆ cross()

Individual protocols::ligand_evolution::Crossover::cross ( Individual const &  reaction_parent,
Individual const &  other_parent 
) const
private

◆ name()

std::string const & protocols::ligand_evolution::Crossover::name ( ) const
overridevirtual

Returns the name of this factory.

Implements protocols::ligand_evolution::OffspringFactory.

References name_.

Member Data Documentation

◆ library_

FragmentLibrary const& protocols::ligand_evolution::Crossover::library_
private

Since this function regularly produces offspring and consults a FragmentLibrary for this, it keeps ownership to one.

Referenced by cross().

◆ name_

std::string protocols::ligand_evolution::Crossover::name_ = "Crossover"
private

Referenced by name().


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