Go to the previous, next section.

Support Programs

There are a number of programs and procedures available which assist in the use of CONGEN and which aid its development. We can divide these programs into three categories: programs which aid in the use of CONGEN, tools used in developing the program, and general programs for the manipulation of data. The tools used for program development are described in section The Implementation of CONGEN, and the other programs are described below. All of these programs are stored in the support directory. `CGP'. In the normal CONGEN setup, any user may execute these commands by simply typing their names. See section Installation of CONGEN on UNIX, and section Installation of CONGEN on VMS, for more details about the setup.

CONGEN Support Programs

A number of utilities exist to support the use of CONGEN as well as to create data files used by the program. There are also several programs for the display of space filling pictures of molecules. The interactive display program, peer, is described below, and the static display programs are described in section Displaying Pictures.

cmploop -- Preliminary Analysis of CGEN Files

The cmploop command provides a simple method to analyze CONGEN conformation file. The syntax is

cmploop [/b] [input-file [output-file]]

If no input-file is specified, the program defaults to `congen.crd', and if no output-file is specified, then standard output on Unix machines or `SYS$OUTPUT' on VMS machines is used.

The program will read the CONGEN conformation file specified as the input-file and it will compute the RMS difference between each conformation in the file and reference coordinate set stored in the beginning, see section Conformations File, for more information. The RMS difference is computed only over those atoms which are defined in both coordinates and which are different. If there are no such atoms, as might be the case when the reference coordinate set is empty, then the RMS is reported at 9.999. The /b switch directs the program to use just backbone atoms; N, C, and CA.

cmploop also reports the energy of each conformation as evaluated by the last EVL degree of freedom used in the search, see section Evaluate Degree of Freedom. It will also display the torsion angles for all backbone degrees of freedom used.

Frequently, one is interested in the conformations with the lowest energy or RMS deviations. See section sortn -- Sort a Text File by Numbers (Real or Integer), for a command that will sort the output of cmploop by these values.

Since cmploop computes RMS deviations over only those atoms which have different coordinates, it can report different RMS deviations than a COOR RMS command using the same atoms, see section The Coordinate Manipulation Commands.

comparecg -- Compare Two Conformation Files

The comparecg command provides a mechanism for comparing two CONGEN conformation files which may have different orders of conformations. It is very useful when comparing results from two CONGEN runs when parallel processing has been enabled. The command takes the two conformation files, generates output from cmploop, see section cmploop -- Preliminary Analysis of CGEN Files, removes the ordinal numbers and summaries from the listing, sorts the files by the energy values, and runs a difference program on the results. This program is available only on Unix machines.

The syntax is

comparecg [-g] [-f font] [-b|-i|-w|-W|-D] [-N name] cg-file1 cg-file2

The -g option is used to specify which difference program to use. When missing, diff is used. Otherwise, gdiff is used. All the other options are passed to the difference program you select.

comparecmp -- Compare Two cmploop Files

The comparecmp is identical to the comparecg command, see section comparecg -- Compare Two Conformation Files, except that the input files are the outputs of the cmploop program.

brkchm -- Converting Brookhaven to Congen Format

The program, brkchm, can be used to convert a Brookhaven data bank file to Congen format. The program will also generate a Congen input file to construct the PSF including disulphides. The program is interactive and reasonably self-explanatory. However, the program is not very robust, and it will often be necessary to edit the files it produces in order to get the structure built.

homology -- Simple Homology Program

The program, homology, is a simple sequence homology program which uses the homology finding code in CONGEN, see section Matching of the Comparison Data Structures. In order to use the program, you must prepare two sequence files as described in section Specifying a Sequence of Residues for a Segment, which will be the first requests of the program. Then, the program will ask for conserved residue sets, and you must respond with a set of lines giving residues which are to be considered equivalent. A blank line terminates this section. The program will then compute and report the homology and repeat the questions. You can terminate the program by specifying a blank file name for the first sequence file.

peer -- Interactive Molecular Display Program

peer is a simple graphics program for "peering" into a set of molecule. It can also be used to manipulate the molecules orientation with respect to one another in a very crude way.

