bpp-seq3  3.0.0
AAChouFasmanBSheetIndex.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_SEQ_ALPHABETINDEX_AACHOUFASMANBSHEETINDEX_H
6 #define BPP_SEQ_ALPHABETINDEX_AACHOUFASMANBSHEETINDEX_H
7 
8 
9 #include "AlphabetIndex1.h"
10 
11 namespace bpp
12 {
20 {
21 private:
22  std::vector<double> bSheet_;
23 
24 public:
27  bSheet_()
28  {
29  bSheet_.resize(20);
30  bSheet_[ 0] = 83; // A
31  bSheet_[ 1] = 93; // R
32  bSheet_[ 2] = 89; // N
33  bSheet_[ 3] = 54; // D
34  bSheet_[ 4] = 119; // C
35  bSheet_[ 5] = 110; // Q
36  bSheet_[ 6] = 37; // E
37  bSheet_[ 7] = 75; // G
38  bSheet_[ 8] = 87; // H
39  bSheet_[ 9] = 160; // I
40  bSheet_[10] = 130; // L
41  bSheet_[11] = 74; // K
42  bSheet_[12] = 105; // M
43  bSheet_[13] = 138; // F
44  bSheet_[14] = 55; // P
45  bSheet_[15] = 75; // S
46  bSheet_[16] = 119; // T
47  bSheet_[17] = 137; // W
48  bSheet_[18] = 147; // Y
49  bSheet_[19] = 170; // V
50  }
51 
53 
54  AAChouFasmanBSheetIndex* clone() const override
55  {
56  return new AAChouFasmanBSheetIndex();
57  }
58 
59 public:
60  double getIndex(int state) const override
61  {
62  return bSheet_[getAlphabet()->getStateIndex(state) - 1];
63  }
64 
65  double getIndex(const std::string& state) const override
66  {
67  return bSheet_[getAlphabet()->getStateIndex(state) - 1];
68  }
69 
70  const std::vector<double>& indexVector() const override { return bSheet_; }
71 };
72 } // end of namespace bpp.
73 #endif // BPP_SEQ_ALPHABETINDEX_AACHOUFASMANBSHEETINDEX_H
B-sheet score for the Chou-Fasman algorithm of secondary structure prediction, according to http://pr...
const std::vector< double > & indexVector() const override
double getIndex(const std::string &state) const override
Get the index associated to a state.
AAChouFasmanBSheetIndex * clone() const override
double getIndex(int state) const override
Get the index associated to a state.
std::shared_ptr< const Alphabet > getAlphabet() const override
Get the alphabet associated to this index.
This alphabet is used to deal NumericAlphabet.