BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
addHydrogenProcessor.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_ADDHYDROGENPROCESSOR_H
6 #define BALL_STRUCTURE_ADDHYDROGENPROCESSOR_H
7 
8 #ifndef BALL_CONCEPT_PROCESSOR_H
10 #endif
11 
12 #ifndef BALL_MATHS_VECTOR3_H
13 #include <BALL/MATHS/vector3.h>
14 #endif
15 
16 #include <vector>
17 
18 namespace BALL
19 {
20  class Residue;
21  class Atom;
22  class Composite;
23 
59  : public UnaryProcessor<Composite>
60  {
61 
62  public:
63 
66 
68  virtual ~AddHydrogenProcessor();
69 
77  virtual bool start();
78 
89  virtual Processor::Result operator() (Composite &composite);
90 
101  Size getConnectivity(const Atom& atom) const;
102 
110  void setRings(const vector<vector<Atom*> >& rings);
111 
118  Size getNumberOfAddedHydrogens() const { return nr_hydrogens_;}
119 
120  protected:
126  Processor::Result placePeptideBondH_(Residue* res);
127 
134  Size countBondOrders(const Atom& atom) const;
135 
142  void addHydrogen_(Atom& atom, Vector3 position);
143 
151  bool isRingAtom_(const Atom& atom) const;
152 
159  vector<Atom*> getPartners_(Atom& atom) const;
160 
168  Vector3 getNormal_(const Vector3& v) const;
169 
176  bool normalize_(Vector3& v) const;
177 
184  bool hasMultipleBond_(const Atom& atom) const;
185 
193  float getBondLength_(Position element) const;
194 
195  private:
196  HashSet<const Atom*> ring_atoms_;
197  Position atom_nr_;
198  Atom* last_atom_;
199  Size nr_hydrogens_;
200  }; //class AddHydrogenProcessor
201 
202 } //namespace BALL
203 
204 #endif // BALL_STRUCTURE_ADDHYDROGENPROCESSOR_H
char Atom[5]
Definition: PDBdefs.h:257
#define BALL_EXPORT
Definition: COMMON/global.h:50