Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PairScoringScheme.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 PairScoringScheme.hh
11 /// @brief class definition for a given scoring scheme for an alignment.
12 /// @detailed Scoring scheme based on comparing sequence columns based on
13 /// the additive combination of several ScoringScheme objects.
14 /// @author James Thompson
15 
16 #ifndef INCLUDED_core_sequence_PairScoringScheme_hh
17 #define INCLUDED_core_sequence_PairScoringScheme_hh
18 
19 #include <core/types.hh>
23 
24 // AUTO-REMOVED #include <utility/vector1.hh>
25 
26 #include <utility/vector1_bool.hh>
27 
28 
29 namespace core {
30 namespace sequence {
31 
33 
34 public:
36  gap_open ( -4 );
37  gap_extend( -1 );
38  type("Pair");
39  }
40 
41  /// @brief ctor
43  Real gap_open_in,
44  Real gap_extend_in,
46  )
47  : pairs_( pairs )
48  {
49  gap_open( gap_open_in );
50  gap_extend( gap_extend_in );
51  type("Pair");
52  }
53 
55  // maybe clone the scoring_schemes() if object re-use ever causes a weird
56  // problem.
57  return new PairScoringScheme(
58  gap_open(),
59  gap_extend(),
60  pairs()
61  );
62  }
63 
65  return pairs_;
66  }
67 
69  core::Size const res1,
70  core::Size const res2,
71  core::Real const score
72  ) {
73  if ( pairs_.size() <= res1 ) {
74  pairs_.resize( res1 );
75  }
76 
77  if ( pairs_[res1].size() <= res2 ) {
78  pairs_[res1].resize( res2 );
79  }
80 
81  pairs_[res1][res2] = score;
82  }
83 
84  /// @brief dtor
85  virtual ~PairScoringScheme() {}
86 
87  virtual void read_from_file( utility::file::FileName const & fn );
88 
89  virtual Real score(
90  SequenceOP seq1,
91  SequenceOP seq2,
92  core::Size pos1,
93  core::Size pos2
94  );
95 
96 private:
98 }; // class PairScoringScheme
99 
100 } // sequence
101 } // core
102 
103 #endif