BALL 1.5.0
Loading...
Searching...
No Matches
HBondProcessor.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_HBONDPROCESSOR_H
6#define BALL_STRUCTURE_HBONDPROCESSOR_H
7
8#ifndef BALL_CONCEPT_PROCESSOR_H
10#endif
11
12#ifndef BALL_KERNEL_RESIDUE_H
13#include <BALL/KERNEL/residue.h>
14#endif
15
16#ifndef BALL_MATHS_VECTOR3_H
17#include <BALL/MATHS/vector3.h>
18#endif
19
20#ifndef BALL_DATATYPE_OPTIONS_H
22#endif
23
24#include <vector>
25#include <map>
26
27namespace BALL
28{
99 : public UnaryProcessor<Composite>
100 {
101
102 public:
103
107
111 {
112 public:
114 HBond(Atom const* acceptor, Atom const* donor, bool donor_is_hydrogen=false)
115 {acceptor_ = acceptor; donor_ = donor; donor_is_hydrogen_ = donor_is_hydrogen;}
116 Atom const* getAcceptor() { return acceptor_; }
117 Atom const* getDonor() { return donor_; }
118
120 bool donorIsHydrogen() { return donor_is_hydrogen_; }
121
123 float getLength() { return acceptor_->getDistance(*donor_); }
124
125 // TODO: getAngle()? This is tricky as the DSSP works with implicit hydrogen positions
126
127 protected:
129 Atom const* donor_;
131 };
133
139 {
143
146 static const String ADD_HBONDS;
147
151 };
152
155 {
157 static const bool ADD_HBONDS;
158 static const float KABSCH_SANDER_ENERGY_CUTOFF;
159 };
160
163 {
164 static const String KABSCH_SANDER;
165 static const String WISHART_ET_AL;
166 };
167
168 // constants for Kabsch Sander
169 // 5.2 Angstrom is the maximum distance between N and O in a hydrogen bond.
170 // 4.2 Angstrom is an upper bound for the distance between N and O in the same
171 // residue. Therefore, if two residues are farther apart than MAX_LENGTH, N and O
172 // are farther apart than 5.2 Angstroms and there will be no hydrogen bond.
173 static float MAX_LENGTH;
174 static float BOND_LENGTH_N_H;
175 static float BOND_LENGTH_C_O;
176
177 // constants for Wishard et al
179 static float ALPHA_PROTON_OXYGEN_SEPARATION_DISTANCE; // = 2.77208;
180
193
195
198
201
203 HBondProcessor(Options& new_options);
204
207
209
210
213
216 virtual void init();
217
220 virtual bool start();
221
223 // computes the theoretical position of H
224 // and stores the residue information in residue_data_
225 //
227 virtual Processor::Result operator() (Composite &composite);
228
230 // to the chosen method <tt> PredictionMethod</tt>.
231 virtual bool finish();
232
234
238
240 const std::vector< HBond>& getHBonds() const {return h_bonds_;}
241
243 std::vector< HBond> getHBonds() {return h_bonds_;}
244
246 const std::vector< std::vector<Position> >& getBackboneHBondPattern() const;
247
249 const std::vector<ResidueData>& getResidueData() const;
250
252
258
263
264 protected:
265
269
270
274
275 //_ lower point of the grid
277 //_ upper point of the grid
279
280 //_ the atom positions and an accending number per residue
281 std::vector<ResidueData> residue_data_;
282
283 //_ the backbone hydrogen bonds for the secondary structure processor
284 std::vector<std::vector<Position> > backbone_h_bond_pairs_;
286
287
288
292
293 /*_ list of __ShiftX__ HBond donors collected by <tt>operator ()</tt>
294 */
295 std::vector<Atom*> donors_;
296
297 /*_ list of HBond acceptors collected by <tt>operator ()</tt>
298 */
299 std::vector<Atom*> acceptors_;
300
301 std::map< Residue*, Position> residue_ptr_to_position_;
303
307
309 std::vector<HBond> h_bonds_;
311
312 }; //class HBondProcessor
313} //namesspace BALL
314
315
316#endif // BALL_STRUCTURE_HBONDPROCESSOR_H
BidirectionalIterator< Composite, Residue, Composite::CompositeIterator, ResidueIteratorTraits > ResidueIterator
Computation of hydrogen bonds from topology information.
BALL_CREATE(HBondProcessor)
static float ALPHA_PROTON_OXYGEN_SEPARATION_DISTANCE
void preComputeBonds_(ResidueIterator &data)
static float BOND_LENGTH_C_O
std::vector< HBond > h_bonds_
store HBond
const std::vector< std::vector< Position > > & getBackboneHBondPattern() const
computes the HBond pattern as needed, e.g. by the SecondaryStructureProcessor
HBondProcessor()
Default constructor.
virtual bool start()
virtual void init()
std::vector< Atom * > acceptors_
static float AMIDE_PROTON_OXYGEN_SEPARATION_DISTANCE
std::vector< std::vector< Position > > backbone_h_bond_pairs_
HBondProcessor(Options &new_options)
Detailed constructor.
const std::vector< HBond > & getHBonds() const
std::vector< ResidueData > residue_data_
static float BOND_LENGTH_N_H
std::vector< Atom * > donors_
const std::vector< ResidueData > & getResidueData() const
std::map< Residue *, Position > residue_ptr_to_position_
Options options
options
std::vector< HBond > getHBonds()
virtual ~HBondProcessor()
virtual bool finish()
Finish computes all hbonds of the composite according.
float getLength()
Return distance between donor and acceptor.
HBond(Atom const *acceptor, Atom const *donor, bool donor_is_hydrogen=false)
bool donorIsHydrogen()
Return flag indicating what HBond definition was used.
static const String KABSCH_SANDER_ENERGY_CUTOFF
static const String ADD_HBONDS
static const String PREDICTION_METHOD
Default values for options.
static const String PREDICTION_METHOD
static const float KABSCH_SANDER_ENERGY_CUTOFF
bool is_complete
sometimes there are defect residues around...
#define BALL_EXPORT