Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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::Size
DaemonIndices
 
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::Real
SizeRealPair
 
typedef std::list< SizeRealPairSizeRealPairs
 
typedef std::pair
< SizeRealPairs, SizeRealPairs
StateEsAndNPDs
 
typedef std::pair< core::Size,
NPDPropCalculatorOP
NPDIndAndCalc
 

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,
NPDPropCalculatorCreatorOP
npd_calculator_creators_
 
utility::vector1< PoseOPdaemon_poses_
 
utility::vector1
< core::pack::task::PackerTaskOP
daemon_tasks_
 
utility::vector1< std::list
< NPDIndAndCalc > > 
npd_calcs_for_poses_
 
core::Size n_npd_properties_
 

Member Typedef Documentation

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

Constructor & Destructor Documentation

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

Member Function Documentation

void protocols::pack_daemon::DaemonSet::activate_daemon_mode ( )
void protocols::pack_daemon::DaemonSet::add_npd_property_calculator_for_state ( core::Size  daemon_index,
std::string const &  npd_property,
core::Size  npd_index 
)
void protocols::pack_daemon::DaemonSet::add_npdpro_calculator_creator ( NPDPropCalculatorCreatorOP  creator)
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().

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 
)
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, n_npd_properties_, and npd_calcs_for_poses_.

Referenced by process_state_energy_evaluations_for_entity().

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

References daemons_.

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

References entity_resfile_.

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

References entity_task_.

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

Call MPI_Finalize and exit.

Referenced by activate_daemon_mode(), and process_add_daemon_message().

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

References daemons_.

Referenced by process_discard_entity_message().

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

References daemons_.

Referenced by activate_daemon_mode().

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

References n_npd_properties_.

core::Size protocols::pack_daemon::DaemonSet::ndaemons ( ) const
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().

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().

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().

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().

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().

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().

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().

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_.

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.

void protocols::pack_daemon::DaemonSet::set_entity_resfile ( std::istream &  resfile,
std::string const &  resfile_name 
)
void protocols::pack_daemon::DaemonSet::set_include_background_energies ( bool  setting)
void protocols::pack_daemon::DaemonSet::set_score_function ( ScoreFunction const &  sfxn)
void protocols::pack_daemon::DaemonSet::set_task_factory ( core::pack::task::TaskFactoryOP  factory)

References task_factory_.

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

utility::vector1< PoseOP > protocols::pack_daemon::DaemonSet::daemon_poses_
private
utility::vector1< core::pack::task::PackerTaskOP > protocols::pack_daemon::DaemonSet::daemon_tasks_
private
DaemonList protocols::pack_daemon::DaemonSet::daemons_
private
core::Size protocols::pack_daemon::DaemonSet::dlig_nmeg_limit_
private
core::pack::task::ResfileContentsOP protocols::pack_daemon::DaemonSet::entity_resfile_
private
core::pack::task::PackerTaskOP protocols::pack_daemon::DaemonSet::entity_task_
private
bool protocols::pack_daemon::DaemonSet::include_background_energies_
private
bool protocols::pack_daemon::DaemonSet::limit_dlig_mem_usage_
private
core::Size protocols::pack_daemon::DaemonSet::n_npd_properties_
private
core::Size protocols::pack_daemon::DaemonSet::ndaemons_
private

Referenced by add_pack_daemon(), and ndaemons().

utility::vector1< std::list< NPDIndAndCalc > > protocols::pack_daemon::DaemonSet::npd_calcs_for_poses_
private
std::map< std::string, NPDPropCalculatorCreatorOP > protocols::pack_daemon::DaemonSet::npd_calculator_creators_
private
core::Size protocols::pack_daemon::DaemonSet::num_entities_
private
ScoreFunctionOP protocols::pack_daemon::DaemonSet::score_function_
private
core::pack::task::TaskFactoryOP protocols::pack_daemon::DaemonSet::task_factory_
private

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