User generated MOL-items (USEGRA)

Introduction.

The menu PORNO holds the real fancy graphics stuff and some options that were requested by users. The menus PORNO and GRAEXT are somewhat similar, so options expected here could very well be found in the GRAEXT menu. Also the

User created items

Reading lines from a file (LINFIL)

The command LINFIL allows you to read graphics lines from a file. The lines have to be written one graphics line per line in the input file. The format is 7(F10.0,1X), that means 7 real numbers that are written in the columns 1-10, 12-21, 23-32, etc. The position of the decimal point within the numbers is free. The first three numbers are the X, Y and Z coordinates of the one end of the line. The 4-th till 6-th number are de coordinates of the endpoint. The seventh number is the colour on the usual 0 - 360 scale.

Reading dots from a file (DOTFIL)

The command DOTFIL allows you to read graphics dots from a file. The dots have to be written one dot per line in the input file. The format is 4(F10.0,1X), that means 4 real numbers that are written in the columns 1-10, 12-21, 23-32, and 34-43. The position of the decimal point within the numbers is free. The first three numbers are the X, Y and Z coordinates of the dot. The fourth number is the colour of the dot on the usual 0 - 360 scale.

Reading general graphics commands from a file (ALLFIL)

The command ALLFIL allows you to read graphics lines, dots, labels and viewing directives from a file. This file is keyword driven. That means that every line starts with a keyword. Allowed keywords are DOT, CROSS, LINE, DASH, CENTER, TEXT (or LABEL), RESIDUE, CALPHA, CONE, CIRCLE, WHEEL, BALL, PCKLAB, PCKPNT, MOLLAB, LINATOM, AARROW, HAT, FOURCONE, TRICONE, PLANE, SCALE and END.

Some of these commands are functionally similar to 'normal' WHAT IF commands. This redundancy was built in as a form of user-friendliness.

The ALLFIL command can be preceded by the SIMPLE command. This ensures that WHAT IF will for up to eight MOL-items not prompt you for anything. Give SIMPLE again to disable the simple graphics mode.

WARNING. Be aware that if one of these options requires N input parameters anything else than exactly N parameters will lead to errors. In other words there is virtually no error checking done on ALLFIL files.

And, please do not forget the END statement at the end.

Example

You can cut the next file from the writeup and feed it as input file to the ALLFIL command. (assuming that you have at least 10 residues in the soup! Otherwise, remove the RESIDUE and CALPHA commands).
DOT 2 2 2       RED
DOT 2.1 2 2     RED
DOT 2 2.1 2     RED
DOT 2 2 2.1     RED
DOT 2.1 2.1 2   RED
DOT 2.1 2 2.1   RED
DOT 2 2.1 2.1   RED
DOT 2.1 2.1 2.1 RED
DOT 8 2 2       RED
DOT 2 2 10      BLUE
DOT 7 2 10      BLUE
DOT 2  7  2     RED 
DOT 7  7  2     RED
DOT 2  7  9     BLUE
DOT 7  7  9     BLUE
DOT ITEM

CROSS 1.2 2.2 3.6 BLUE
CROSS 2.2 2.2 3.6 RED
CROSS 3.2 2.2 3.6 GREEN
CROSS 4.2 2.2 3.6 YELLOW
CROSS 5.2 2.2 3.6 PURPLE
CROSS 6.2 2.2 3.6 CYAN
CROSS 7.2 2.2 3.6 MAGENTA
CROSS 8.2 2.2 3.6 ORANGE
CROSS ITEM
COMMENT This line is just comment and thus is skipped
DASH 1 1 1   8 1 1   10
DASH 1 1 1   1 1 10  10
DASH 8 1 1   8 1 10  BLUE
DASH 1 1 10  8 1 10  BLUE
LINE 1 1 1   1 7 1   GREEN
LINE 8 1 1   8 7 1   GREEN
LINE 1 7 1   8 7 1   120
LINE 1 7 1   1 7 10  120
LINE 1 1 10  1 7 10  GREEN
LINE 1 7 10  8 7 10  GREEN
LINE 8 7 1   8 7 10  RED
LINE 8 1 10  8 7 10  RED
LINE ITEM

TEXT 8 1 10 CYAN
one corner point
TEXT 8 7 1  CYAN
another corner

