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
scores
FragmentScoringMethod.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/scores/FragmentScoringMethod.hh
11
/// @brief a base class for fragment scoring
12
/// @author Dominik Gront (dgront@chem.uw.edu.pl)
13
14
#ifndef INCLUDED_protocols_frag_picker_scores_FragmentScoringMethod_hh
15
#define INCLUDED_protocols_frag_picker_scores_FragmentScoringMethod_hh
16
17
// type headers
18
#include <
core/types.hh
>
19
#include <utility/pointer/ReferenceCount.hh>
20
21
// package headers
22
#include <
protocols/frag_picker/FragmentPicker.fwd.hh
>
23
#include <
protocols/frag_picker/scores/FragmentScoringMethod.fwd.hh
>
24
#include <
protocols/frag_picker/FragmentCandidate.fwd.hh
>
25
#include <
protocols/frag_picker/scores/FragmentScoreMap.fwd.hh
>
26
27
#include <string>
28
29
namespace
protocols {
30
namespace
frag_picker {
31
namespace
scores {
32
33
using namespace
core;
34
35
/// @brief a fragment candidate score
36
class
FragmentScoringMethod
:
public
utility::pointer::ReferenceCount
{
37
public
:
38
39
FragmentScoringMethod
(
Size
priority,
Real
lowest_acceptable_value,
40
bool
use_lowest,
std::string
name) {
41
priority_ = priority;
42
name_ = name;
43
lowest_acceptable_value_ = lowest_acceptable_value;
44
use_lowest_ = use_lowest;
45
}
46
47
virtual
bool
score(
FragmentCandidateOP
,
FragmentScoreMapOP
) =0;
48
49
/// @brief Returns a name of this scoring method
50
inline
std::string
&
get_score_name
() {
51
return
name_;
52
}
53
54
/// @brief Returns an integer index assigned to this scoring method by a scoring manager
55
inline
Size
get_id
() {
56
return
id_;
57
}
58
59
/// @brief Sets a new integer index for this scoring method.
60
/// @detailed the method should be called only by a scoring manager
61
inline
void
set_id
(
Size
id
) {
62
id_ = id;
63
}
64
65
/// @brief Returns a priority of this scoring method.
66
/// @detailed The higher the priority, the earlier a given scoring method is evaluated
67
inline
Size
get_priority
() {
68
return
priority_;
69
}
70
71
/// @brief Returns the lowest acceptable score value for this scoring method.
72
/// @detailed Fragments that are below the threshold will be discarded
73
inline
Real
get_min_allowed_score
() {
74
return
lowest_acceptable_value_;
75
}
76
77
/// @brief Returns the boolean choice on using the above lowest acceptable score value.
78
/// @detailed False means there is no lowest acceptable score
79
inline
bool
get_use_lowest
() {
80
return
use_lowest_;
81
}
82
83
/// @brief Sets a new value of the lowest acceptable score
84
/// @detailed Fragments that are below the threshold will be discarded
85
inline
void
set_min_allowed_score
(
Real
lowest_acceptable_value) {
86
lowest_acceptable_value_ = lowest_acceptable_value;
87
}
88
89
protected
:
90
Size
id_
;
91
Size
priority_
;
92
std::string
name_
;
93
Real
lowest_acceptable_value_
;
94
bool
use_lowest_
;
95
};
96
97
/// @brief a fragment candidate
98
class
MakeFragmentScoringMethod
:
public
utility::pointer::ReferenceCount
{
99
public
:
100
MakeFragmentScoringMethod
(
std::string
name) :
101
name_(name) {
102
}
103
104
virtual
FragmentScoringMethodOP
make(
Size
,
Real
,
bool
,
FragmentPickerOP
,
105
std::string
) =0;
106
107
inline
std::string
&
get_score_name
() {
108
return
name_;
109
}
110
111
private
:
112
std::string
name_
;
113
};
114
115
}
// scores
116
}
// frag_picker
117
}
// protocols
118
119
120
#endif
/* INCLUDED_protocols_frag_picker_scores_FragmentScoringMethod_HH */
Generated on Sat Jun 1 2013 11:52:46 for Rosetta 3.5 by
1.8.4