BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
residueChecker.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_RESIDUECHECKER_H
6 #define BALL_STRUCTURE_RESIDUECHECKER_H
7 
8 #ifndef BALL_MATHS_COMMON_H
9 # include <BALL/MATHS/common.h>
10 #endif
11 
12 #ifndef BALL_COMMON_H
13 # include <BALL/common.h>
14 #endif
15 
16 #ifndef BALL_CONCEPT_PROCESSOR_H
17 # include <BALL/CONCEPT/processor.h>
18 #endif
19 
20 #ifndef BALL_DATATYPE_BITVECTOR_H
21 # include <BALL/DATATYPE/bitVector.h>
22 #endif
23 
24 namespace BALL
25 {
26  class FragmentDB;
27  class Residue;
28 
127  : public UnaryProcessor<Residue>
128  {
129  public:
130 
132 
133 
136 
137 
141  enum TestType
142  {
144  MISSING_ATOMS = 0,
167 
168  NUMBER_OF_TESTS
169  };
171 
175 
178  ResidueChecker();
179 
182  ResidueChecker(FragmentDB& fragment_db);
183 
186  ResidueChecker(const ResidueChecker& residue_checker);
187 
190  virtual ~ResidueChecker();
192 
196 
199  void enable(TestType t, bool enable = true) ;
200 
203  void disable(TestType t) ;
204 
207  void enableSelection() { selection_ = true; }
208 
211  void disableSelection() { selection_ = false; }
212 
215  bool isSelectionEnabled() { return selection_; }
216 
222  bool getStatus() const;
223 
224 
225 
228  bool isEnabled(TestType t) const ;
230 
234 
237  Processor::Result operator () (Residue& residue);
238 
241  bool start();
242 
245  bool finish();
246 
248 
254  bool checkAtomPositions(const Residue& res, const String& res_name)
255  ;
256 
259  bool checkCharge(const Residue& res, const String& res_name)
260  ;
261 
264  bool checkCompleteness(const Residue& res, const Residue& reference, const String& res_name)
265  ;
266 
269  bool checkTemplate(const Residue& res, const Residue& reference, const String& res_name)
270  ;
271 
273 
274  protected:
275 
276  // The fragment database
278 
279  // Bool flag indicating whether any of the tests failed
280  bool status_;
281 
282  // A bitvector containing the flags for the tests
284 
285  // If this flag is set, all atoms/residues having problems will be selected
287  };
288 
289 } // namespace BALL
290 
291 #endif // BALL_STRUCTURE_RESIDUE_CHECKER
#define BALL_CREATE(name)
Definition: create.h:62
FragmentDB * fragment_db_
#define BALL_EXPORT
Definition: COMMON/global.h:50