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
core::select::residue_selector::ResidueIndexSelector Class Reference

The ResidueIndexSelector returns a ResidueSubset, i.e. a utility::vector1< bool > containing 'true' for residue positions which match the given residue index. The index is read as comma-separated list of either Rosetta indices (e.g. 10) or PDB numbers (e.g. 10A, residue 10 of chain A). It can also take range specifications (e.g. 10A-20A). Detection and mapping from PDB to Rosetta residue numbers is done internally. More...

#include <ResidueIndexSelector.hh>

Inheritance diagram for core::select::residue_selector::ResidueIndexSelector:
Inheritance graph
[legend]

Public Member Functions

 ResidueIndexSelector ()
 
 ResidueIndexSelector (std::string const &index_str)
 
 ResidueIndexSelector (core::Size index_in)
 Convenience constructor for a single residue index. More...
 
 ResidueIndexSelector (utility::vector1< core::Size > const &index_in)
 Convenience constructor for a vector of indexes. More...
 
 ResidueIndexSelector (ResidueIndexSelector const &src)
 Copy constructor. More...
 
ResidueSelectorOP clone () const override
 Clone operator. More...
 
 ~ResidueIndexSelector () override
 
ResidueSubset apply (core::pose::Pose const &pose) const override
 Return a ResidueSubset indicating a selection of Residues from the input Pose; the ResidueSubset is an array of booleans where a value of "true" for position i indicates that residue i is a part of the selected subset – and a value of "false" would indicate that it is not. More...
 
void parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &) override
 Initialize any data members of this instance from an input tag and a DataMap object. More...
 
std::string get_name () const override
 
void set_index (std::string const &index_str)
 sets the string by which residues are selected More...
 
void set_index (core::Size index)
 Set an index using a size. More...
 
void set_index_range (core::Size start, core::Size end)
 Set a range of indexes. Includes start and end. More...
 
void append_index (core::Size index_in)
 Append an additional index (in Rosetta numbering) to the list of indices. More...
 
void append_index (utility::vector1< core::Size > const &index_in)
 Append additional indexes (in Rosetta numbering) to the list of indices. More...
 
bool error_on_out_of_bounds_index () const
 Is this selector set to throw an error if an out-of-range index is selected (e.g. residue 56 of a 55-residue pose)? More...
 
void set_error_on_out_of_bounds_index (bool const setting)
 Set whether this selector set to throws an error if an out-of-range index is selected (e.g. residue 56 of a 55-residue pose). More...
 
- Public Member Functions inherited from core::select::residue_selector::ResidueSelector
 ResidueSelector ()
 Constructor. More...
 
 ~ResidueSelector () override
 Destructor. More...
 
virtual bool residue_selector_provides_citation_info () const
 Does this residue selector 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 residue_selector_is_unpublished () const
 Does this residue selector 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 std::string class_name ()
 
static void provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd)
 

Private Attributes

std::string index_str_
 
bool error_on_out_of_bounds_index_
 If false, then there is no error if an index that is not in the pose is selected. True by default, which means that you get an error if you try to select an index that's not in the pose. More...
 
bool reverse_
 If true, will reverse the index selection from the end of the pose. More...
 

Detailed Description

The ResidueIndexSelector returns a ResidueSubset, i.e. a utility::vector1< bool > containing 'true' for residue positions which match the given residue index. The index is read as comma-separated list of either Rosetta indices (e.g. 10) or PDB numbers (e.g. 10A, residue 10 of chain A). It can also take range specifications (e.g. 10A-20A). Detection and mapping from PDB to Rosetta residue numbers is done internally.

Constructor & Destructor Documentation

core::select::residue_selector::ResidueIndexSelector::ResidueIndexSelector ( )
core::select::residue_selector::ResidueIndexSelector::ResidueIndexSelector ( std::string const &  index_str)
core::select::residue_selector::ResidueIndexSelector::ResidueIndexSelector ( core::Size  index_in)

Convenience constructor for a single residue index.

References append_index().

core::select::residue_selector::ResidueIndexSelector::ResidueIndexSelector ( utility::vector1< core::Size > const &  index_in)

Convenience constructor for a vector of indexes.

References append_index().

