
I am pleased to annouce the first internal release of MDTools for Python.  The goal of this package is to simplify the analysis and modification of protein structure and dynamics data.  Hopefully these tools will make your work easier.

Both Python and this package are installed on all of our machines and should function almost identically on all platforms.  Python is a legible and easy-to-learn language.  Please consult the tutorial on the Python Language Home Page (http://www.python.org/) for a starter course.  There is also a demo and additional documentation for this package on the MDTools for Python web site (http://www.ks.uiuc.edu/~jim/mdtools/) and the package itself features extensive online help.

Please let me know of any questions, bugs, or feature requests.

-Jim Phillips  5/17/96

What is Python?

For our purposes, Python is an extensible object-oriented scripting language with high-level data structures and a large selection of built-in libraries. For a more complete answer, consult the executive summary from the Python Language Home Page (http://www.python.org/).

What is MDTools for Python?

MDTools is a Python module which provides a set of classes useful for the analysis and modification of protein structures. Current capabilities include reading psf files, reading and writing (X-PLOR style) pdb and dcd files, calculating phi-psi angles and other properties for arbitrary selections of residues, and parsing output from NAMD (http://www.ks.uiuc.edu/Research/namd/) into an easy-to-manipulate data object. MDTools also features online help.

Why MDTools?

I wanted a modern interactive/scripting language which could be used to perform some of the simple calcuations and manipulations often necessary when setting up and analyzing molecular dynamics simulations. The closest example was the X-PLOR (http://xplor.csb.yale.edu/xplor-info/xplor-info.html) scripting language, which is a decade old. Although C++ libraries existed, writing compiled code for simple manipulations would be inefficient. Additional inspiration came from Andrew Dalke's pdblang written in Perl.

Why Python?

I chose Python because it is a legible, cross-platform, interactive programming language. Unlike TCL, Python has high-level data structures and libraries which would allow everything to be done in Python. Python's object-oriented features also allow a simple and elegant class hierarchy to be used.

Getting Started

To load the MDTool module, use the command import md.

Python 1.3 (Wed Oct 25 1995)  [GCC NeXT DevKit-based CPP 3.1]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import md
MDTools 0.62 Exp (1996/05/17) by James Phillips.  md.help() for more info.

Help System

As noted in the above startup message, online help is available for all classes and many functions. The main module and classes are documented using Python's __doc__ string system. The help([name]) function provides an extended interface to this system, including help strings for several functions and concepts. The help() function also works on objects by determining the class of an object and returning the help for that class. Therefore, if you have a molecule mol, help(mol) will return the documentation for the Molecule class.

In order to avoid data duplication data and methods from a superclass are not included in the documentation for a subclass. However, the help() function preceeds the documentation for a subclass with the documentation for its superclass. Therefore, md.help('Atom') returns information about the data members x, y, and z even though these are defined in HomoCoord (see below).

Class Structure

Inheritance is essential to the design of MDTools. The volume of source code is rather evenly distributed among the different levels of the class hierarcy, with the root classes being the most complex in most cases. An understanding of the class structure will aid your use of MDTools because of the common methods many classes inherit.

   HomoCoord - homogeneous coordinate (x,y,z,W)
   Vector - magnitude and direction in space (W is 0)
      Coord - position in space (W is 1)
         Atom - atomic properties plus links to residue, segment, and molecule
   AtomGroup - collection of atoms, uses frames, calculates physical averages
      ASel - generated from an AtomGroup by a selection function
      Residue - residue properties plus links to segment and molecule
      ResidueGroup - collection of residues
         RSel - generated from a ResidueGroup by a selection function
         Segment - segment properties plus link to molecule
         SegmentGroup - collection of segments
            Molecule - pdb and psf file handling ability
   Trans - (homogeneous) coordinate transformation
   DCD - dcd file reading ability
      DCDWrite - writing ability (deals with fixed atoms)
   Data - fancy data structure for columns of numbers
      NAMDOutput - reads _NAMD_ output, converts timestep to time

Distribution

Since the MDTools module is in an early beta stage, it is not directly available to persons outside of the Theoretical Biophysics Group. For more information and special consideration, please send me email (jim@ks.uiuc.edu). The first public release will take place before the end of June.

MDTools for Python is written by James Christopher Phillips at the University of Illinois with support from the United States Department of Energy Computational Science Graduate Fellowship Program. MDTools for Python and related documentation Copyright (c) 1995-96 by University of Illinois Board of Trustees and others. Distribution is encouraged as long as proper credit is given.
