Rosetta
Classes | Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
core::pose::PDBPoseMap Class Reference

PDBPoseMap can be queried with PDB information (chain, sequence position) and returns a pose's resid position. Useful for handing input/output in terms of PDB positions. Can be tucked into the pose for repeated access, or generated just-in-time for a single use. Basically a wrapper class for std::map. More...

#include <PDBPoseMap.hh>

Inheritance diagram for core::pose::PDBPoseMap:
Inheritance graph
[legend]

Classes

struct  no_segID_comp
 
struct  ResidueKey
 sortable residue key internal to PDBPoseMap More...
 

Public Types

typedef core::Size Size
 

Public Member Functions

 PDBPoseMap ()
 default constructor More...
 
 PDBPoseMap (PDBInfo const &info)
 PDBInfo constructor. More...
 
 PDBPoseMap (PDBPoseMap const &map)
 copy constructor More...
 
 ~PDBPoseMap () override
 default destructor More...
 
PDBPoseMapoperator= (PDBPoseMap const &m)
 copy assignment More...
 
Size size () const
 number of mappings More...
 
Size find (char const chain, int const pdb_res, char const ins_code=' ', std::string const &segmentID=" ") const
 lookup pose numbering More...
 
void insert (char const chain, int const pdb_res, char const ins_code, std::string const &segmentID, Size const pose_res)
 insert pdb -> pose number mapping More...
 
bool conditional_erase (char const chain, int const pdb_res, char const ins_code, std::string const &segmentID, Size const pose_res)
 remove mapping for pdb residue key only if Pose residue matches More...
 
void erase (char const chain, int const pdb_res, char const ins_code, std::string const &segmentID=" ")
 forcibly remove mapping for pdb residue key More...
 
void clear ()
 clear the current mapping data More...
 
void fill (PDBInfo const &info)
 fill with corresponding pdb -> pose residue mapping More...
 

Private Types

typedef utility::VirtualBase Super
 

Private Attributes

std::map< ResidueKey, Sizepdb2pose_
 maps ResidueKey -> Pose internal numbering More...
 
std::map< ResidueKey, Size, no_segID_comppdb2pose_noSegmentIDs_
 

Detailed Description

PDBPoseMap can be queried with PDB information (chain, sequence position) and returns a pose's resid position. Useful for handing input/output in terms of PDB positions. Can be tucked into the pose for repeated access, or generated just-in-time for a single use. Basically a wrapper class for std::map.

Warning
danpf.nosp@m.@uw..nosp@m.edu – In order to avoid breaking workflows I added a secondary map that tracks the map<ResidueKey, Size> without the segmentID field being checked. This is sort of a strange if you use segmentIDs, but if you don't you won't notice any differences.

Member Typedef Documentation

◆ Size

◆ Super

typedef utility::VirtualBase core::pose::PDBPoseMap::Super
private

Constructor & Destructor Documentation

◆ PDBPoseMap() [1/3]

core::pose::PDBPoseMap::PDBPoseMap ( )

default constructor

◆ PDBPoseMap() [2/3]

core::pose::PDBPoseMap::PDBPoseMap ( PDBInfo const &  info)

PDBInfo constructor.

References fill().

◆ PDBPoseMap() [3/3]

core::pose::PDBPoseMap::PDBPoseMap ( PDBPoseMap const &  map)
default

copy constructor

◆ ~PDBPoseMap()

core::pose::PDBPoseMap::~PDBPoseMap ( )
overridedefault

default destructor

Member Function Documentation

◆ clear()

void core::pose::PDBPoseMap::clear ( )
inline

clear the current mapping data

References pdb2pose_, and pdb2pose_noSegmentIDs_.

Referenced by core::pose::PDBInfo::rebuild_pdb2pose().

◆ conditional_erase()

bool core::pose::PDBPoseMap::conditional_erase ( char const  chain,
int const  pdb_res,
char const  ins_code,
std::string const &  segmentID,
Size const  pose_res 
)

remove mapping for pdb residue key only if Pose residue matches

Parameters
[in]chainchain id
[in]pdb_respdb residue numbering
[in]ins_codeinsertion code, use ' ' if no insertion code
[in]pose_resthe mapped Pose residue
Returns
true if key-value pair erase, false otherwise

References pdb2pose_, and pdb2pose_noSegmentIDs_.

Referenced by core::pose::PDBInfo::chain(), core::pose::PDBInfo::icode(), core::pose::PDBInfo::number(), and core::pose::PDBInfo::set_resinfo().

◆ erase()

void core::pose::PDBPoseMap::erase ( char const  chain,
int const  pdb_res,
char const  ins_code,
std::string const &  segmentID = "    " 
)

forcibly remove mapping for pdb residue key

Parameters
[in]chainchain id
[in]pdb_respdb residue numbering
[in]ins_codeinsertion code, use ' ' if no insertion code

References pdb2pose_, and pdb2pose_noSegmentIDs_.

Referenced by core::pose::PDBInfo::copy(), and core::pose::PDBInfo::delete_res().

◆ fill()

void core::pose::PDBPoseMap::fill ( PDBInfo const &  info)

fill with corresponding pdb -> pose residue mapping

Note
does not clear any currently existing mapping data

References core::pose::PDBInfo::chain(), core::pose::PDBInfo::icode(), insert(), core::pose::PDBInfo::nres(), core::pose::PDBInfo::number(), and core::pose::PDBInfo::segmentID().

Referenced by PDBPoseMap(), and core::pose::PDBInfo::rebuild_pdb2pose().

◆ find()

Size core::pose::PDBPoseMap::find ( char const  chain,
int const  pdb_res,
char const  ins_code = ' ',
std::string const &  segmentID = "    " 
) const

◆ insert()

void core::pose::PDBPoseMap::insert ( char const  chain,
int const  pdb_res,
char const  ins_code,
std::string const &  segmentID,
Size const  pose_res 
)

insert pdb -> pose number mapping

Parameters
[in]chainchain id
[in]pdb_respdb residue numbering
[in]ins_codeinsertion code, use ' ' if no insertion code
[in]pose_respose numbering for residue
Remarks
if the chain is equal to the PDBInfo's empty record character, the insertion will be skipped

References core::pose::PDBInfo::empty_record(), pdb2pose_, and pdb2pose_noSegmentIDs_.

Referenced by core::pose::PDBInfo::append_res(), core::pose::PDBInfo::chain(), core::pose::PDBInfo::copy(), core::pose::PDBInfo::delete_res(), fill(), core::pose::PDBInfo::icode(), core::pose::PDBInfo::number(), core::pose::PDBInfo::prepend_res(), and core::pose::PDBInfo::set_resinfo().

◆ operator=()

PDBPoseMap & core::pose::PDBPoseMap::operator= ( PDBPoseMap const &  m)

copy assignment

References pdb2pose_, and pdb2pose_noSegmentIDs_.

◆ size()

Size core::pose::PDBPoseMap::size ( ) const
inline

number of mappings

References pdb2pose_.

Member Data Documentation

◆ pdb2pose_

std::map< ResidueKey, Size > core::pose::PDBPoseMap::pdb2pose_
private

maps ResidueKey -> Pose internal numbering

Referenced by clear(), conditional_erase(), erase(), find(), insert(), operator=(), and size().

◆ pdb2pose_noSegmentIDs_

std::map< ResidueKey, Size, no_segID_comp> core::pose::PDBPoseMap::pdb2pose_noSegmentIDs_
private

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