BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
structureMapper.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_STRUCTURE_STRUCTUREMAPPER_H
6 #define BALL_STRUCTURE_STRUCTUREMAPPER_H
7 
8 #ifndef BALL_COMMON_H
9 # include <BALL/common.h>
10 #endif
11 
12 #ifndef BALL_CONCEPT_PROCESSOR_H
13 # include <BALL/CONCEPT/processor.h>
14 #endif
15 
16 #ifndef BALL_STRUCTURE_GEOMETRICTRANSFORMATIONS_H
18 #endif
19 
20 #ifndef BALL_DATATYPE_STRING_H
21 # include <BALL/DATATYPE/string.h>
22 #endif
23 
24 #ifndef BALL_KERNEL_PROTEIN_H
25 # include <BALL/KERNEL/protein.h>
26 #endif
27 
28 #ifndef BALL_KERNEL_ATOM_H
29 # include <BALL/KERNEL/atom.h>
30 #endif
31 
32 #ifndef BALL_MATHS_MATRIX44_H
33 # include <BALL/MATHS/matrix44.h>
34 #endif
35 
36 #ifndef BALL_STRUCTURE_ATOMBIJECTION_H
38 #endif
39 
40 #include <vector>
41 #include <map>
42 
43 namespace BALL
44 {
45 
51  {
52  public:
53 
57 
61 
65 
68  virtual ~StructureMapper();
69 
71 
74  void set(AtomContainer& A, AtomContainer& B);
75 
78  double calculateRMSD();
79 
82  double calculateRMSD(const AtomBijection& new_bijection);
83 
87  bool calculateTransformation();
88 
91  void calculateDefaultBijection(bool limit_to_selection = false);
92 
95  const AtomBijection& getBijection() const { return bijection_; }
96 
99  AtomBijection calculateFragmentBijection
100  (const vector<Fragment*>& A, const vector<Fragment*>& B);
101 
104  bool mapFragments
105  (const vector<Fragment*>& A, const vector<Fragment*>& B,
106  Matrix4x4* transformation, double upper_bound = 8.0, double lower_bound = 2.5);
107 
116  static Matrix4x4 matchPoints
117  (const Vector3& w1, const Vector3& w2, const Vector3& w3,
118  const Vector3& v1, const Vector3& v2, const Vector3& v3);
119 
122  static Matrix4x4 matchBackboneAtoms(const Residue& r1, const Residue& r2);
123 
126  Size mapResiduesByBackbone(const list<Residue*>& l1, const list<Residue*>& l2);
127 
130  vector<vector<Fragment*> >& searchPattern
131  (vector<Fragment*>& pattern, AtomContainer& composite,
132  double max_rmsd = 4.0, double max_center_tolerance = 2.0,
133  double upper_bound = 8.0, double lower_bound = 4.0);
134 
137  Matrix4x4 mapProteins
138  (Protein& P1, Protein& P2,
139  std::map<String, Size>& type_map,
140  Size& no_matched_ca,
141  double& rmsd,
142  double upper_bound = 8.0,
143  double lower_bound = 4.0,
144  double tolerance = 0.6);
145 
146  protected:
147  // Count the fragments in an AtomContainer -- this is not implemented
148  // in AtomContainer!
149  Size countFragments_(const AtomContainer& ac) const;
150 
151  /*_ The first of two composites - the "original"
152  */
154 
155  /*_ The second composites - the "copy" to be mapped
156  */
158 
159  /*_ The current atom bijection.
160  Required for the caclulation of the RMSD.
161  */
163 
164  /*_ The rmsd of the last mapping executed
165  */
166  double rmsd_;
167  };
168 
169 } // namespace BALL
170 
171 #endif // BALL_STRUCTURE_STRUCTUREMAPPER_H
172 
const AtomBijection & getBijection() const
#define BALL_EXPORT
Definition: COMMON/global.h:50
AtomBijection bijection_