core::select::residue_selector::ResidueIndexSelector::ResidueIndexSelector ( ResidueIndexSelector const &  src)
default

Copy constructor.

core::select::residue_selector::ResidueIndexSelector::~ResidueIndexSelector ( )
overridedefault

Member Function Documentation

void core::select::residue_selector::ResidueIndexSelector::append_index ( core::Size  index_in)

Append an additional index (in Rosetta numbering) to the list of indices.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu)

References index_str_.

Referenced by protocols::fold_from_loops::utils::Nub::get_nub_pieces(), and ResidueIndexSelector().

void core::select::residue_selector::ResidueIndexSelector::append_index ( utility::vector1< core::Size > const &  index_in)

Append additional indexes (in Rosetta numbering) to the list of indices.

References index_str_.

ResidueSubset core::select::residue_selector::ResidueIndexSelector::apply ( core::pose::Pose const &  pose) const
overridevirtual

Return a ResidueSubset indicating a selection of Residues from the input Pose; the ResidueSubset is an array of booleans where a value of "true" for position i indicates that residue i is a part of the selected subset – and a value of "false" would indicate that it is not.

Implements core::select::residue_selector::ResidueSelector.

References error_on_out_of_bounds_index(), core::pose::get_resnum_list(), index_str_, core::pose::symmetry::is_symmetric(), reverse_, core::pose::Pose::size(), core::pose::symmetry::symmetry_info(), and core::select::residue_selector::TR().

std::string core::select::residue_selector::ResidueIndexSelector::class_name ( )
static
ResidueSelectorOP core::select::residue_selector::ResidueIndexSelector::clone ( ) const
overridevirtual

Clone operator.

Copy this object and return an owning pointer to the new object.

Implements core::select::residue_selector::ResidueSelector.

bool core::select::residue_selector::ResidueIndexSelector::error_on_out_of_bounds_index ( ) const
inline

Is this selector set to throw an error if an out-of-range index is selected (e.g. residue 56 of a 55-residue pose)?

References error_on_out_of_bounds_index_.

Referenced by apply(), and parse_my_tag().

std::string core::select::residue_selector::ResidueIndexSelector::get_name ( ) const
overridevirtual
void core::select::residue_selector::ResidueIndexSelector::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap &  datacache 
)
overridevirtual

Initialize any data members of this instance from an input tag and a DataMap object.

Noop implementation in the base class in the case that a derived class has no need to read data from an input tag

Reimplemented from core::select::residue_selector::ResidueSelector.

References error_on_out_of_bounds_index(), reverse_, set_error_on_out_of_bounds_index(), set_index(), and core::select::residue_selector::TR().

void core::select::residue_selector::ResidueIndexSelector::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static
void core::select::residue_selector::ResidueIndexSelector::set_error_on_out_of_bounds_index ( bool const  setting)
inline

Set whether this selector set to throws an error if an out-of-range index is selected (e.g. residue 56 of a 55-residue pose).

References error_on_out_of_bounds_index_.

Referenced by parse_my_tag().

void core::select::residue_selector::ResidueIndexSelector::set_index ( std::string const &  index_str)

sets the string by which residues are selected

References index_str_.

Referenced by parse_my_tag(), set_index(), and set_index_range().

void core::select::residue_selector::ResidueIndexSelector::set_index ( core::Size  index)

Set an index using a size.

References set_index(), and core::id::to_string().

void core::select::residue_selector::ResidueIndexSelector::set_index_range ( core::Size  start,
core::Size  end 
)

Set a range of indexes. Includes start and end.

References protocols::sic_dock::range(), set_index(), and core::id::to_string().

Member Data Documentation

bool core::select::residue_selector::ResidueIndexSelector::error_on_out_of_bounds_index_
private

If false, then there is no error if an index that is not in the pose is selected. True by default, which means that you get an error if you try to select an index that's not in the pose.

Referenced by error_on_out_of_bounds_index(), and set_error_on_out_of_bounds_index().

std::string core::select::residue_selector::ResidueIndexSelector::index_str_
private

Referenced by append_index(), apply(), and set_index().

bool core::select::residue_selector::ResidueIndexSelector::reverse_
private

If true, will reverse the index selection from the end of the pose.

Referenced by apply(), and parse_my_tag().


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