![]() |
Rosetta
2021.16
|
A class for mapping ResidueType atom references from one to another. It's intended not only for intra ResidueType mapping, but also for mapping corresponding references from one ResidueType to another. More...
#include <AtomRefMapping.hh>

Public Types | |
| typedef SubMap::const_iterator | const_iterator |
Public Member Functions | |
| AtomRefMapping () | |
| AtomRefMapping (FromRef const &invalid_from, ToRef const &invalid_to) | |
| Constructor with non-standard invalid values. More... | |
| AtomRefMapping (bool identity) | |
| Ctor with explicit identity setting. More... | |
| template<class F = FromRef, class T = ToRef, typename = typename std::enable_if< !std::is_same< F, core::Size >::value && !std::is_same< T, core::Size >::value, int >::type> | |
| AtomRefMapping (MutableResidueType const &restype) | |
| Make an explicit identity mapping for the ResType. More... | |
| template<class F = FromRef, class T = ToRef, typename = typename std::enable_if< !std::is_same< F, VD >::value && !std::is_same< T, VD >::value, int >::type> | |
| AtomRefMapping (ResidueType const &restype) | |
| Make an explicit identity mapping for the ResType. More... | |
| FromRef const & | invalid_key () const |
| What's the invalid value for the keys? More... | |
| ToRef const & | invalid_entry () const |
| What's the invalid value for the mapped values? More... | |
| void | identity (bool setting) |
| Set the identity flag. More... | |
| bool | identity () const |
| Get the identity setting. More... | |
| AtomRefMapping< ToRef, FromRef > | reverse () const |
| go from an A->B mapping to a B->A mapping More... | |
| template<class OToRef > | |
| AtomRefMapping< FromRef, OToRef > | downstream_combine (AtomRefMapping< ToRef, OToRef > const &vmap_to_add) const |
| Apply a B->C mapping to the current A->B mapping to get an A->C mapping i.e. vmap[j] becomes vmap_to_add[ vmap[j] ]. More... | |
| template<class OFromRef > | |
| AtomRefMapping< OFromRef, ToRef > | upstream_combine (AtomRefMapping< OFromRef, FromRef > const &vmap_to_add) const |
| Apply a C->A mapping to the current A->B mapping to get a C->B mapping i.e. vmap[j] becomes vmap[ vmap_to_add[ j ] ]. More... | |
| void | show (std::ostream &output) const |
| void | clear () |
| Ignore all specializations on this map. More... | |
| void | erase (FromRef const &in) |
| Make in act like the default (pay attention to identity_) More... | |
| void | invalidate (FromRef const &in) |
| Make the key value an invalid to value (Will work even with identity_ == true) More... | |
| ToRef const | operator[] (FromRef const &in) const |
| ToRef & | operator[] (FromRef const &in) |
| FromRef const & | reverse_lookup (ToRef const &out) const |
| Gets the key which corresponds to the given mapped value, if any. More... | |
| bool | count (FromRef const &key) const |
| Does this map have the given key? More... | |
| bool | empty () const |
| Does this mapping contain any explicit (non-identity) mappings? More... | |
| bool | operator== (AtomRefMapping< FromRef, ToRef > const &other) const |
| Equality operator. More... | |
| template<class F = FromRef, class T = ToRef, typename = typename std::enable_if< !std::is_same< F, VD >::value && !std::is_same< T, VD >::value, int >::type> | |
| utility::vector1< core::Size > | vectorize (ResidueType const &from_res, ResidueType const &to_res) const |
| Make a Size-to-Size vector, indexed by the from, with elements that specify the two entries. More... | |
| const_iterator | begin () const |
| An iterator to std::pair(key,value) pairs for explicit entries. More... | |
| const_iterator | end () const |
| An iterator to std::pair(key,value) pairs for explicit entries. More... | |
Private Types | |
| typedef std::map< FromRef, ToRef > | SubMap |
Private Attributes | |
| SubMap | mapping_ |
| The actual mapping. More... | |
| FromRef | invalid_from_ |
| What value to use for invalid from values. More... | |
| ToRef | invalid_to_ |
| What value to use for invalid to values. More... | |
| bool | identity_ |
| Should non-explicitly stated atoms be treated like an identity relation? Only meaningful if the two types are the same. More... | |
Friends | |
| template<class Foo , class Bar > | |
| class | AtomRefMapping |
A class for mapping ResidueType atom references from one to another. It's intended not only for intra ResidueType mapping, but also for mapping corresponding references from one ResidueType to another.
This is a templated class to cut down on combinitorial complexity.
| typedef SubMap::const_iterator core::chemical::AtomRefMapping< FromRef, ToRef >::const_iterator |
|
private |
|
inline |
|
inline |
Constructor with non-standard invalid values.
|
inline |
Ctor with explicit identity setting.
|
inline |
Make an explicit identity mapping for the ResType.
Not availible if either ref is a core::Size
|
inline |
Make an explicit identity mapping for the ResType.
Not availible if either ref is a VD
|
inline |
An iterator to std::pair(key,value) pairs for explicit entries.
|
inline |
Ignore all specializations on this map.
Referenced by core::chemical::rdkit::RDMolToRestype::generate_restype(), and core::chemical::rdkit::RestypeToRDMol::Mol().
|
inline |
Does this map have the given key?
Referenced by core::chemical::AtomRefMapping< VD, core::Size >::downstream_combine(), core::chemical::rdkit::RDMolToRestype::generate_restype(), core::chemical::AtomRefMapping< VD, core::Size >::operator==(), core::chemical::AtomRefMapping< VD, core::Size >::operator[](), core::chemical::AtomRefMapping< VD, core::Size >::reverse(), and core::chemical::AtomRefMapping< VD, core::Size >::reverse_lookup().
|
inline |
Apply a B->C mapping to the current A->B mapping to get an A->C mapping i.e. vmap[j] becomes vmap_to_add[ vmap[j] ].
Referenced by core::chemical::combine(), and core::chemical::AtomRefMapping< VD, core::Size >::upstream_combine().
|
inline |
Does this mapping contain any explicit (non-identity) mappings?
Referenced by core::chemical::rdkit::find_mapping().
|
inline |
An iterator to std::pair(key,value) pairs for explicit entries.
|
inline |
Make in act like the default (pay attention to identity_)
Referenced by core::chemical::rdkit::RDMolToRestype::generate_restype().
|
inline |
Set the identity flag.
|
inline |
Get the identity setting.
|
inline |
What's the invalid value for the mapped values?
Referenced by core::chemical::rdkit::RestypeToRDMol::Mol().
|
inline |
What's the invalid value for the keys?
|
inline |
Make the key value an invalid to value (Will work even with identity_ == true)
|
inline |
Equality operator.
|
inline |
|
inline |
|
inline |
go from an A->B mapping to a B->A mapping
Referenced by core::chemical::rdkit::find_mapping().
|
inline |
Gets the key which corresponds to the given mapped value, if any.
|
inline |
Referenced by core::chemical::operator<<().
|
inline |
Apply a C->A mapping to the current A->B mapping to get a C->B mapping i.e. vmap[j] becomes vmap[ vmap_to_add[ j ] ].
|
inline |
Make a Size-to-Size vector, indexed by the from, with elements that specify the two entries.
|
friend |
|
private |
Should non-explicitly stated atoms be treated like an identity relation? Only meaningful if the two types are the same.
Referenced by core::chemical::AtomRefMapping< VD, core::Size >::downstream_combine(), core::chemical::AtomRefMapping< VD, core::Size >::identity(), core::chemical::AtomRefMapping< VD, core::Size >::operator==(), core::chemical::AtomRefMapping< VD, core::Size >::operator[](), core::chemical::AtomRefMapping< VD, core::Size >::reverse(), core::chemical::AtomRefMapping< VD, core::Size >::reverse_lookup(), and core::chemical::AtomRefMapping< VD, core::Size >::show().
|
private |
What value to use for invalid from values.
Referenced by core::chemical::AtomRefMapping< VD, core::Size >::count(), core::chemical::AtomRefMapping< VD, core::Size >::downstream_combine(), core::chemical::AtomRefMapping< VD, core::Size >::invalid_key(), core::chemical::AtomRefMapping< VD, core::Size >::operator==(), core::chemical::AtomRefMapping< VD, core::Size >::operator[](), core::chemical::AtomRefMapping< VD, core::Size >::reverse(), core::chemical::AtomRefMapping< VD, core::Size >::reverse_lookup(), and core::chemical::AtomRefMapping< VD, core::Size >::show().
|
private |
What value to use for invalid to values.
Referenced by core::chemical::AtomRefMapping< VD, core::Size >::downstream_combine(), core::chemical::AtomRefMapping< VD, core::Size >::invalid_entry(), core::chemical::AtomRefMapping< VD, core::Size >::invalidate(), core::chemical::AtomRefMapping< VD, core::Size >::operator[](), core::chemical::AtomRefMapping< VD, core::Size >::reverse(), and core::chemical::AtomRefMapping< VD, core::Size >::reverse_lookup().
|
private |
The actual mapping.
Referenced by core::chemical::AtomRefMapping< VD, core::Size >::AtomRefMapping(), core::chemical::AtomRefMapping< VD, core::Size >::begin(), core::chemical::AtomRefMapping< VD, core::Size >::clear(), core::chemical::AtomRefMapping< VD, core::Size >::count(), core::chemical::AtomRefMapping< VD, core::Size >::downstream_combine(), core::chemical::AtomRefMapping< VD, core::Size >::empty(), core::chemical::AtomRefMapping< VD, core::Size >::end(), core::chemical::AtomRefMapping< VD, core::Size >::erase(), core::chemical::AtomRefMapping< VD, core::Size >::invalidate(), core::chemical::AtomRefMapping< VD, core::Size >::operator==(), core::chemical::AtomRefMapping< VD, core::Size >::operator[](), core::chemical::AtomRefMapping< VD, core::Size >::reverse(), core::chemical::AtomRefMapping< VD, core::Size >::reverse_lookup(), core::chemical::AtomRefMapping< VD, core::Size >::show(), and core::chemical::AtomRefMapping< VD, core::Size >::vectorize().
1.8.7