Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
core
pose
PDBPoseMap.cc
Go to the documentation of this file.
1
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2
// vi: set ts=2 noet:
3
//
4
// (c) Copyright Rosetta Commons Member Institutions.
5
// (c) This file is part of the Rosetta software suite and is made available under license.
6
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9
10
/// @file core/pose/PDBPoseMap.cc
11
/// @brief class to allow querying for pose resid with pdb chain/seqpos
12
/// @author Steven Lewis
13
14
// Unit headers
15
#include <
core/pose/PDBPoseMap.hh
>
16
#include <
core/pose/PDBInfo.hh
>
17
// AUTO-REMOVED #include <core/pose/Pose.hh>
18
19
// Utility headers
20
#include <basic/Tracer.hh>
21
#include <utility/exit.hh>
22
// AUTO-REMOVED #include <utility/vector1.hh>
23
24
// Project headers
25
26
// STL headers
27
#include <map>
28
29
#include <utility/vector1.hh>
30
31
32
namespace
core {
33
namespace
pose {
34
35
static
basic::Tracer
TR
(
"core.pose.PDBPoseMap"
);
36
37
38
/// @brief default constructor
39
PDBPoseMap::PDBPoseMap
() :
40
Super
()
41
{}
42
43
44
/// @brief PDBInfo constructor
45
PDBPoseMap::PDBPoseMap
(
PDBInfo
const
& info ) :
46
Super
()
47
{
48
fill
( info );
49
}
50
51
52
/// @brief copy constructor
53
PDBPoseMap::PDBPoseMap
(
PDBPoseMap
const
& map ) :
54
Super
( map ),
55
pdb2pose_( map.pdb2pose_ )
56
{}
57
58
59
/// @brief default destructor
60
PDBPoseMap::~PDBPoseMap
()
61
{}
62
63
64
/// @brief copy assignment
65
PDBPoseMap
&
66
PDBPoseMap::operator =
(
PDBPoseMap
const
& m )
67
{
68
if
(
this
!= &m ) {
69
pdb2pose_
= m.
pdb2pose_
;
70
}
71
return
*
this
;
72
}
73
74
75
/// @brief insert pdb -> pose number mapping
76
/// @param[in] chain chain id
77
/// @param[in] pdb_res pdb residue numbering
78
/// @param[in] ins_code insertion code, use ' ' if no insertion code
79
/// @param[in] pose_res pose numbering for residue
80
/// @remarks if the chain is equal to the PDBInfo's empty record character,
81
/// the insertion will be skipped
82
void
83
PDBPoseMap::insert
(
84
char
const
chain,
85
int
const
pdb_res,
86
char
const
ins_code,
87
Size
const
pose_res
88
)
89
{
90
if
( chain !=
PDBInfo::empty_record
() ) {
91
pdb2pose_
[
ResidueKey
( chain, pdb_res, ins_code ) ] = pose_res;
92
}
93
}
94
95
96
/// @brief fill with corresponding pdb -> pose residue mapping
97
/// @note does not clear any currently existing mapping data
98
void
99
PDBPoseMap::fill
(
PDBInfo
const
& info )
100
{
101
for
(
Size
i = 1; i <= info.
nres
(); ++i ) {
102
insert
( info.
chain
( i ), info.
number
( i ), info.
icode
( i ), i );
103
}
104
}
105
106
107
}
// pose
108
}
// core
Generated on Sat Jun 1 2013 11:34:25 for Rosetta 3.5 by
1.8.4