AARROW 1.3 1.2 1.8 3.0 5 -6.1 RED
AARROW ITEM

PLANE 1 1 1  2 2 2  3 3 3  4 4 4 purple
CIRCLE -6 0 0  0 0 1  3 GREEN
WHEEL  -6 0 0  0 0 2  3.5 3.7 260

RESIDUE 1 2
RESIDUE 4 5
CALPHA  6 10
RESIDUE ITEM

LINATOM 6 O 10 N red

BALL 6 CA
BALL 7 CA
BALL 8 CA
BALL ITEM

CONE 1 1 1 4 4 4 30 YELLOW
CONE ITEM
HAT 1 1 1 4 4 4 30 8 YELLOW
HAT 1 1 1 4.2 4.2 4.2 30 12 ORANGE
HAT ITEM

TRICONE 0 0 0   1 0 0  0 1 0  0 0 1   1.5  12 RED
TRICONE ITEM

CENTER 1 1 1 

SCALE 0.6

END

The ALLFIL keyword "ITEM"

All options in ALLFIL are closed with an ITEM command, this is CONE ITEM for cones, LINE ITEM for lines, etc. However, you do not need to close every option immediately with an ITEM command. Multiple options that produce the same kind of data (lines or dots) can be combined in one ITEM. So, the following ALLFIL file will work fine:
CROSS 7.2 2.2 3.6 MAGENTA
DASH 1 1 1   8 1 1   10
DASH 1 1 1   1 1 10  10
LINE 8 1 10  8 7 10  RED
AARROW 1.3 1.2 1.8 3.0 5 -6.1 RED
CALPHA  6 10
RESIDUE ITEM

DOT 2 2 10      BLUE
DOT 7 2 10      BLUE
BALL 7 CA
BALL 8 CA
BALL ITEM
The following groups of commands are allowed to reside in one ITEM:
MOLLAB 
LINE DASH AARROW CROSS CONE HAT PLANE RESIDUE CALPHA CIRCLE WHEEL TRICONE
BALL DOT 
I.e. You can have LINE and CIRCLE in one ITEM, but not LINE and BALL, nor WHEEL and MOLLAB, etc.

The following commands are independent commands that do not sit in ITEMs:

CENTER
LABEL/TEXT 
SCALE

The ALLFIL keyword "COMMENT"

The COMMENT command has no explicit format. If the first 6 characters of an ALLFIL line are COMMEN, then that line will be entirely skipped.

The ALLFIL keyword "LINE"

The LINE command has the format:

LINE 7 numbers (or 6 numbers and a colour)

The first six numbers are X,Y,Z of the begin and end point of the line. There should either be a seventh number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of LINE commands should be closed with the LINE ITEM command.

The ALLFIL keyword "AARROW"

The AARROW command has the format:

LINE 7 numbers (or 6 numbers and a colour)

The first six numbers are X,Y,Z of the begin and end point of the arrow. There should either be a seventh number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of AARROW commands should be closed with the AARROW ITEM command.

The ALLFIL keyword for drawing an arrow is called AARROW with double A to distinguish it from the normal WHAT IF command ARROW in the GRAEXT menu.

The ALLFIL keyword "BALL"

The BALL command allows you to draw a sphere of dots around an atom. This option functions similar as the DOTATM command in the GRAEXT menu. The keyword BALL must be placed at the first 4 positions of the line. It must be followed by a residue number and the name of an atom in that residue. The rest of the ALLFIL file will be mis-interpreted if you make a mistake in the atom name. The sphere of dots will get the colour that the atom has in WHAT IF. A set of BALL commands should be closed with the BALL ITEM command.

The ALLFIL keyword "CIRCLE"

The CIRCLE command has the format:

LINE 8 numbers (or 7 numbers and a colour)

The first three numbers are X,Y,Z of the center of the circle. The second three numbers for a vector orthogonal to the circle. Make sure that these first two vectors do not fall on one line with the origin! The seventh number is the radius of the circle. There should either be a eighth number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of CIRCLE commands should be closed with the CIRCLE ITEM command.

The ALLFIL keyword "WHEEL"

The WHEEL command has the format:

LINE 9 numbers (or 8 numbers and a colour)

