Rosetta
Public Types | Public Member Functions | Private Types | Private Attributes | Friends | List of all members
core::chemical::AtomRefMapping< FromRef, ToRef > Class Template Reference

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>

Inheritance diagram for core::chemical::AtomRefMapping< FromRef, ToRef >:
Inheritance graph
[legend]

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::Sizevectorize (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
 

Detailed Description

template<class FromRef, class ToRef>
class core::chemical::AtomRefMapping< FromRef, ToRef >

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.

Member Typedef Documentation

◆ const_iterator

template<class FromRef , class ToRef >
typedef SubMap::const_iterator core::chemical::AtomRefMapping< FromRef, ToRef >::const_iterator

◆ SubMap

template<class FromRef , class ToRef >
typedef std::map< FromRef, ToRef > core::chemical::AtomRefMapping< FromRef, ToRef >::SubMap
private

Constructor & Destructor Documentation

◆ AtomRefMapping() [1/5]

template<class FromRef , class ToRef >
core::chemical::AtomRefMapping< FromRef, ToRef >::AtomRefMapping ( )
inline

◆ AtomRefMapping() [2/5]

template<class FromRef , class ToRef >
core::chemical::AtomRefMapping< FromRef, ToRef >::AtomRefMapping ( FromRef const &  invalid_from,
ToRef const &  invalid_to 
)
inline

Constructor with non-standard invalid values.

◆ AtomRefMapping() [3/5]

template<class FromRef , class ToRef >
core::chemical::AtomRefMapping< FromRef, ToRef >::AtomRefMapping ( bool  identity)
inline

Ctor with explicit identity setting.

◆ AtomRefMapping() [4/5]

template<class FromRef , class ToRef >
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>
core::chemical::AtomRefMapping< FromRef, ToRef >::AtomRefMapping ( MutableResidueType const &  restype)
inline

◆ AtomRefMapping() [5/5]

template<class FromRef , class ToRef >
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>
core::chemical::AtomRefMapping< FromRef, ToRef >::AtomRefMapping ( ResidueType const &  restype)
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().

Member Function Documentation

◆ begin()

template<class FromRef , class ToRef >
const_iterator core::chemical::AtomRefMapping< FromRef, ToRef >::begin ( ) const
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().

◆ clear()

template<class FromRef , class ToRef >
void core::chemical::AtomRefMapping< FromRef, ToRef >::clear ( )
inline

◆ count()

template<class FromRef , class ToRef >
bool core::chemical::AtomRefMapping< FromRef, ToRef >::count ( FromRef const &  key) const
inline

◆ downstream_combine()

template<class FromRef , class ToRef >
template<class OToRef >
AtomRefMapping<FromRef,OToRef> core::chemical::AtomRefMapping< FromRef, ToRef >::downstream_combine ( AtomRefMapping< ToRef, OToRef > const &  vmap_to_add) const
inline

◆ empty()

template<class FromRef , class ToRef >
bool core::chemical::AtomRefMapping< FromRef, ToRef >::empty ( ) const
inline

◆ end()

template<class FromRef , class ToRef >
const_iterator core::chemical::AtomRefMapping< FromRef, ToRef >::end ( ) const
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().

◆ erase()

template<class FromRef , class ToRef >
void core::chemical::AtomRefMapping< FromRef, ToRef >::erase ( FromRef const &  in)
inline

◆ identity() [1/2]

template<class FromRef , class ToRef >
bool core::chemical::AtomRefMapping< FromRef, ToRef >::identity ( ) const
inline

Get the identity setting.

References core::chemical::AtomRefMapping< FromRef, ToRef >::identity_.

◆ identity() [2/2]

template<class FromRef , class ToRef >
void core::chemical::AtomRefMapping< FromRef, ToRef >::identity ( bool  setting)
inline

◆ invalid_entry()

template<class FromRef , class ToRef >
ToRef const& core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_entry ( ) const
inline

◆ invalid_key()

template<class FromRef , class ToRef >
FromRef const& core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_key ( ) const
inline

What's the invalid value for the keys?

References core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_from_.

◆ invalidate()

template<class FromRef , class ToRef >
void core::chemical::AtomRefMapping< FromRef, ToRef >::invalidate ( FromRef const &  in)
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_.

◆ operator==()

template<class FromRef , class ToRef >
bool core::chemical::AtomRefMapping< FromRef, ToRef >::operator== ( AtomRefMapping< FromRef, ToRef > const &  other) const
inline

◆ operator[]() [1/2]

template<class FromRef , class ToRef >
ToRef& core::chemical::AtomRefMapping< FromRef, ToRef >::operator[] ( FromRef const &  in)
inline

◆ operator[]() [2/2]

template<class FromRef , class ToRef >
ToRef const core::chemical::AtomRefMapping< FromRef, ToRef >::operator[] ( FromRef const &  in) const
inline

◆ reverse()

template<class FromRef , class ToRef >
AtomRefMapping< ToRef, FromRef > core::chemical::AtomRefMapping< FromRef, ToRef >::reverse ( ) const
inline

◆ reverse_lookup()

template<class FromRef , class ToRef >
FromRef const& core::chemical::AtomRefMapping< FromRef, ToRef >::reverse_lookup ( ToRef const &  out) const
inline

◆ show()

template<class FromRef , class ToRef >
void core::chemical::AtomRefMapping< FromRef, ToRef >::show ( std::ostream &  output) const
inline

◆ upstream_combine()

template<class FromRef , class ToRef >
template<class OFromRef >
AtomRefMapping<OFromRef, ToRef> core::chemical::AtomRefMapping< FromRef, ToRef >::upstream_combine ( AtomRefMapping< OFromRef, FromRef > const &  vmap_to_add) const
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().

◆ vectorize()

template<class FromRef , class ToRef >
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 > core::chemical::AtomRefMapping< FromRef, ToRef >::vectorize ( ResidueType const &  from_res,
ResidueType const &  to_res 
) const
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().

Friends And Related Function Documentation

◆ AtomRefMapping

template<class FromRef , class ToRef >
template<class Foo , class Bar >
friend class AtomRefMapping
friend

Member Data Documentation

◆ identity_

template<class FromRef , class ToRef >
bool core::chemical::AtomRefMapping< FromRef, ToRef >::identity_
private

◆ invalid_from_

template<class FromRef , class ToRef >
FromRef core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_from_
private

◆ invalid_to_

template<class FromRef , class ToRef >
ToRef core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_to_
private

◆ mapping_

template<class FromRef , class ToRef >
SubMap core::chemical::AtomRefMapping< FromRef, ToRef >::mapping_
private

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