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 
26 namespace BALL
27 {
28  class ForceField;
29 
35  {
36 
37  friend class ForceField;
38 
39  public:
40 
44 
45  public:
46 
48 
49 
52 
55  ForceFieldComponent(ForceField& force_field);
56 
61  ForceFieldComponent(const ForceFieldComponent& force_field_component);
62 
65  virtual ~ForceFieldComponent();
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
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::ForceField
Definition: forceField.h:85
BALL::ForceFieldComponent::force_field_
ForceField * force_field_
Definition: forceFieldComponent.h:152
BALL
Definition: constants.h:12
BALL::String
Definition: string.h:56
scoringComponent.h
BALL::ForceFieldComponent::isEnabled
bool isEnabled() const
Definition: forceFieldComponent.h:100
atom.h
BALL::ScoringComponent
Definition: scoringComponent.h:20
string.h
BALL::ForceFieldComponent
Definition: forceFieldComponent.h:34
common.h
BALL::ForceFieldComponent::energy_
double energy_
Definition: forceFieldComponent.h:156
BALL::ForceFieldComponent::setEnabled
void setEnabled(bool state)
Definition: forceFieldComponent.h:103
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::RTTI::getName
const char * getName()
Definition: rtti.h:97