Victor
 All Data Structures Functions Variables Friends Pages
StructuralAlignment.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 #ifndef _STRUCTURALALIGNMENT_H_
18 #define _STRUCTURALALIGNMENT_H_
19 
20 // Includes:
21 #include <string>
22 #include <vector>
23 #include <Debug.h>
24 #include <AlignmentBase.h>
25 #include <Spacer.h>
26 #include <vector3.h>
27 #include <matrix3.h>
28 using namespace Victor::Biopool;
29 
30 using namespace Victor;
31 using namespace std;
32 
33 namespace Victor { namespace Align2{
34 
40  struct EData {
41 
42  EData(unsigned int _o = 0, double _d = 0.0) : other(_o), dist(_d) {
43  }
44  unsigned int other;
45  double dist;
46  };
47 
48  struct FData {
49 
50  FData(unsigned int _mi = 0, unsigned int _ma = 0, double _d = 0.0) :
51  min(_mi), max(_ma), dist(_d) {
52  }
53  unsigned int min;
54  unsigned int max;
55  double dist;
56  };
57 
58  class StructuralAlignment : public AlignmentBase {
59  public:
60 
61  // CONSTRUCTORS/DESTRUCTOR:
62  StructuralAlignment();
63  StructuralAlignment(const StructuralAlignment& orig);
64  virtual ~StructuralAlignment();
65 
66  // PREDICATES:
67 
68  Spacer& getTarget() {
69  return spTarget;
70  }
71 
72  Spacer& getTemplate() {
73  return spTemplate;
74  }
75 
76  // MODIFIERS:
77 
78  void setTarget(Spacer& sp) {
79  spTarget = sp;
80  }
81 
82  void setTemplate(Spacer& sp) {
83  spTemplate = sp;
84  }
85 
86  void loadCE(istream& input, Spacer& spNew);
87  void buildEquivalenceNetwork();
88  void buildFragmentNetwork(double maxDist = 4.0);
89  // maximum CA distance for "equivalence"
90  void writeData(double maxDist = 4.0);
91  virtual void copy(const StructuralAlignment& orig);
92 
93  // OPERATORS:
94 
95  protected:
96 
97  private:
98 
99  // HELPERS:
100 
101  void pExecStructAli(vgMatrix3<double> rot, vgVector3<double> trans);
102 
103  // ATTRIBUTES:
104  Spacer spTarget;
105  Spacer spTemplate;
106 
107  public:
108  vector<EData> equivData;
109  vector<FData> fragData;
110 
111  };
112 
113 }} // namespace
114 
115 #endif //_STRUCTURALALIGNMENT_H_
Class for structural alignments.
Definition: StructuralAlignment.h:40
Implements a "Spacer" for a protein chain. Includes methods to obtain values from the atoms and its p...
Definition: Spacer.h:42