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

IMDSimThread Class Reference

A multithreaded implementation of the interactive MD coordinate/force communication update loop. More...

#include <IMDSimThread.h>

Inheritance diagram for IMDSimThread:

List of all members.

Public Methods

IMDSimThread (const char *, int)
initialize with host and port. More...

virtual ~IMDSimThread ()
virtual void get_next_ts (float *, IMDEnergies *)
Fetch last received coordinates and energies. Ask for both at the same time so that they at least have a chance of being in sync with each other. More...

virtual void send_forces (int, int *, float *)
These methods obtain a lock on the socket (to prevent it from being destroyed from the reader thread), check for a connection, then send their information before releasing the lock. More...

virtual void pause ()
virtual void unpause ()
virtual void detach ()
virtual void kill ()
virtual void set_transrate (int)
void * reader (void *)
reader method must be public to be callable from extern "C" thread proc. More...


Detailed Description

A multithreaded implementation of the interactive MD coordinate/force communication update loop.

Definition at line 29 of file IMDSimThread.h.


Constructor & Destructor Documentation

IMDSimThread::IMDSimThread ( const char * ,
int
)

initialize with host and port.

Definition at line 35 of file IMDSimThread.C.

References imdreaderthread, IMDSim::isConnected, NULL, wkf_mutex_init, and wkf_thread_create.

IMDSimThread::~IMDSimThread ( ) [virtual]

Definition at line 57 of file IMDSimThread.C.

References IMDSim::disconnect, IMDSim::isConnected, and wkf_thread_join.


Member Function Documentation

void IMDSimThread::detach ( ) [virtual]

Reimplemented from IMDSim.

Definition at line 197 of file IMDSimThread.C.

References imd_disconnect, IMDSim::IMDOFFLINE, IMDSim::isConnected, IMDSim::simstate, IMDSim::sock, wkf_mutex_lock, and wkf_mutex_unlock.

void IMDSimThread::get_next_ts ( float * ,
) [virtual]

Fetch last received coordinates and energies. Ask for both at the same time so that they at least have a chance of being in sync with each other.

Implements IMDSim.

Definition at line 152 of file IMDSimThread.C.

References IMDSim::new_coords_ready, IMDSim::numcoords, IMDSim::swap4_aligned, wkf_mutex_lock, and wkf_mutex_unlock.

void IMDSimThread::kill ( ) [virtual]

Reimplemented from IMDSim.

Definition at line 207 of file IMDSimThread.C.

References imd_kill, IMDSim::IMDOFFLINE, IMDSim::isConnected, IMDSim::simstate, IMDSim::sock, wkf_mutex_lock, and wkf_mutex_unlock.

void IMDSimThread::pause ( ) [virtual]

Reimplemented from IMDSim.

Definition at line 179 of file IMDSimThread.C.

References IMDSim::getSimState, imd_pause, IMDSim::IMDPAUSED, IMDSim::IMDRUNNING, IMDSim::isConnected, IMDSim::simstate, IMDSim::sock, wkf_mutex_lock, and wkf_mutex_unlock.

void * IMDSimThread::reader ( void * )

reader method must be public to be callable from extern "C" thread proc.

Definition at line 71 of file IMDSimThread.C.

References IMDSim::disconnect, IMD_ENERGIES, IMD_FCOORDS, IMD_IOERROR, IMD_MDCOMM, imd_recv_header, IMDType, length, NULL, IMDSim::sock, vmd_msleep, vmdsock_selread, wkf_mutex_lock, and wkf_mutex_unlock.

Referenced by imdreaderthread.

void IMDSimThread::send_forces ( int ,
int * ,
float *
) [virtual]

These methods obtain a lock on the socket (to prevent it from being destroyed from the reader thread), check for a connection, then send their information before releasing the lock.

Implements IMDSim.

Definition at line 162 of file IMDSimThread.C.

References imd_send_mdcomm, IMDSim::isConnected, num, IMDSim::sock, IMDSim::swap4_aligned, wkf_mutex_lock, and wkf_mutex_unlock.

void IMDSimThread::set_transrate ( int ) [virtual]

Reimplemented from IMDSim.

Definition at line 217 of file IMDSimThread.C.

References imd_trate, IMDSim::isConnected, IMDSim::sock, wkf_mutex_lock, and wkf_mutex_unlock.

void IMDSimThread::unpause ( ) [virtual]

Reimplemented from IMDSim.

Definition at line 188 of file IMDSimThread.C.

References IMDSim::getSimState, imd_pause, IMDSim::IMDPAUSED, IMDSim::IMDRUNNING, IMDSim::isConnected, IMDSim::simstate, IMDSim::sock, wkf_mutex_lock, and wkf_mutex_unlock.


The documentation for this class was generated from the following files:
Generated on Mon Nov 17 02:48:44 2025 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002

AltStyle によって変換されたページ (->オリジナル) /