The fundamental operation of the program is to display the molecule using either vector or space filling representations. Transparent spheres are also supported. You can move or rotate the view at will using the dials or the keyboard. The program's input file specifies the molecules by their atoms and bonding connections. Up to 32 molecules can be read in. These molecules can be selected using the buttons, and when they are selected, they can be moved relative to the non-selected molecules.

Not all of these features of this program can be used on Personal Irises. In particular, anti-aliased vectors, depth-cued vectors, and transparent spheres are not supported on PI's.

The peer file is normally generated by the peer command in CONGEN, see section PEER Command. It is a text file and describes of a set of molecules, each of which is given in three parts. Each of the parts consists an initial line count which is on a line by itself followed that many lines. The first part of molecule is the color table. Only the color table of the first molecule is used. Next comes a list of atoms specifying the segment id, residue name, residue id, IUPAC atomic name, XYZ coordinates, radius, and color. Finally, a list of bond connections is given, one per line where each bond connection is specified by atom numbers. In principal, such a specification could be made by hand.

There are two major modes of operation for peer, one where no molecules are selected, the other when some are. The difference between these two modes is the intepretation of the dials as we shall describe below.

Dial Usage in Peer

The dials are used to control either the entire view or to move individual molecules. When no molecules are selected, the dials have the following interpretation:

X rotation  o o  X translation
Y rotation  o o  Y translation
Z rotation  o o  Z translation
      Slab  o o  Scale

The rotations and translations apply to the entire view.

Slab and Z translation apply to clipping and display with regard to the front and rear of the viewing box. Slab controls the size of the viewing box using units of the vertical dimension of window. When this value is changed by the dials, it is displayed in the window title. The z translation specifies the position of the molecule within this viewing box. Its value is also displayed with this dial is changed.

You can make the molecule completely disappear by either shrinking the viewing box down too small, or by z translating the molecules out of the box.

When some molecules are selected, then the interpretation is similar except that Slab and Scale have no effect, the translations and rotations apply to the selected molecules only. The origin of rotation can be set with the set origin menu item.

Switches for Peer

The switch box is used to select molecules. When a molecule is selected, its color changes to the last color specified in the color table. Also, the light on the switch turns on. The switches act as toggles, so that successive operations of a switch select and then deselect the molecule.

Mouse Buttons for Peer

The left mouse button is used for atom identification. Move the cursor to the center of any atom, and touch the left mouse button. All atoms fairly close to the cursor will be displayed in the text window as well as the title bar. Note: it is difficult to pick an atom when drawn as a sphere because the pick area is very small compared to the usual sphere size. It is usually helpful to switch to the vector drawing before picking. The center mouse button has its default action of window moving. The right mouse button brings up the pop-up menu.

Keyboard Usage in Peer

In the event that dials and buttons are not available, keys on the keyboard may be used for those functions. The following set of keys are supported:

F1-F12
Toggle objects 1 through 12, respectively.

Keypad 0
Scale down in size if no objects selected.

Keypad .
Scale up in size if no objects selected.

Keypad 2
Z rotation, 2.9 degrees.

Keypad 3
Z rotation, -2.9 degrees.

Keypad 5
Y rotation, 2.9 degrees.

Keypad 6
Y rotation, -2.9 degrees.

Keypad 8
X rotation, 2.9 degrees.

Keypad 9
X rotation, -2.9 degrees.

Left Arrow
Translate Left.

Right Arrow
Translate Right.

Up Arrow
Translate Up.

Down Arrow
Translate Down.

Esc
Exit peer.

Pop-up Menu Items for Peer

The right mouse button brings up a large menu of options for controlling peer. In the commands which specify how a molecule is drawn, the behavior of peer depends on whether any objects are selected. If no objects are selected, then all molecules are drawn in the specified way. However, if any objects are selected, then only the selected objects are drawn according to the command. For example, if you wanted to draw a transparent space filling view of a molecule on top of a vector drawing of the same molecule, you would do the following:

  1. cat the peer input file twice and pipe it into peer.

  2. Hit button 1, and select the Vector menu item.

  3. Hit button 1 again to deselect the first object, and hit button 2. Select the space filling drawing type of your choice.

  4. Select the Toggle object transparency menu item, and you are done.

