Insight II



10       Graph Pulldown


Implementation

The Graph pulldown contains commands that allow you to create graphs, modify their appearance, and query their data. These commands work on all types of graphs (e.g., those created from atomic trajectory data, or any other source of data). A number of other graph-related commands that work only with atomic trajectory data can be found in the Trajectory pulldown. Note that throughout this chapter, commands are listed in the format Pulldown/Command. This is a shorthand notation for the typed form of a command. For example, Graph/Get specifies the Get command from the Graph pulldown, and is exactly equivalent to the typed form: Get Graph.

Graphs can be created from numbers in an ASCII file using the Graph/Get command. They can also be created by copying existing plots (with automatic combination of thresholds) using the Graph/Boolean command. The data from existing plots can be correlated to form a new plot using the Graph/Correlate command. Or, new plots can be created with arbitrarily complex equations using the Graph/Equation command.

Contour maps can be added to graphs with the Graph/Contour command. Display attributes such as colors used on the various lines, curves, and points in graphs can be altered using the options in the Graph/Color command. Text labels used to describe minimum and maximum values and to describe axes can be modified with the Graph/Label command. Tick marks (with or without labels) can be created with the Graph/Tick_Mark command. The scale of this text can be adjusted with the Graph/CharSize command. The axes can be moved from one side of the graph to the other, or can be inverted, using the Graph/Move_Axis command. Data points along the plot curves can be displayed or hidden using the Graph/Modify_Display command, which also controls the display of the line segments that connect data points along a plot curve. Bar graphs can also be constructed with the Graph/Modify_Display command. You can zoom in or out on portions of plot curves using the Graph/Threshold command. Similarly, the box enclosing the plots can be scaled and reshaped with the Graph/Scale_Axis command.

Graph/Integration, Graph/Differentiation, Graph/FFT_Real, and Graph/Smoothing can be used to perform various numerical operations on any curves in 2D or 3D graphs.

The actual data points on plot curves and the functions used to derive those points can be queried with either the Graph/Put or Graph/Info commands.

Equation

With the Graph/Equation command you can create plots of equations defined from data contained in other plots or from lists of numbers in simple ASCII files. These equations consist of operators and operands. An operand may be a graph plot specification, or a file and function specification, or a constant numeric value. Any graph property that can be displayed by a plot can be an operand, except cluster plots. An operator is a mathematical function, such as addition or subtraction. The full list of operators is described below.

There are five classes of operators (listed in Table 10-1) grouped according to the operation each performs, and according to their individual syntax requirements.

Table 10¯1 . Operator Classes and Syntax

MATH: syntax: expression operator expression  
  operators: +   add    
    -   subtract    
    *   multiply    
    /   divide    
TRIG: syntax: operator (expression)  
  operators: sin   sine    
    cos   cosine    
    tan   tangent    
    asin   arc sine    
    acos   arc cosine    
    atan   arc tangent    
UNIT: syntax: operator (expression)  
  operators: log   logarithm, base 10  
    ln   natural logarithm  
    abs   absolute value  
    exp   exponential  
POWER: syntax: expression operator number  
  operators: **   power    
    ^   power    
    (There is no difference between these.)  
AVE: syntax: operator (expression)  
    average of all values of expression  
    operator (expression real-number real-number)  
    average of expression using only values between the first and second numbers (the real-numbers must have a decimal point)  
    operator (expression integer integer)  
    average of expression using only frames between the first and second integers  
  operators: ave   average  
    avg   average  
    (There is no difference between these.)  

A number is any integer or decimal value. Negative number must be enclosed within parentheses. An integer must be a positive, nondecimal value.

An expression may be any grouping of the above syntax classes enclosed within parentheses, or may be a single operand. There are two groups of operands: number (a fixed numeric value, allowing creation of baselines for graphs) and plot or file/function specification.

A plot specification is:

graph<graph_number>:<plot_number>:<data_point>:axis

where <graph_number> and <plot_number> are integers, <data_point> is either an asterisk or empty, and axis may be x, y, or z. For example:

graph<graph_number>:<plot_number>:*:axis

graph<graph_number>:<plot_number>::axis

A file/function specification is:

file(<file_name>,<column_number>)

or:

file(<file_name>,<function_name>)

where <file_name> refers to a file having the graph file format (described in Appendix B), <column_number> is an integer which refers to a specific column of numbers in the file, and <function_name> is a string which also refers to a specific column of numbers in the file. Either <column_number> or <function_name> should be specified, but not both. The left-most column is considered number one. For examples of valid equations, refer to the on-line documentation for the Graph/Equation command.

Correlate

The Graph/Correlate command is used to perform auto- and cross-correlations on graphs. The formula for standard correlations is:

