![]() |
Rosetta
2021.16
|
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>

Public Types | |
| typedef conformation::ResidueOP | ResidueOP |
| typedef conformation::ResidueCOP | ResidueCOP |
| typedef scoring::trie::RotamerTrieBaseOP | RotamerTrieBaseOP |
Public Types inherited from core::conformation::RotamerSetBase | |
| typedef basic::datacache::BasicDataCache | BasicDataCache |
| typedef basic::datacache::BasicDataCacheOP | BasicDataCacheOP |
Public Member Functions | |
| RotamerSubset (RotamerSet &rotset, utility::vector1< Size > const &rotamer_subset) | |
| ~RotamerSubset () override | |
| void | add_rotamer (conformation::Residue const &rotamer) override |
| Append a rotamer to the list; it will not be sorted into the same group as other rotamers of the same group or amino acid unless the last group/amino acid is already the same. Instead it will sit at the end of the list of Rotamers. There are performance implications of using this function instead of add_rotamer_into_existing_group: there are several places in the code which scale quadratically with the number of amino acid groups (but where we assume that this number is small) so if you call this function N times oscilating between ASP and ASN rotamers, you will get O(N^2) performance. If you do not need your rotamers to appear in a particular order, use add_rotamer_into_existing_group instead. More... | |
| void | add_rotamer_into_existing_group (conformation::Residue const &rotamer) override |
| Add a rotamer to the RotamerSet where you will group it with other residues of the same type or barring that, the same group. This will keep the total number of residue type groups down. It will not guarantee (it cannot guarantee) that the newly added rotamer will appear after existing rotamers or at the end of the list of rotamers – if you need that kind of guarantee, use add_rotamer instead. More... | |
| Size | get_n_residue_types () const override |
| Return the number of different residue types; two residue types are considered different if they have a different address. More... | |
| Size | get_n_residue_groups () const override |
| 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... | |
| Size | get_residue_type_begin (Size which_restype) const override |
| Return the first rotamer of a particular residue type. More... | |
| Size | get_residue_group_begin (Size which_resgroup) const override |
| Return the first rotamer that belongs to a particular rotamer group. More... | |
| Size | get_n_rotamers_for_residue_type (Size which_restype) const override |
| Size | get_n_rotamers_for_residue_group (Size which_resgroup) const override |
| Size | get_residue_type_index_for_rotamer (Size which_rotamer) const override |
| given a rotamer id, return an int which represents a type for this rotamer. More... | |
| Size | get_residue_group_index_for_rotamer (Size which_rotamer) const override |
| given a rotamer id, return an int which represents a type for this rotamer. INCOMPLETELY IMPLEMENTED. ANDREW: FIX THIS. More... | |
| Size | num_rotamers () const override |
| Size | id_for_current_rotamer () const override |
| Return the index in the RotamerSet for the current rotamer. More... | |
| conformation::ResidueCOP | rotamer (Size rot_id) const override |
| basic::datacache::BasicDataCache & | rotamer_data_cache (Size rot_id) const override |
| conformation::Residue const & | rotamer_ref (Size rot_id) const override |
| Rotamers::const_iterator | begin () const override |
| Rotamers::const_iterator | end () const override |
| conformation::ResidueOP | nonconst_rotamer (Size rot_id) override |
| void | store_trie (Size method_enum_id, conformation::AbstractRotamerTrieOP trie) override |
| conformation::AbstractRotamerTrieCOP | get_trie (Size method_enum_id) const override |
| void | drop_rotamer (Size rot_id) override |
| removes a single rotamer and causes a rotamer index update More... | |
| void | drop_rotamers (utility::vector1< bool > const &rotamers_to_delete) override |
| rotamers_to_delete must be of size nrotmaers – each position in the array that's "true" is removed from the set of rotamers More... | |
| void | drop_rotamers_by_index (utility::vector1< Size > const &rotamer_indices_to_delete) override |
| 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... | |
| void | initialize_pose_for_rotset_creation (pose::Pose &) const override |
| Give the pose a chance to stash any data needed by the rotset need nonconst access to pose. More... | |
| void | show (std::ostream &out) const override |
| void | build_rotamers (pose::Pose const &the_pose, scoring::ScoreFunction const &scorefxn, task::PackerTask const &task, utility::graph::GraphCOP packer_neighbor_graph, bool use_neighbor_context=true) override |
| void | build_dependent_rotamers (RotamerSets const &rotamer_sets, pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, task::PackerTask const &task, utility::graph::GraphCOP packer_neighbor_graph) override |
| virtual void | build_pwat_rotamers (pose::Pose const &pose, core::Size resid, utility::vector1< Vector > const &new_pwat_rotset) |
| void | compute_one_body_energies (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, task::PackerTask const &task, utility::graph::GraphCOP packer_neighbor_graph, utility::vector1< core::PackerEnergy > &energies, bool const no_update=false) const override |
| void | compute_one_and_two_body_energies (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, task::PackerTask const &task, utility::graph::GraphCOP packer_neighbor_graph, utility::vector1< core::PackerEnergy > &one_body_energies, utility::vector1< utility::vector1< core::PackerEnergy > > &two_body_energies, utility::vector1< core::Size > &packable_neighbors) const override |
| void | compute_one_body_energy_maps (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, task::PackerTask const &task, utility::graph::GraphCOP packer_neighbor_graph, utility::vector1< scoring::EnergyMap > &energies) const override |
| for OptE More... | |
Public Member Functions inherited from core::pack::rotamer_set::RotamerSet | |
| RotamerSet () | |
| ~RotamerSet () override | |
| void | set_resid (Size resid) |
| Size | resid () const override |
Public Member Functions inherited from core::conformation::RotamerSetBase | |
| RotamerSetBase () | |
| ~RotamerSetBase () override | |
| BasicDataCache & | data () |
| 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 override |
| Lazy update of rotamer indices and offsets and integration of those rotamers in the rotamers_waiting_for_sort_ list. More... | |
Private Attributes | |
| Rotamers | rotamers_ |
| std::list< ResidueOP > | rotamers_waiting_for_sort_ |
| Size | n_residue_types_ |
| Size | n_residue_groups_ |
| utility::vector1< Size > | residue_type_rotamers_begin_ |
| utility::vector1< Size > | residue_group_rotamers_begin_ |
| utility::vector1< Size > | n_rotamers_for_restype_ |
| utility::vector1< Size > | n_rotamers_for_resgroup_ |
| utility::vector1< Size > | residue_type_for_rotamers_ |
| utility::vector1< Size > | residue_group_for_rotamers_ |
| utility::vector1 < conformation::AbstractRotamerTrieOP > | cached_tries_ |
| Size | id_for_current_rotamer_ |
| ResidueOP | current_rotamer_copy_ |
| bool | rotamer_offsets_require_update_ |
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).
| core::pack::rotamer_set::RotamerSubset::RotamerSubset | ( | RotamerSet & | rotset, |
| utility::vector1< Size > const & | rotamer_subset | ||
| ) |
|
overridedefault |
|
private |
(private) No copy-constructor
|
overridevirtual |
Append a rotamer to the list; it will not be sorted into the same group as other rotamers of the same group or amino acid unless the last group/amino acid is already the same. Instead it will sit at the end of the list of Rotamers. There are performance implications of using this function instead of add_rotamer_into_existing_group: there are several places in the code which scale quadratically with the number of amino acid groups (but where we assume that this number is small) so if you call this function N times oscilating between ASP and ASN rotamers, you will get O(N^2) performance. If you do not need your rotamers to appear in a particular order, use add_rotamer_into_existing_group instead.
Implements core::pack::rotamer_set::RotamerSet.
References core::conformation::Residue::clone(), prepare_for_new_residue_type(), push_back_rotamer(), and core::conformation::Residue::type().
|
overridevirtual |
Add a rotamer to the RotamerSet where you will group it with other residues of the same type or barring that, the same group. This will keep the total number of residue type groups down. It will not guarantee (it cannot guarantee) that the newly added rotamer will appear after existing rotamers or at the end of the list of rotamers – if you need that kind of guarantee, use add_rotamer instead.
Implements core::pack::rotamer_set::RotamerSet.
References core::conformation::Residue::clone(), rotamer_offsets_require_update_, and rotamers_waiting_for_sort_.
|
inlineoverridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
References rotamers_.
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
|
virtual |
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
|
overridevirtual |
for OptE
Implements core::pack::rotamer_set::RotamerSet.
|
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).
References core::chemical::ResidueTypeBase::name3(), and core::chemical::ResidueType::nbr_radius().
Referenced by prepare_for_new_residue_type(), and update_rotamer_offsets().
|
private |
should two residue types be considered the same residue type?
Referenced by prepare_for_new_residue_type(), and update_rotamer_offsets().
|
overridevirtual |
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.
References id_for_current_rotamer_, rotamer_offsets_require_update_, rotamers_, and update_rotamer_offsets().
|
overridevirtual |
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.
References current_rotamer_copy_, id_for_current_rotamer_, rotamer_offsets_require_update_, rotamers_, and update_rotamer_offsets().
Referenced by drop_rotamers_by_index().
|
overridevirtual |
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.
References drop_rotamers(), and rotamers_.
|
inlineoverridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
References rotamers_.
|
overridevirtual |
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.
References n_residue_groups_, and update_rotamer_offsets().
Referenced by show().
|
overridevirtual |
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.
References n_residue_types_, and update_rotamer_offsets().
Referenced by show().
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
References n_residue_groups_, n_rotamers_for_resgroup_, and update_rotamer_offsets().
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
References n_residue_types_, n_rotamers_for_restype_, and update_rotamer_offsets().
|
overridevirtual |
Return the first rotamer that belongs to a particular rotamer group.
Implements core::pack::rotamer_set::RotamerSet.
References n_residue_groups_, residue_group_rotamers_begin_, and update_rotamer_offsets().
|
overridevirtual |
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.
|
overridevirtual |
Return the first rotamer of a particular residue type.
Implements core::pack::rotamer_set::RotamerSet.
References n_residue_types_, residue_type_rotamers_begin_, and update_rotamer_offsets().
|
overridevirtual |
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.
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
References cached_tries_.
|
overridevirtual |
Return the index in the RotamerSet for the current rotamer.
Implements core::pack::rotamer_set::RotamerSet.
References id_for_current_rotamer_.
|
inlineoverridevirtual |
Give the pose a chance to stash any data needed by the rotset need nonconst access to pose.
Implements core::pack::rotamer_set::RotamerSet.
|
private |
This function should not be called directly – it ought to be called only from prepare_for_new_residue_type.
References n_residue_groups_, n_rotamers_for_resgroup_, num_rotamers(), and residue_group_rotamers_begin_.
Referenced by prepare_for_new_residue_type().
|
private |
This function should not be called directly – it ought to be called only from prepare_for_new_residue_type.
References n_residue_types_, n_rotamers_for_restype_, num_rotamers(), and residue_type_rotamers_begin_.
Referenced by prepare_for_new_residue_type().
|
overridevirtual |
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.
References rotamer_offsets_require_update_, and rotamers_.
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
References rotamers_.
Referenced by new_residue_group(), new_residue_type(), prepare_for_new_residue_type(), and show().
|
private |
declare that a new block of residue types has begun, and that new residues are about to be pushed back.
References different_resgroup(), different_restype(), n_residue_types_, new_residue_group(), new_residue_type(), num_rotamers(), and rotamers_.
Referenced by add_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.
References n_residue_types_, n_rotamers_for_restype_, residue_type_for_rotamers_, and rotamers_.
Referenced by add_rotamer().
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
References rotamers_.
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
References rotamers_.
|
overridevirtual |
Implements core::conformation::RotamerSetBase.
References rotamers_.
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
References core::conformation::Residue::chi(), get_n_residue_groups(), get_n_residue_types(), core::conformation::Residue::mainchain_torsions(), core::conformation::Residue::name(), num_rotamers(), core::conformation::Residue::nus(), core::pack::rotamer_set::RotamerSet::resid(), rot(), and rotamers_.
|
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.
References rotamer_offsets_require_update_, and rotamers_.
Referenced by RotamerSubset().
|
overridevirtual |
Implements core::pack::rotamer_set::RotamerSet.
References cached_tries_.
|
overrideprivatevirtual |
Lazy update of rotamer indices and offsets and integration of those rotamers in the rotamers_waiting_for_sort_ list.
Implements core::pack::rotamer_set::RotamerSet.
References different_resgroup(), different_restype(), id_for_current_rotamer_, n_residue_groups_, n_residue_types_, n_rotamers_for_resgroup_, n_rotamers_for_restype_, residue_group_for_rotamers_, residue_group_rotamers_begin_, residue_type_for_rotamers_, residue_type_rotamers_begin_, rotamer_offsets_require_update_, rotamers_, rotamers_waiting_for_sort_, and core::pack::rotamer_set::sort_new_rotamers_into_rotset_vector().
Referenced by drop_rotamer(), drop_rotamers(), get_n_residue_groups(), get_n_residue_types(), get_n_rotamers_for_residue_group(), get_n_rotamers_for_residue_type(), get_residue_group_begin(), and get_residue_type_begin().
|
private |
Referenced by get_trie(), and store_trie().
|
private |
Referenced by drop_rotamers().
|
mutableprivate |
Referenced by drop_rotamer(), drop_rotamers(), id_for_current_rotamer(), RotamerSubset(), and update_rotamer_offsets().
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
Referenced by get_n_rotamers_for_residue_group(), new_residue_group(), and update_rotamer_offsets().
|
mutableprivate |
Referenced by get_n_rotamers_for_residue_type(), new_residue_type(), push_back_rotamer(), and update_rotamer_offsets().
|
mutableprivate |
Referenced by update_rotamer_offsets().
|
mutableprivate |
Referenced by get_residue_group_begin(), new_residue_group(), and update_rotamer_offsets().
|
mutableprivate |
Referenced by push_back_rotamer(), and update_rotamer_offsets().
|
mutableprivate |
Referenced by get_residue_type_begin(), new_residue_type(), and update_rotamer_offsets().
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
Referenced by add_rotamer_into_existing_group(), and update_rotamer_offsets().
1.8.7