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
protocols
hybridization
TemplateHistory.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
// This file is part of the Rosetta software suite and is made available under license.
5
// The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6
// (C) 199x-2009 Rosetta Commons participating institutions and developers.
7
// For more information, see http://www.rosettacommons.org/.
8
9
/// @file TemplateHistory.cc
10
/// @brief
11
/// @author Frank DiMaio
12
13
// Unit headers
14
#include <
protocols/hybridization/TemplateHistory.hh
>
15
16
#include <utility/vector1.hh>
17
#include <utility/exit.hh>
18
#include <utility/tag/Tag.hh>
19
20
#include <basic/Tracer.hh>
21
#include <
core/pose/Pose.hh
>
22
#include <
core/pose/datacache/CacheableDataType.hh
>
23
#include <basic/datacache/BasicDataCache.hh>
24
25
namespace
protocols {
26
//namespace comparative_modeling {
27
namespace
hybridization {
28
29
static
basic::Tracer
TZ
(
"protocols.hybridization.TemplateHistory"
);
30
31
TemplateHistory::TemplateHistory
(
core::pose::Pose
&pose ) {
32
// initialize to identity mapping
33
core::Size
nres = pose.
total_residue
();
34
history_
.resize( nres , -1 );
35
}
36
37
int
38
TemplateHistory::get
(
core::Size
resid ){
39
if
( resid <=
history_
.size() )
40
return
history_
[resid];
41
else
42
return
-1;
43
}
44
45
void
46
TemplateHistory::setall
(
int
template_id ) {
47
for
(
core::Size
i=1; i<=
history_
.size(); ++i)
48
history_
[i] = template_id;
49
}
50
51
void
52
TemplateHistory::set
(
core::Size
start_res,
core::Size
stop_res,
int
template_id) {
53
runtime_assert( stop_res<=
history_
.size() );
54
for
(
core::Size
i=start_res; i<=stop_res; ++i)
55
history_
[i] = template_id;
56
}
57
58
}
59
//}
60
}
Generated on Sat Jun 1 2013 11:53:59 for Rosetta 3.5 by
1.8.4