For a normalized correlation, the formula is:

where C is the correlation, N is the number of frames, and A and B are the functions being correlated. The variable j refers to the current frame minus 1. The "current frame" starts as 1 and ends as N. In the case of auto-correlations, A and B are equal.


Command Summary

Graph Pulldown

The Graph pulldown commands allow you to create and manipulate graphs.

Get

The Graph/Get command is used to create graphs that plot functions whose domain and range are specified in files which have been generated by the Put Graph command, by the various Polymer application modules, or in files that have been created manually, following the file format described in Appendix B.

Put

The Graph/Put command is used to put the data used in a graph into a file. If more than one graph is specified, only the unique data from each graph is written to a file.

With the exception of cluster graphs, all plots written to a file using the Put command (with the Header Style parameter set to the Title option and the External_File parameter off) can be used to create new plots with both the Graph/Get and Graph/Equation commands.

You can also create files that can be used as input to the Insight II program's Contour utility. Extra information is put at the start of the file so that the file can be used for this purpose. Please refer to the Put Graph on-line command description.

Boolean

The Graph/Boolean command allows you to create new plots by cloning plots from existing graphs. The new plots all share the same thresholds that are formed by unioning or intersecting existing threshold lists. When you union thresholds, you are able to see at least as much of each plot as you could see before they were cloned. This is because you are seeing thresholds that are merged (unioned) together. When you intersect thresholds, you may see less of each plot because you are looking at only those sections of the plots where thresholds overlapped (intersected). You can also use the Boolean command to clone plots that have no thresholds. In this case, the command is merely a tool that simplifies the task of copying plots.

Correlate

The Graph/Correlate command is used to either auto- or cross-correlate plots on existing graphs. By default, the correlation result is normalized.

Equation

The Graph/Equation command is used to create a graph that uses mathematical expressions to describe each axis. Existing graph functions or data from files produced by the Put command are used as operands within the equation.

Contour

The Graph/Contour command creates a set of contours composed of the specified contour levels from a specified Insight II program graph plot, or from a Contour File. A contour level is a curve (or surface) connecting all of the points in the given graph which have the same value. This contour is automatically displayed in a graph.

When creating contours from a graph plot, you may create a single contour level or a range of contour levels, or you may delete a single contour level from an existing contour.

Line_Fit

The Graph/Line_Fit command allows the determination of the equation of the line that best fits the data points contained in a selected curve segment. The results can be displayed as a line on the graph being examined. The equation of the line is reported as well.

Interpolation

The Graph/Interpolation command allows you to interpolate an existing graph with either the linear or cubic spline method. It also allows you to modify the number of points in the graph.

Integration

The Graph/Integration command enables you to integrate a plot using the trapezoidal rule. Since a plot is a set of discrete data, the trapezoidal rule is sufficient. You can specify the plot by picking from a graph, and specify the integration range by setting start and end data-points. By default, the start and end data-points are set to the first and last data points in the plot. The results are given in two ways: a plot showing the running integration, and a numerical value of the total integral. The former can be plotted in either a new graph or in an existing graph; the latter is displayed in the Information area.

Differentiation

The Graph/Differentiation command enables you to calculate derivatives of a plot by using the Central Differences method. You can specify the plot by picking from a graph. By default, the calculation is conducted over the entire range of the plot on the independent axis. However, you can specify a smaller region to integrate by setting the start and end points in the parameter block. The results are given as a plot showing the running derivatives in a new graph or in an existing graph.

FFT_Real

This command performs fast Fourier transform for an one-dimensional, real function. The input-data must be even-spaced and the number of points must be an integer power of 2. Failure of the first requirement leads to stop of calculation. If the second requirement is failed, the data will be truncated, to the largest, available integer power of 2. Only the real-part of the results (Power Spectrum) are given, which are plotted in a new graph or an existing graph.

Smoothing

Two methods are provided in the Graph/Smoothing command to enable you to smooth a plot. The Least_Squares method reconstructs data by three-point fitting the input data to a first-order polynomial. This procedure can be repeatedly performed by specifying the parameter N_Iteration. The Fourier_Transform method transfers the input data into frequency space, filters out high-frequency components according to the parameter Window_Size, then restores the data by reverse transform. Both N_Iteration and Window_Size affect the results obtained; the larger these values are, the smoother the results. The results are given as a plot in a new graph or an existing graph.

CharSize

The Graph/CharSize command allows you to change and reset the size of text associated with graphs.

Color

The Graph/Color command is used to specify and alter the colors for portions of a graph such as axes, box segments, labels, cursors, dynamic numbers, and plots (in their entirety or just segments). If an axis is recolored, the axis, the label, and the minimum and maximum values are all displayed in the new color.