The first three numbers are X,Y,Z of the center of the inner circle. The second three numbers for a vector orthogonal to the wheel. Make sure that these first two vectors do not fall on one line with the origin! The seventh number is the radius of the inner circle. The eight number is the radius of the outer circle There should either be a nine-th number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of WHEEL commands should be closed with the WHEEL ITEM command.

The ALLFIL keyword "PLANE"

The PLANE command has the format:

LINE 14 numbers (or 13 numbers and a colour)

The first three numbers are X,Y,Z of the lower-left corner of the plane. The second three are for lower-right, the next three for upper-right, and the next three for upper-left. The 13-th number is the line-density in the plane. There should either be a 14-th number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of PLANE commands should be closed with the PLANE ITEM command.

The ALLFIL keyword "DASH"

The DASH command has the format:

DASH 7 numbers (or 6 numbers and a colour)

The first six numbers are X,Y,Z of the begin and end point of the line. There should either be a seventh number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of DASH commands should be closed with the DASH ITEM command.

The ALLFIL keyword "RESIDUE"

With the RESIDUE command you can tell WHAT IF to display residues. The residues will be coloured using the present colours in WHAT IF. The keyword RESIDUE must be placed in the first seven columns of the line. It must be followed by either a residue, or by a residue range. This residue input follows the same rules as normal WHAT IF residue input. A set RESIDUE commands should be closed with a RESIDUE ITEM command.

The ALLFIL keyword "LINATOM"

The ALLFIL keyword LINATOM should be followed by residue-1/atom-1 and residue-2/atom-2 and a colour. The two indicated atoms will be connected by a line of the colour given. Residues can be given as usual in WHATIF (however, if you use O type residues, put the O and the residue name together without blank in between). A set LINATOM commands should be closed with a LINATOM ITEM command.

The ALLFIL keyword "CALPHA"

With the CALPHA command you can tell WHAT IF to display an alpha carbon trace. The alpha carbons will be coloured using the present colours in WHAT IF. The keyword CALPHA must be placed in the first six columns of the line. It must be followed by either a residue, or by a residue range. This residue input follows the same rules as normal WHAT IF residue input. A set CALPHA commands should be closed with a CALPHA ITEM command.

The ALLFIL keyword "CENTER"

The CENTER command has the format:

CENTER 3 numbers

The three numbers are X,Y,Z of the new center of the screen The center command should preferably be used as the first, or the second to last command in the file (END should be the last one).

Be aware that there also exists a normal command CENTER in the GRAFIC menu that does exactly the same as the ALLFIL command with that name.

The ALLFIL keyword "DOT"

The DOT command has the format:

DOT 4 numbers (or 3 numbers and a colour)

The first three numbers are X,Y,Z of the dot. There should either be a fourth number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of DOT commands should be closed with the DOT ITEM command.

The ALLFIL keyword "CROSS"

The CROSS command has the format:

CROSS 4 numbers (or 3 numbers and a colour)

The first three numbers are X,Y,Z of the center of the cross. There should either be a fourth number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of CROSS commands should be closed with the CROSS ITEM command.

The ALLFIL keyword "CROS45"

The CROS45 command draws a cross (like CROSS), but this cross is 45 degrees rotated (in all directions) relative to the cross drawn by CROSS. It has the format:

CROS45 4 numbers (or 3 numbers and a colour)

The first three numbers are X,Y,Z of the center of the cross. There should either be a fourth number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of CROS45 commands should be closed with the CROS45 ITEM command.

The ALLFIL keyword "SIZE"

The command size determines the lenth of the legs in crosses produced by the commands CROSS and CROS45. Its format is:

SIZE 1 number

The ALLFIL keyword "CONE"

The CONE command has the format:

CONE 8 numbers (or 7 numbers and a colour)

The first three numbers are X,Y,Z of the sharp point of the cone. The second three numbers are X,Y,Z of the center of the blunt end of the cone. The seventh number is half of the opening angle of the cone in degrees (or in other words the angle between the central axis and the side of the cone). There should either be an eight number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of CONE commands should be closed with the CONE ITEM command. This will make WHAT IF create a MOL-item, and store it in a MOL-object.

The ALLFIL keyword "HAT"

The HAT command puts a dotted sphere surface limited by the intersection of a cone and a sphere at the screen. The cone will not be displayed.

The HAT command has the format:

HAT 9 numbers (or 8 numbers and a colour)

