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
sequence
ScoringScheme.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 ScoringScheme.hh
11
/// @brief abstract base class for representing scoring schemes for alignments.
12
/// @detailed ScoringScheme objects contain two scoring rules:
13
/// - a rule for comparing any character from a sequence to a gap character (usually
14
/// liste as gap insertion and gap extension, or d and e)
15
/// - a rule for scoring two elements from a sequence (simply S)
16
/// Generally the rule for scoring gaps is composed of a gap insertion and a gap
17
/// extension parameter. It's important to note that alignments derived using
18
/// the ScoringScheme and Aligner objects are only guaranteed to be optimal if
19
/// every element of S is bigger than -2 * e.
20
/// @author James Thompson
21
22
#ifndef INCLUDED_core_sequence_ScoringScheme_hh
23
#define INCLUDED_core_sequence_ScoringScheme_hh
24
25
// Unit headers
26
#include <
core/sequence/ScoringScheme.fwd.hh
>
27
28
#include <
core/types.hh
>
29
#include <
core/sequence/Sequence.fwd.hh
>
30
31
// AUTO-REMOVED #include <utility/exit.hh>
32
#include <utility/io/izstream.fwd.hh>
33
#include <utility/file/FileName.fwd.hh>
34
#include <utility/pointer/ReferenceCount.hh>
35
36
#include <string>
37
38
namespace
core {
39
namespace
sequence {
40
41
class
ScoringScheme
:
public
utility::pointer::ReferenceCount
{
42
43
public
:
44
45
/// @brief ctor
46
ScoringScheme
();
47
48
/// @brief dtor
49
virtual
~ScoringScheme
();
50
51
/// @brief clone method.
52
virtual
ScoringSchemeOP
clone
()
const
= 0;
53
54
/// @brief Initialize from a file.
55
virtual
void
read_from_file
(
utility::file::FileName
const
&
/*fn*/
);
56
57
virtual
void
read_data
( utility::io::izstream &
/*input*/
);
58
59
/// @brief Gets the gap opening penalty.
60
virtual
Real
gap_open
()
const
;
61
62
/// @brief Gets the gap extension penalty.
63
virtual
Real
gap_extend
()
const
;
64
65
/// @brief Sets the gap opening penalty.
66
void
gap_open
(
Real
const
gap_open );
67
68
/// @brief Sets the gap extension penalty.
69
void
gap_extend
(
Real
const
gap_extend );
70
71
/// @brief getters for type, which is a unique string name for this object.
72
std::string
type
()
const
;
73
74
/// @brief getters for type, which is a unique string name for this object.
75
void
type
(
std::string
new_type );
76
77
virtual
Real
score
(
78
SequenceOP
seq1,
79
SequenceOP
seq2,
80
Size
pos1,
81
Size
pos2
82
) = 0;
83
84
/// @brief Utility method for producing useful error messages and exiting
85
/// from program. Declared const which is funny, because exiting the program
86
/// certainly changes the state of this object! This might be replaced with
87
/// exception handling if we ever start using those.
88
void
unimplemented_method_error
(
std::string
const
& method_name )
const
;
89
90
bool
is_good
(
91
Real
const
& num
92
);
93
94
private
:
95
Real
gap_open_
;
96
Real
gap_extend_
;
97
std::string
type_
;
98
};
// class ScoringScheme
99
100
}
// sequence
101
}
// core
102
103
#endif
Generated on Sat Jun 1 2013 11:40:22 for Rosetta 3.5 by
1.8.4