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

A TaskOperation that allows amino acids at designable positions through a set of aa probabilities (aa profile). More...

#include <ResidueProbDesignOperation.hh>

Inheritance diagram for protocols::task_operations::ResidueProbDesignOperation:
Inheritance graph
[legend]

Public Member Functions

 ResidueProbDesignOperation ()
 
 ResidueProbDesignOperation (ResidueProbDesignOperation const &src)
 
 ~ResidueProbDesignOperation () override
 
void apply (core::pose::Pose const &pose, core::pack::task::PackerTask &task) const override
 Change a packer task in some way. The input pose is the one to which the input task will be later applied. More...
 
void parse_tag (TagCOP tag, DataMap &) override
 Used to parse an xml-like tag to load parameters and properties. More...
 
void set_aa_probability_set (PerResidueAAProbSet per_res_aa_probs)
 Sets the whole aa probability set. More...
 
void set_aa_probabilities (core::Size const resnum, AAProbabilities aa_probs)
 Sets aa probabilities for a particular resnum. More...
 
void set_aa_probabilities_from_file (const std::string &weights_file)
 Reads weights for each posenum and residue type. Format for each line in the file is: POSENUM RESIDUETYPE WEIGHT. With weight as a real between 0 and 1. More...
 
void set_overall_aa_probabilities (AAProbabilities aa_probs)
 Set the probability for a particular aa @ a particular resnum. More...
 
void set_no_probability (bool no_probability)
 Set to sample all available AAs per position instead of sampling based on weights Used to increase diversity and for testing purposes. More...
 
void clear_prob_set ()
 Clears the probability matrix. More...
 
void clear_overall_prob_set ()
 Clears the overall probabilities if any are set. More...
 
void set_include_native_restype (bool include)
 Include current residuetype in packer in addition to selected mutation. Default is true. More...
 
bool include_native_restype () const
 
void set_sample_zero_probs_at (core::Real const probability)
 Sample any zero probabilities at this probability instead of not using them. More...
 
core::Real sample_zero_probs_at () const
 
void set_picking_rounds (core::Size picking_rounds)
 Max number of times to sample from the probability distribution. Default is once. More...
 
core::Size picking_rounds () const
 
bool resnum_exists_in_set (core::Size const resnum) const
 
core::pack::task::operation::TaskOperationOP clone () const override
 Create another task operation of the type matching the most-derived version of the class. More...
 
void set_defaults ()
 
- Public Member Functions inherited from core::pack::task::operation::TaskOperation
 ~TaskOperation () override
 
virtual bool task_operation_provides_citation_info () const
 Does this task operation 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 task_operation_is_unpublished () const
 Does this task_operation 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)
 
static std::string keyname ()
 

Private Types

typedef std::map
< core::chemical::AA,
core::Real
AAProbabilities
 
typedef std::map< core::Size,
AAProbabilities
PerResidueAAProbSet
 

Private Member Functions

void init_for_equal_operator_and_copy_constructor (ResidueProbDesignOperation &lhs, ResidueProbDesignOperation const &rhs)
 
utility::vector1< core::Realget_weights (AAProbabilities &aa_prob_set) const
 Create full weight set for all amino acids from a probability set. More...
 
bool aa_exists (core::chemical::AA amino_acid, AAProbabilities const &aa_prob_set) const
 

Private Attributes

PerResidueAAProbSet prob_set_
 
AAProbabilities overall_prob_set_
 
bool include_native_restype_
 
core::Real zero_probs_overwrite_
 
core::Size picking_rounds_
 
bool no_probability_ = false
 

Additional Inherited Members

- Public Types inherited from core::pack::task::operation::TaskOperation
typedef utility::tag::TagCOP TagCOP
 
typedef basic::datacache::DataMap DataMap
 
typedef pose::Pose Pose
 

Detailed Description

A TaskOperation that allows amino acids at designable positions through a set of aa probabilities (aa profile).

Each time a task is generated, it will choose one amino acid from the set for that position and add it to (or replace) the set of packable residues chosen for that position. Decreases number of rotamers for packing and the space for design. Instead of using energy for profiles, we use selection of residues through probabilities at each task generation. If picking rounds is higher can result in more than one additional residue in the task from the native.

Default is for the TaskOp to control the allowed amino acids only if the class has probabilities to use for that resnum. If no probabilities were set in general, it will not do anything. Probabilities should add to one, but if not, they will act as weights. Does NOT control which positions are set to design or repack, only what can be designed into.

If probabilities/weights for a particular residue are not present in the map, will not modify that residues task.

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::task_operations::ResidueProbDesignOperation::ResidueProbDesignOperation ( )

References set_defaults().

protocols::task_operations::ResidueProbDesignOperation::ResidueProbDesignOperation ( ResidueProbDesignOperation const &  src)
protocols::task_operations::ResidueProbDesignOperation::~ResidueProbDesignOperation ( )
overridedefault

Member Function Documentation

bool protocols::task_operations::ResidueProbDesignOperation::aa_exists ( core::chemical::AA  amino_acid,
AAProbabilities const &  aa_prob_set 
) const
private

Referenced by get_weights().