The pop-up menu options are as follows:

Vector
Draw using vectors. If no objects are selected, then all molecules are drawn using vectors. If objects are selected, then only the selected objects are drawn using vectors.

Anti-aliasing
Toggles anti-aliasing for all vector drawn objects. Anti-aliasing greatly improves the appearance of vectors at a 50% performance penalty. This option does not work on Personal Irises.

Toggle depth cueing
Toggles depth cueing for all vector drawn objects. Depth cueing results in distant vectors being dimmer than close ones. This effect is not very pronounced for Irises in bright environments. This option does not work on Personal Irises.

12 sided polyhedron
Displays atoms as a regular dodecahedron. Object selection rules are the same as for Vector.

60 sided polyhedron
Displays each atom as 60 sided polyhedral sphere approximation. Object selection rules are the same as for Vector.

240 sided polyhedron
Displays each atom as a 240 sided polyhedral sphere approximation. Object select rules are the same as for Vector.

Sphere library sphere
Uses the Silicon Graphics sphere library for drawing spheres. The lowest resolution sphere is an icosahedron, and the higher resolution spheres are generated by dividing the triangular faces. The next menu item sets the resolution. This option can give the best quality spheres, but at a great penalty in performance.

Set sphere divisions
Sets the number of sphere divisions used for sphere library spheres. The text window where peer was invoked is popped to the foreground, and you are queries for your selection. If your response cannot be parsed as a number, then no change will be made.

Stereo
Toggles stereo display. In a stereo display, the screen is split in half, and left and right eye images are displayed. The stereo is "wall eye", so the left eye image is on the left.

Y rot +6
Rotates the view by six degrees. This option is essential for making stereo slides from the screen. To use it, simply take one picture, touch this item to rotate six degrees, and take the second member of the stereo pair.

Y rot -6
Rotates the view by six degrees in the direction opposite to the previous item. This is used to restore the view after a stereo shot is made.

Set Origin
Set the origin of rotation. The origin is set to the last atom picked using the left mouse button. When no molecules are selected, then the origin is for the entire picture. When molecules are selected, the origin for the rotation of the selected atoms. In this case, the picked atom must be in a selected molecule.

Reset object position
Reset positions. When no molecules are selected, the view is restored to its initial state. When molecules are selected, then each of the molecules is returned to its initial position. In order to do a complete reset of the picture to its starting point, start with no molecules selected. Then, touch this menu item. Then, select all molecules, and hit this menu item again.

Highlight objects
Normally, when objects are selected, they are displayed with a different color than normal. Alternatively, they can be displayed with their normal colors. This option toggles between those two possibilities.

Toggle object display
Toggles whether selected objects are displayed.

Color objects
This menu item will change the color used for selected objects. When touched, it will display another menu giving the choice of colors to use. Touch the color you desire, and all selected molecules will now have this color.

Color touched residue
This menu item will change the color of all the atoms in the residue of the last atom touched. When touched, it will display another menu giving the choice of colors to use. Touch the color you desire, and the residue will now have this color. Note: This color will be seen only when the molecule is not selected.

Reset residue color
This menu item will change the color of all the atoms in the residue of the last atom touched back to its initial value.

Color touch segment
This menu item will change the color of all the atoms in the segment of the last atom touched. It works analogously to Color touched residue.

Reset segment color
Reset the color of all the atoms in the segment of the last atom touched.

Define color
Allows you to define new colors. When this item is selected, the window where peer was invoked will be popped to the foreground, and the current color table will be displayed. You can then specify a new color as a name and three sets of low, high pairs of color intensities. The intensities must not exceed the range of 0.0 to 1.0, and the pairs are given in red, green, and blue order. Once you specify a new color, any commands which request color changes will show your new color as an option. If you make a mistake in the specification, then nothing will happen.

Toggle touched atom transparency
Toggles whether the last atom touched is displayed transparently.

