RibbonJr is documented in online manual pages and in the MidasPlus manual.
By giving the command "man ribbonjr", you can get information on all the
options available for this program. There are quite a few nice options available,
so it is a good idea to look at this documentation.
To get started, give the following commands, and don't forget the "." after
the cp command:
cp /usr/local/midas/tutorials/cgl/ex2/rib.com .
midas -f /usr/local/midas/tutorials/cgl/ex2/dna
This copies the file "rib.com" into your working directory, calling it the
same name, rib.com. The second command starts a MidasPlus session in "fullscreen"
mode (note the -f).
RIBBON PICTURES.
1) We will be looking at a piece of DNA. First, see how the DNA looks with
the default ribbonjr settings. Once inside MidasPlus, type at the command
line:
command: ribbonjr
The four bases are each a different color, and the guide atoms for the ribbon
are all orange, making the backbone ribbon orange. Ribbonjr uses the atom
C5* as the guide atom. When done examining the ribbonjr image, click the
left mouse button to return to MidasPlus.
2) There are many options in ribbonjr, which can all be reviewed by giving
the "man ribbonjr" command once you are no longer in MidasPlus. Because
of the large number of options, it is convenient to put ribbonjr commands
into a file, and then source the file, rather than type the command out each time you wish to use it. Such a file has been provided
for you, in /usr/local/midas/tutorials/cgl/ex2/rib.com (you copied it at
the beginning of this exercise). It contains the following line, which can
also be directly typed in at the MidasPlus prompt while running MidasPlus:
ribbonjr -h -P na_sugar -P na_base -B .1 -A .1 -J 4.0
To cause MidasPlus to execute the command contained in rib.com:
command: source rib.com
The results should be different from just typing "ribbonjr". The bases appear
solid, as do the sugars. Also, the oxygen on the sugar is larger.
2) You can change this file during a MidasPlus session by "lowering" MidasPlus
using the right mouse button along with the ALT key during your session,
and then editing your rib.com file. Please note that the name "rib.com"
is arbitrary; the file could be have any name. Any line in a file that you
source from MidasPlus that has a # at the start of the line is ignored.
In this way, you can have comments in your file, and you can turn various
lines "on" and "off" by removing or adding "#" to the front of a line.
If your machine has the SGI "Inventor" program suite on it, you can create
a ribbon that you can interactively rotate. This requires that ribbonjr
be given an additional option to change the output to inventor format. This
is the "-f inventor" option. Put a comment mark in front of the existing
line, and create a new line with this option in it. Your rib.com file should
then look as follows:
#ribbonjr -h -P na_sugar -P na_base -B .1 -A .1 -J 4.0 ribbonjr -f inventor
-h -P na_sugar -P na_base -B .1 -A .1 -J 4.0
"Raise" MidasPlus and source this new file. If Inventor does not exist on
this machine, you will get an error message, and instructions for how to install this program, should you desire to do so.
If the "Inventor" program suite is installed, a window will come up in about
a minute or so (you can keep working in the meantime). Unfortunately, the
interactive viewer program that comes with Inventor uses a lot of memory,
so performance can be quite poor on machines with limited memory. To get
acceptable performance with the structure in this exercise, IRIX 4.x systems
would need at least 32 MB of memory and IRIX 5.x systems would need 64 MB.
You may want to undisplay parts of the example structure if your performance
is unacceptable as is.
In the viewer, you should be able to move the ribbon by clicking and dragging
in the viewer window. You should also be to change background colors, add
fog, etc., by using the menus and buttons around the edges of the viewer.
Next we will see how to change background colors within MidasPlus, and how to create still images for papers or slides.
3) To vary the color of the background, or of helices or sheets, ribbonjr
options are used; such as "-b" for background color. Three components of the color must be given; red,
green and blue. The values for each color must be between 0 and 1. Since
these are not primary colors (red, yellow and blue are primary), it may
take some experimenting to get used to this color system. To get the color
yellow, you have to use 100% Red, 100% G, and 0% Blue. Add the following
option to your rib.com file, and comment out the last line you created,
to get the following line:
#ribbonjr -h -P na_sugar -P na_base -B .1 -A .1 -J 4.0 #ribbonjr -f inventor
-h -P na_sugar -P na_base -B .1 -A .1 -J 4.0
#The following command makes a graded black to blue background ribbonjr
-h -P na_sugar -P na_base -B .1 -A .1 -J 4.0 -b 0.00,0.00,0.00,0.00,0.00,1.00
This should create an image with a background graded from black on the top
to blue on the bottom.
4) Black and white pictures are often necessary for publication. We are
going to make a picture similar to the one found in the file ribbonjr.tiff
in /usr/local/midas/demos/images, except in black and white. Since MidasPlus provides only black, white,
and medium gray at start-up, it is important to know that there is now a method in MidasPlus for getting your own custom colors. This means that you can create your own shades of grey for your image,
or any other custom colors you wish, beyond the starting 65 colors that
MidasPlus provides. For example, for black and white images, solid black
often does not have enough highlights for good definition of your bonds
or ribbons. So, in order to create your own color, you can use the colordef
command within MidasPlus:
colordef mygray .75 .75 .75
These three numbers, .75 .75 .75, stand for the amount of red, green and
blue in your color. The numbers need to range between 0 and 1. As long as
you have equal values of red, green and blue, you should get shades of gray,
ranging from white (1.0 1.0 1.0) to black (0.0 0.0 0.0).
Use this color for the DNA. We will color the whole DNA molecule this color:
set bg_color gray
make background medium gray
devopt smooth off
turn off antialiasing
set linewidth 3
make lines 3 times normal width
color mygray
color structure with new color
Now we will draw a ribbon of this:
ribbonjr
5) Material properties can change the effect of color quite a bit as well.
If you are not getting enough contrast, try increasing the diffuse lighting
of your model. Add the following "-l" option to your command line:
#ribbonjr -f inventor -h -P na_sugar -P na_base -B .1 -A .1 -J 4.0
#The following command makes a graded black to blue background #ribbonjr
-h -P na_sugar -P na_base -B .1 -A .1 -J 4.0 -b 0.00,0.00,0.00,0.00,0.00,1.00
#The following material property has medium ambient light ribbonjr -h -P
na_sugar -P na_base -B .1 -A .1 -J 4.0 -l 0.5,1.0,0.9,0.8
These four numbers at the end of the line represent ambient, diffuse, specular and shininess for lighting the material of the ribbon and the balls and sticks. The default values are usually fine, but this is an example of how to control them if desired, such as when trying to provide more contrast in a difficult black and white image where color is not an option for differentiating between areas of interest.