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
core::pack::rotamer_set::RotamerSubset Class Reference

Container for a subset of rotamers that have been created by another rotamer set. This subset object copies pointers to the rotamers contained in another set, as opposed to cloning the rotamers. It's main purpose is to manage the bookkeeping involved in packing with a subset of rotamers (when it might be faster to use a subset and to create an interaction graph specifically for that subset than to simply pass an abreviated list of rotamers to the SimAnnealer with the "rot_to_pack" vector). More...

#include <RotamerSubset.hh>

Inheritance diagram for core::pack::rotamer_set::RotamerSubset:
Inheritance graph
[legend]
Collaboration diagram for core::pack::rotamer_set::RotamerSubset:
Collaboration graph
[legend]

Public Types

typedef conformation::ResidueOP ResidueOP
 
typedef conformation::ResidueCOP ResidueCOP
 
typedef
scoring::trie::RotamerTrieBaseOP 
RotamerTrieBaseOP
 

Public Member Functions

 RotamerSubset (RotamerSet &rotset, utility::vector1< Size > const &rotamer_subset)
 
virtual ~RotamerSubset ()
 
virtual void add_rotamer (conformation::Residue const &rotamer)
 
virtual Size get_n_residue_types () const
 Return the number of different residue types; two residue types are considered different if they have a different address. More...
 
virtual Size get_n_residue_groups () const
 Return the number of different residue groups. Two residue types are considered to be part of the same block of residues if 1. they have the same address or 2. they have the same "name3" and the same neighbor radius. More...
 
virtual Size get_residue_type_begin (Size which_restype) const
 Return the first rotamer of a particular residue type. More...
 
virtual Size get_residue_group_begin (Size which_resgroup) const
 Return the first rotamer that belongs to a particular rotamer group. More...
 
virtual Size get_n_rotamers_for_residue_type (Size which_restype) const
 
virtual Size get_n_rotamers_for_residue_group (Size which_resgroup) const
 
virtual Size get_residue_type_index_for_rotamer (Size which_rotamer) const
 given a rotamer id, return an int which represents a type for this rotamer. More...
 
virtual Size get_residue_group_index_for_rotamer (Size which_rotamer) const
 given a rotamer id, return an int which represents a type for this rotamer. INCOMPLETELY IMPLEMENTED. ANDREW: FIX THIS. More...
 
virtual Size num_rotamers () const
 
virtual Size id_for_current_rotamer () const
 
virtual conformation::ResidueCOP rotamer (Size rot_id) const
 
virtual Rotamers::const_iterator begin () const
 
virtual Rotamers::const_iterator end () const
 
virtual conformation::ResidueOP nonconst_rotamer (Size rot_id)
 
virtual void store_trie (Size method_enum_id, conformation::AbstractRotamerTrieOP trie)
 
virtual
conformation::AbstractRotamerTrieCOP 
get_trie (Size method_enum_id) const
 
virtual void drop_rotamer (Size rot_id)
 removes a single rotamer and causes a rotamer index update More...
 
virtual void drop_rotamers (utility::vector1< bool > const &rotamers_to_delete)
 rotamers_to_delete must be of size nrotmaers – each position in the array that's "true" is removed from the set of rotamers More...
 
virtual void drop_rotamers_by_index (utility::vector1< Size > const &rotamer_indices_to_delete)
 deletes the rotamers in the list with the given indices. The indices of these rotamers is presumed to be those before any delete operation. e.g. if there are four rotamers, and rotamer_indices_to_delete includes 1 & 3, then the rotamers that will remain are the rotamers originally indexed as 2 and 4, even though their new indices will be 1 & 2. More...
 
virtual void build_rotamers (pose::Pose const &the_pose, scoring::ScoreFunction const &scorefxn, task::PackerTask const &task, graph::GraphCOP packer_neighbor_graph, bool use_neighbor_context=true)
 
virtual void build_dependent_rotamers (RotamerSets const &rotamer_sets, pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, task::PackerTask const &task, graph::GraphCOP packer_neighbor_graph)
 
virtual void compute_one_body_energies (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, task::PackerTask const &task, graph::GraphCOP packer_neighbor_graph, utility::vector1< core::PackerEnergy > &energies) const
 
