BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
periodicBoundary.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: periodicBoundary.h,v 1.22 2005/12/23 17:01:51 amoll Exp $
5 //
6 
7 #ifndef BALL_MOLMEC_COMMON_PERIODICBOUNDARY_H
8 #define BALL_MOLMEC_COMMON_PERIODICBOUNDARY_H
9 
10 #ifndef BALL_COMMON_H
11 # include <BALL/common.h>
12 #endif
13 
14 #ifndef BALL_DATATYPE_OPTIONS_H
15 # include <BALL/DATATYPE/options.h>
16 #endif
17 
18 #ifndef BALL_MATHS_SIMPLEBOX3_H
19 # include <BALL/MATHS/simpleBox3.h>
20 #endif
21 
22 namespace BALL
23 {
24  class ForceField;
25 
26  class PeriodicBoundary;
27 
35  {
36  public:
37 
39 
40 
43 
44 
45  typedef std::pair<Size, Size> AtomIndexPair;
46 
48  typedef std::vector<AtomIndexPair> AtomIndexArray;
49 
51 
54 
57  {
59  static const char* PERIODIC_BOX_LOWER;
60 
62  static const char* PERIODIC_BOX_UPPER;
63 
65  static const char* PERIODIC_BOX_ENABLED;
66 
68  static const char* PERIODIC_BOX_DISTANCE;
69 
71  static const char* PERIODIC_BOX_ADD_SOLVENT;
72 
77  static const char* PERIODIC_BOX_SOLVENT_FILE;
78 
82 
85  static const char* PERIODIC_WATER_FILE;
86 
87  };
88 
91  {
93  static const Vector3 PERIODIC_BOX_LOWER;
94 
97 
99  static const bool PERIODIC_BOX_ENABLED;
100 
102  static const float PERIODIC_BOX_DISTANCE;
103 
105  static const bool PERIODIC_BOX_ADD_SOLVENT;
106 
111  static const char* PERIODIC_BOX_SOLVENT_FILE;
112 
115 
117  static const char* PERIODIC_WATER_FILE;
118  };
119 
121 
124 
128 
131  PeriodicBoundary(const ForceField& force_field);
132 
135  PeriodicBoundary(const PeriodicBoundary& periodic_boundary);
136 
139  virtual ~PeriodicBoundary();
140 
142 
145 
148  PeriodicBoundary& operator = (const PeriodicBoundary& periodic_boundary);
149 
152  virtual void clear();
153 
155 
158 
161  bool setup();
162 
165  Size generateMoleculesVector();
166 
168 
171 
173  void enable();
174 
176  void disable();
177 
180  SimpleBox3 getBox() const;
181 
186  void setBox(const SimpleBox3& box);
187 
204  Size addSolvent(const String& filename);
205 
212  Size removeSolvent();
213 
215 
218 
223  bool isEnabled() const;
224 
226 
229 
234  void updateMolecules();
235 
237 
240 
246 
248 
249  protected:
250 
251  private:
252 
253  /*_ @name Private Attributes
254  */
255  //_@{
256 
257  //_ Pointer to the force field of the periodic boundary
258  ForceField* force_field_;
259 
260  //_ Indicates if periodic boundary is enabled or not
261  bool enabled_;
262 
263  //_ The box of the periodic boundary
264  SimpleBox3 box_;
265 
266  //_ An pair vector with the start and end indices of all molecules (atoms of the molecules)
267  AtomIndexArray molecules_;
268 
269  //_@}
270 
271  };
272 
273 } // namespace BALL
274 
275 #endif // BALL_MOLMEC_COMMON_PERIODICBOUNDARY_H
#define BALL_CREATE(name)
Definition: create.h:62
std::pair< Size, Size > AtomIndexPair
static const char * PERIODIC_BOX_UPPER
Vector containing the upper corner of the box.
static const char * PERIODIC_BOX_SOLVENT_FILE
static const Vector3 PERIODIC_BOX_UPPER
Default vector for the upper corner of the box.
static const char * PERIODIC_BOX_ENABLED
Bool that indicates whether periodic boundary is enabled or not.
static const float PERIODIC_BOX_SOLVENT_SOLUTE_DISTANCE
Default minimum distance between solvent and solute for added solvent.
static const Vector3 PERIODIC_BOX_LOWER
Default vector for the lower corner of the box.
static const char * PERIODIC_BOX_ADD_SOLVENT
Flag to initiate the addition of solvent to the box.
static const char * PERIODIC_BOX_LOWER
Vector containing the lower corner of the box.
static const bool PERIODIC_BOX_ADD_SOLVENT
Default value of the flag to initiate the addition of solvent to the box.
std::vector< AtomIndexPair > AtomIndexArray
static const char * PERIODIC_BOX_SOLVENT_FILE
static const bool PERIODIC_BOX_ENABLED
Default bool value for periodic boundary (enabled or not)
static const char * PERIODIC_WATER_FILE
Default file for default solvent.
static const float PERIODIC_BOX_DISTANCE
Default minimum distance between solute molecules and the box in Angstrom.
#define BALL_EXPORT
Definition: COMMON/global.h:50
static const char * PERIODIC_BOX_SOLVENT_SOLUTE_DISTANCE
static const char * PERIODIC_WATER_FILE
static const char * PERIODIC_BOX_DISTANCE
Minimum distance between solute molecules and the box in Angstrom.