VMD is an excellent visualization program, with powerful command-line scripting functionality. Recently, VMD’s C functions can be invoked using a set of easy to use python modules. Vmd-python is installable VMD as a Python module.
I’ve pulled some bonus features out of the source code and made it work with Python 2 or Python 3, as well as being (relatively) easy to build.
Although there is some online documentation, it is not quite complete. Here I’ve collected a full reference of all available functionality in the vmd-python module. Note that this does not include GUI features you may find helpful, such as Python callbacks or adding Tkinter menus.
- All features of VMD from the 1.9.4 alpha release
- DMS plugin for DESRES molecular file format
- HOOMD plugin (with libexpat)
- Doesn’t depend on the exact numpy version it was built agains
- Can be built with any Python
- Support for Python 2 or 3
I recommend using the pre-built binary packages with the Anaconda Python Distribution. Currently, there are packages available for Linux and OSX:
conda install -c conda-forge vmd-python
For other architectures, you can download the source:
python setup.py build python setup.py install
VMD-Python has the following dependencies:
- libnetcdf >= 4.3