Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
protocols::recon_design::FindConsensusSequence Class Reference

Takes in multiple poses from the VectorPoseJobDistributor and finds the consensus sequence that optimizes energy of all input poses. Used in conjuction with MSDMover at the end of a protocol to make sure that you end up with one multistate solution. Only accessible through recon application. More...

#include <FindConsensusSequence.hh>

Inheritance diagram for protocols::recon_design::FindConsensusSequence:
Inheritance graph
[legend]

Public Member Functions

 FindConsensusSequence ()
 empty constructor More...
 
 ~FindConsensusSequence () override
 
moves::MoverOP clone () const override
 Return a clone of the Mover object. More...
 
moves::MoverOP fresh_instance () const override
 Generates a new Mover object freshly created with the default ctor. More...
 
std::string get_name () const override
 Each derived class must specify its name. The class name. More...
 
void parse_my_tag (TagCOP, basic::datacache::DataMap &) override
 Read options from RosettaScripts. More...
 
void apply (Pose &pose) override
 Movers derived from VectorPoseMover must define two apply methods: apply and apply_mpi, depending on whether the protocol is run in MPI or not Running in MPI will distribute each pose to a separate node, so the mover will operate on one pose. More...
 
void apply_mpi (Pose &pose) override
 Pure virtual method to apply this mover under MPI. More...
 
void parse_resfiles ()
 Populates designable_residues_ with a list of designable residues corresponding to the poses in poses_, corresponding element-wise (designables_residues[0] matches to poses_[0], etc) More...
 
std::string resfile_at (core::Size index)
 Get the resfile corresponding to the pose at index. If only one resfile is present then it will be returned regardless of the value of index. More...
 
void pick_consensus_AA (core::Size res_link_index, utility::vector1< std::string > candidate_AAs)
 Based on all the input poses, find the optimal AA at position res_link_index. candidate_AAs specifies all of the AAs present in any of poses_ at position res_link_index. Fitness is defined implicitly as the sum of energy of all poses. More...
 
void pick_consensus_AA_mpi (core::pose::Pose &pose, utility::vector1< std::string > candidate_AAs, core::Size pose_position)
 
void initialize_packer ()
 Set up the packer to be used when substituting different candidate AAs and repacking before evaluating energy. More...
 
core::Real test_AA (core::pose::PoseOP pose_copy, std::string trial_AA, core::Size pose_position)
 Place a candidate AA (trial_AA) onto a pose (pose_copy) at position pose_position and repack and measure the energy. Function returns the energy of that pose with the trial_AA. More...
 
core::scoring::ScoreFunctionOP score_function () const
 Getters and setters. More...
 
void score_function (core::scoring::ScoreFunctionOP)
 
core::pack::task::TaskFactoryOP task_factory () const
 
void task_factory (core::pack::task::TaskFactoryOP)
 
void resfiles (utility::vector1< std::string > &resfiles)
 
utility::vector1
< utility::vector1< core::Size > > 
designable_residues ()
 
- Public Member Functions inherited from protocols::moves::VectorPoseMover
 VectorPoseMover ()
 Constructor. More...
 
 ~VectorPoseMover () override
 
 VectorPoseMover (std::string const &name)
 
 VectorPoseMover (VectorPoseMover const &other)
 
void set_poses (utility::vector1< core::pose::PoseOP > const &poses)
 Set the vector of poses for the mover to act upon. More...
 
- Public Member Functions inherited from protocols::moves::Mover
 Mover ()
 
virtual MoverOP create ()
 
MoverCOP get_self_ptr () const
 
MoverOP get_self_ptr ()
 
MoverCAP get_self_weak_ptr () const
 
MoverAP get_self_weak_ptr ()
 
 Mover (std::string const &type_name)
 sets the type for a mover; name_ has been removed (2010/05/14) More...
 
virtual void test_move (Pose &pose)
 : Unit test support function. Apply one move to a given pose. Allows extra test specific functions to be called before applying More...
 
