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  // Function to receive packest from the socket connection
31  void get_imd_packet();
32 
33  void gather_time(IMDTime *time);
34  void gather_box(int timestep, IMDBox *box);
35  void gather_energies(IMDEnergies *energies);
36  void gather_coordinates(int timestep, int N, FloatVector *coords);
37  void gather_velocities(int timestep, int N, FloatVector *velocities);
38  void gather_forces(int timestep, int N, FloatVector *forces);
39 
40  // called by GlobalMasterIMD to set the transfer rate. Should probably
41  // be handled internally by GlobalMasterIMD instead.
42  void set_transrate(int newrate) {transrate = newrate; }
43  const GlobalMasterIMD* getIMD() {return imd;};
44 private:
45  GlobalMasterIMD *imd;
46  int transrate;
47  int ignore;
48 };
49 
50 #endif
51 
void gather_velocities(int timestep, int N, FloatVector *velocities)
Definition: IMDOutput.C:53
const GlobalMasterIMD * getIMD()
Definition: IMDOutput.h:43
void gather_coordinates(int timestep, int N, FloatVector *coords)
Definition: IMDOutput.C:44
void gather_energies(IMDEnergies *energies)
Definition: IMDOutput.C:39
Definition: imd.h:55
void gather_time(IMDTime *time)
Definition: IMDOutput.C:76
~IMDOutput()
Definition: IMDOutput.C:16
Definition: imd.h:49
void gather_box(int timestep, IMDBox *box)
Definition: IMDOutput.C:71
void gather_forces(int timestep, int N, FloatVector *forces)
Definition: IMDOutput.C:62
void set_transrate(int newrate)
Definition: IMDOutput.h:42
static float * coords
Definition: ScriptTcl.C:67
void use_imd(GlobalMasterIMD *)
Definition: IMDOutput.C:28
void get_imd_packet()
Definition: IMDOutput.C:33
IMDOutput()
Definition: IMDOutput.C:10