NAMD
IMDOutput.h
Go to the documentation of this file.
1 
7 #ifndef IMD_OUTPUT_H__
8 #define IMD_OUTPUT_H__
9 
10 #include "imd.h"
11 class FloatVector;
12 class GlobalMasterIMD;
13 
14 // IMDOutput
15 // This object's only reason for existence is to forward energies and
16 // coordinates to GlobalMasterIMD for export to connected IMD connections.
17 // If Controller could access GlobalMasterIMD directly we wouldn't need
18 // need this.
19 
20 class IMDOutput {
21 
22 public:
23  IMDOutput();
24  ~IMDOutput();
25 
26  // The GlobalMasterIMD instance passes itself to this object so it can
27  // receive energies and coordinates.
28  void use_imd(GlobalMasterIMD *);
29 
30  // gather_* are called by Controller with the current timesteps and
31  // energies.
32  void gather_energies(IMDEnergies *energies);
33  void gather_coordinates(int timestep, int N, FloatVector *coords);
34 
35  // called by GlobalMasterIMD to set the transfer rate. Should probably
36  // be handled internally by GlobalMasterIMD instead.
37  void set_transrate(int newrate) {transrate = newrate; }
38 
39 private:
40  GlobalMasterIMD *imd;
41  int transrate;
42  int ignore;
43 };
44 
45 #endif
46 
void gather_coordinates(int timestep, int N, FloatVector *coords)
Definition: IMDOutput.C:29
void gather_energies(IMDEnergies *energies)
Definition: IMDOutput.C:24
~IMDOutput()
Definition: IMDOutput.C:16
void set_transrate(int newrate)
Definition: IMDOutput.h:37
static float * coords
Definition: ScriptTcl.C:66
void use_imd(GlobalMasterIMD *)
Definition: IMDOutput.C:19
IMDOutput()
Definition: IMDOutput.C:10