BALL 1.5.0
Loading...
Searching...
No Matches
geometricProperties.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_GEOMETRICPROPERTIES_H
6#define BALL_STRUCTURE_GEOMETRICPROPERTIES_H
7
8#ifndef BALL_COMMON_H
9# include <BALL/common.h>
10#endif
11
12#ifndef BALL_MATHS_VECTOR3_H
13# include <BALL/MATHS/vector3.h>
14#endif
15
16#ifndef BALL_MATHS_SIMPLEBOX3_H
18#endif
19
20#ifndef BALL_KERNEL_ATOM_H
21# include <BALL/KERNEL/atom.h>
22#endif
23
24#ifndef BALL_KERNEL_FRAGMENT_H
25# include <BALL/KERNEL/fragment.h>
26#endif
27
28#ifndef BALL_CONCEPT_PROCESSOR_H
30#endif
31
32#ifndef BALL_DATATYPE_STRING_H
33# include <BALL/DATATYPE/string.h>
34#endif
35
36#include <vector>
37
38namespace BALL
39{
40
57 : public ConstUnaryProcessor<Atom>
58 {
59 public:
60
64
73 virtual bool start();
74
82 virtual bool finish();
83
89 virtual Processor::Result operator () (const Atom& atom)
90 { return operator() (atom.getPosition());}
91
95 virtual Processor::Result operator () (const Vector3& v);
96
97
99
102
106
109 const Vector3& getLower() const;
110
113 const Vector3& getUpper() const;
114
116
117 private:
118
119 Vector3 lower_;
120 Vector3 upper_;
121 };
122
134 : public ConstUnaryProcessor<Atom>
135 {
136 public:
137
141
144 virtual bool start()
145 ;
146
149 virtual bool finish()
150 ;
151
154 virtual Processor::Result operator()(const Atom& atom)
155 { return operator()(atom.getPosition());}
156
160 ;
161
163
166
170 ;
171
173
174 private:
175
176 Vector3 center_;
177 Size n_;
178 };
179
180
199 : public ConstUnaryProcessor<Composite>
200 {
201 public:
202
206
210 ;
211
217 ;
218
224 FragmentDistanceCollector(const Composite& composite, float distance)
225 ;
226
228
229 {}
230
232
235
238 virtual bool start()
239 ;
240
243 virtual bool finish()
244 ;
245
248 virtual Processor::Result operator()(const Composite& composite);
249
251
254
259 ;
260
264 void setComposite(const Composite& composite)
265 ;
266
270 const Composite* getComposite() const
271 ;
272
276 float getDistance() const
277 ;
278
282 void setDistance(float distance)
283 ;
284
286
289 std::vector<const Fragment*> fragments;
290
291
292 protected:
293
294 std::vector<const Fragment*> all_fragments_;
297 };
298
299
301
305
309 BALL_EXPORT Angle calculateTorsionAngle(const Atom& a1, const Atom& a2, const Atom& a3, const Atom& a4);
310
319 BALL_EXPORT bool setTorsionAngle(const Atom& a1, const Atom& a2, Atom& a3, const Atom& a4, Angle angle);
320
324 BALL_EXPORT Angle calculateBondAngle(const Atom& a1, const Atom& a2, const Atom& a3);
325
327} // namespace BALL
328
329#endif // BALL_STRUCTURE_GEOMETRICPROPERTIES_H
BALL_EXPORT bool setTorsionAngle(const Atom &a1, const Atom &a2, Atom &a3, const Atom &a4, Angle angle)
BALL_EXPORT Angle calculateTorsionAngle(const Atom &a1, const Atom &a2, const Atom &a3, const Atom &a4)
BALL_EXPORT Angle calculateBondAngle(const Atom &a1, const Atom &a2, const Atom &a3)
Vector3 & getPosition()
Return the atom coordinates (mutable)
SimpleBox3 getBox() const
const Vector3 & getLower() const
const Vector3 & getUpper() const
virtual Processor::Result operator()(const Vector3 &v)
virtual Processor::Result operator()(const Atom &atom)
virtual Processor::Result operator()(const Composite &composite)
FragmentDistanceCollector(const Composite &composite, float distance)
void setDistance(float distance)
std::vector< const Fragment * > fragments
const Composite * getComposite() const
void setComposite(const Composite &composite)
std::vector< const Fragment * > all_fragments_
FragmentDistanceCollector(const Composite &composite)
#define BALL_EXPORT