virtual void compute_one_body_energy_maps (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, task::PackerTask const &task, graph::GraphCOP packer_neighbor_graph, utility::vector1< scoring::EnergyMap > &energies) const
 for OptE More...
 
- Public Member Functions inherited from core::pack::rotamer_set::RotamerSet
 RotamerSet ()
 
virtual ~RotamerSet ()
 
void set_resid (Size resid)
 
virtual Size resid () const
 
- Public Member Functions inherited from core::conformation::RotamerSetBase
 RotamerSetBase ()
 
virtual ~RotamerSetBase ()
 
BasicDataCachedata ()
 BasicDataCache indexed by enum in core/pack/rotamer_set/RotamerSetCacheableDataType.hh. More...
 
BasicDataCache const & data () const
 BasicDataCache indexed by enum in core/pack/rotamer_set/RotamerSetCacheableDataType.hh. More...
 

Private Member Functions

 RotamerSubset (RotamerSubset const &)
 (private) No copy-constructor More...
 
void steal_rotamer (conformation::ResidueOP rotamer)
 declare that a new block of residue types has begun, and that new residues are about to be pushed back. NOT IMPLEMENTED. More...
 
void prepare_for_new_residue_type (core::chemical::ResidueType const &restype)
 declare that a new block of residue types has begun, and that new residues are about to be pushed back. More...
 
bool different_restype (core::chemical::ResidueType const &rt1, core::chemical::ResidueType const &rt2) const
 should two residue types be considered the same residue type? More...
 
bool different_resgroup (core::chemical::ResidueType const &rt1, core::chemical::ResidueType const &rt2) const
 should two residue types be considered to belong to the same residue-type group? More...
 
void new_residue_type ()
 This function should not be called directly – it ought to be called only from prepare_for_new_residue_type. More...
 
void new_residue_group ()
 This function should not be called directly – it ought to be called only from prepare_for_new_residue_type. More...
 
void push_back_rotamer (conformation::ResidueOP)
 appends a rotamer to the list of rotamers, and increments the count for the number of rotamers for the current value of n_residue_types. More...
 
void update_rotamer_offsets () const
 

Private Attributes

Rotamers rotamers_
 
Size n_residue_types_
 
Size n_residue_groups_
 
utility::vector1< Sizeresidue_type_rotamers_begin_
 
utility::vector1< Sizeresidue_group_rotamers_begin_
 
utility::vector1< Sizen_rotamers_for_restype_
 
utility::vector1< Sizen_rotamers_for_resgroup_
 
utility::vector1< Sizeresidue_type_for_rotamers_
 
utility::vector1< Sizeresidue_group_for_rotamers_
 
utility::vector1
< conformation::AbstractRotamerTrieOP
cached_tries_
 
Size id_for_current_rotamer_
 
ResidueOP current_rotamer_copy_
 
bool rotamer_offsets_require_update_
 

Detailed Description

Container for a subset of rotamers that have been created by another rotamer set. This subset object copies pointers to the rotamers contained in another set, as opposed to cloning the rotamers. It's main purpose is to manage the bookkeeping involved in packing with a subset of rotamers (when it might be faster to use a subset and to create an interaction graph specifically for that subset than to simply pass an abreviated list of rotamers to the SimAnnealer with the "rot_to_pack" vector).

Definition at line 63 of file RotamerSubset.hh.

Member Typedef Documentation

Definition at line 67 of file RotamerSubset.hh.

Definition at line 66 of file RotamerSubset.hh.

Definition at line 68 of file RotamerSubset.hh.

Constructor & Destructor Documentation

core::pack::rotamer_set::RotamerSubset::RotamerSubset ( RotamerSet rotset,
utility::vector1< Size > const &  rotamer_subset 
)
core::pack::rotamer_set::RotamerSubset::~RotamerSubset ( )
virtual

Definition at line 57 of file RotamerSubset.cc.

core::pack::rotamer_set::RotamerSubset::RotamerSubset ( RotamerSubset const &  )
private

(private) No copy-constructor

Member Function Documentation

void core::pack::rotamer_set::RotamerSubset::add_rotamer ( conformation::Residue const &  rotamer)
virtual
virtual Rotamers::const_iterator core::pack::rotamer_set::RotamerSubset::begin ( ) const
inlinevirtual

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 129 of file RotamerSubset.hh.

