BALL
1.5.0
include
BALL
STRUCTURE
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
17
# include <
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
29
# include <
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
38
namespace
BALL
39
{
40
56
class
BALL_EXPORT
BoundingBoxProcessor
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
105
SimpleBox3
getBox()
const
;
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
133
class
BALL_EXPORT
GeometricCenterProcessor
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
159
virtual
Processor::Result
operator()(
const
Vector3
& v)
160
;
161
163
166
169
Vector3
& getCenter()
170
;
171
173
174
private
:
175
176
Vector3
center_;
177
Size
n_;
178
};
179
180
198
class
BALL_EXPORT
FragmentDistanceCollector
199
:
public
ConstUnaryProcessor
<Composite>
200
{
201
public
:
202
206
209
FragmentDistanceCollector
()
210
;
211
216
FragmentDistanceCollector
(
const
Composite
& composite)
217
;
218
224
FragmentDistanceCollector
(
const
Composite
& composite,
float
distance)
225
;
226
227
virtual
~FragmentDistanceCollector
()
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
258
Size
getNumberOfFragments()
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_
;
295
const
Composite
*
reference_composite_
;
296
float
squared_distance_
;
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::TAngle< float >
BALL::calculateBondAngle
BALL_EXPORT Angle calculateBondAngle(const Atom &a1, const Atom &a2, const Atom &a3)
fragment.h
vector3.h
simpleBox3.h
BALL::Atom
Definition:
atom.h:87
BALL::FragmentDistanceCollector::~FragmentDistanceCollector
virtual ~FragmentDistanceCollector()
Definition:
geometricProperties.h:227
BALL::calculateTorsionAngle
BALL_EXPORT Angle calculateTorsionAngle(const Atom &a1, const Atom &a2, const Atom &a3, const Atom &a4)
BALL
Definition:
constants.h:12
BALL::FragmentDistanceCollector
Definition:
geometricProperties.h:198
BALL::FragmentDistanceCollector::all_fragments_
std::vector< const Fragment * > all_fragments_
Definition:
geometricProperties.h:294
BALL::ConstUnaryProcessor
Definition:
processor.h:119
BALL::BoundingBoxProcessor
Definition:
geometricProperties.h:56
BALL::FragmentDistanceCollector::squared_distance_
float squared_distance_
Definition:
geometricProperties.h:296
BALL::GeometricCenterProcessor::operator()
virtual Processor::Result operator()(const Atom &atom)
Definition:
geometricProperties.h:154
BALL::Composite
Definition:
composite.h:71
BALL_SIZE_TYPE
BALL::TVector3< float >
atom.h
string.h
BALL::FragmentDistanceCollector::reference_composite_
const Composite * reference_composite_
Definition:
geometricProperties.h:295
processor.h
common.h
BALL::setTorsionAngle
BALL_EXPORT bool setTorsionAngle(const Atom &a1, const Atom &a2, Atom &a3, const Atom &a4, Angle angle)
BALL::Atom::getPosition
Vector3 & getPosition()
Return the atom coordinates (mutable)
BALL::FragmentDistanceCollector::fragments
std::vector< const Fragment * > fragments
Definition:
geometricProperties.h:289
BALL::Processor::Result
int Result
Definition:
processor.h:36
BALL::GeometricCenterProcessor
Definition:
geometricProperties.h:133
BALL_EXPORT
#define BALL_EXPORT
Definition:
COMMON/global.h:50
BALL::TSimpleBox3< float >
Generated by
1.8.17