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
frag_picker
quota
QuotaSelector.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
//
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 protocols/frag_picker/quota/QuotaSelector.hh
11
/// @brief provides a selector that picks best fragments based on their total score
12
/// @author Dominik Gront (dgront@chem.uw.edu.pl)
13
14
#ifndef INCLUDED_protocols_frag_picker_quota_QuotaSelector_hh
15
#define INCLUDED_protocols_frag_picker_quota_QuotaSelector_hh
16
17
#include <
protocols/frag_picker/quota/QuotaSelector.fwd.hh
>
18
#include <
protocols/frag_picker/quota/QuotaCollector.hh
>
19
#include <
protocols/frag_picker/quota/QuotaPool.hh
>
20
21
#include <
protocols/frag_picker/FragmentSelectingRule.hh
>
22
23
// package headers
24
// AUTO-REMOVED #include <protocols/frag_picker/CommonFragmentComparators.hh>
25
#include <
protocols/frag_picker/FragmentCandidate.hh
>
26
#include <
protocols/frag_picker/scores/FragmentScoreMap.fwd.hh
>
27
28
// utility headers
29
#include <
core/types.hh
>
30
31
// C++ headers
32
#include <set>
33
34
#include <utility/vector1.hh>
35
36
37
namespace
protocols {
38
namespace
frag_picker {
39
namespace
quota {
40
41
/// @brief selects a given number of fragments using a quota scheme
42
class
QuotaSelector
:
public
FragmentSelectingRule
{
43
public
:
44
45
/// @brief Constructor sets the desired number of fragments.
46
QuotaSelector
(
Size
,
Size
,
QuotaCollectorOP
);
47
48
virtual
~QuotaSelector
() {
49
}
50
51
/// @brief Selects desired number of fragments from a given candidates
52
virtual
void
select_fragments
(
53
ScoredCandidatesVector1
const
& in,
54
ScoredCandidatesVector1
& out)
55
{
56
select_fragments_25_200
(in,out);
57
}
58
59
protected
:
60
QuotaCollectorOP
collector_
;
61
Size
q_pos_
;
62
inline
Size
round
(
Real
x) {
return
Size
(x > 0.0 ? x + 0.5 : x - 0.5); }
63
64
Size
next_from_pool
(
65
ScoredCandidatesVector1
const
&,
66
Size
recently_taken,
67
std::set<Size> & in_use
68
);
69
70
void
push_the_limits
(
utility::vector1<Size>
& q_limits,
Size
target_total);
71
72
void
push_the_limits_to_the_winner
(
utility::vector1<Size>
& q_limits,
Size
target_total);
73
74
void
push_the_limits
(
utility::vector1<Size>
&,
Size
,
utility::vector1<Real>
&);
75
76
virtual
void
select_fragments_200
(
77
ScoredCandidatesVector1
const
& in,
78
ScoredCandidatesVector1
& out);
79
80
virtual
void
select_fragments_25_200
(
81
ScoredCandidatesVector1
const
& in,
82
ScoredCandidatesVector1
& out);
83
private
:
84
utility::vector1<std::string>
tags_
;
85
std::map<std::string,Size>
tag_map_
;
86
};
87
88
}
// quota
89
}
// frag_picker
90
}
// protocols
91
92
93
#endif
/* INCLUDED_protocols_frag_picker_quota_QuotaSelector_HH */
Generated on Sat Jun 1 2013 11:52:34 for Rosetta 3.5 by
1.8.4