Rosetta
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::select::residue_selector::NeighborhoodResidueSelector Class Reference

The NeighborhoodResidueSelector selects residues neighboring a defined set of residues (the focus). The focus residue set can be obtained from another ResidueSelector, from a set of positions. Focus is included in subset by default. Use include_focus_in_subset to change this! More...

#include <NeighborhoodResidueSelector.hh>

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

Public Member Functions

 NeighborhoodResidueSelector ()
 
 NeighborhoodResidueSelector (NeighborhoodResidueSelector const &src)
 Copy constructor. More...
 
ResidueSelectorOP clone () const override
 Clone operator. More...
 
 NeighborhoodResidueSelector (utility::vector1< bool > const &focus, Real distance, bool include_focus_in_subset=true)
 
 NeighborhoodResidueSelector (ResidueSelectorCOP selector, Real distance, bool include_focus_in_subset=true)
 
 ~NeighborhoodResidueSelector () override
 
void set_focus (std::string const &focus_str)
 Set the focus, which is the residues for which we will be getting neighbors of. More...
 
void set_focus (utility::vector1< bool > const &focus)
 Set the focus, which is the residues for which we will be getting neighbors of. More...
 
void set_focus_selector (ResidueSelectorCOP rs)
 Set a Residue Selector for the focus. More...
 
void set_distance (Real distance)
 Set the distance we will be measuring to get neighbors. More...
 
void set_include_focus_in_subset (bool include_focus)
 Setting to include the focus in the resulting subset or not. Default is TRUE. More...
 
void set_atom_names_for_distance_measure (utility::vector1< std::string > const &atom_names)
 @breif Set atom names to be used for selecting instead of using neighbor atoms. More...
 
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 &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 provide_citation_info (basic::citation_manager::CitationCollectionList &) const override
 Provide the citation. More...
 
- Public Member Functions inherited from core::select::residue_selector::ResidueSelector
 ResidueSelector ()
 Constructor. More...
 
 ~ResidueSelector () override
 Destructor. More...
 
utility::vector1< core::Sizeselection_positions (core::pose::Pose const &pose) const
 Calls apply and returns the Rosetta numbering corresponding to the selected residues. More...
 

Static Public Member Functions

static std::string class_name ()
 
static void provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd)
 

Private Member Functions

void get_focus (core::pose::Pose const &, ResidueSubset &, utility::vector1< bool > &) const
 
void set_defaults ()
 
void clear_focus ()
 

Private Attributes

utility::vector1< bool > focus_
 
std::string focus_str_
 
Real distance_
 
ResidueSelectorCOP focus_selector_
 
bool include_focus_in_subset_
 
utility::vector1< std::string > atom_names_for_distance_measure_
 

Detailed Description

The NeighborhoodResidueSelector selects residues neighboring a defined set of residues (the focus). The focus residue set can be obtained from another ResidueSelector, from a set of positions. Focus is included in subset by default. Use include_focus_in_subset to change this!

Note: Uses the 10 A neighbor graph by default. If neighbor distance is great than this, we use slow-style double for loop.

Constructor & Destructor Documentation

◆ NeighborhoodResidueSelector() [1/4]

core::select::residue_selector::NeighborhoodResidueSelector::NeighborhoodResidueSelector ( )

References set_defaults().

◆ NeighborhoodResidueSelector() [2/4]

core::select::residue_selector::NeighborhoodResidueSelector::NeighborhoodResidueSelector ( NeighborhoodResidueSelector const &  src)

Copy constructor.

References focus_selector_.

◆ NeighborhoodResidueSelector() [3/4]

core::select::residue_selector::NeighborhoodResidueSelector::NeighborhoodResidueSelector ( utility::vector1< bool > const &  focus,
Real  distance,
bool  include_focus_in_subset = true 
)

◆ NeighborhoodResidueSelector() [4/4]

core::select::residue_selector::NeighborhoodResidueSelector::NeighborhoodResidueSelector ( ResidueSelectorCOP  selector,
Real  distance,
bool  include_focus_in_subset = true 
)

◆ ~NeighborhoodResidueSelector()

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

Member Function Documentation

◆ apply()

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

◆ class_name()

