TSRI Home
HomePersonalBack to ProjectsPublicationsLinks



ViPEr: a visual programming environment for Python

We have developed a Python- and Tkinter-based visual-programming environment called ViPEr [1]. ViPEr allows non-programmers to interactively build networks describing novel combinations of computational methods, and yielding new visualizations of their data without actually writing code. Nodes are organized in libraries from which they are placed with drag-and-drop onto a canvas and their input and output ports can be connected using the mouse. The connections between the nodes define a directed graph that is used to propagate data and trigger the execution of nodes that have new input data. Subnetworks can be encapsulated into macro nodes, allowing nesting of networks. Tooltips and balloon help provide runtime information about node functions, inputs and outputs. Data flowing through nodes can be interactively monitored and introspected. A data type manager holds a pre-defined set of data type objects and new types can be added to this table interactively through a GUI. Although data types are optional, by declaring one, it is possible to specify the appearance (i.e. the color and shape) of the port's icon. This provides helpful visual hints for connecting the proper outputs with the proper inputs.

Figure 1: The symmetry server nodes (cyan, right half of the network) are used to generate 60 transformation matrices describing an icosahedral symmetry. These matrices are used to transform a CPK (spheres) representation of the carbon alpha atoms of the polio-virus coat-protein generating the virus' capsid. For readability, only one of the four chains composing the protein is displayed and colored from red to blue along the chain.

The Network and the parameters set by the user are saved as Python code. The network is loaded into ViPEr by executing the Python code contained in this file. This approach avoids a network file format with its limitations and arbitrary choices and instead provides a powerful, flexible and general purpose programming language to describe networks.

New nodes are easy to write and can be created interactively during a working session. The computational method of a given node can be changed while the network is running. In addition, for even greater flexibility and execution speed, our environment allows to incorporate compiled C- and Fortran code. Input and output variables of such code are accessed in ViPEr by exposing them as input- and output ports in respective nodes. ViPEr nodes are essentially lightweight wrappers of functionality that is otherwise available in Python, C and Fortran. This makes ViPEr useful beyond biological applications.

To date, ViPEr comprises a set of standard nodes including an OpenGL 3D-visualization library. In addition, we have developed several more libraries. The SymServ library implements a set of nodes defining geometric transformations such as translation, rotation, helical arrangements etc. These nodes allow to describe complex hierarchical symmetries such as icosahedral symmetry as tree-like structures. The MolKit library, which is based on our Python MolKit library, allows to read, write, represent and query molecular data structures. The Imaging library exposes the Python Image Library thus enabling image processing in ViPEr. Many more custom nodes have been written to date, such as electron density map reading, isocontouring, texture mapping, 2-D image to 3-D heightfield, and data converters which allow to output molecules in various 3-D formats. ViPEr was successfully used to combine and compare in 3-D electron microscopy and atomic force microscopy data to build and refine models of supramolecular assemblies [2].

You can get ViPEr here.

References:

1 Sanner, M., Stoffler, D., and Olson, A.J. (2002) In Proceedings of the Tenth International Python Conference 2002. ViPEr was awarded the first prize for the best project at this conference.

2. Guangwei Min, Martin Stolz, Ge Zhou, Fengxia Liang, Peter Sebbel, Daniel Stoffler, Rudi Glockshuber, Tung-Tien-Sun, Ueli Aebi, and Xian-Peng Kong. Localization of uroplakin Ia, the urothelial receptor for bacterial adhesin FimH, on the six inner domains of the 16nm urothelial plaque particle. J Mol Biol. 2002, 317:697-706.


Homepage Daniel Stoffler: Home | Personal | Projects | Publications | Links