References rotamers_.

void core::pack::rotamer_set::RotamerSubset::build_dependent_rotamers ( RotamerSets const &  rotamer_sets,
pose::Pose const &  pose,
scoring::ScoreFunction const &  scorefxn,
task::PackerTask const &  task,
graph::GraphCOP  packer_neighbor_graph 
)
virtual

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 420 of file RotamerSubset.cc.

void core::pack::rotamer_set::RotamerSubset::build_rotamers ( pose::Pose const &  the_pose,
scoring::ScoreFunction const &  scorefxn,
task::PackerTask const &  task,
graph::GraphCOP  packer_neighbor_graph,
bool  use_neighbor_context = true 
)
virtual

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 410 of file RotamerSubset.cc.

void core::pack::rotamer_set::RotamerSubset::compute_one_body_energies ( pose::Pose const &  pose,
scoring::ScoreFunction const &  scorefxn,
task::PackerTask const &  task,
graph::GraphCOP  packer_neighbor_graph,
utility::vector1< core::PackerEnergy > &  energies 
) const
virtual

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 430 of file RotamerSubset.cc.

void core::pack::rotamer_set::RotamerSubset::compute_one_body_energy_maps ( pose::Pose const &  pose,
scoring::ScoreFunction const &  scorefxn,
task::PackerTask const &  task,
graph::GraphCOP  packer_neighbor_graph,
utility::vector1< scoring::EnergyMap > &  energies 
) const
virtual

for OptE

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 440 of file RotamerSubset.cc.

bool core::pack::rotamer_set::RotamerSubset::different_resgroup ( core::chemical::ResidueType const &  rt1,
core::chemical::ResidueType const &  rt2 
) const
private

should two residue types be considered to belong to the same residue-type group?

The logic to determine if two residue types should be classified as part of the same group. The thinking is as follows. Two residue types are in the same group if they have the same residue type. They're in the same group if their residue types differ, but they have the same name3 (HIS vs HIS_D have the same name3) and they have the same neighbor radius (SER and PhosphoSER should have different groups). The goal is to organize residue types together which will be packed together (as happens in multistate design with HIS and HISD) and that have the same reach (as is needed for the AANeighborSparseMatrix).

Definition at line 307 of file RotamerSubset.cc.

References core::chemical::ResidueType::name3(), and core::chemical::ResidueType::nbr_radius().

Referenced by prepare_for_new_residue_type(), and update_rotamer_offsets().

bool core::pack::rotamer_set::RotamerSubset::different_restype ( core::chemical::ResidueType const &  rt1,
core::chemical::ResidueType const &  rt2 
) const
private

should two residue types be considered the same residue type?

Definition at line 295 of file RotamerSubset.cc.

Referenced by prepare_for_new_residue_type(), and update_rotamer_offsets().

void core::pack::rotamer_set::RotamerSubset::drop_rotamer ( Size  rot_id)
virtual

removes a single rotamer and causes a rotamer index update

O(n) operation; if you have a lot of rotamers you want to remove, use drop_rotamers() instead.

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 189 of file RotamerSubset.cc.

References id_for_current_rotamer_, rotamer_offsets_require_update_, rotamers_, and update_rotamer_offsets().

void core::pack::rotamer_set::RotamerSubset::drop_rotamers ( utility::vector1< bool > const &  rotamers_to_delete)
virtual

rotamers_to_delete must be of size nrotmaers – each position in the array that's "true" is removed from the set of rotamers

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 216 of file RotamerSubset.cc.

References current_rotamer_copy_, id_for_current_rotamer_, rotamer_offsets_require_update_, rotamers_, and update_rotamer_offsets().

Referenced by drop_rotamers_by_index().

void core::pack::rotamer_set::RotamerSubset::drop_rotamers_by_index ( utility::vector1< Size > const &  rotamer_indices_to_delete)
virtual

deletes the rotamers in the list with the given indices. The indices of these rotamers is presumed to be those before any delete operation. e.g. if there are four rotamers, and rotamer_indices_to_delete includes 1 & 3, then the rotamers that will remain are the rotamers originally indexed as 2 and 4, even though their new indices will be 1 & 2.

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 266 of file RotamerSubset.cc.

