Package vmd :: Module control :: Class server
[hide private]
[frames] | no frames]

Class server

source code

The VMD server process.
Instance Methods [hide private]
 
__init__(self, vmdbinary='vmd', server_tcl='/sansom/gfio/users/oliver/Library/python/GromacsWrapper/vmd/remote_..., force=False, maxdelay=10, dispdev='text')
Start VMD in text mode and launch the remote server.
source code
 
start(self, force=False, maxdelay=10)
Start VMD and launch the remote server.
source code
 
stop(self)
Shutdown VMD.
source code
 
ping(self, pid=8564)
Check if a vmd server can be used.
source code
 
command(self, *args)
Send commands to the VMD server::
source code
Method Details [hide private]

__init__(self, vmdbinary='vmd', server_tcl='/sansom/gfio/users/oliver/Library/python/GromacsWrapper/vmd/remote_..., force=False, maxdelay=10, dispdev='text')
(Constructor)

source code 
Start VMD in text mode and launch the remote server.
Parameters:
  • vmdbinary - vmd (either in PATH or absolute path)
  • server_tcl - path to the tcl script that starts the listening server in VMD (the default is correct in 99.9% of cases)
  • force -
    False
    don't launch new server if one is already active
    True
    always start new vmd process
  • maxdelay - maximum time to wait for the server to come up in seconds
  • dispdev - VMD display device; default is 'text' which runs VMD without graphics. 'win' is the graphical window device

start(self, force=False, maxdelay=10)

source code 
Start VMD and launch the remote server.
Parameters:
  • force -
    False
    don't launch new server if one is already active
    True
    always start new vmd process
  • maxdelay - maximum number of seconds to wait for VMD to start

ping(self, pid=8564)

source code 

Check if a vmd server can be used.

Ignore the message 'error: uncaptured python exception' if the server is down.

Returns:
True for a live VMD server, or False.

command(self, *args)

source code 
Send commands to the VMD server::

   c = command('cd','set w [atomselect top {water}]', '$w writepdb water.pdb')
   c.results()

This is only a thin convenience wrapper for
:meth:`vmd.control.command` and not strongly tied to the server (as
anyone can connect).