Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

IMDSimThread.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr
00003  *cr            (C) Copyright 1995-2019 The Board of Trustees of the
00004  *cr                        University of Illinois
00005  *cr                         All Rights Reserved
00006  *cr
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: IMDSimThread.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.17 $       $Date: 2019/01/17 21:20:59 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *  A multithreaded implementation of the interactive MD 
00019  *  coordinate/force communication update loop.
00020  ***************************************************************************/
00021 #ifndef IMD_SIM_THREAD_H__
00022 #define IMD_SIM_THREAD_H__
00023 
00024 #include "IMDSim.h"
00025 #include "WKFThreads.h" 
00026 
00029 class IMDSimThread : public IMDSim {
00030 public:
00032   IMDSimThread(const char *, int);
00033   virtual ~IMDSimThread();
00034 
00035   virtual void get_next_ts(float *, IMDEnergies *);
00036 
00040   virtual void send_forces(int, int *, float *);
00041   virtual void pause();
00042   virtual void unpause();
00043   virtual void detach();
00044   virtual void kill();
00045   virtual void set_transrate(int);
00046 
00048   void *reader(void *);
00049 
00050 private:
00055   float *curpos, *curbuf;      
00056   float *posbuf1, *posbuf2;
00057 
00060   IMDEnergies imdEnergies; 
00061 
00067   int deadsocket;
00068   void process_coordinates(int32);
00069   void process_energies(int32);
00070   void process_mdcomm(int32);
00071 
00072   wkf_thread_t readerthread;
00073   wkf_mutex_t sockmutex;   
00074   wkf_mutex_t coordmutex;  
00075 
00078   int time2die;
00079   
00080 };
00081 
00082 #endif
00083  

Generated on Fri Nov 8 02:44:41 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002