Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SimpleScoringScheme.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 SimpleScoringScheme.cc
11 /// @brief class definition for a given scoring scheme for an alignment.
12 /// @detailed Scoring scheme based on comparing single characters from two sequences
13 /// with three types of score:
14 /// - score for a match (characters are equal)
15 /// - score for a mismatch (characters are not equal)
16 /// - affine gap penalties of the form penalty = A + Bk
17 /// @author James Thompson
18 
19 #include <core/types.hh>
20 
23 
24 #include <utility/exit.hh>
25 
26 // AUTO-REMOVED #include <iostream>
27 #include <string>
28 
29 #include <utility/vector1.hh>
30 
31 
32 namespace core {
33 namespace sequence {
34 
36  utility_exit_with_message( "SimpleScoringScheme::read_from_file method stubbed out!");
37  }
38 
40  return match_score_;
41  }
42 
44  return mismatch_score_;
45  }
46 
48  SequenceOP seq1, SequenceOP seq2,
49  core::Size pos1, core::Size pos2
50  ) {
51  runtime_assert( pos1 <= seq1->length() );
52  runtime_assert( pos2 <= seq2->length() );
53 
54  if ( (*seq1)[pos1] == (*seq2)[pos2] ) return match_score_;
55  else return mismatch_score_;
56  }
57 
58 } // sequence
59 } // core