next up previous contents index
Next: Dotted Up: Molecular Drawing Methods Previous: Points

VDW

 

`VDW' draws the atoms as spheres. The radius used is the van der Waals radius multiplied by a user-selectable scaling factor. The sphere resolution determines how finely to tessellate the spheres that are drawn. Drawing spheres takes some time, since they are built from a collection of triangles produced by a sphere library external to GL/OpenGL.

For those of you interested in the details, what happens is as follows: At the most primitive level, the sphere drawing algorithm starts with a shape, such as a square bipyramid (two pyramids with a square base joined base-to-base). Then a recursive bisection is applied to this shape, where at each level of recursion, given a triangular face, the endpoints of the centers are computed and scaled so as to be on the surface of the sphere. Given these endpoints and centers, one can construct four sub-triangles, which themselves are subject to bisection on the next level of recursion. A diagram illustrating these concepts is given below.

         Subdivide each triangle in the old approximation and normalize
          the new points thus generated to lie on the surface of the unit
          sphere.
         Each input triangle with vertices labeled [0,1,2] as shown
          below will be turned into four new triangles:
         
                               Make new points
                                   a = (0+2)/2
                                   b = (0+1)/2
                                   c = (1+2)/2
                  
                               Normalize a, b, c
                                   a = (0+2)/2
                                   b = (0+1)/2
                                   c = (1+2)/2
                 1
                /\             Normalize a, b, c
               /  \
             b/____\ c         Construct new triangles
             /\    /\              [0,b,a]
            /  \  /  \             [b,1,c]
           /____\/____\            [a,b,c]
          0      a     2           [a,c,2]

The ``Sphere Res'' setting is actually controlling the number of levels of recursion being applied.

Note:: Due to variations in atom naming conventions, in rare instances VMD may improperly assign VDW radii to specific atoms, since VMD determines each atom type based on the first letter forming its name. For example, VMD would assume an atom named ``HG'' to be a hydrogen rather than a mercury. If this happens, you are always free to redefine the radii, using a syntax much like that below:

        set sel [atomselect top ``name HG'']
        $sel set radius 1.9



Justin Gullingsrud
Tue Apr 6 09:22:39 CDT 1999