bpp-seq3  3.0.0
AASurfaceIndex.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_AASURFACEINDEX_H
6 #define BPP_SEQ_ALPHABETINDEX_AASURFACEINDEX_H
7 
8 
9 #include "../Alphabet/AlphabetTools.h"
10 #include "../Alphabet/ProteicAlphabet.h"
11 #include "AlphabetIndex1.h"
12 
13 namespace bpp
14 {
21 {
22 private:
23  std::vector<double> surface_;
24 
25 public:
28  surface_()
29  {
30  surface_.resize(20);
31  surface_[ 0] = 115; // A
32  surface_[ 1] = 225; // R
33  surface_[ 2] = 160; // N
34  surface_[ 3] = 150; // D
35  surface_[ 4] = 135; // C
36  surface_[ 5] = 180; // Q
37  surface_[ 6] = 190; // E
38  surface_[ 7] = 75; // G
39  surface_[ 8] = 195; // H
40  surface_[ 9] = 175; // I
41  surface_[10] = 170; // L
42  surface_[11] = 200; // K
43  surface_[12] = 185; // M
44  surface_[13] = 210; // F
45  surface_[14] = 145; // P
46  surface_[15] = 115; // S
47  surface_[16] = 140; // T
48  surface_[17] = 255; // W
49  surface_[18] = 230; // Y
50  surface_[19] = 155; // V
51  }
52 
53  virtual ~AASurfaceIndex() {}
54 
55  AASurfaceIndex* clone() const override { return new AASurfaceIndex(); }
56 
57 public:
58  double getIndex(int state) const override
59  {
60  return surface_[getAlphabet()->getStateIndex(state) - 1];
61  }
62 
63  double getIndex(const std::string& state) const override
64  {
65  return surface_[getAlphabet()->getStateIndex(state) - 1];
66  }
67 
68  const std::vector<double>& indexVector() const override { return surface_; }
69 };
70 } // end of namespace bpp.
71 #endif // BPP_SEQ_ALPHABETINDEX_AASURFACEINDEX_H
Surface (Angström^2) of each amino acid, according to http://www.imb-jena.de/IMAGE_AA....
AASurfaceIndex * clone() const override
virtual ~AASurfaceIndex()
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 > surface_
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.