Molecular Modeling: An introduction to Grasp

written by Tim Heuer, Pat Brown's Lab, 1997

1. Why Grasp?

Grasp was first developed by Anthony Nicholls and Kim Sharp in Barry Honig's laboratory in 1989, and the present version in 1992. The impetus to develop GRASP was derived primarily from the creators desire to visualize electrostatic potentials at the surfaces of molecules. While there were already software programs available, such as insight from Biosym Technologies, that could calculate isopotential contours, these approaches were limited because they could not capture local topology or shape, and the contours often extend significant distances away from the molecule. Therefore, Grasp was created to emphasize surfaces and electrostatics, and provides the best method currently available to visualize molecular surfaces and associated electrostatic potentials. I also believe that Grasp provides a superior representation of atoms, bonds, and backbone worms / ribbons than other programs such as insight, and therefore provides the best images.

2. Using Grasp.

Atomic coordinates are the fundamental data structure from which everything else is derived. External files in standard crystallographic format, PDB, are used. To begin depress the right-most mouse button and select read from the pop-up menu. Grasp will then ask for the file name, and you can either select it from the list of PDB files in your account or enter the file name your self by typing it in. When PDB data for more than one molecule is read into Grasp the different molecules are assigned a number that correspond to the order in which the data was read. The molecule number is used to identify each molecule during all subsequent processes. For simple processes such as assigning colors and building molecular surfaces there is no need to create formal subsets of molecules. If however, you wish to move molecules relative to each other, you must frst create a formal subset of the molecule(s) that will be moved, and then set the dials to the subset. We will first cover how to represent and color molecules by atoms, surfaces and backbones, then we will cover subsetting and moving molecules, and finally how to write files so that you can make images and save models.

3. Representations of molecules (and coloring them). ATOMS:

The standard method to represent atoms is as spheres of given radius, referred to as CPK. Atoms can be assigned discrete colors, and Grasp supports 99 independent, indexed colors. To color atoms you must type in a command line that deEnes the molecule, residue(s), and color. If only one molecule is present, or if you wish to assign the same color to the same residues in all molecules, the molecule number need not be defined. Colors are defined and indexed by typing control-P, or through the colors panel, (which is accessed through the options panel, and discussed in dtail later; see "using the panels"). For example, to color residue 64 of molecule 2 the color indexed as number 2, type the following command: m=2, rn=64, c=2. The color number zero is used to hide atoms, bonds, worms, etc.. All other color numbers can be user defined. To color en entire molecule the residues need not be specified; e.g. m=l, c=1. The proper order for a command line is molecule, residue, color. The residue can also be specified by side chain. For example, to color all Iysine residues in molecule number I the color indexed as number 5, use the command: m=1, r=lys, c=5. Grasp use the three letter codes for all amino acids.


  1. The cursor arrow must be in the Grasp graphics display window
    when you enter a command.
  2. There is no undo function in Grasp except for the last coloring
    command. To undue the last coloring command type c=u (or bc,
    vc, etc.)


A second way to represent a molecule is build a molecular surface of the molecule. The molecular surface is deOned as the boundary of that volume within any probe sphere of given radius (meant to represent a water molecule) sharing no volume with the hard sphere atoms that comprise the molecule. Building a molecular surface takes only a few seconds, and results in a smooth tessellation of the surface, which is colored white.


Surfaces are constructed by going to the build sub-menu using the right most mouse button. Then highlight and select molecular surface. At this time you will be prompted to dehme the molecule(s). Highlight and select all molecules if this is what you desire. Otherwise highlight and select enter string, and then type the molecule number(s) as m=i, j, etc.(where "i" and "j" represent molecule numbers). You have now defined the molecule(s), and in a few seconds the surface will be displayed. You can now calculate and display the surface electrostatic potential.


The first step is to read the radius / charge file that contains Poisson-Boltzmann (PB) solver, which is a simpler version of that used by DelPhi. To do this use the right most mouse button and select the read sub-menu, and then select radius/charge file. Grasp will now prompt you for the file, and you should select let me enter B.le name, and then type in the file name command: /usr/local/grasp/data/full.crg. Grasp will read the file, and then you need to calculate e the electrostatic potential of the molecule(s). To do so, select calculate from the pop-up menu, and next select new potential map. Now you need to again select calculate from the first-level menu. This time select potential map via surfaces / atoms. Grasp now prompts you for the molecule(s), and you need to select the appropriate response: either all molecules or enter string. If you select enter string, proceed as above, and type in the molecule number (e.g. m=i, n, etc.). The final step is to select all atoms when prompted, unless of course you wish to enter a subset of atoms. The default colors for electrostatic potentials are red, white, and blue. with red for the minimum value (typically negative), white at zero, and blue for the maximum value (typically positive). The user can increase or decrease the gain by toggling the levels on the bar at the top of the screen.


