Mario Valle Web

STM4 – the molecular visualization toolkit

STM4 is a molecular visualization toolkit built on top of AVS/Express. Its goal is not to replace existing tools, but to provide a platform on which new, advanced or unusual visualization techniques can be implemented.

[STM4 Molecular Visualization Toolkit]

One of the STM4 strengths is its quick prototyping capability that permits a tight interaction with the users to elicit their real needs.

Another unusual capability is the ability to use standard visualization techniques together with the more usual chemistry visualization ones.

Today at CSCS STM4 is not only one of the tools offered to our chemistry related research users to support their real researcher’s needs, but also helps us to elicit users’ unstated requirements and to focus on representation needs, not on implementation details. For this reason the STM4 functionalities are somehow specific to CSCS requirements. This means that not everything is here, but everything can be added…

STM4 originated from the Ohio Supercomputer Center project See The Molecule, by Ken Flurchick, Libero Bartolotti, Theresa Windus, Mark Reed, and evolved through the work of many people, in primis Jean Favre at CSCS. Then it was engineered by me into the well-known STM3 release, to be recently cleaned and refactored into the current STM4 version.

To see what STM4 is, take a look at the gallery below or browse the STM4 module list and peruse the modules documentation. If you have installed STM4, you will find usage examples under the stm4-examples directory. To work with STM4, the simplest method is to instantiate one of the Full Apps applications and modify it.

A frequently asked question is: why a commercial tool inside STM4? Well, it shortens the development cycle letting me concentrate on the important, specific functionalities. But, more important, it provides something not available in standard chemistry visualization tools: the mix-up of general visualization techniques together with chemistry-specific ones. And before you ask, yes, I have considered the move of STM4 into something entirely free, maybe with STM99…

Something more on STM4

[STM4 Molecular Visualization Toolkit]

The toolkit is built as a library of modules inside AVS/Express. An application is built visually connecting the modules together in a network. AVS/Express allows connections only between similarly typed ports. Each module goes into execution when all its needed data are available at its input ports.

[STM4 modules]

STM4 introduces two new data types: MoleculeType (the datatype used by the modules that operate on molecular data) and DisplayParamsType (the datatype that carries information on how the molecules are rendered on screen).

The STM4 modules provided can be grouped into the following categories:

  1. Readers and writers: chemical formats and screenshots
  2. Bonds related modules: compute, count and edit
  3. Modules that compute various derived structures
  4. Atoms selection by various criteria
  5. Trajectory related modules
  6. Crystallography support modules: symmetries, replications, etc.
  7. Visualization of volumetric data, like Gaussian cube files
  8. Structure display and related graphical objects
  9. Probing, interaction and measurements
  10. Ready to run applications (plus display of STM4 version)

Here is a more in-depth view of the various STM4 modules.

Citing STM4

M. Valle, STM3: a chemistry visualization platform,
Zeitschrift für Kristallographie, vol. 220, no. 5-6, pp. 585-588, 2005.

The BibTeX entry and the PDF from the publisher: Oldenbourg Wissenschaftsverlag, München.


[Electronic ring currents]

Electronic ring currents in benzene, induced by an external magnetic field perpendicular to the plane.

[Electron solvated in water]

First principles study of the hydrated electron.

[Reaction of an ethylene molecule]

Reaction of an ethylene molecule with a Ti catalytic center.

[Z-DNA dodecamer crystal]

The electronic properties of a Z-DNA dodecamer crystal.

[Phase transition]

Rendering of atom condensation. The atoms are transparent when a certain parameter is below a given threshold. The atoms are more opaque whenever the parameter approaches the threshold and solid when the parameter crosses the threshold.

[DNA symmetry] [DNA extracted from crystal]

STM4 understands symmetries and can continue a given crystal structure. The symmetry planes are not necessary perpendicular or parallel to coordinates axis. Another module can then crop the resulting molecule inside or outside a given geometric shape (cylinder, sphere or block).

[Protein backbone]

STM4 searches for Cα atoms sandwiched between N and C atoms. Then computes a smooth line passing through them and renders it as a tube for better image quality.

[Atoms movement trace]

Atom traces display. This module accumulates selected atoms positions in a sequence and renders them as clouds color coded with the occupancy density.

[Solvent excluded surface]

Solvent Excluded Surface (SES) computation. The surface has been cut in half to show the two sides colored differently. The surface is computed using the program MSMS (Molecular Surface Computation Home Page – Michel F. Sanner) from inside STM4.

[Pharmaceutical product]

Pharmaceutical product.


Free energy surface as a function of two torsional angles for a dialanine dipeptide in water solution.

[Ring currents in NMR] [It is on the ChemPhysChem cover]

Visualization of ring currents in the presence of an external magnetic field for a high density supercritical system.

[Molecular Dynamic of Hydrated NAFION(R)]

CRS4: Molecular Dynamic of Hydrated NAFION®.


Loose ends

The previous version, called STM3, had been presented on October 27th 2003 during the Fourth LACSI Symposium organized by the Los Alamos National Laboratory (see the technical program).