Toggle touched residue transparency
Toggles whether the last residue touched in displayed transparently.

Toggle touched segment transparency
Toggles whether the last segment touched in displayed transparently.

Toggle object transparency
Toggles whether the currently selected objects are made transparent

Set transparency factor
Sets the transparency factor (alpha) for all transparent atoms. The window where peer was invoked is used.

Set background
Sets the background color. Currently, there is a problem with the interaction of transparent atoms with a non-black background, whose solution remains a mystery.

Change light direction
Change the direction of the light source. The coordinate system used for lighting has the x axis in the horizontal direction, the y axis in the vertical direction, and the z axis toward the viewer. The default direction is (0,0,1). The window where peer was invoked is used to type in this information.

Set shininess
Change the shininess of the spheres. This parameter is the same as the glossiness parameter (G) in the sphere drawing commands, see section Adjustment of the Lighting and Shading. The window where peer was invoked is used for this.

Write peer file
Ask for a file name, and write the current view to a new peer file. The new file presents the atoms in their current position, so molecule motions and views can be stored for later use, or for conversion to CONGEN format by peercg, see section peercg -- Convert peer Files to CONGEN Coordinates for more information.

Write CONGEN coordinates
Ask for a file name and a one line title, and write the current view to a new CONGEN file. The new file presents the atoms in their current position.

Remove Border
Turns off the border display. Note: This does not take affect until the window is completely redrawn, eg by a resize or an iconification. This option is useful for a full screen display.

Set draw frequency
This option is used to reduce the complexity of a drawing so that large objects can be moved more quickly. It specifies a reduction factor in the number of either atoms or bonds drawn. A value of 1 specifies everything should be drawn, and a value of n specifies that every nth atom or bond should be drawn. The value is taken from the window where peer was invoked.

exit
Exits the program. Nothing is saved by default.

peercg -- Convert peer Files to CONGEN Coordinates

The command, peercg, runs a simple awk script to convert a peer file into a CONGEN formatted coordinate file. The usage is as follows:

peercg peer-file congen-coordinate-file

emap -- Backbone Maps and Proline Constructors

The construction of the backbone energy maps and the proline constructors is performed by a number of programs and user subroutines added to CONGEN, and is orchestrated by a makefile. The directory controlling the process is the `emap' directory under the `CGP' directory. To rebuild all these files within this `emap' directory, change your default directory to that one, and issue either a make all command on UNIX or an mms all command on VMS. To install new copies of these files in `CGDATA', use a target of install for the make or mms.

The pieces of the construction process are described briefly below:

`proring.inp'
A CONGEN run which minimizes the energy of a proline ring constrained to a wide range of phi angles along a one degree grid.

`mkprocns'
A simple program which reads `proring.out' and generates the proline constructor file, `pro.cns'.

`emap'
A user subroutine for CONGEN which read in a specification of a map grid and calculates Van der Waals energies for all the points. These are written into the map files. This program is used for the glycine and alanine maps

`emappro'
An analogue to `emap' that is used for the proline maps. The construction of the proline map requires an additional step to balance the energies of the cis and trans peptides. Only the five degree map is constructed using the input file, `emappro.inp'. Additional processing by `remappro' is needed to make the larger grid maps.

`remappro'
A simple program to divide the 5 degree map produced by `emappro'.

PDM88 -- Potential Derived Multipole Program

PDM88 is a program written by Donald E. Williams which is used in the calculation of charges. See section GAUSSIAN Command -- Invoke Gaussian Program, for bibliographic references and for complete information on the interface from CONGEN to this program.

This version of the program is very similar to the program published in QCPE. It has been modified to detect I/O errors so that it will fail cleanly if the Gaussian job fails.

PDGRID -- Potential Derived Grid Program

PDGRID is a program written by Donald E. Williams which is used in the calculation of charges. See section GAUSSIAN Command -- Invoke Gaussian Program, for bibliographic references and for complete information on the interface to this program.

This version of the program is very similar to the program published in QCPE. It has been modified to accept an external specification of radii, and to detect I/O errors.

