Stuart Green, School of Chemistry, University of Leeds
One feature lacking from Rasmol and Chime is the ability to render surfaces with your molecules. VRML is an alternative but to my mind its too slow and doesn't offer the scripting capabilities and range of rendering options by default.
To overcome this I've returned to the dim and distant days of early graphics systems which couldn't render solids in realtime - surfaces were rendered using lines to create a mesh or chicken-wire diagram. These meshes are created using the marching cubes algorithm from a file of three-dimensional grid-based data. This finds the isovalues and calculates the triangle edges and vertices to generate the surface.
|
Electrostatic potential of formamide Generated from point charges in an XYZ file |
|
| HOMO of formamide | LUMO of formamide |
|
Generated by using the MOPAC with the GRAPH keyword and PSI88. |
|
To generate similar surfaces you'll need the following software:
patch < psi1.XX.patchThese patches modify the output format of psi1 to that required for surfacing and set the grid-size to 25x25x25 or 50x50x50, respectively.
Thus far the software has been tested on IRIX 5.3 and Linux 2.0.30. Any queries/problems please email s.m.green@chem.leeds.ac.uk.
marching grid_file atom_number residue_number isovalue
The resulting mesh is written to the standard output as a series of HETATM and CONECT records in a pdb file.
The file described by grid_file has the following format:-
To generate molecular orbitals a tcl script, orbgen, is provided. Before using this you'll need to set the environment variable MARCHING_BIN so the script can find psi1 and preplot.
This takes three arguments, firstly the filename of a MOPAC GRAPH file (extension usually .gpt), secondly, the orbital number for plotting and finally, the name for the generated grid file. Surfaces can now be generated using the grid file and the marching program.
Both XYZ files with charges and MOPAC output files can be used to generate the electrostatic potential grid files with the programs xyzp and mopacp, respectively.
mopacp filename grid_spacing grid_extent dielectric xyzp " " " "
Grid spacing and extent are in Ångstroms. The extent being the distance added to the maximum and minimum dimensions of the atomic centres. The file produced on the standard output is then suitable for marching.
| Created by Stuart Green | 1st September 1997 |