Good quality
Tutorials >  Quality      [ site map ]

How to build a GRASP molecular surface of "good quality"

What is "good quality" for a GRASP molecular surface ?

When rendering a GRASP surface in Pov4Grasp (or any mesh object in POV-Ray), you may experience a lot of "holes" on the object depending on the light sources positions. This is neither a problem with the raytracer nor with GRASP, but the result of using projected shadows on a tesselated object (i.e. shape is made of triangles). Such objects are not perfectly smooth, and the irregulaties of the molecular surfaces are more visible with lights that cast shadows.

  Default surface constructed in GRASP
* Default surface of 18,176 triangles (9,092 vertices).
* Note the shadowing artifacts and the flat edges of the surface.
Click for full size (640x480)

This very common problem can be easily overcome if you make GRASP produce molecular surface with a lot of triangles, typically from 150,000 up to about 1 million. A good choice is to produce surfaces with a least 200,000 or 250,000 triangles, but this can be greatly increased depending on its complexity. For instance, this F1 ATPase surface is made of almost 800,000 triangles.

So my definition of a "good quality" GRASP surface is an object which consists of as many triangles as possible !

Is GRASP able to produce such huge surfaces ?

Yes, and it's a common mistake to think that GRASP is limited to specific, fixed values for several parameters, such as maximum number of atoms. The main limiting factor is actually your SGI device in terms of memory (and graphics card for faster display when using huge surfaces !).

By default GRASP produces molecular surfaces of about 20,000 or 25,000 triangles only. However it's possible to set a minimum resolution for building the surface, which is expressed in terms of "Grid per Ångström" due to the method used in GRASP. But this requires to configure GRASP first in order to get full surfaces instead of "truncated" ones, such as below.

  Truncated surface with default configuration file
* The default init_grasp allows to build surfaces up to about 25,000 vertices.
* A new resolution of 2.0 grid/Å leads to 48,027 triangles (24,144 vertices).
* The surface is truncated when no more vertices can be allocated.
Click for full size (640x480)

So here is how to do to avoid such kind of behaviour:

  Setup GRASP first
  1. Create a copy of the grasp/data files to you home directory.
  2. Edit therein the init_grasp file by adding VERTEXMAXIMUMPERBUILD=500000 for instance. This tells GRASP to build molecular surfaces with up to 500,000 vertices; usually the number of triangles is about twice.
  3. Type setenv GRASP PathToYourCopyOf/grasp/data in your shell.
  4. Run GRASP.
Alternatively, you may also simply edit a .init_grasp file in your home or your current working directories (not tested). For further details on such parameters, read the addendumweb  to the official GRASP documentation.

You have to rerun GRASP to take your modifications into account if a GRASP session was already running.

Which parameter mostly affects the number of triangles ?

This is the "Minimum Surface Resolution". Beware, there is also a "Maximum" value you can set, but it's obviously opposite to our goal here.

Now you can construct high quality molecular surface with much more triangles. Before using any construction method (such as Build Molecular Surface or the Surf_Charge_PB_Interpolate macro), you have to set the minimum surface resolution required.

  Surface resolution in GRASP
  1. Enter the main menu (right click)
  2. Choose Set Parameters
  3. Select System Miscellaneous
  4. Find Minimum Surface Resolution and enter a new value.

The default surface resolution is 0 Grids per Ångström. Try at least 1.5 or 2, and increase this value until you obtain a surface of about 200,000 triangles for instance. You may probably test several values to reach the amount of triangles you want, as this does not increase linearly. The higher the value is, the more triangles you will get. Between each test, delete the previous surface calculated.

  Gotcha ;-)
* Same surface made of 273,151 triangles (136,582 vertices).
* Minimum Surface Resolution was set at 2.5 grid/Å.
* Note that the representation of its surface property (electrostatic potentials) is also affected.
* Rendering time is a little bit slower.
Click for full size (640x480)

In conclusion I recommend to always specify a resolution value of at least 2.0 to get much better surfaces and pictures quality. Don't be afraid to increase the number of triangles as much as possible, especially when you need a close view of your molecular surface (ligand docking for instance).

Valid HTML 4.01! Page last updated: Jun 20, 2002
Any comment or suggestion ?