References drop_rotamers(), and rotamers_.

virtual Rotamers::const_iterator core::pack::rotamer_set::RotamerSubset::end ( ) const
inlinevirtual

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 130 of file RotamerSubset.hh.

References rotamers_.

Size core::pack::rotamer_set::RotamerSubset::get_n_residue_groups ( ) const
virtual

Return the number of different residue groups. Two residue types are considered to be part of the same block of residues if 1. they have the same address or 2. they have the same "name3" and the same neighbor radius.

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 78 of file RotamerSubset.cc.

References n_residue_groups_, and update_rotamer_offsets().

Size core::pack::rotamer_set::RotamerSubset::get_n_residue_types ( ) const
virtual

Return the number of different residue types; two residue types are considered different if they have a different address.

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 71 of file RotamerSubset.cc.

References n_residue_types_, and update_rotamer_offsets().

Size core::pack::rotamer_set::RotamerSubset::get_n_rotamers_for_residue_group ( Size  which_resgroup) const
virtual
Size core::pack::rotamer_set::RotamerSubset::get_n_rotamers_for_residue_type ( Size  which_restype) const
virtual
Size core::pack::rotamer_set::RotamerSubset::get_residue_group_begin ( Size  which_resgroup) const
virtual

Return the first rotamer that belongs to a particular rotamer group.

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 94 of file RotamerSubset.cc.

References n_residue_groups_, residue_group_rotamers_begin_, and update_rotamer_offsets().

Size core::pack::rotamer_set::RotamerSubset::get_residue_group_index_for_rotamer ( Size  which_rotamer) const
virtual

given a rotamer id, return an int which represents a type for this rotamer. INCOMPLETELY IMPLEMENTED. ANDREW: FIX THIS.

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 132 of file RotamerSubset.cc.

Size core::pack::rotamer_set::RotamerSubset::get_residue_type_begin ( Size  which_restype) const
virtual

Return the first rotamer of a particular residue type.

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 86 of file RotamerSubset.cc.

References n_residue_types_, residue_type_rotamers_begin_, and update_rotamer_offsets().

Size core::pack::rotamer_set::RotamerSubset::get_residue_type_index_for_rotamer ( Size  which_rotamer) const
virtual

given a rotamer id, return an int which represents a type for this rotamer.

given a rotamer id, return an int which represents a type for this rotamer. INCOMPLETELY IMPLEMENTED. ANDREW: FIX THIS.

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 123 of file RotamerSubset.cc.

conformation::AbstractRotamerTrieCOP core::pack::rotamer_set::RotamerSubset::get_trie ( Size  method_enum_id) const
virtual

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 181 of file RotamerSubset.cc.

References cached_tries_.

Size core::pack::rotamer_set::RotamerSubset::id_for_current_rotamer ( ) const
virtual

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 146 of file RotamerSubset.cc.

References id_for_current_rotamer_.

void core::pack::rotamer_set::RotamerSubset::new_residue_group ( )
private

This function should not be called directly – it ought to be called only from prepare_for_new_residue_type.

Definition at line 321 of file RotamerSubset.cc.

References n_residue_groups_, n_rotamers_for_resgroup_, num_rotamers(), and residue_group_rotamers_begin_.

Referenced by prepare_for_new_residue_type().

void core::pack::rotamer_set::RotamerSubset::new_residue_type ( )
private

This function should not be called directly – it ought to be called only from prepare_for_new_residue_type.

Definition at line 313 of file RotamerSubset.cc.

References n_residue_types_, n_rotamers_for_restype_, num_rotamers(), and residue_type_rotamers_begin_.

Referenced by prepare_for_new_residue_type().

conformation::ResidueOP core::pack::rotamer_set::RotamerSubset::nonconst_rotamer ( Size  rot_id)
virtual

In handing out non-const data, the guarantee of rotamer-type contiguity within the rotamers_ array, and the correspondence of the rotamer offset data is lost. Future access to rotamer offset data first requires an update of the rotamer offset arrays.

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 163 of file RotamerSubset.cc.

References rotamer_offsets_require_update_, and rotamers_.

Size core::pack::rotamer_set::RotamerSubset::num_rotamers ( ) const
virtual
void core::pack::rotamer_set::RotamerSubset::prepare_for_new_residue_type ( core::chemical::ResidueType const &  restype)
private