virtual bool reinitialize_for_each_job () const
 Inform the Job Distributor (August '08 vintage) whether this object needs to be freshly regenerated on each use. More...
 
virtual bool reinitialize_for_new_input () const
 Inform the Job Distributor (August '08 vintage) whether this object needs to be regenerated when the input pose is about to change, (for example, if the Mover has special code on the first apply() that is only valid for that one input pose). More...
 
MoverStatus get_last_move_status () const
 end parser interface, start Job Distributor interface///////////// More...
 
void reset_status ()
 resets status to SUCCESS, meant to be used before an apply(). The job distributor (august 08 vintage) uses this to ensure non-accumulation of status across apply()s. More...
 
virtual core::pose::PoseOP get_additional_output ()
 Mechanism by which a mover may return multiple output poses from a single input pose. More...
 
void set_type (std::string const &setting)
 Set the 'type' string. More...
 
std::string get_type () const
 
void type (const std::string &type_in)
 Set the 'type' string. More...
 
std::string const & type () const
 Get the set 'type' string. More...
 
virtual void set_input_pose (PoseCOP pose)
 setter for poses contained for rms More...
 
virtual void set_native_pose (PoseCOP pose)
 setter for native poses contained for rms -— we should get rid of this method? it is widely used, but a bit unsafe More...
 
PoseCOP get_input_pose () const
 
PoseCOP get_native_pose () const
 
void set_current_job (protocols::jobdist::BasicJobCOP job)
 
jobdist::BasicJobCOP get_current_job () const
 
virtual void set_current_tag (std::string const &new_tag)
 
std::string get_current_tag () const
 A tag is a unique identifier used to identify structures produced by this Mover. get_current_tag() returns the tag, and set_current_tag( std::string tag ) sets the tag. This functionality is not intended for use with the 2008 job distributor. More...
 
virtual void show (std::ostream &output=std::cout) const
 Outputs details about the Mover, including current settings. More...
 
virtual core::Real last_proposal_density_ratio ()
 
virtual void clear_info ()
 Strings container can be used to return miscellaneous info (as std::string) from a mover, such as notes about the results of apply(). The job distributor (Apr 09 vintage) will check this function to see if your protocol wants to add string info to the Job that ran this mover. One way this can be useful is that later, a JobOutputter may include/append this info to an output file. More...
 
virtual Stringsinfo ()
 non-const accessor More...
 
virtual Strings const & info () const
 const accessor More...
 
virtual bool mover_provides_citation_info () const
 Does this mover provide information about how to cite it? More...
 
virtual utility::vector1
< basic::citation_manager::CitationCollectionCOP > 
provide_citation_info () const
 Provide the citation. More...
 
virtual bool mover_is_unpublished () const
 Does this mover indicate that it is unpublished (and, by extension, that the author should be included in publications resulting from it)? More...
 
virtual utility::vector1
< basic::citation_manager::UnpublishedModuleInfoCOP > 
provide_authorship_info_for_unpublished () const
 Provide a list of authors and their e-mail addresses, as strings. More...
 

Static Public Member Functions

static void provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd)
 Specify XML schema. More...
 
- Static Public Member Functions inherited from protocols::moves::Mover
static std::string name ()
 
static void register_options ()
 Overload this static method if you access options within the mover. More...
 

Private Attributes

core::scoring::ScoreFunctionOP sfxn_
 Scorefunction to be used. More...
 
core::pack::task::TaskFactoryOP task_factory_
 TaskFactory to specify tasks in repacking when substituting AAs. More...
 
utility::vector1< std::string > resfiles_
 List of resfile file names, must be either 1 resfile, or same length as poses_. More...
 
utility::vector1
< utility::vector1< core::Size > > 
designable_residues_
 
minimization_packing::PackRotamersMoverOP packer_
 Packer to be used when substituting AAs. More...
 
bool debug_ = false
 Output extra debug messages. More...
 
core::Size rank_ = 0
 Variables used in MPI. More...
 
core::Size n_procs_ = 1
 
bool master_ = false
 

Additional Inherited Members

- Public Types inherited from protocols::moves::Mover
typedef utility::tag::TagCOP TagCOP
 
typedef core::pose::Pose Pose
 
typedef core::pose::PoseCOP PoseCOP
 
typedef std::list< std::string > Strings
 
- Protected Member Functions inherited from protocols::moves::Mover
void set_last_move_status (MoverStatus status)
 nonvirtual setter for MoverStatus last_status_. Protected means that only the mover itself will be able to change its own status. The job distributor (august 08 vintage) is aware of status set with this function and will do what the MoverStatus says. More...
 
- Protected Attributes inherited from protocols::moves::VectorPoseMover
utility::vector1
< core::pose::PoseOP
poses_
 Vector of all the input poses. More...
 

Detailed Description

Takes in multiple poses from the VectorPoseJobDistributor and finds the consensus sequence that optimizes energy of all input poses. Used in conjuction with MSDMover at the end of a protocol to make sure that you end up with one multistate solution. Only accessible through recon application.

Constructor & Destructor Documentation

protocols::recon_design::FindConsensusSequence::FindConsensusSequence ( )

empty constructor

Referenced by clone().

protocols::recon_design::FindConsensusSequence::~FindConsensusSequence ( )
override

Member Function Documentation

void protocols::recon_design::FindConsensusSequence::apply ( Pose pose)
overridevirtual

Movers derived from VectorPoseMover must define two apply methods: apply and apply_mpi, depending on whether the protocol is run in MPI or not Running in MPI will distribute each pose to a separate node, so the mover will operate on one pose.

Implements protocols::moves::VectorPoseMover.

References designable_residues_, protocols::recon_design::find_pose_in_vector(), protocols::recon_design::get_candidate_AAs(), protocols::recon_design::get_designable_sequence(), parse_resfiles(), pick_consensus_AA(), and protocols::moves::VectorPoseMover::poses_.

void protocols::recon_design::FindConsensusSequence::apply_mpi ( Pose pose)
overridevirtual
moves::MoverOP protocols::recon_design::FindConsensusSequence::clone ( ) const
overridevirtual

Return a clone of the Mover object.

clone is meant to return an OP'ed deep copy of this object. This really should be a pure virtual in the base class, but adding pure virtuals to Mover would massively disrupt the code. This default implementation crashes at runtime instead of compiletime if you try to call it. If this code is causing you problems, your Mover needs to override this function.

Reimplemented from protocols::moves::Mover.

References FindConsensusSequence().

utility::vector1< utility::vector1< core::Size > > protocols::recon_design::FindConsensusSequence::designable_residues ( )

References designable_residues_.

moves::MoverOP protocols::recon_design::FindConsensusSequence::fresh_instance ( ) const
overridevirtual

Generates a new Mover object freshly created with the default ctor.

fresh_instance is meant to return a new object of this class, created with the default constructor. This really should be a pure virtual in the base class, but adding pure virtuals to Mover would massively disrupt the code. This default implementation crashes at runtime instead of compiletime if you try to call it. If this code is causing you problems, your Mover needs to override this function. This is used by the August 08 job distributor.

Reimplemented from protocols::moves::Mover.

std::string protocols::recon_design::FindConsensusSequence::get_name ( ) const
overridevirtual

Each derived class must specify its name. The class name.

Reimplemented from protocols::moves::VectorPoseMover.

void protocols::recon_design::FindConsensusSequence::initialize_packer ( )

Set up the packer to be used when substituting different candidate AAs and repacking before evaluating energy.

Set up the packer to be used when substituting different candidate AAs and repacking before evaluating energy

References packer_, sfxn_, and task_factory_.

Referenced by pick_consensus_AA(), and pick_consensus_AA_mpi().

void protocols::recon_design::FindConsensusSequence::parse_my_tag ( TagCOP  tag,
basic::datacache::DataMap &  datamap 
)
overridevirtual
void protocols::recon_design::FindConsensusSequence::parse_resfiles ( )

Populates designable_residues_ with a list of designable residues corresponding to the poses in poses_, corresponding element-wise (designables_residues[0] matches to poses_[0], etc)

Populates designable_residues_ with a list of designable residues corresponding to the poses in poses_, corresponding element-wise (designables_residues[0] matches to poses_[0], etc)

References designable_residues_, protocols::recon_design::get_designable_residues(), protocols::moves::VectorPoseMover::poses_, and resfile_at().

Referenced by apply().

void protocols::recon_design::FindConsensusSequence::pick_consensus_AA ( core::Size  str_position,
utility::vector1< std::string >  candidate_AAs 
)

Based on all the input poses, find the optimal AA at position res_link_index. candidate_AAs specifies all of the AAs present in any of poses_ at position res_link_index. Fitness is defined implicitly as the sum of energy of all poses.

Based on all the input poses, find the optimal AA at position res_link_index. candidate_AAs specifies all of the AAs present in any of poses_ at position res_link_index. Fitness is defined implicitly as the sum of energy of all poses.

References debug_, designable_residues_, initialize_packer(), packer_, protocols::moves::VectorPoseMover::poses_, and test_AA().

Referenced by apply().

void protocols::recon_design::FindConsensusSequence::pick_consensus_AA_mpi ( core::pose::Pose pose,
utility::vector1< std::string >  candidate_AAs,
core::Size  pose_position 
)

Based on all the input poses, find the optimal AA at position res_link_index. candidate_AAs specifies all of the AAs present in any of poses_ at position res_link_index. Fitness is defined implicitly as the sum of energy of all poses.

References core::pose::Pose::clone(), debug_, initialize_packer(), master_, n_procs_, packer_, and test_AA().

Referenced by apply_mpi().

void protocols::recon_design::FindConsensusSequence::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static
std::string protocols::recon_design::FindConsensusSequence::resfile_at ( core::Size  index)

Get the resfile corresponding to the pose at index. If only one resfile is present then it will be returned regardless of the value of index.

Get the resfile corresponding to the pose at index. If only one resfile is present then it will be returned regardless of the value of index

References resfiles_.

Referenced by apply_mpi(), and parse_resfiles().

void protocols::recon_design::FindConsensusSequence::resfiles ( utility::vector1< std::string > &  resfiles)

References resfiles_.

core::scoring::ScoreFunctionOP protocols::recon_design::FindConsensusSequence::score_function ( ) const

Getters and setters.

References sfxn_.

void protocols::recon_design::FindConsensusSequence::score_function ( core::scoring::ScoreFunctionOP  sfxn)

References sfxn_.

core::pack::task::TaskFactoryOP protocols::recon_design::FindConsensusSequence::task_factory ( ) const

References task_factory_.

Referenced by task_factory().

void protocols::recon_design::FindConsensusSequence::task_factory ( core::pack::task::TaskFactoryOP  task_factory)

References task_factory(), and task_factory_.

core::Real protocols::recon_design::FindConsensusSequence::test_AA ( core::pose::PoseOP  pose_copy,
std::string  trial_AA,
core::Size  pose_position 
)

Place a candidate AA (trial_AA) onto a pose (pose_copy) at position pose_position and repack and measure the energy. Function returns the energy of that pose with the trial_AA.

Place a candidate AA (trial_AA) onto a pose (pose_copy) at position pose_position and repack and measure the energy. Function returns the energy of that pose with the trial_AA

References debug_, packer_, and sfxn_.

Referenced by pick_consensus_AA(), and pick_consensus_AA_mpi().

Member Data Documentation

bool protocols::recon_design::FindConsensusSequence::debug_ = false
private

Output extra debug messages.

Referenced by apply_mpi(), parse_my_tag(), pick_consensus_AA(), pick_consensus_AA_mpi(), and test_AA().

utility::vector1< utility::vector1< core::Size > > protocols::recon_design::FindConsensusSequence::designable_residues_
private

Vector of designable residues for each pose in poses_. Must be same length as poses_. Also each pose must have same number of designable residues (i.e. designable_residues[1].size() == designable_residues[2].size())

Referenced by apply(), designable_residues(), parse_resfiles(), and pick_consensus_AA().

bool protocols::recon_design::FindConsensusSequence::master_ = false
private

Referenced by apply_mpi(), and pick_consensus_AA_mpi().

core::Size protocols::recon_design::FindConsensusSequence::n_procs_ = 1
private

Referenced by apply_mpi(), and pick_consensus_AA_mpi().

minimization_packing::PackRotamersMoverOP protocols::recon_design::FindConsensusSequence::packer_
private

Packer to be used when substituting AAs.

Referenced by initialize_packer(), pick_consensus_AA(), pick_consensus_AA_mpi(), and test_AA().

core::Size protocols::recon_design::FindConsensusSequence::rank_ = 0
private

Variables used in MPI.

Referenced by apply_mpi().

utility::vector1< std::string > protocols::recon_design::FindConsensusSequence::resfiles_
private

List of resfile file names, must be either 1 resfile, or same length as poses_.

Referenced by parse_my_tag(), resfile_at(), and resfiles().

core::scoring::ScoreFunctionOP protocols::recon_design::FindConsensusSequence::sfxn_
private

Scorefunction to be used.

Referenced by initialize_packer(), parse_my_tag(), score_function(), and test_AA().

core::pack::task::TaskFactoryOP protocols::recon_design::FindConsensusSequence::task_factory_
private

TaskFactory to specify tasks in repacking when substituting AAs.

Referenced by initialize_packer(), parse_my_tag(), and task_factory().


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