Data Manipulation Commands

There are a number of commands which manipulate data in a general way. Similar tools are available on most Unix systems, but most VMS systems lack them, and there are subtleties that make some of these programs more useful than similar commands.

sortn -- Sort a Text File by Numbers (Real or Integer)

sortn and bigsortn sort files based on numbers found in each line in the file. The operation is specified through the command line, or if blank, the operations are specified interactively. sortn will sort a file containing no more than 25000 lines each containing no more than 133 characters. For bigsortn, the limits are 100000 lines.

The command line syntax is

sortn [/r] input-file output-file col1 size1 [col2 size2 ...]

coln are the positions of data, sizen is the number of characters for each data entry. The output file is sorted based on these keys after they have been converted to numbers. If the fields cannot be converted, then zero is used instead. If input-file is specified as a -, then standard input is used. If output-file is specified as a -, then standard output is used. The flag, /r, specifies that the sorting should be reversed, i.e. biggest first.

extract -- Extract Columns of Data from a File

extract extracts columns of data from a file and places them in another file. This program is similar to the Unix program, cut, and was primarily written to provide that functionality for VMS. The operation is specified through the command line, or if blank, the operations are specified interactively.

The command line syntax is

extract input-file output-file col1 size1 [col2 size2 ...]

coln are the positions of data, sizen is the number of characters for each data entry. The output file consists of the columns concatenated together in the order specified with no blanks in between. If input-file is specified as -, then standard input is used. If output-file is specified as -, then standard output is used.

histo -- Compute a Histogram from Data in a File

histo computes a histogram from the data in a file. The command line syntax is

histo input-file

If input-file is specified as a -, then standard-input will be used. Every word in the file which can be interpreted as a number is used.

As the program executes, you will be asked for the dimensions of the graph. The histogram is sent to standard output, and is designed to printed or displayed on a character device. histo uses the same code as the HISTO command in the Analysis facility, see section HISTO Command -- Print a Histogram.

scat -- Compute a Scatter Plot

scat computes a scatter plot from the data in a file. The command line syntax is

scat input-file

If input-file is specified as -, then standard input will be used. The data is free form, mixed with non-numeric input. Each line containing two numbers is used with the first two numbers going into the plot. scat uses the same code as the 2DPLOT command in the Analysis Facility, see section 2DPLOT Command -- Make a Scatter Plot.

numdiff -- Difference Based on Numbers

numdiff is used to compare two text files which contain numbers. The files must have the same number of lines, and must have the same structure for this command to work. The command line syntax is

numdiff file1 file2

Neither file may be specified as a hyphen (-) -- explicit names must be used. numdiff reads a line from each file, translates all punctuation to spaces, and then read each word on the line. An attempt is made to convert each word to a floating point number, and the minimum of the absolute and relative difference in magnitude is computed. If this number is larger than 0.01, then a message is printed and the two offending lines are displayed, otherwise, the difference is used to calculate the maximum difference over the entire pair of files. Large differences are not used in the calculation of the maximum, so differences in dates and CPU times will usually not affect the results. Messages are printed if numbers are not found in equivalent positions or if the number of words in a line do not match.

ndiffpost -- Numerical Difference Postprocessor

ndiffpost is an alternate program for comparing two text files which contain numbers. To use ndiffpost, you first use the diff program to compare the files and then use ndiffpost to calculate numerical differences. The command line syntax is

ndiffpost [cutoff=real] [input-file]

ndiffpost goes through all of the difference blocks and reports the maximum absolute or relative differences found in each block. It is very handy for comparing the results of a program after a small change is made to a numerical calculation.

The program expects the input-file to be the output of an ordinary diff command. Do not use any other options (such as -c) with the diff program. The cutoff parameter specifies any block which has a maximum difference smaller than the \f3cutoff\f1 will not be printed. It is useful for reducing the clutter in an output file.

A example command execution would be

diff file1 file2 | ndiffpost cutoff=1.0e-5

This program is not available on any machine where awk is not provided. Most VAX/VMS machines do not have it.

Go to the previous, next section.