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
PairScoringScheme.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
// (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 PairScoringScheme.cc
11
/// @author James Thompson
12
13
#include <
core/types.hh
>
14
#include <
core/sequence/Sequence.hh
>
15
#include <
core/sequence/PairScoringScheme.hh
>
16
17
#include <utility/exit.hh>
18
// AUTO-REMOVED #include <utility/vector1.hh>
19
#include <utility/file/FileName.fwd.hh>
20
21
#include <string>
22
23
#include <utility/vector1.hh>
24
25
26
namespace
core {
27
namespace
sequence {
28
29
void
PairScoringScheme::read_from_file
(
utility::file::FileName
const
&
/*fn*/
) {
30
utility_exit_with_message(
31
"PairScoringScheme::read_from_file method stubbed out!"
32
);
33
}
34
35
Real
PairScoringScheme::score
(
36
SequenceOP
seq1,
37
SequenceOP
seq2,
38
core::Size
pos1,
39
core::Size
pos2
40
) {
41
runtime_assert( pos1 <= seq1->length() );
42
runtime_assert( pos2 <= seq2->length() );
43
44
// looks unsafe, but isn't because of short-circuit operators.
45
if
( pos1 <=
pairs_
.size() && pos2 <=
pairs_
[pos1].size() ) {
46
return
pairs_
[pos1][pos2];
47
}
else
{
48
return
0.0;
49
}
50
}
51
52
}
// sequence
53
}
// core
Generated on Sat Jun 1 2013 11:40:22 for Rosetta 3.5 by
1.8.4