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
match
output
UpstreamHitCacher.hh
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
// :noTabs=false:tabSize=4:indentSize=4:
4
//
5
// (c) Copyright Rosetta Commons Member Institutions.
6
// (c) This file is part of the Rosetta software suite and is made available under license.
7
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10
11
/// @file protocols/match/output/UpstreamHitCacher.hh
12
/// @brief Declaration for class to cache and recall the conformations of upstream hits.
13
/// @author Alex Zanghellini (zanghell@u.washington.edu)
14
/// @author Andrew Leaver-Fay (aleaverfay@gmail.com), porting to mini
15
16
#ifndef INCLUDED_protocols_match_output_UpstreamHitCacher_hh
17
#define INCLUDED_protocols_match_output_UpstreamHitCacher_hh
18
19
// Unit headers
20
#include <
protocols/match/output/UpstreamHitCacher.fwd.hh
>
21
22
// Package headers
23
#include <
protocols/match/Hit.fwd.hh
>
24
#include <
protocols/match/Matcher.fwd.hh
>
25
#include <
protocols/match/upstream/UpstreamBuilder.hh
>
26
27
// Utility headers
28
#include <utility/pointer/ReferenceCount.hh>
29
#ifdef WIN32
30
#include <utility/OrderedTuple.hh>
31
#include <utility/vector1.hh>
32
#endif
33
34
// C++ headers
35
#include <map>
36
37
#include <utility/OrderedTuple.fwd.hh>
38
#include <utility/vector1_bool.hh>
39
40
41
namespace
protocols {
42
namespace
match
{
43
namespace
output {
44
45
class
UpstreamHitCacher
:
public
upstream::UpstreamResidueProcessor
{
46
public
:
47
48
typedef
utility::fixedsizearray1< Size, 2 >
ScaffoldRotamerPair
;
49
typedef
utility::OrderedTuple< ScaffoldRotamerPair >
ScaffoldRotamerTuple
;
50
51
public
:
52
UpstreamHitCacher
(
MatcherCOP
matcher );
53
virtual
~UpstreamHitCacher
();
54
55
void
56
set_cache_size
(
Size
n_rotamers_to_cache );
57
58
core::conformation::ResidueCOP
59
upstream_conformation_for_hit
(
Size
geometric_constraint_id,
Hit
const
& hit );
60
61
public
:
62
63
/// @brief The method by which the UpstreamHitCacher communicates with the UpstreamBuilders.
64
/// CAUTION: this class should not be handed to an UpstreamBuilder directly. It should only
65
/// hand itself to an UpstreamBuilder. Ask the UpstreamHitCacher for a particular hit, and it
66
/// will call recover_rotamer() on the upstream builder; it's doing bookkeeping in the background
67
/// and that bookkeeping is important for the success of this function.
68
virtual
69
void
70
process_hit
(
71
Hit
const
& hit,
72
core::conformation::Residue
const
& upstream_conformation
73
);
74
75
76
private
:
77
78
/// @brief Allocate space in the arrays dependent on n_geometric_constraints_ and
79
/// n_confs_to_cache_.
80
void
81
resize_arrays
();
82
83
/// @brief Returns 0 if the scaffold/rotamer pair is not already in the queue, and
84
/// the non-zero index in the queue if it is.
85
Size
86
already_in_queue
(
Size
cst_id,
ScaffoldRotamerTuple
const
& rotid )
const
;
87
88
/// @brief Construct the rotamer for the requested scaffold/rotamer pair and
89
/// put it into the queue, evicting the previous queue resident if necessary.
90
Size
91
fetch
(
Size
cst_id,
ScaffoldRotamerTuple
const
& rotid );
92
93
private
:
94
MatcherCOP
matcher_
;
95
96
Size
n_geometric_constraints_
;
97
Size
n_confs_to_cache_
;
98
99
utility::vector1< std::map< ScaffoldRotamerTuple, Size >
>
index_for_rotamer_
;
100
101
Size
which_cst_being_processed_
;
102
103
utility::vector1< Size >
queue_head_
;
104
utility::vector1< utility::vector1< ScaffoldRotamerTuple >
>
scafrot_pair_for_conf_
;
105
utility::vector1< utility::vector1< core::conformation::ResidueCOP >
>
upstream_confs_
;
106
107
};
108
109
}
110
}
111
}
112
113
#endif
Generated on Sat Jun 1 2013 11:59:48 for Rosetta 3.5 by
1.8.4