|
Rosetta
|
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
References core::chemical::MutableResidueType::atom_iterators(), core::chemical::RefConvert< OutRef >::convert(), and core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
|
inline |
Make an explicit identity mapping for the ResType.
Not availible if either ref is a VD
References core::chemical::RefConvert< OutRef >::convert(), core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_, and core::chemical::ResidueType::natoms().
|
inline |
An iterator to std::pair(key,value) pairs for explicit entries.
References core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
Referenced by protocols::ligand_docking::ga_ligand_dock::MCSAligner::apply(), and protocols::drug_design::DrugDesignMover::post_process_restype().
|
inline |
Ignore all specializations on this map.
References core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
Referenced by protocols::drug_design::ReactionBasedAnalogSampler::apply(), protocols::drug_design::ReactionFragment::apply(), protocols::drug_design::ReactionGrow::apply(), protocols::drug_design::ReactionMultiTransform::apply(), protocols::drug_design::SubstituentReplace::apply(), protocols::drug_design::SubstructureReplace::apply(), core::chemical::rdkit::RDMolToRestype::generate_restype(), and core::chemical::rdkit::RestypeToRDMol::Mol().
|
inline |
Does this map have the given key?
References core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_from_, and core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
Referenced by core::chemical::AtomRefMapping< FromRef, ToRef >::downstream_combine(), core::chemical::rdkit::RDMolToRestype::generate_restype(), core::chemical::AtomRefMapping< FromRef, ToRef >::operator==(), core::chemical::AtomRefMapping< FromRef, ToRef >::operator[](), core::chemical::AtomRefMapping< FromRef, ToRef >::reverse(), and core::chemical::AtomRefMapping< FromRef, ToRef >::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] ].
References core::chemical::AtomRefMapping< FromRef, ToRef >::count(), core::chemical::AtomRefMapping< FromRef, ToRef >::identity_, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_from_, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_to_, and core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
Referenced by core::chemical::combine(), protocols::drug_design::DrugDesignMover::emplace_residue_type(), and core::chemical::AtomRefMapping< FromRef, ToRef >::upstream_combine().
|
inline |
Does this mapping contain any explicit (non-identity) mappings?
References core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
Referenced by protocols::drug_design::ReactionBasedAnalogSampler::apply(), protocols::drug_design::ReactionFragment::apply(), protocols::drug_design::ReactionGrow::apply(), core::chemical::rdkit::find_mapping(), and protocols::drug_design::place_new_restype_rotamer_align().
|
inline |
An iterator to std::pair(key,value) pairs for explicit entries.
References core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
Referenced by protocols::ligand_docking::ga_ligand_dock::MCSAligner::apply(), and protocols::drug_design::DrugDesignMover::post_process_restype().
|
inline |
Make in act like the default (pay attention to identity_)
References core::conformation::membrane::in, and core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
Referenced by core::chemical::rdkit::RDMolToRestype::generate_restype().
|
inline |
Get the identity setting.
References core::chemical::AtomRefMapping< FromRef, ToRef >::identity_.
|
inline |
Set the identity flag.
References core::chemical::AtomRefMapping< FromRef, ToRef >::identity_.
Referenced by protocols::drug_design::ReactionBasedAnalogSampler::apply(), protocols::drug_design::ReactionFragment::apply(), protocols::drug_design::ReactionGrow::apply(), protocols::drug_design::SubstituentReplace::apply(), and protocols::drug_design::SubstructureReplace::apply().
|
inline |
What's the invalid value for the mapped values?
References core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_to_.
Referenced by protocols::drug_design::align_residues(), protocols::drug_design::ReactionBasedAnalogSampler::apply(), protocols::rotamer_gen::RDKitRotamers::generate_conformers(), protocols::ligand_evolution::FragmentLibrary::generate_rotamers(), core::chemical::rdkit::RestypeToRDMol::Mol(), protocols::drug_design::place_new_restype_rotamer_align(), and protocols::drug_design::DrugDesignMover::post_process_restype().
|
inline |
What's the invalid value for the keys?
References core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_from_.
Referenced by protocols::drug_design::DrugDesignMover::post_process_restype().
|
inline |
Make the key value an invalid to value (Will work even with identity_ == true)
References core::conformation::membrane::in, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_to_, and core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
Referenced by core::chemical::modifications::Reprotonate::remove_hydrogens().
|
inline |
|
inline |
References core::chemical::AtomRefMapping< FromRef, ToRef >::count(), core::chemical::AtomRefMapping< FromRef, ToRef >::identity_, core::chemical::RefConvert< OutRef >::identity_pass_through(), core::conformation::membrane::in, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_from_, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_to_, and core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
|
inline |
References core::chemical::AtomRefMapping< FromRef, ToRef >::identity_, core::chemical::RefConvert< OutRef >::identity_pass_through(), core::conformation::membrane::in, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_from_, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_to_, and core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
|
inline |
go from an A->B mapping to a B->A mapping
References core::chemical::AtomRefMapping< FromRef, ToRef >::count(), core::chemical::AtomRefMapping< FromRef, ToRef >::identity_, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_from_, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_to_, and core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
Referenced by protocols::rotamer_gen::FragmentRotamers::apply(), core::chemical::rdkit::find_mapping(), and protocols::drug_design::ReactionBasedAnalogSampler::find_O3A_mapping().
|
inline |
Gets the key which corresponds to the given mapped value, if any.
References core::chemical::AtomRefMapping< FromRef, ToRef >::count(), core::chemical::AtomRefMapping< FromRef, ToRef >::identity_, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_from_, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_to_, core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_, and core::conformation::membrane::out.
Referenced by protocols::drug_design::DrugDesignMover::post_process_restype().
|
inline |
References core::chemical::AtomRefMapping< FromRef, ToRef >::identity_, core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_from_, and core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_.
Referenced by protocols::ligand_docking::ga_ligand_dock::MCSAligner::apply(), and 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 ] ].
References core::chemical::AtomRefMapping< FromRef, ToRef >::downstream_combine().
|
inline |
Make a Size-to-Size vector, indexed by the from, with elements that specify the two entries.
References core::chemical::RefConvert< OutRef >::convert(), core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_, and core::chemical::ResidueType::natoms().
|
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< FromRef, ToRef >::downstream_combine(), core::chemical::AtomRefMapping< FromRef, ToRef >::identity(), core::chemical::AtomRefMapping< FromRef, ToRef >::operator==(), core::chemical::AtomRefMapping< FromRef, ToRef >::operator[](), core::chemical::AtomRefMapping< FromRef, ToRef >::reverse(), core::chemical::AtomRefMapping< FromRef, ToRef >::reverse_lookup(), and core::chemical::AtomRefMapping< FromRef, ToRef >::show().
|
private |
What value to use for invalid from values.
Referenced by core::chemical::AtomRefMapping< FromRef, ToRef >::count(), core::chemical::AtomRefMapping< FromRef, ToRef >::downstream_combine(), core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_key(), core::chemical::AtomRefMapping< FromRef, ToRef >::operator==(), core::chemical::AtomRefMapping< FromRef, ToRef >::operator[](), core::chemical::AtomRefMapping< FromRef, ToRef >::reverse(), core::chemical::AtomRefMapping< FromRef, ToRef >::reverse_lookup(), and core::chemical::AtomRefMapping< FromRef, ToRef >::show().
|
private |
What value to use for invalid to values.
Referenced by core::chemical::AtomRefMapping< FromRef, ToRef >::downstream_combine(), core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_entry(), core::chemical::AtomRefMapping< FromRef, ToRef >::invalidate(), core::chemical::AtomRefMapping< FromRef, ToRef >::operator[](), core::chemical::AtomRefMapping< FromRef, ToRef >::reverse(), and core::chemical::AtomRefMapping< FromRef, ToRef >::reverse_lookup().
|
private |
The actual mapping.
Referenced by core::chemical::AtomRefMapping< FromRef, ToRef >::AtomRefMapping(), core::chemical::AtomRefMapping< FromRef, ToRef >::begin(), core::chemical::AtomRefMapping< FromRef, ToRef >::clear(), core::chemical::AtomRefMapping< FromRef, ToRef >::count(), core::chemical::AtomRefMapping< FromRef, ToRef >::downstream_combine(), core::chemical::AtomRefMapping< FromRef, ToRef >::empty(), core::chemical::AtomRefMapping< FromRef, ToRef >::end(), core::chemical::AtomRefMapping< FromRef, ToRef >::erase(), core::chemical::AtomRefMapping< FromRef, ToRef >::invalidate(), core::chemical::AtomRefMapping< FromRef, ToRef >::operator==(), core::chemical::AtomRefMapping< FromRef, ToRef >::operator[](), core::chemical::AtomRefMapping< FromRef, ToRef >::reverse(), core::chemical::AtomRefMapping< FromRef, ToRef >::reverse_lookup(), core::chemical::AtomRefMapping< FromRef, ToRef >::show(), and core::chemical::AtomRefMapping< FromRef, ToRef >::vectorize().