Rosetta
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::pack_daemon::DaemonSet Class Reference

#include <PackDaemon.hh>

Inheritance diagram for protocols::pack_daemon::DaemonSet:
Inheritance graph
[legend]

Public Types

typedef core::pose::Pose Pose
 
typedef core::pose::PoseOP PoseOP
 
typedef core::scoring::ScoreFunction ScoreFunction
 
typedef core::scoring::ScoreFunctionOP ScoreFunctionOP
 
typedef core::pack::task::PackerTask PackerTask
 
typedef core::pack::task::PackerTaskOP PackerTaskOP
 
typedef core::pack::task::ResfileContentsOP ResfileContentsOP
 
typedef protocols::genetic_algorithm::Entity Entity
 
typedef protocols::genetic_algorithm::EntityOP EntityOP
 
typedef utility::vector1< core::SizeDaemonIndices
 
typedef utility::vector1< std::pair< core::Size, PackDaemonCOP > > ConstDaemonList
 
typedef ConstDaemonList::const_iterator ConstDaemonListIter
 
typedef utility::vector1< std::pair< core::Size, PackDaemonOP > > DaemonList
 
typedef DaemonList::const_iterator DaemonListIter
 
typedef std::pair< core::Size, core::RealSizeRealPair
 
typedef std::list< SizeRealPairSizeRealPairs
 
typedef std::pair< SizeRealPairs, SizeRealPairsStateEsAndNPDs
 
typedef std::pair< core::Size, NPDPropCalculatorOPNPDIndAndCalc
 

Public Member Functions

 DaemonSet ()
 
 ~DaemonSet () override
 
void set_entity_resfile (std::string const &resfile)
 
void set_entity_resfile (std::istream &resfile, std::string const &resfile_name)
 
void set_score_function (ScoreFunction const &)
 
void set_task_factory (core::pack::task::TaskFactoryOP factory)
 
void set_include_background_energies (bool setting)
 
void set_dlig_nmeg_limit (core::Size setting)
 restrict the amount of memory spent on storing Rotamer Pair Energies in the DoubleLazyInteractionGraph; More...
 
void add_npdpro_calculator_creator (NPDPropCalculatorCreatorOP)
 
void add_pack_daemon (core::Size daemon_index, std::string const &pdb_name, std::string const &correspondence_file_name, std::string const &secondary_resfile)
 Each daemon is associated with an index representing its position in some master list somewhere. The DaemonSet is responsible for keeping this index. More...
 
void add_pack_daemon (core::Size daemon_index, std::string const &pose_file_name, Pose const &pose, std::string const &correspondence_file_filename, std::istream &correspondence_file, std::string const &secondary_refile_file_filename, std::istream &secondary_resfile)
 
void add_npd_property_calculator_for_state (core::Size daemon_index, std::string const &npd_property, core::Size npd_index)
 
void setup_daemons ()
 call daemon->setup() on all daemons, which will trigger the precomputation of all rotamer pair energies. More...
 
core::Size ndaemons () const
 
core::Size n_npd_properties () const
 
StateEsAndNPDs compute_energy_for_assignment (Entity const &entity)
 Compute the state energies and, for those states requiring non-pairwise-decomposable-properties, the non-pairwise decomposable properties as well. Return them as a pair of lists. More...
 
ConstDaemonList daemons () const
 
void mark_last_entity_as_important ()
 
void mark_entity_as_unimportant (Entity const &)
 
std::list< std::pair< core::Size, PoseOP > > retrieve_relevant_poses_for_entity (Entity const &, DaemonIndices const &) const
 
core::pack::task::PackerTaskOP entity_task () const
 
core::pack::task::ResfileContentsCOP entity_resfile () const
 
void activate_daemon_mode ()
 MPI related methods. More...
 

Private Member Functions

void process_add_daemon_message ()
 Private MPI related methods. More...
 
void process_state_energy_evaluations_for_entity ()
 When we receive a evaluate_entity signal, calculate the energies for that entity for each PackDaemon and send those energies back to the master node. More...
 