You can color a graph using predefined colors, as well as blends, and hues of predefined colors.

Label

The Graph/Label command allows you to customize the text of the labels on the x, y, or z axis of a graph, or the minimum or maximum labels on the x, y, or z axis of a graph. Each graph can also have an overall label that is placed just above the graph. The maximum number of characters allowed in an axis label is 19. The maximum number for the overall label is 29. The maximum number of characters displayed for the minimum and maximum labels is 10.

Move_Axis

The Graph/Move_Axis command allows you to change the position or orientation of an axis on a graph. By setting the Shift_Axis parameter to on, the axis can be moved to a position that is parallel to but opposite from the old position. This can be used with the Color command (for coloring box segments) and the Transform/Overlay command to create what looks like a single graph with opposing axes.

By setting the Invert_Axis parameter to on, the axis can be inverted. That is, its origin and termination are exchanged. The origin of the graph can thereby be moved to a different corner of the graph box.

Modify_Display

The Graph/Modify_Display command allows you to alter the display characteristics of a graph plot. Some options are:

In addition, you can control the scale of the points, and the width and direction of the bars. Various combinations of the options above are also possible.

The notion of displaying data points can be important when using commands like Trajectory/Conformation, where you frequently pick individual data points. The picking (and the differentiating between points) is made much easier by temporarily turning on display of the points.

Scale_Axis

The Graph/Scale_Axis command allows you to scale any of the graph axes.

Threshold

The Graph/Threshold command allows you to zoom in on portions of a plot, or to set an axis' minimum or maximum limits. Plot functions that are periodic (such as angle measurements) cannot be used in the Threshold command.

Tick_Mark

With the Graph/Tick_Mark command you can add, modify, or remove tick marks and their labels on any axis.

Info

With the Graph/Info command you can get information pertaining to plots or map contours in graphs.

For plots, you are told which functions are set for the x, y, and z axes. For functions that use atom selections (such as distance, angle, etc.), you are told specifically which atoms were chosen. However, graphs created with the Get command do not retain the history of what atoms (if any) their data pertain to. Therefore, executing Info for graphs created with the Get command do not list any atoms. In some cases you may be able to find the atom references in the top of the file used as input to the Get command.

For map contours, you are told the contour level (for example, the energy level) and the x, y, and z values for the data point on the contour. For example, if a map relates two dihedral angles to the energy of a conformation, then Graph/Info might tell you that a given point on a particular contour corresponds to energy level -0.50, and that the two dihedral angles are 140.00° and -60.00°, respectively.

Among the parameters contained in the Info command are Graph and Map. By setting these to On or Off, you specify whether you are interested in plot or map information. You may set one or both of them On.

Depending on the values of the Graph and Map parameters, you may need to give a plot point (in the Graph Spec parameter) or a map contour point (in the Map Spec parameter). You may type in either of these parameter values or you may interactively pick them off of a graph. If you pick a point at which a plot and a map contour meet, both parameters are filled in simultaneously. If a plot or map point is given, the coordinates of the point are also given.

If Info does not give you enough information, try the Put command. Also note that when you pick a plot point when no parameter block is active, the x, y, and z values are given along with the full plot point specification.

Figure 28 . Graph/Threshold Examples

A. No thresholds.   B. (Both plots) X axis thresholded from 10 to 15, but not zoomed in.   C. (Both plots) X axis thresholded from 10 to 15, and zoomed in.   D. (Top plot only) X axis thresholded from 10 to 15, but not zoomed in.   E. (Both plots) X axis thresholded from 4 to 6 and 8 to 10, and zoomed in.   F. (Top plot) X axis thresholded from 8 to 10.   G. (Both plots) X axis thresholded from 6 to 8, Y axis thresholded from 9 to 14, and zoomed in.   H. (Both plots) Y axis thresholded from 0 to 20, and zoomed out.   I. (Top plot only) Y axis thresholded from 10.46 to 12.45.    


Tutorial

As of this release, most tutorials are now available online for use with the Pilot interface. To access the online tutorials for Graph, click the mortarboard icon in the Insight II interface.

Then, from the Open Tutorial window, select Insight II tutorials, then the Graph Pulldown option and choose from the list of available lessons:

Lesson 1 Basics, Interpolation, and Numerical application

You can access the Open Tutorial window at any time by clicking the Open File button in the lower left corner of the Pilot window.

For a more complete description of Pilot and its use, click the on-screen help button in the Pilot interface or refer to the Insight II User Guide.




Last updated December 17, 1998 at 04:27PM PST.
Copyright © 1998, Molecular Simulations Inc. All rights reserved.