void protocols::task_operations::ResidueProbDesignOperation::apply ( core::pose::Pose const &  ,
core::pack::task::PackerTask  
) const
overridevirtual
void protocols::task_operations::ResidueProbDesignOperation::clear_overall_prob_set ( )

Clears the overall probabilities if any are set.

References overall_prob_set_.

void protocols::task_operations::ResidueProbDesignOperation::clear_prob_set ( )

Clears the probability matrix.

References prob_set_.

core::pack::task::operation::TaskOperationOP protocols::task_operations::ResidueProbDesignOperation::clone ( ) const
overridevirtual

Create another task operation of the type matching the most-derived version of the class.

Implements core::pack::task::operation::TaskOperation.

vector1< Real > protocols::task_operations::ResidueProbDesignOperation::get_weights ( AAProbabilities aa_prob_set) const
private

Create full weight set for all amino acids from a probability set.

References aa_exists(), and zero_probs_overwrite_.

Referenced by apply().

bool protocols::task_operations::ResidueProbDesignOperation::include_native_restype ( ) const
void protocols::task_operations::ResidueProbDesignOperation::init_for_equal_operator_and_copy_constructor ( ResidueProbDesignOperation lhs,
ResidueProbDesignOperation const &  rhs 
)
private
static std::string protocols::task_operations::ResidueProbDesignOperation::keyname ( )
inlinestatic
void protocols::task_operations::ResidueProbDesignOperation::parse_tag ( TagCOP  tag,
DataMap  
)
overridevirtual
Size protocols::task_operations::ResidueProbDesignOperation::picking_rounds ( ) const

References picking_rounds_.

Referenced by set_picking_rounds().

void protocols::task_operations::ResidueProbDesignOperation::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static
bool protocols::task_operations::ResidueProbDesignOperation::resnum_exists_in_set ( core::Size const  resnum) const

References prob_set_.

Referenced by apply().

Real protocols::task_operations::ResidueProbDesignOperation::sample_zero_probs_at ( ) const

References zero_probs_overwrite_.

void protocols::task_operations::ResidueProbDesignOperation::set_aa_probabilities ( core::Size const  resnum,
AAProbabilities  aa_probs 
)

Sets aa probabilities for a particular resnum.

References prob_set_.

void protocols::task_operations::ResidueProbDesignOperation::set_aa_probabilities_from_file ( const std::string &  weights_file)

Reads weights for each posenum and residue type. Format for each line in the file is: POSENUM RESIDUETYPE WEIGHT. With weight as a real between 0 and 1.

References protocols::cluster::calibur::aa, core::chemical::aa_from_one_or_three(), set_aa_probability_set(), protocols::sparta::split(), and protocols::task_operations::TR().

Referenced by parse_tag().

void protocols::task_operations::ResidueProbDesignOperation::set_aa_probability_set ( PerResidueAAProbSet  per_res_aa_probs)
void protocols::task_operations::ResidueProbDesignOperation::set_defaults ( )
void protocols::task_operations::ResidueProbDesignOperation::set_include_native_restype ( bool  include)

Include current residuetype in packer in addition to selected mutation. Default is true.

References include_native_restype_.

Referenced by protocols::antibody::task_operations::AddCDRProfilesOperation::apply(), parse_tag(), and set_defaults().

void protocols::task_operations::ResidueProbDesignOperation::set_no_probability ( bool  no_probability)

Set to sample all available AAs per position instead of sampling based on weights Used to increase diversity and for testing purposes.

References no_probability_.

Referenced by protocols::antibody::task_operations::AddCDRProfilesOperation::apply(), and parse_tag().

void protocols::task_operations::ResidueProbDesignOperation::set_overall_aa_probabilities ( AAProbabilities  aa_probs)

Set the probability for a particular aa @ a particular resnum.

Sets aa probabilities for all positions not given specifically. All designable residues will use these probabilities this if not specified through other functions.

References overall_prob_set_.

void protocols::task_operations::ResidueProbDesignOperation::set_picking_rounds ( core::Size  picking_rounds)

Max number of times to sample from the probability distribution. Default is once.

This is to increase variability. Too many rounds will even out the distribution. Can also run the PackRotamers mover or equivalent multiple times for sampling.

References picking_rounds(), and picking_rounds_.

Referenced by protocols::antibody::task_operations::AddCDRProfilesOperation::apply(), parse_tag(), and set_defaults().

void protocols::task_operations::ResidueProbDesignOperation::set_sample_zero_probs_at ( core::Real const  probability)

Sample any zero probabilities at this probability instead of not using them.

References protocols::simple_moves::bb_sampler::probability, and zero_probs_overwrite_.

Referenced by protocols::antibody::task_operations::AddCDRProfilesOperation::apply(), parse_tag(), and set_defaults().

Member Data Documentation

bool protocols::task_operations::ResidueProbDesignOperation::include_native_restype_
private
bool protocols::task_operations::ResidueProbDesignOperation::no_probability_ = false
private
AAProbabilities protocols::task_operations::ResidueProbDesignOperation::overall_prob_set_
private
core::Size protocols::task_operations::ResidueProbDesignOperation::picking_rounds_
private
PerResidueAAProbSet protocols::task_operations::ResidueProbDesignOperation::prob_set_
private
core::Real protocols::task_operations::ResidueProbDesignOperation::zero_probs_overwrite_
private

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