Victor
 All Data Structures Functions Variables Friends Pages
VGPFunction.h
1 /* This file is part of Victor.
2 
3  Victor is free software: you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation, either version 3 of the License, or
6  (at your option) any later version.
7 
8  Victor is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with Victor. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 
18 #ifndef __VGPFunction_H__
19 #define __VGPFunction_H__
20 
21 #include <GapFunction.h>
22 #include <PdbLoader.h>
23 #include <SolvExpos.h>
24 #include <Spacer.h>
25 #include <vector3.h>
26 #include <math.h>
27 
28 namespace Victor { namespace Align2{
29 
42  class VGPFunction : public GapFunction {
43  public:
44 
45  // CONSTRUCTORS:
46 
48  VGPFunction(string pdbFileName, string chainID);
49 
51  VGPFunction(string pdbFileName, string chainID, double o, double e, unsigned int extType,
52  double wH, double wS, double wB, double wC, double wD);
53 
55  VGPFunction(const VGPFunction &orig);
56 
58  virtual ~VGPFunction();
59 
60 
61  // OPERATORS:
62 
64  VGPFunction& operator =(const VGPFunction &orig);
65 
66 
67  // PREDICATES:
68 
70  virtual double getOpenPenalty(int p);
71 
73  virtual double getExtensionPenalty(int p);
74 
75 
76  // MODIFIERS:
77 
79  virtual void copy(const VGPFunction &orig);
80 
82  virtual VGPFunction* newCopy();
83 
85  virtual void setOpenPenalty(double pen);
86 
88  virtual void setExtensionPenalty(double pen);
89 
90 
91  // HELPERS:
92 
94  void pExtractPdbInfo(string pdbFileName, string chainID);
95 
96 
97  protected:
98 
99 
100  private:
101 
102  // ATTRIBUTES:
103 
104  double o;
105  double e;
106  unsigned int extType;
107  unsigned int extCounter;
108  vector<double> hContent;
109  vector<double> sContent;
110  vector<double> solvAccess;
111  vector<double> bbStraight;
112  vector<double> spaceProx;
113  double wH;
114  double wS;
115  double wB;
116  double wC;
117  double wD;
118 
119  };
120 
121  // -----------------------------------------------------------------------------
122  // VGPFunction
123  // -----------------------------------------------------------------------------
124 
125  // MODIFIERS:
126 
127  inline void
129  o = pen;
130  }
131 
132  inline void
134  e = pen;
135  }
136 
137 }} // namespace
138 
139 #endif
Implement VGP (Variable Gap Penalty) function.
Definition: VGPFunction.h:42
virtual double getExtensionPenalty(int p)
Return extension gap penalty for template position p.
Definition: VGPFunction.cc:123
Base class for gap functions.
Definition: GapFunction.h:31
virtual void setExtensionPenalty(double pen)
Set extension gap penalty.
Definition: VGPFunction.h:133
virtual ~VGPFunction()
Destructor.
Definition: VGPFunction.cc:73
virtual void setOpenPenalty(double pen)
Set open gap penalty.
Definition: VGPFunction.h:128
VGPFunction & operator=(const VGPFunction &orig)
Assignment operator.
Definition: VGPFunction.cc:84
virtual double getOpenPenalty(int p)
Return open gap penalty for template position p.
Definition: VGPFunction.cc:99
void pExtractPdbInfo(string pdbFileName, string chainID)
Extract structural infos from PDB template file.
Definition: VGPFunction.cc:191
VGPFunction(string pdbFileName, string chainID)
Default constructor.
Definition: VGPFunction.cc:45
virtual VGPFunction * newCopy()
Construct a new "deep copy" of this object.
Definition: VGPFunction.cc:178
virtual void copy(const VGPFunction &orig)
Copy orig object to this object ("deep copy").
Definition: VGPFunction.cc:144