void process_discard_entity_message ()
 When we receive a discard_entity signal, pass that message on to the Daemons. More...
 
void process_pose_request_for_entity ()
 When we receive a pose_request signal, have the desired PackDaemons create the poses for that entity, and, ship them as PDB strings back to node 0. More...
 
EntityOP recieve_entity () const
 Receive an entity string from node 0 and create an Entity object from that string. More...
 
DaemonIndices recieve_daemon_inds_requiring_pose_creation () const
 Accept a list of daemon indices which should return a pose based on their state in the presence of a particular entity. More...
 
void graceful_exit () const
 Call MPI_Finalize and exit. More...
 

Private Attributes

ScoreFunctionOP score_function_
 
core::Size num_entities_
 
core::pack::task::TaskFactoryOP task_factory_
 
bool include_background_energies_
 
bool limit_dlig_mem_usage_
 
core::Size dlig_nmeg_limit_
 
core::pack::task::PackerTaskOP entity_task_
 
core::pack::task::ResfileContentsOP entity_resfile_
 
DaemonList daemons_
 
core::Size ndaemons_
 
std::map< std::string, NPDPropCalculatorCreatorOPnpd_calculator_creators_
 
utility::vector1< PoseOPdaemon_poses_
 
utility::vector1< core::pack::task::PackerTaskOPdaemon_tasks_
 
utility::vector1< std::list< NPDIndAndCalc > > npd_calcs_for_poses_
 
core::Size n_npd_properties_
 

Member Typedef Documentation

◆ ConstDaemonList

◆ ConstDaemonListIter

typedef ConstDaemonList::const_iterator protocols::pack_daemon::DaemonSet::ConstDaemonListIter

◆ DaemonIndices

◆ DaemonList

typedef utility::vector1< std::pair< core::Size, PackDaemonOP > > protocols::pack_daemon::DaemonSet::DaemonList

◆ DaemonListIter

typedef DaemonList::const_iterator protocols::pack_daemon::DaemonSet::DaemonListIter

◆ Entity

◆ EntityOP

◆ NPDIndAndCalc

◆ PackerTask

◆ PackerTaskOP

◆ Pose

◆ PoseOP

◆ ResfileContentsOP

◆ ScoreFunction

◆ ScoreFunctionOP

◆ SizeRealPair

◆ SizeRealPairs

◆ StateEsAndNPDs

Constructor & Destructor Documentation

◆ DaemonSet()

protocols::pack_daemon::DaemonSet::DaemonSet ( )

◆ ~DaemonSet()

protocols::pack_daemon::DaemonSet::~DaemonSet ( )
overridedefault

Member Function Documentation

◆ activate_daemon_mode()

void protocols::pack_daemon::DaemonSet::activate_daemon_mode ( )

◆ add_npd_property_calculator_for_state()

void protocols::pack_daemon::DaemonSet::add_npd_property_calculator_for_state ( core::Size  daemon_index,
std::string const &  npd_property,
core::Size  npd_index 
)

◆ add_npdpro_calculator_creator()

void protocols::pack_daemon::DaemonSet::add_npdpro_calculator_creator ( NPDPropCalculatorCreatorOP  creator)

◆ add_pack_daemon() [1/2]

void protocols::pack_daemon::DaemonSet::add_pack_daemon ( core::Size  daemon_index,
std::string const &  pdb_name,
std::string const &  correspondence_file_name,
std::string const &  secondary_resfile 
)

Each daemon is associated with an index representing its position in some master list somewhere. The DaemonSet is responsible for keeping this index.

References core::import_pose::PDB_file, and core::import_pose::pose_from_file().

Referenced by process_add_daemon_message().

◆ add_pack_daemon() [2/2]

void protocols::pack_daemon::DaemonSet::add_pack_daemon ( core::Size  daemon_index,
std::string const &  pose_file_name,
Pose const &  pose,
std::string const &  correspondence_file_filename,
std::istream &  correspondence_file,
std::string const &  secondary_refile_file_filename,
std::istream &  secondary_resfile 
)

◆ compute_energy_for_assignment()