std::string core::select::residue_selector::NeighborhoodResidueSelector::class_name ( )
static

◆ clear_focus()

void core::select::residue_selector::NeighborhoodResidueSelector::clear_focus ( )
private

References focus_, focus_selector_, and focus_str_.

Referenced by set_focus().

◆ clone()

ResidueSelectorOP core::select::residue_selector::NeighborhoodResidueSelector::clone ( ) const
overridevirtual

Clone operator.

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

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

Referenced by protocols::simple_moves::CoupledMover::apply().

◆ get_focus()

void core::select::residue_selector::NeighborhoodResidueSelector::get_focus ( core::pose::Pose const &  pose,
ResidueSubset subset,
utility::vector1< bool > &  focus 
) const
private

◆ get_name()

std::string core::select::residue_selector::NeighborhoodResidueSelector::get_name ( ) const
overridevirtual

◆ parse_my_tag()

void core::select::residue_selector::NeighborhoodResidueSelector::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 distance_, core::select::residue_selector::get_embedded_residue_selector(), core::select::residue_selector::get_residue_selector(), include_focus_in_subset_, set_atom_names_for_distance_measure(), set_distance(), set_focus(), set_focus_selector(), set_include_focus_in_subset(), and core::select::residue_selector::TR().

◆ provide_citation_info()

void core::select::residue_selector::NeighborhoodResidueSelector::provide_citation_info ( basic::citation_manager::CitationCollectionList &  citations) const
overridevirtual

Provide the citation.

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

References focus_selector_.

◆ provide_xml_schema()

void core::select::residue_selector::NeighborhoodResidueSelector::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static

◆ set_atom_names_for_distance_measure()

void core::select::residue_selector::NeighborhoodResidueSelector::set_atom_names_for_distance_measure ( utility::vector1< std::string > const &  atom_names)

@breif Set atom names to be used for selecting instead of using neighbor atoms.

setter for custom atom names

A list of atom names, for each focus residue, the positions of which will be used for measuring distance to find neighbors. Since focus residues will be known only during the apply time, a check to see if the number of given atom names is equal to the number of focus residues. If these are not equal, an error is thrown.

References atom_names_for_distance_measure_.

Referenced by parse_my_tag().

◆ set_defaults()

void core::select::residue_selector::NeighborhoodResidueSelector::set_defaults ( )
private

◆ set_distance()

void core::select::residue_selector::NeighborhoodResidueSelector::set_distance ( Real  distance)

◆ set_focus() [1/2]

void core::select::residue_selector::NeighborhoodResidueSelector::set_focus ( std::string const &  focus_str)

◆ set_focus() [2/2]

void core::select::residue_selector::NeighborhoodResidueSelector::set_focus ( utility::vector1< bool > const &  focus)

Set the focus, which is the residues for which we will be getting neighbors of.

References clear_focus(), and focus_.

◆ set_focus_selector()

void core::select::residue_selector::NeighborhoodResidueSelector::set_focus_selector ( ResidueSelectorCOP  rs)

Set a Residue Selector for the focus.

References focus_selector_.

Referenced by parse_my_tag().

◆ set_include_focus_in_subset()

void core::select::residue_selector::NeighborhoodResidueSelector::set_include_focus_in_subset ( bool  include_focus)

Member Data Documentation

◆ atom_names_for_distance_measure_

utility::vector1< std::string > core::select::residue_selector::NeighborhoodResidueSelector::atom_names_for_distance_measure_
private

◆ distance_

Real core::select::residue_selector::NeighborhoodResidueSelector::distance_
private

◆ focus_

utility::vector1< bool > core::select::residue_selector::NeighborhoodResidueSelector::focus_
private

Referenced by clear_focus(), get_focus(), and set_focus().

◆ focus_selector_

ResidueSelectorCOP core::select::residue_selector::NeighborhoodResidueSelector::focus_selector_
private

◆ focus_str_

std::string core::select::residue_selector::NeighborhoodResidueSelector::focus_str_
private

Referenced by clear_focus(), get_focus(), and set_focus().

◆ include_focus_in_subset_

bool core::select::residue_selector::NeighborhoodResidueSelector::include_focus_in_subset_
private

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