bpp-seq3  3.0.0
AASEASup30Index.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_AASEASUP30INDEX_H
6 #define BPP_SEQ_ALPHABETINDEX_AASEASUP30INDEX_H
7 
8 
9 #include "../Alphabet/AlphabetTools.h"
10 #include "../Alphabet/ProteicAlphabet.h"
11 #include "AlphabetIndex1.h"
12 
13 namespace bpp
14 {
22 {
23 private:
24  std::vector<double> seaSup30_;
25 
26 public:
29  seaSup30_()
30  {
31  seaSup30_.resize(20);
32  seaSup30_[ 0] = 0.48; // A
33  seaSup30_[ 1] = 0.84; // R
34  seaSup30_[ 2] = 0.82; // N
35  seaSup30_[ 3] = 0.81; // D
36  seaSup30_[ 4] = 0.32; // C
37  seaSup30_[ 5] = 0.81; // Q
38  seaSup30_[ 6] = 0.93; // E
39  seaSup30_[ 7] = 0.51; // G
40  seaSup30_[ 8] = 0.66; // H
41  seaSup30_[ 9] = 0.39; // I
42  seaSup30_[10] = 0.41; // L
43  seaSup30_[11] = 0.93; // K
44  seaSup30_[12] = 0.44; // M
45  seaSup30_[13] = 0.42; // F
46  seaSup30_[14] = 0.78; // P
47  seaSup30_[15] = 0.70; // S
48  seaSup30_[16] = 0.71; // T
49  seaSup30_[17] = 0.49; // W
50  seaSup30_[18] = 0.67; // Y
51  seaSup30_[19] = 0.40; // V
52  }
53 
54  virtual ~AASEASup30Index() {}
55 
56  AASEASup30Index* clone() const override { return new AASEASup30Index(); }
57 
58 public:
59  double getIndex(int state) const override
60  {
61  return seaSup30_[getAlphabet()->getStateIndex(state) - 1];
62  }
63 
64  double getIndex(const std::string& state) const override
65  {
66  return seaSup30_[getAlphabet()->getStateIndex(state) - 1];
67  }
68 
69  const std::vector<double>& indexVector() const override { return seaSup30_; }
70 };
71 } // end of namespace bpp.
72 #endif // BPP_SEQ_ALPHABETINDEX_AASEASUP30INDEX_H
Percentage of amino acids having a Solvent Exposed Area above 30 Angström^2 for each type of amino a...
double getIndex(const std::string &state) const override
Get the index associated to a state.
double getIndex(int state) const override
Get the index associated to a state.
std::vector< double > seaSup30_
AASEASup30Index * clone() const override
const std::vector< double > & indexVector() const override
std::shared_ptr< const Alphabet > getAlphabet() const override
Get the alphabet associated to this index.
This alphabet is used to deal NumericAlphabet.