MidasPlus Tutorial Example 1


MidasPlus Neon Exercise



Covered in this exercise:

1)  Unix and SGI utility commands cp, cat, blend, assemble, ipaste,
cat, man.

2)  MidasPlus commands show, window, neon, distance, midaspush, midaspop,
 conic, preneon, move, and pdbrun.
3) Silicon Graphics (SGI) image tools ipaste, blend, assemble, and izoom.

Important Note: This exercise is geared toward users of Silicon Graphics platforms. Use of conic and neon on other machines is similar, except that image files should be written in a different format (TIFF is the default in Midas version 2.1) and, of course, the SGI image tools would not be available.

Neon is a user-contributed piece of software written by Tom Hynes of Genentech. It works in conjunction with conic, and there are manual pages for both programs. When neon is used, the current directory is searched for a file named neon.dat, which contains various adjustable parameters affecting the final image. If this file is not found, default parameters are used. Below are the contents of an example neon.dat; the numbers in the leftmost section can be changed to customize the image. Neon creates many spheres close together to form cylinders along bonds. These spheres are passed on to conic for rendering. Since neon includes conic, conic options and an additional file to control conic features can be used as well as the neon control file, which must be named neon.dat.


0         |Tubetype           |0=all atoms, 1=smooth, 2=bent, 3=straight|
3         |Sphere density     |1=rough, 5=high resolution     |
1         |Dash    flag       |0=no dashes,  1=draw dashes    |
1         |Object  flag       |0=no objects, 1=draw objects             |
0         |CPK     flag       |0=normal Render output, 1=CPK output     |
0.18      |Stick   thickness  |Angstroms                                |
0.50      |Tube    thickness  |Angstroms                                |
0.15      |Dash    thickness  |Angstroms                                |
0.20      |Object  thickness  |Angstroms                                |
0.04      |Density thickness  |Angstroms                                |
0         |Atom rendering     |0=stick, 1=ball & stick                  |
0.25      |Atom size          |Percent of vdw radius (ball & stick mode)|
1 0.50    |Depthcue,Percent   |0=n, 1=y; percent aft intensity          |
0 0.0 0.0 |B-factor,Range     |0=n, 1=shade to color, 2=rainbow; min-max|
1.0 1.0 1.0|B-factor color     |RGB (red, green, blue)                   |
4         |Number of dashes   |Number drawn between each pair of atoms  |
1.0 1.0 1.0|Dash color         |RGB (red, green, blue)                   |
0.30      |Dash offset        |Dist. from atom to first dash, Angstroms | 
0.00      |Dash/space ratio   |0.0=dots, 0.4=dashes, 1.0=solid line     |
4.00      |CA conect distance |Angstroms                                |



(1) An example neon.dat has been provided for you
Copy a sample neon.dat into your directory: 

cp /usr/local/midas/tutorials/cgl/ex3/neon.dat .

Note the "." at the end of the command.
The Neon control file must be called neon.dat.  If you have
different files for different images, you must rename your file
neon.dat when you want to use it. 

2)  Start a MidasPlus session and display a molecule of your choice.

3)  Show only a small number of atoms, say, one residue.  
For example(if your molecule contains a residue number one):

     command:  show #0:1 

4)  Zoom in on that residue:

     command:  window

This residue should now fill your screen.


5)  Give the command:

     command:  neon

Once the image is drawn, clicking on it will remove it.

6)  Use the distance command to create a dashed line between two
atoms that you have displayed.

     command:  distance (use the ALT key and the mouse to pick two
          atoms).

Try neon again. Then, edit your neon.dat file to change a parameter, such as the color of the dashed line, and try neon again. If your MidasPlus window is obscuring your system windows, you can use the midaspush command to lower it. Later, to raise it to the front, place the cursor the MidasPlus part of the screen, type midaspop, and hit return

7) More complicated images may be useful for presentation or publication purposes. The fol lowing shows how to make an image of sticks inside transparent spheres, using the SGI image tool blend.

First, save a stick image with neon:

command: neon -f sgi -o sticks.img

-f indicates output format and -o indicates the output filename. Next, without moving the atoms, save a spheres image with conic:

command: conic -f sgi -o spheres.img

At the Unix prompt (you can use midaspush again), look at the image files with ipaste:

ipaste sticks.img

(to exit, use the mouse to select Exit from the top bar) 

ipaste spheres.img

Now, blend the images together:

blend sticks.img spheres.img both.img .5 
ipaste both.img 

The .5 is the fraction of the final image contributed by the second image. Try these:


blend sticks.img spheres.img both.img .8 
ipaste both.img 
blend sticks.img spheres.img both.img .2 
ipaste both.img


(8) The next type of complicated image includes both spheres and sticks, where neither is tran sparent. The following example shows how to make an image with side-by-side stick and sphere representations of the same group of atoms. With a small number of atoms (one or two residues, or a small molecule) displayed in MidasPlus, use preneon to put the output from the first part of neon (many spheres along each bond) into a file:

command: preneon cat > coordinates.file

Next, move the atoms to the side in preparation for making spheres:

command: move x 25 1

This translates everything 25 angstroms along the x axis, and does it 1 time. If that was too far, use a move x command with a negative number to move the atoms in the opposite direction. Now put the coordinates into a file without preneon processing, so that full-sized spheres will be drawn:

command: pdbrun cat >> coordinates.file

This adds more lines of coordinates to the end of the file made previously with preneon (see above). At the Unix prompt, outside of MidasPlus (you can use midaspush again), render the final image with both sticks and spheres:
conic -f sgi -o all.img coordinates.file
ipaste all.img


Sometimes you will want to show different parts of the same molecule as sticks and spheres. To do this, first display the "sticks" part only and use preneon as above; second, (without moving anything) display the "spheres" part only and use pdbrun as above; finally, use conic as shown above.

Another way to do a simple side-by-side comparison, however, is to make two separate images and join them together with assemble:

assemble 2 1 join.img all.img both.img

If the component images were wider than half the screen, you may want to scale down the assembled image before viewing it:

izoom join.img shrunk.img .5 .5
ipaste shrunk.img

There are many tools on an SGI for manipulating images; they can usually be reviewed by giv ing the command:

man -k img

Of course, you can access individual manual pages if they are installed on your machine, for example:

man assemble

This concludes the exercise. Remember to clean up your directories by rm-ing any unwanted files!


7/97 revised by Elaine Meng, original by Julie Newdoll
UCSF Computer Graphics Lab