BALL 1.5.0
forceFieldComponent.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id: forceFieldComponent.h,v 1.20.18.1 2007/03/25 21:23:49 oliver Exp $
5//
6
7// Molecular Mechanics: general force field component class
8
9#ifndef BALL_MOLMEC_FORCEFIELDCOMPONENT_H
10#define BALL_MOLMEC_FORCEFIELDCOMPONENT_H
11
12#ifndef BALL_COMMON_H
13# include <BALL/common.h>
14#endif
15
16#ifndef BALL_DATATYPE_STRING_H
17# include <BALL/DATATYPE/string.h>
18#endif
19
20#ifndef BALL_KERNEL_ATOM_H
21# include <BALL/KERNEL/atom.h>
22#endif
23
25
26namespace BALL
27{
28 class ForceField;
29
35 {
36
37 friend class ForceField;
38
39 public:
40
44
45 public:
46
48
49
52
56
61 ForceFieldComponent(const ForceFieldComponent& force_field_component);
62
66
68
72
75 virtual bool setup();
76
78
81
85 ForceField* getForceField() const;
86
89 void setForceField(ForceField& force_field);
90
93 void setName(const String& name);
94
97 String getName() const;
98
100 bool isEnabled() const { return enabled_;}
101
103 void setEnabled(bool state) { enabled_ = state;}
104
106
109
112 virtual double getEnergy() const;
113
120 virtual double updateEnergy();
121
128 virtual void updateForces();
129
138 virtual void update();
139
141 double updateScore();
142
143 protected:
144
146 /*_ @name Protected Attributes
147 */
148 //_@{
149
150 /*_ The force field this component is registered in
151 */
153
154 /*_ The energy of the component
155 */
156 double energy_;
157
158 private:
159
160 //_@}
161 /*_ @name Private Attributes
162 */
163 //_@{
164
165 /*_ The force field component name
166 */
167 String name_;
168
169 bool enabled_;
170
171 //_@}
172
173 };
174} // namespace BALL
175
176#endif // BALL_MOLMEC_FORCEFIELDCOMPONENT_H
#define BALL_CREATE(name)
Definition: create.h:62
Definition: constants.h:13
const char * getName()
Definition: rtti.h:97
virtual double getEnergy() const
virtual double updateEnergy()
virtual void updateForces()
#define BALL_EXPORT
Definition: COMMON/global.h:50