The first three numbers are X,Y,Z of the sharp point of a cone, just like in the CONE command. The second three numbers are X,Y,Z of the center of the blunt end of a cone, just like in the CONE command. The seventh number is half of the opening angle of a cone in degrees (or in other words the angle between the central axis and the side of the cone). The eight number gives the dot density for the dotted surface. Good values range from 8 to 12. Higher numbers are allowed, but somewhere near 20 WHAT IF will no longer treat you as a friend. There should either be an nine-th number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

A set of HAT commands should be closed with the HAT ITEM command. This will make WHAT IF create a MOL-item, and store it in a MOL-object.

The ALLFIL keyword "TRICONE"

The TRICONE command puts a dotted sphere surface limited by a triangle. The corner points of this triangle are the projection of three vectors X, Y and Z on a sphere with radius R and center C. with

The TRICONE command has the format:

TRICONE 15 numbers (or 14 numbers and a colour)

The first three numbers are the coordinates of the center C of the sphere. The next 9 numbers are coordinates of 3 points (X, Y, Z). The planes X,Y,C Y,Z,C and Z,X,C cut a sphere with radius R and center C along three curved lines. The 'triangle' formed by these three lines on the sphere will be filled with dots. The 13-th number is the radius R of the sphere. The 14-th number is the dot density for which good values range from 8 to 12. There should either be an 15-th number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full. A series of TRICONE commands should be closed with a TRICONE ITEM command.

The ALLFIL keyword "FOURC"

The FOURC command puts a dotted sphere surface limited by a quadrangle. The corner points of this quadrangle are the projection of four vectors X, Y and Z on a sphere with radius R and center C. with

The FOURC command has the format:

FOURC 18 numbers (or 17 numbers and a colour)

The first three numbers are the coordinates of the center C of the sphere. The next 12 numbers are coordinates of 4 points (X, Y, Z). The planes W,X,C, X,Y,C Y,Z,C and Z,W,C cut a sphere with radius R and center C along four curved lines. The 'quadrangle' formed by these three lines on the sphere will be filled with dots. The 16-th number is the radius R of the sphere. The 17-th number is the dot density for which good values range from 8 to 12. There should either be an 18-th number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full. A series of FOURC commands should be closed with a TRICONE ITEM command.

The ALLFIL keyword "EVPLOT"

EVPLOT draws the frame and maximum entropy line for entropy-variability plots. See the WALVAR menu for more information on this type of plot. The dimensions of the plot are 1.0 by 1.0. So, points on the variability axis should be divided by 20, and points on the entropy axis should be divided by ln(20).

The format is simply:

EVPLOT

And the EVPLOT command can be closed with:

EVPLOT ITEM

but, as EVPLOT only produces lines, you can combine EVPLOT with other line-producing options.

The ALLFIL keyword "TEXT"

The TEXT command has the format:

TEXT 4 numbers (or 4 numbers and a colour)

The first three numbers are X,Y,Z of the origin of the text label. There should either be a fourth number that corresponds to the colour in the usual manner (colour is number from 1 till 360), or one of the normal colours is written out in full.

The line immediately after the TEXT should hold the actual text to be used as label.

Instead of TEXT you can also use LABEL.

The ALLFIL keyword "MOLLAB"

The MOLLAB command has the format:

MOLLAB 4 numbers

The first three numbers are X,Y,Z of the origin of the text label. The fourth number is the MOL-object in which this label should be stored.

The line immediately after the MOLLAB should hold the actual text to be used as label.

The ALLFIL keyword "PCKLAB"

The PCKLAB command has the format (2 lines):

PCKLAB 3 numbers TEXT

The three numbers are X,Y,Z of the origin of the text label. TEXT is the text that should show up when the point X,Y,Z is picked with the mouse.

The ALLFIL keyword "PCKPNT"

The PCKPNT command has the format:

PCKPNT 3 numbers

The three numbers are X,Y,Z of a point in space. In contrast to PCKLAB, picking this point with the mouse does not bring up a label, but the points can be used to pick in screen options like DIST, LINE, etc.

The ALLFIL keyword "SCALE"

The SCALE command has the format:

SCALE 1 numbers

The number will be the new scale factor at the screen. Reasonable values when working with proteins are 0.1 - 1.0.

The ALLFIL command "END"

The END command has the format:

END

The END command should be the last command in the file.