declare that a new block of residue types has begun, and that new residues are about to be pushed back.

Definition at line 278 of file RotamerSubset.cc.

References different_resgroup(), different_restype(), n_residue_types_, new_residue_group(), new_residue_type(), num_rotamers(), and rotamers_.

Referenced by add_rotamer().

void core::pack::rotamer_set::RotamerSubset::push_back_rotamer ( conformation::ResidueOP  rotamer)
private

appends a rotamer to the list of rotamers, and increments the count for the number of rotamers for the current value of n_residue_types.

Definition at line 329 of file RotamerSubset.cc.

References n_residue_types_, n_rotamers_for_restype_, residue_type_for_rotamers_, and rotamers_.

Referenced by add_rotamer().

conformation::ResidueCOP core::pack::rotamer_set::RotamerSubset::rotamer ( Size  rot_id) const
virtual

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 152 of file RotamerSubset.cc.

References rotamers_.

void core::pack::rotamer_set::RotamerSubset::steal_rotamer ( conformation::ResidueOP  rotamer)
private

declare that a new block of residue types has begun, and that new residues are about to be pushed back. NOT IMPLEMENTED.

declare that a new block of residue types has begun, and that new residues are about to be pushed back.

appends a rotamer to the list of rotamers, and increments the count for the number of rotamers for the current value of n_residue_types. NOT IMPLEMENTED. Borrow (steal) a rotamer held by another RotamerSet without cloning that rotamer. That is, both sets will now point at the same rotamer object, so if that rotamer changes for one set, it changes for both.

appends a rotamer to the list of rotamers, and increments the count for the number of rotamers for the current value of n_residue_types.

Definition at line 471 of file RotamerSubset.cc.

References rotamer_offsets_require_update_, and rotamers_.

Referenced by RotamerSubset().

void core::pack::rotamer_set::RotamerSubset::store_trie ( Size  method_enum_id,
conformation::AbstractRotamerTrieOP  trie 
)
virtual

Implements core::pack::rotamer_set::RotamerSet.

Definition at line 171 of file RotamerSubset.cc.

References cached_tries_.

void core::pack::rotamer_set::RotamerSubset::update_rotamer_offsets ( ) const
private

Member Data Documentation

utility::vector1< conformation::AbstractRotamerTrieOP > core::pack::rotamer_set::RotamerSubset::cached_tries_
private

Definition at line 273 of file RotamerSubset.hh.

Referenced by get_trie(), and store_trie().

ResidueOP core::pack::rotamer_set::RotamerSubset::current_rotamer_copy_
private

Definition at line 277 of file RotamerSubset.hh.

Referenced by drop_rotamers().

Size core::pack::rotamer_set::RotamerSubset::id_for_current_rotamer_
mutableprivate
Size core::pack::rotamer_set::RotamerSubset::n_residue_groups_
mutableprivate
Size core::pack::rotamer_set::RotamerSubset::n_residue_types_
mutableprivate
utility::vector1< Size > core::pack::rotamer_set::RotamerSubset::n_rotamers_for_resgroup_
mutableprivate
utility::vector1< Size > core::pack::rotamer_set::RotamerSubset::n_rotamers_for_restype_
mutableprivate
utility::vector1< Size > core::pack::rotamer_set::RotamerSubset::residue_group_for_rotamers_
mutableprivate

Definition at line 271 of file RotamerSubset.hh.

Referenced by update_rotamer_offsets().

utility::vector1< Size > core::pack::rotamer_set::RotamerSubset::residue_group_rotamers_begin_
mutableprivate
utility::vector1< Size > core::pack::rotamer_set::RotamerSubset::residue_type_for_rotamers_
mutableprivate

Definition at line 270 of file RotamerSubset.hh.

Referenced by push_back_rotamer(), and update_rotamer_offsets().

utility::vector1< Size > core::pack::rotamer_set::RotamerSubset::residue_type_rotamers_begin_
mutableprivate
bool core::pack::rotamer_set::RotamerSubset::rotamer_offsets_require_update_
mutableprivate
Rotamers core::pack::rotamer_set::RotamerSubset::rotamers_
private

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