Delaunay triangulations are useful for visualizing a variety of molecular surfaces. Here, we use the program Hull to compute two kinds of surfaces: the surface connecting the heads of lipid membranes and the surface enclosed by a set of atoms. If you have questions about using these scripts, please send email to vmd@ks.uiuc.edu.

Installing the scripts

To use the Delaunay triangulation scripts, you will need to follow these steps:

  1. Download either the original hull.orig.tar.gz or a patched version which has been fixed to work on recent versions of gcc hull.new.tar.gz (the diff/patch file is also available), lipid_surface.tcl, and 3d_delaunay_surface.tcl.
  2. Unpack and build Hull with
      gunzip hull.tar.gz
      tar xf hull.tar
      cd hull
      make
    
  3. Move the resulting executable, hull, to a permanent location.
  4. Edit the hullpath variables defined at the beginnings of the two Tcl scripts to refer to this location.

Drawing the surface enclosed by a lipid membrane

Load a system containing a lipid membrane, and draw its surface by following this example. You should replace "DLPE LPPC" by the segment names of your membrane (e.g. "POPE"). If you can generate two atomselections corresponding to the two lipid layers, or you know the orientation of your lipid membrane (points are projected onto a plane and triangulated in 2D), you can skip some of these steps. The atomselections sel1 and sel2 can also be modified to use more than just the default phosphorous atoms, to produce a more detailed surface.
  source lipid_surface.tcl
  # first locate the two distinct layers of lipids (if necessary)
  set groups [lipid_pids "DLPE LPPC"]

  # next calculate the normal direction (if you don't know it)
  set normal [lipid_normal $groups]

  # now draw the lipid surfaces, removing triangles with edges
  # longer than 20A.
  set sel1 [atomselect top "index [lindex $groups 0]"]
  set sel2 [atomselect top "index [lindex $groups 1]"]

  lipid_clear
  graphics $graphicsmol color yellow
  lipid_surface $sel1 $normal 20
  lipid_surface $sel2 [vecscale $normal -1] 20

Drawing the surface enclosed by a set of atoms.

You can draw a protein surface like this:
  source 3d_surface.tcl
  set sel [atomselect top "protein and name CA"]
  clear_surface
  graphics $3dgraphicsmol color green
  draw_surface $sel 10
You may wish to modify the selection and the edge-length cutoff (currently 10) to produce surfaces with more or less detail. Keep in mind that this script becomes very slow as the number of atoms or the number of cut-off regions increases.