Surfaces can be colored by assigning colors to the appropriate vertexes. In general surfaces are colored the same as atoms, with the only difference being that you must specify that you wish to color a surface. To specify that you want to color a surface, use vc=n instead of c=n. (where "n" represents the indexed color number). The command "c" is the default for "ac" or atom color. When coloring all things other then atoms, "c" must be preceded with the appropriate prefix. For example, to color the surface of molecule I color number "4", at residues 50-59, and 80; type the command: m=1, rn=(50,59), 80, vc=4. To define a continuous series of residues, separate the first and last residue numbers by a comma, and place them within parentheses.


The a-carbon backbone of protein molecules can be displayed as a worm or ribbon drawing. There are two ways to build a backbone worm. One method is two proceed through the pop-up menus as we did to build a molecular surface. To build the backbone worm select the build option from the pop-up menu, and then select backbone worm in the next menu. Finally select alpha-carbon worm, and a worm will appear. If you are working with more than one molecule worms will be built for all molecules. To hide worms that you do not wish to be displayed you must color those worms color number zero. This is done as follows: m=i, etc., wc=0. The color command is "wc" for worm color. Accordingly, the color of the worm is chosen as for atoms or surfaces, i.e. by using indexed colors. The portion of the worm that corresponds to particular residues can be colored as well, and this is done the same as for atoms and surfaces: e.g. m=3, rn=50, wc=1 will color the backbone worm of molecule 3 at residue 50 color number l. The second method to build a backbone worm or ribbon is to use the objects panel (see immediately below).


Many users will likely find the panel an easier way to operate in Grasp, and they can be used for many procedures. The panels are accessed through the first-level pop-up menu. There are object panels, and options panels. To build, hide, display, or alter the parameters of any object the objects panels are used. The options panels allow you to access the color panel, where you can create, define and index colors for coloring atoms, surfaces, etc. Another option panel that is very useful is the rotate and translate panel. This allows the user to adjust the rate at which molecules are rotated and translated on the screen. This is very useful, and I will come back to this later (see moving objects). For now we will learn how to build a backbone worm using the panels. From the "objects" panel click on the backbone worm button, and you will see menu appear. At the bottom of the menu click on build a worm, and worms will appear for all molecules. Using the upper portion of the menu you can select the type of worm that you like, and I recommend that you click on each button to see what the different choices are. I prefer the "variable thickness" selection. The parameters button in the lower right comer of this menu allows you to adjust the worm parameters when the wormed is displayed as "variable thickness".


The last conventional representation of molecules is to display the bond arrangement. Bonds can be hidden and displayed by using both the pop-up menus and the panels. Both of these methods will hide or display all bonds on all molecules. To display only a subset of the bonds, you must hide the others by setting the color to zero. The bond color command is be, and this is done as follows: m=1, bc=0 will hide all bonds on molecule l. You can then color bonds you wish to view, e.g. m=1, rn=64,116,152, bc=6 will then color bonds of residues 64,116,152, color 6, or m=1, r=gly, bc=2 will color all glycine bonds color number 2. The bonds of a molecule are only visible in the absence of displayed atoms and surfaces. The bonds can be displayed as lines, sticks, or rods, and the thickness of the rods can be set by the user. These parameters are most easily adjusted by clicking on the bonds button on the objects panel. This will give you a menu where you can select from these options (lines, sticks, and rods).

Hiding and Displaying Objects: Using the panels you can also hide or display atoms, bonds, surfaces, worms, etc. The button to the right of each panel button will hide or display that object. This will hide atoms, bonds, etc., for all molecules. If you wish to hide only some molecules you must do that by setting the color to zero.


DNA objects can be displayed in the same way as protein molecules, i.e. as atoms, surfaces, backbone ribbon, and bonds. The only difference between DNA and proteins is in building DNA backbone ribbons. The only method I know of to build a DNA ribbon is by the panels route. To do this click on the DNA objects button, and then select build backbone. Backbone ribbons will appear for all DNA strands up to four. In an unexplainable quirk, the limit for DNA backbones has been set to four, and this can not be changed without re-writing the code. I also know of no way to change the default coloring for DNA backbones. You can however select a tube or ribbon representation using the buttons on the menu. You can also select different base and sugar representations, or choose to hide the sugars and bases. This part of the program was written by a graduate student, and unfortunately contains a few glitches as I mentioned above.

