Package vmd
[hide private]
[frames] | no frames]

Source Code for Package vmd

 1  # $Id: __init__.py 1212 2007-10-24 20:23:03Z oliver$ 
 2  # vmd remote control --- client/server scripts to run VMD from python 
 3  # Copyright (c) 2007-2009 Oliver Beckstein <orbeckst@gmail.com> 
 4  # Released under the GNU Lesser Public License, version 3 or later. 
 5  # See COPYING and COPYING.LESSER. 
 6  """ 
 7  ============= 
 8   VMD control 
 9  ============= 
10   
11  Simple client to transmit Tcl commands to a server running in `VMD`_. 
12   
13  VMD and the server run locally and can be started from the module. Once the 
14  server is running, one can use :class:`vmd.client` to communicate with the server 
15  process via a local socket. 
16   
17  Example 
18  ------- 
19   
20  Start a VMD server and connect:: 
21   
22    from vmd.control import * 
23    VMD = server() 
24    VMD.command('molecule new load 1AKE') 
25   
26  or start an interactive `Tcl`_ session connected to a running VMD  
27  server process:: 
28   
29    interactive(host) 
30    asyncore.loop()      # necessary 
31   
32  See `VMD Tcl Text Commands`_ for all available commands. 
33   
34  .. _VMD: http://www.ks.uiuc.edu/Research/vmd/ 
35  .. _Tcl: http://www.tcl.tk/man/ 
36  .. _VMD Tcl Text Commands: http://www.ks.uiuc.edu/Research/vmd/current/ug/node107.html 
37   
38  """ 
39  __docformat__ = "restructuredtext en" 
40  __all__ = [ 'control', ] 
41   
42  import control 
43  from control import command as cmd 
44