NAMD
GlobalMasterIMD.h
Go to the documentation of this file.
1 
7 #ifndef GLOBALMASTERIMD_H
8 #define GLOBALMASTERIMD_H
9 
10 #include "GlobalMaster.h"
11 #include "common.h"
12 #include "imd.h"
13 #include "ResizeArray.h"
14 
15 class FloatVector;
16 
17 class GlobalMasterIMD : public GlobalMaster {
18  public:
19  /* initializes this according to the simulation parameters */
22 
23  void send_energies(IMDEnergies *);
24  void send_fcoords(int, FloatVector *);
25  // IMDv3 functions start
26  void send_velocities(int, FloatVector *);
27  void send_forces(int, FloatVector *);
28  void send_box(IMDBox *);
29  void send_time(IMDTime *);
30  // IMDv3 functions end
31 
32  protected:
33 
34  friend class IMDOutput;
35 
36  virtual void calculate();
37 
38  // Simple function to check for socket connection
39  void imd_connection();
40 
41  // Simple function for getting MDComm-style forces from VMD
42  // Needs to be renamed to something more appropriate as it
43  // receives other type of packets like pause, resume, etc.
44  // and not just forces
45  void get_vmd_forces();
46 
47  // IMD protocol version
49 
50  // flag for whether to proceed with simulation when there are no connections
51  int IMDwait;
52 
53  // flag for whether to ignore all user input
54  int IMDignore;
55 
56  // flag for whether to ignore only forces
58 
59  // IMD session info i.e. send settings
61 
62  // My server socket handle
63  void *sock;
64 
65  // Connected sockets
67 
68  // temporaries in case 3*sizeof(float) != sizeof(FloatVector)
69  float *coordtmp;
71 
72  float *veltmp;
74 
75  float *forcetmp;
77 
79 };
80 
81 #endif
82 
void send_time(IMDTime *)
void send_velocities(int, FloatVector *)
Definition: imd.h:55
void send_box(IMDBox *)
Definition: imd.h:49
ResizeArray< void * > clients
void send_energies(IMDEnergies *)
virtual void calculate()
void send_forces(int, FloatVector *)
IMDSessionInfo IMDsendsettings
void send_fcoords(int, FloatVector *)