4. Subsetting and moving objects.

Objects are moved by selecting the molecule(s) that you wish to move, and then executing rotations and translations with the mouse. If you are working with only a single molecule, or alternatively you want to move all molecules together, there is no need to create formal subsets, and to select molecules. If however you have multiple molecules, and you wish to move one or more of them relative to the others, formal subsets that contain the molecules to be moved must be created.


Formal subsets must be created through the pop-up menus. First, select formal subsets from the first-level menu, and then select create a formal subset. Grasp will then prompt you to select the molecules you wish to make subsets for. If you wish to make each molecule its own individual subset (and hence able to move each molecule by itself), select make all molecules subsets. Otherwise, select enter string, and then type in the molecule number you want to subset. After making this choice Grasp will require you name the subset, and will offer you a default name. If the subset contains only a single molecule the default name will be m(i), where "i" is the molecule number, I usually use these names. If I selected enter string, and placed more than one molecule in the subset I usually select enter different name, and then type in a short name that identifies the subset.


After creating a subset, the dials are automatically fixed to that subset. To return the dials to the world, or set them to a different subset, go to the formal subsets selection on the pop-up menu. Then select either set dials to world or set dials to a subset. If you select "set dials to a subset", Grasp will give you a pop-up menu from which you make the selection.


The diagram below illustrates how to move objects with the mouse. At first it is a bit cumbersome, but with practice I think you will find it adequate. You can adjust the rate at which molecules move. This is done by using the rotate and translate panel, which is found in the options panel. Increasing the values in the rotate and translate boxes at the bottom of this menu will increase the speed at which molecules move. Values of 0.1 for translation, and 1.0 for rotation are reasonable values for gross movement of objects.

5. Saving models and making images (writing files)

Models are saved by writing a PDB file of the coordinates the molecules. Coordinates can be written for all molecules or a only subset if you wish. If you have only one molecule. or if you did not create formal subsets. you simply write a PDB file using the write command in the first-level pop-up menu. Grasp will prompt you for a name which needs to end ".pdb" (e.g. model.pdb), and will ask you to either select "all molecules" or to define which molecules are to be written. I always select from the subsequent prompts absolute centering, and then radius and charge data. It takes only a few seconds to write the file. If you have created formal subsets, then you must first fix the rotation of each subset. This is done through the formal subsets menu. Select from this menu fix rotation of subset, and be sure to do this for each subset. If you fail to fix the rotation of a subset the coordinates will be written, but it will arranged arbitrarily relative to other molecules.

Images are made in Grasp by writing a RGB snapshot file of the image on the screen. This is done by using the write command in the first-level pop-up menu. From the write sub-menu select RGB snapshot file. Grasp will then prompt you to enter in a name for the file, and after you do this it will write the fle. After converting your RGB file to a JPEG or TIFF file, in a program such as XV, it can be opened in PhotoShop (available on the SGI "loop") and imaged.

6. Summary / important reminders.

  1. The cursor arrow must be in the Grasp graphics display window when you enter a command.
  2. There is no undo function in Grasp except for the last coloring command. To undue the last coloring command type c=u (or bc. vc, etc.)
  3. The proper order for a command line is molecule, residue, color.

    e.g., m=2, rn=50, c=3.
  4. To dehme a series of continuous residues separate the first and last residues by a comma, and place them within parentheses.

    e.g., m=l, rn=(1,49), c=2 (colors residues 1-49)
  5. To hide objects designate the color to be zero
    e.g., m=3, wc=0 (hides worm molecule3)
  6. Models are saved by writing PDB f~les of the coordinates. PDB files mUst be named so they end ".pdb" (e.g. model.pdb).
  7. if you have created formal subsets and wish to write a PDB file, you must first fix the rotation of each subset. This is done through the formal sobsets menu. Select from this sub-menu fix rotation of subset, and be sure to do this for each subset.
  8. images are made by writing RGB snapshot files. This is done by using the write command in the pop-up menus. Convert RGB files to JPEG or TIFF format, and open them up through photoshop.
  9. Below is a list of coloring commands for atoms, bonds, surfaces, and worms.









(10) Below is a list of commands to subset residue types (e.g. hydrophobic residues, polar residues etc.) HYDROPHOBIC POLAR CHARGED GLYCINE












I.I for specific amino acids use the three letter code

e.g. r=hyd, c=2
colors all hydrophobic residues the color indexed as number 2