DaemonSet::StateEsAndNPDs protocols::pack_daemon::DaemonSet::compute_energy_for_assignment ( Entity const &  entity)

Compute the state energies and, for those states requiring non-pairwise-decomposable-properties, the non-pairwise decomposable properties as well. Return them as a pair of lists.

References daemon_poses_, daemons_, core::sequence::end, protocols::buns::energy, n_npd_properties_, and npd_calcs_for_poses_.

Referenced by process_state_energy_evaluations_for_entity().

◆ daemons()

DaemonSet::ConstDaemonList protocols::pack_daemon::DaemonSet::daemons ( ) const

References daemons_.

◆ entity_resfile()

core::pack::task::ResfileContentsCOP protocols::pack_daemon::DaemonSet::entity_resfile ( ) const

References entity_resfile_.

◆ entity_task()

core::pack::task::PackerTaskOP protocols::pack_daemon::DaemonSet::entity_task ( ) const

References entity_task_.

◆ graceful_exit()

void protocols::pack_daemon::DaemonSet::graceful_exit ( ) const
private

Call MPI_Finalize and exit.

Referenced by activate_daemon_mode(), and process_add_daemon_message().

◆ mark_entity_as_unimportant()

void protocols::pack_daemon::DaemonSet::mark_entity_as_unimportant ( Entity const &  ent)

References daemons_.

Referenced by process_discard_entity_message().

◆ mark_last_entity_as_important()

void protocols::pack_daemon::DaemonSet::mark_last_entity_as_important ( )

References daemons_.

Referenced by activate_daemon_mode().

◆ n_npd_properties()

core::Size protocols::pack_daemon::DaemonSet::n_npd_properties ( ) const

References n_npd_properties_.

◆ ndaemons()

core::Size protocols::pack_daemon::DaemonSet::ndaemons ( ) const

◆ process_add_daemon_message()

void protocols::pack_daemon::DaemonSet::process_add_daemon_message ( )
private

Private MPI related methods.

When we recieve an add_daemons message, recieve all the input files that go along with the set of daemons that should be added, and then proceed to read these files. Send back a shut-down signal and a message if any of the input files cannot be properly read. If all goes well, send back the ok signal.

References add_npd_property_calculator_for_state(), add_pack_daemon(), core::sequence::end, protocols::pack_daemon::error_message, graceful_exit(), core::import_pose::pose_from_pdbstring(), setup_daemons(), and protocols::pack_daemon::success_message.

Referenced by activate_daemon_mode().

◆ process_discard_entity_message()

void protocols::pack_daemon::DaemonSet::process_discard_entity_message ( )
private

When we receive a discard_entity signal, pass that message on to the Daemons.

References mark_entity_as_unimportant(), and recieve_entity().

Referenced by activate_daemon_mode().

◆ process_pose_request_for_entity()

void protocols::pack_daemon::DaemonSet::process_pose_request_for_entity ( )
private

When we receive a pose_request signal, have the desired PackDaemons create the poses for that entity, and, ship them as PDB strings back to node 0.

References core::io::pdb::dump_pdb(), recieve_daemon_inds_requiring_pose_creation(), recieve_entity(), and retrieve_relevant_poses_for_entity().

Referenced by activate_daemon_mode().

◆ process_state_energy_evaluations_for_entity()

void protocols::pack_daemon::DaemonSet::process_state_energy_evaluations_for_entity ( )
private

When we receive a evaluate_entity signal, calculate the energies for that entity for each PackDaemon and send those energies back to the master node.

References compute_energy_for_assignment(), n_npd_properties_, ndaemons(), and recieve_entity().

Referenced by activate_daemon_mode().

◆ recieve_daemon_inds_requiring_pose_creation()

DaemonSet::DaemonIndices protocols::pack_daemon::DaemonSet::recieve_daemon_inds_requiring_pose_creation ( ) const
private

Accept a list of daemon indices which should return a pose based on their state in the presence of a particular entity.

Referenced by process_pose_request_for_entity().

◆ recieve_entity()

DaemonSet::EntityOP protocols::pack_daemon::DaemonSet::recieve_entity ( ) const
private

