Rosetta 3.5
 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]
Collaboration diagram for protocols::pack_daemon::DaemonSet:
Collaboration 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 ()
 
virtual ~DaemonSet ()
 
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 (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 (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 (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 (Size daemon_index, std::string const &npd_property, 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< 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_
 
Size dlig_nmeg_limit_
 
core::pack::task::PackerTaskOP entity_task_
 
core::pack::task::ResfileContentsCOP 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_
 
Size n_npd_properties_
 

Detailed Description

Definition at line 196 of file PackDaemon.hh.

Member Typedef Documentation

Definition at line 210 of file PackDaemon.hh.

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

Definition at line 211 of file PackDaemon.hh.

Definition at line 209 of file PackDaemon.hh.

Definition at line 212 of file PackDaemon.hh.

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

Definition at line 213 of file PackDaemon.hh.

Definition at line 206 of file PackDaemon.hh.

Definition at line 207 of file PackDaemon.hh.

Definition at line 219 of file PackDaemon.hh.

Definition at line 203 of file PackDaemon.hh.

Definition at line 204 of file PackDaemon.hh.

Definition at line 199 of file PackDaemon.hh.

Definition at line 200 of file PackDaemon.hh.

Definition at line 205 of file PackDaemon.hh.

Definition at line 201 of file PackDaemon.hh.

Definition at line 202 of file PackDaemon.hh.

Definition at line 215 of file PackDaemon.hh.

Definition at line 216 of file PackDaemon.hh.

Definition at line 217 of file PackDaemon.hh.

Constructor & Destructor Documentation

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

Definition at line 455 of file PackDaemon.cc.

protocols::pack_daemon::DaemonSet::~DaemonSet ( )
virtual

Definition at line 465 of file PackDaemon.cc.

Member Function Documentation

void protocols::pack_daemon::DaemonSet::activate_daemon_mode ( )
void protocols::pack_daemon::DaemonSet::add_npd_property_calculator_for_state ( Size  daemon_index,
std::string const &  npd_property,
Size  npd_index 
)
void protocols::pack_daemon::DaemonSet::add_npdpro_calculator_creator ( NPDPropCalculatorCreatorOP  creator)

Definition at line 548 of file PackDaemon.cc.

References npd_calculator_creators_.

void protocols::pack_daemon::DaemonSet::add_pack_daemon ( 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.

Definition at line 560 of file PackDaemon.cc.

References core::import_pose::pose_from_pdb().

Referenced by process_add_daemon_message().

void protocols::pack_daemon::DaemonSet::add_pack_daemon ( 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.

Definition at line 799 of file PackDaemon.cc.

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

Definition at line 840 of file PackDaemon.cc.

References daemons_.

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

Definition at line 892 of file PackDaemon.cc.

References entity_resfile_.

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

Definition at line 891 of file PackDaemon.cc.

References entity_task_.

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

Call MPI_Finalize and exit.

Definition at line 1128 of file PackDaemon.cc.

Referenced by activate_daemon_mode(), and process_add_daemon_message().

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

Definition at line 860 of file PackDaemon.cc.

References daemons_.

Referenced by process_discard_entity_message().

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

Definition at line 853 of file PackDaemon.cc.

References daemons_.

Referenced by activate_daemon_mode().

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

Definition at line 796 of file PackDaemon.cc.

References n_npd_properties_.

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

Definition at line 794 of file PackDaemon.cc.

References ndaemons_.

Referenced by process_state_energy_evaluations_for_entity().

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.

Definition at line 948 of file PackDaemon.cc.

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.

Definition at line 1076 of file PackDaemon.cc.

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.

Definition at line 1085 of file PackDaemon.cc.

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.

Definition at line 1024 of file PackDaemon.cc.

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.

Definition at line 1117 of file PackDaemon.cc.

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.

Definition at line 1105 of file PackDaemon.cc.

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

Definition at line 869 of file PackDaemon.cc.

References daemons_.

Referenced by process_pose_request_for_entity().

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

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

Definition at line 538 of file PackDaemon.cc.

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.

Definition at line 471 of file PackDaemon.cc.

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)

Definition at line 533 of file PackDaemon.cc.

References include_background_energies_.

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

Definition at line 523 of file PackDaemon.cc.

References core::scoring::ScoreFunction::clone(), and score_function_.

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

Definition at line 528 of file PackDaemon.cc.

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.

Definition at line 786 of file PackDaemon.cc.

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

Definition at line 356 of file PackDaemon.hh.

Referenced by add_npd_property_calculator_for_state(), and add_pack_daemon().

DaemonList protocols::pack_daemon::DaemonSet::daemons_
private
Size protocols::pack_daemon::DaemonSet::dlig_nmeg_limit_
private

Definition at line 345 of file PackDaemon.hh.

Referenced by add_pack_daemon(), and set_dlig_nmeg_limit().

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

Definition at line 349 of file PackDaemon.hh.

Referenced by add_pack_daemon(), entity_resfile(), and set_entity_resfile().

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

Definition at line 348 of file PackDaemon.hh.

Referenced by add_pack_daemon(), entity_task(), and set_entity_resfile().

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

Definition at line 342 of file PackDaemon.hh.

Referenced by add_pack_daemon(), and set_include_background_energies().

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

Definition at line 344 of file PackDaemon.hh.

Referenced by add_pack_daemon(), and set_dlig_nmeg_limit().

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

Definition at line 351 of file PackDaemon.hh.

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

Definition at line 339 of file PackDaemon.hh.

Referenced by add_pack_daemon(), and set_entity_resfile().

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

Definition at line 338 of file PackDaemon.hh.

Referenced by add_pack_daemon(), and set_score_function().

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

Definition at line 340 of file PackDaemon.hh.

Referenced by add_pack_daemon(), and set_task_factory().


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