00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 #ifndef IMD_H__
00023 #define IMD_H__
00024 
00025 #include <limits.h>
00026 
00027 #if ( INT_MAX == 2147483647 )
00028 typedef int     int32;
00029 #else
00030 typedef short   int32;
00031 #endif
00032 
00033 
00034 typedef enum IMDType_t {
00035   IMD_DISCONNECT,   
00036   IMD_ENERGIES,     
00037   IMD_FCOORDS,      
00038   IMD_GO,           
00039   IMD_HANDSHAKE,    
00040   IMD_KILL,         
00041   IMD_MDCOMM,       
00042   IMD_PAUSE,        
00043   IMD_TRATE,        
00044   IMD_IOERROR       
00045 } IMDType;          
00048 typedef struct {
00049   int32 tstep;      
00050   float T;          
00051   float Etot;       
00052   float Epot;       
00053   float Evdw;       
00054   float Eelec;      
00055   float Ebond;      
00056   float Eangle;     
00057   float Edihe;      
00058   float Eimpr;      
00059 } IMDEnergies;      
00062 
00063 extern int imd_disconnect(void *);   
00064 extern int imd_pause(void *);        
00065 extern int imd_kill(void *);         
00066 extern int imd_handshake(void *);    
00067 extern int imd_trate(void *, int32); 
00069 
00070 
00072 extern int imd_send_mdcomm(void *, int32, const int32 *, const float *);
00073 
00075 extern int imd_send_energies(void *, const IMDEnergies *);
00076 
00078 extern int imd_send_fcoords(void *, int32, const float *);
00079 
00085 extern int imd_recv_handshake(void *);
00086 
00088 extern IMDType imd_recv_header(void *, int32 *);
00089 
00091 extern int imd_recv_mdcomm(void *, int32, int32 *, float *);
00092 
00094 extern int imd_recv_energies(void *, IMDEnergies *);
00095 
00097 extern int imd_recv_fcoords(void *, int32, float *);
00098 
00099 #endif
00100