Receive an entity string from node 0 and create an Entity object from that string.

Referenced by process_discard_entity_message(), process_pose_request_for_entity(), and process_state_energy_evaluations_for_entity().

◆ retrieve_relevant_poses_for_entity()

std::list< std::pair< core::Size, core::pose::PoseOP > > protocols::pack_daemon::DaemonSet::retrieve_relevant_poses_for_entity ( Entity const &  ent,
DaemonIndices const &  daemon_indices 
) const

References daemons_.

Referenced by process_pose_request_for_entity().

◆ set_dlig_nmeg_limit()

void protocols::pack_daemon::DaemonSet::set_dlig_nmeg_limit ( core::Size  setting)

restrict the amount of memory spent on storing Rotamer Pair Energies in the DoubleLazyInteractionGraph;

References dlig_nmeg_limit_, and limit_dlig_mem_usage_.

◆ set_entity_resfile() [1/2]

void protocols::pack_daemon::DaemonSet::set_entity_resfile ( std::istream &  resfile,
std::string const &  resfile_name 
)

◆ set_entity_resfile() [2/2]

void protocols::pack_daemon::DaemonSet::set_entity_resfile ( std::string const &  resfile)

The entity resfile is slightly different from a regular resfile. Its first line should consist of the number of residues that are entity; the rest of the resfile lists those residues numbering from 1.

◆ set_include_background_energies()

void protocols::pack_daemon::DaemonSet::set_include_background_energies ( bool  setting)

◆ set_score_function()

void protocols::pack_daemon::DaemonSet::set_score_function ( ScoreFunction const &  sfxn)

◆ set_task_factory()

void protocols::pack_daemon::DaemonSet::set_task_factory ( core::pack::task::TaskFactoryOP  factory)

References task_factory_.

◆ setup_daemons()

void protocols::pack_daemon::DaemonSet::setup_daemons ( )

call daemon->setup() on all daemons, which will trigger the precomputation of all rotamer pair energies.

References daemons_.

Referenced by process_add_daemon_message().

Member Data Documentation

◆ daemon_poses_

utility::vector1< PoseOP > protocols::pack_daemon::DaemonSet::daemon_poses_
private

◆ daemon_tasks_

utility::vector1< core::pack::task::PackerTaskOP > protocols::pack_daemon::DaemonSet::daemon_tasks_
private

◆ daemons_

DaemonList protocols::pack_daemon::DaemonSet::daemons_
private

◆ dlig_nmeg_limit_

core::Size protocols::pack_daemon::DaemonSet::dlig_nmeg_limit_
private

◆ entity_resfile_

core::pack::task::ResfileContentsOP protocols::pack_daemon::DaemonSet::entity_resfile_
private

◆ entity_task_

core::pack::task::PackerTaskOP protocols::pack_daemon::DaemonSet::entity_task_
private

◆ include_background_energies_

bool protocols::pack_daemon::DaemonSet::include_background_energies_
private

◆ limit_dlig_mem_usage_

bool protocols::pack_daemon::DaemonSet::limit_dlig_mem_usage_
private

◆ n_npd_properties_

core::Size protocols::pack_daemon::DaemonSet::n_npd_properties_
private

◆ ndaemons_

core::Size protocols::pack_daemon::DaemonSet::ndaemons_
private

Referenced by add_pack_daemon(), and ndaemons().

◆ npd_calcs_for_poses_

utility::vector1< std::list< NPDIndAndCalc > > protocols::pack_daemon::DaemonSet::npd_calcs_for_poses_
private

◆ npd_calculator_creators_

std::map< std::string, NPDPropCalculatorCreatorOP > protocols::pack_daemon::DaemonSet::npd_calculator_creators_
private

◆ num_entities_

core::Size protocols::pack_daemon::DaemonSet::num_entities_
private

◆ score_function_

ScoreFunctionOP protocols::pack_daemon::DaemonSet::score_function_
private

◆ task_factory_

core::pack::task::TaskFactoryOP protocols::pack_daemon::DaemonSet::task_factory_
private

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