		PREPI EXAMPLES AND DATA FILES
		=============================
CONTENTS:	
		[i]   A QUICK REMINDER ABOUT PREPI PERFORMANCE
		[ii]  A NOTE ABOUT FILE FORMATS
		[iii] A NOTE ABOUT PREPI'S *.fre FILES
		[iv]  EXAMPLES TO TRY


[i] A QUICK REMINDER ABOUT PREPI PERFORMANCE
____________________________________________

Skip this section if you have read it in README-FIRST.
The speed and smoothness of manipulations (eg rotations, scaling) will
obviously depend on the number of vectors/polygons being displayed.
PREPI can display objects such as bonds as Lighted Solid Polygons. 
For LARGE structures, display manipulation can be a little slow on LOW
END SGI systems such as the INDY. Therefore PREPI also allows the
option of displaying bonds as vectors (i.e. simple LINES). To improve
performance of manipulation on LOW END SG's (or generally) you can do
the following within the program:
	 (i) Turn off menu (item "MENU OFF" in main menu)
             Press RIGHT MOUSE BUTTON to turn MENU back on
	(ii) Turn off complex lighted objects such as SPHERES,
	     & COIL, manipulate and turn objects back on
       (iii) For general manipulations display bonds as LINES by:
	     a) Press F1 (no depth-cue) or F2 (lines with depth-cue)
	     b) Alternatively you can select the "LINES" option
	        under individual menu items eg "C-ALPHA" (under
	        TOP-BAR menu item "OBJECTS"
These items can be EASILY TOGGLED ON & OFF within the program. Therefore
you can produce complex and smooth objects for a Photograph but turn
these items off when adjusting for a better view or adjusting position
of TEXT & CAPTIONS.
Also do "prepi help" for a full list of startup options. Options such as
"-small" and "-line" are very convenient.


[ii] A NOTE ABOUT FILE FORMATS
______________________________

This directory contains a number of data file in various formats.

*.pdb	Brookhaven protein databank format

	To read: 	% prepi -p file.pdb

*.csd	Cambridge FDATA format

	To read: 	% prepi -csd file.csd

*.fre	Suhail free format for prepi. This was designed for in-house
	display of "anything" quickly

	To read: 	% prepi -fre file.fre

*.log	These are previoulsy saved log (script) files of pdb files. These
	essentially contain a startup script, colours etc

	To read: 	% prepi -d file.log

There are many other input file formats. TO SEE THE FULL LIST OF INPUT
FORMATS DO
		% prepi help 



[iii] A NOTE ABOUT PREPI'S *.fre FILES
______________________________________

This was designed for in-house display of "anything" quickly, as
long as coordinates were available. You can use this to display
your own atomic or non-atomic data e.g. polygons. This format is
still under development to include more options. You should look
at the *.fre files (section iv) to see examples of use.
Here is some format information:


(i)	Characters can be lower or upper cases


(ii)	Any line is ignored if its blank or begins with
	'*' , '!' , '%' OR '/'


(iii)	Fields can be separated by SPACE(S),COMMA(S) OR TAB(S).
	DO NOT USE OTHER CHARACTERS.


(iv)	ATOMIC COORDINATES can be specified in a number of different ways:


	(a) 3 NUMBERS (REAL OR INTEGER) ON A LINE ARE READ AS X,Y & Z e.g.
	    1.0 2.567 3.451
	    1.0, 2.567, 3.451
	(b) A character string and 3 numbers are read as ATOM NAME,X,Y,Z e.g.
	    C  1.123 4.567 5.6788
	(c) ATOM keyword followed by ATOM NAME X,Y,Z, [B-VALUE] e.g.
	    ATOM N1 1.123 4.567 5.6788 
	    ATOM N2 1.123 4.567 5.6788 24.5

	The ATOM NAME must be an alphanumeric character (e.g. C1, N5) and
	NOT JUST A NUMBER. 


(v)	BONDS can be specified in a number of different ways:


	(a) 2 INTEGER NUMBER ON A LINE READ AS A "BOND" BETWEEN "ATOMS" e.g.
	    1 2
	    4, 5
	(b) BOND keyword followed by TWO ATOM NUMBERS e.g.
	    BOND  1 2


(vi)	LIST OF KEYWORDS - NOTE THAT ALL PARAMETERS FOR EACH COMMAND
			   MUST BE ON A SINGLE LINE. LINE LENGTH IS
			   LIMITED TO 256 CHARACTERS


	'*'	Line beginning with this is taken as a comment
	'!'	Line beginning with this is taken as a comment
	'%'	Line beginning with this is taken as a comment
	'/'	Line beginning with this is taken as a comment

	ATOM	See section iv (ATOMIC COORDINATES) above

	BOND	See section v (BONDS) above

	BOX	Not in use as yet

	CELL    A B C ALPHA BETA GAMMA
		Unit cell definition. For example
			CELL 5. 5. 10.5 90.0 95.0 90.0
		See also CRYST1

	CHAIN	chain_id
		Input data is automatically assigned a chain ID of " ".
		This keyword allows this default to be changed. Any
		coordinates following the CHAIN keyword will be 
		assigned "chain_id". If no value follows CHAIN then
		the chain_id is reset to " ". E.g.
			CHAIN A
			ATOM CA 0. 0. 0.
			CHAIN B
			ATOM CA 5. 0. 0.
			CHAIN

	CRYST1  A B C ALPHA BETA GAMMA
		Unit cell definition (this is included so that you can
		copy the record directly from the PDB files)
		See also CELL

	COL     colour_number/colour_name/"NULL"/"CLEAR"
	COLOR   colour_number/colour_name/"NULL"/"CLEAR"
	COLOUR  colour_number/colour_name/"NULL"/"CLEAR"
		Colour number is a prepi colour number (1 to 25). You can
		use either a number or the colour name. Colour names and
		number are:
			1 Red           2 Green         3 Blue
			4 White         5 Yellow        6 Orange
			7 Cyan          8 BlueBright    9 BlueGrey
			10 Magenta      11 Mauve        12 Pink
			13 GreenBright  14 Grey         15 Silver
			16 Gold         17 Brass
			18 MetalRed     19 Metal Green  20 MetalBlue
			21 MetalWhite   22 MetalYellow  23 MetalOrange
			24 MetalCyan    25 MetalMagenta
		E.g.
			COLOUR 5
			COLOUR GREEN
		A colour defined by the above keywords is automatically
		assigned as a SPECIFIC ATOM COLOUR. This colour will be
		applied to subsquent atoms untill the NULL or CLEAR
		keywords are found e.g.
			COLOUR YELLOW
			0.5 0.5 0.5
			1.0 1.0 0.0
			COLOUR CLEAR
			1.5 1.5 0.0
		In the above example only atoms 1 & 2 have a colour defined.

	CLEAR	Same as POP and GRESTORE. This clears the matrix stack
		i.e. put a unit matrix on stack.

	CONE	x1 y1 z1 x2 y2 z2 RAD radius_value COL colour_number SIDES no_sides
		Draw a cone with base (x1,y1,z1) and top at (x2,y2,z2).
		If the RAD, COL or SIDES keywords are not given then default
		values of 1.0, 4 & 12 are assigned respectively. For example
			CONE 0.0 0.0 0.0 1.0 1.0 1.0 RAD 0.5 COL 5 SIDES 3
		If the HEIGHT keyword is included then a cone of the given
		height is drawn with base (x1,y1,z1) along the vector direction
		(x2,y2,z2)-(x1,y1,z1). E.g.
			CONE 0.0 0.0 0.0 1.0 1.0 1.0 HEIGHT 5.0 RAD 0.5 COL 5 SIDES 3


	CONE1	V1 V2 RAD radius_value COL colour_number SIDES no_sides
		Essentially same as CONE except that the end coordinates
		are taken from the vertix coordinates i.e. atom numbers.
		If the RAD, COL or SIDES keywords are not given then default
		values of 1.0, 4 & 12 are assigned respectively. E.g.
			CONE1 5 10 RAD 0.5 COL 5 SIDES 3
		If the HEIGHT keyword is included then a cylinder of the given
		height is drawn with base V1 along the vector direction
		V2-V1. E.g.
			CONE1 5 10 HEIGHT 5.0 RAD 0.5 COL 5 SIDES 3


	CURVE3D	Not in use as yet


	CYLINDER x1 y1 z1 x2 y2 z2 RAD radius_value COL colour_number SIDES no_sides
		Draw a cylinder with base (x1,y1,z1) and top at (x2,y2,z2).
		If the RAD, COL or SIDES keywords are not given then default
		values of 1.0, 4 & 12 are assigned respectively. E.g.
			CYLINDER 0.0 0.0 0.0 1.0 1.0 1.0 RAD 0.5 COL 5 SIDES 3
		If the HEIGHT keyword is included then a cylinder of the given
		height is drawn with base (x1,y1,z1) along the vector direction
		(x2,y2,z2)-(x1,y1,z1). E.g.
			CYLINDER 0.0 0.0 0.0 1.0 1.0 1.0 HEIGHT 5.0 RAD 0.5 COL 5 SIDES 3
			

	CYLINDER1 V1 V2 RAD radius_value COL colour_number SIDES no_sides
		Essentially same as CYLINDER except that the end coordinates
		are taken from the vertix coordinates i.e. atom numbers.
		If the RAD, COL or SIDES keywords are not given then default
		values of 1.0, 4 & 12 are assigned respectively. E.g.
			CYLINDER1 5 10 RAD 0.5 COL 5 SIDES 6
		If the HEIGHT keyword is included then a cylinder of the given
		height is drawn with base V1 along the vector direction
		V2-V1. E.g.
			CYLINDER1 5 10 HEIGHT 5.0 RAD 0.5 COL 5 SIDES 6

	DEFINE	variable_name number_value
		Commonly used values can be assigned a variable name
		(UP TO 40 CHARACTERS LONG). E.g.
			DEFINE my_helix_radii 2.5
		The variable name "my_helix_radii" can then be used in
		any command to assign NUMERIC values e.g.
			CYLINDER1 5 10 HEIGHT 5.0 RAD my_helix_radii COL 5
		Note that the variable name is case insensitive. The number
		of definitions (i.e. DEFINE keyword) is limited to 50.

	DIVIDE	number
		Coordinates will be divided by number i.e. x = x / number.
		You may have copied over coordinates that may have been
		multiplied by a factor. Specifying the factor above will
		restore the coordinates.

	DOBOND lower_limit upper_limit
		For example
			DOBOND 0.0 1.8
		will search for bonds within 0.0 to 1.8 distance.

	DONOTBOND
		prepi will not attempt to automatically connect any points

	DORING	ring_number(s) (ring_number = 3-10)
		This will search the bonding list for closed rings
		of a given size (ring_number = 3-10). Then in PREPI
		if you pick the PLANE option from the main menu the
		rings (if any found) will be displayed as planes. For example
			DORING 3,5
		WARNING - for a large number of bonds (> 2000) this is
		VERY slow.

	DOSTELLATION	ring_number(s)
		This option will stellate rings of a given size. The rings
		of given sizes wolud have been found by DORING or explicitly
		defined using the PLANE or PLANE0 keywords. For example		
			DOSTELLATION 5
			DOSTELLATION 3,4,5


	ELLIPSOID	Not in use as yet


	GRESTORE
		Same as CLEAR and POP. This clear the matrix stack
		i.e. put a unit matrix on stack.

	GSAVE	Not in use as yet
		Same as PUSH and SAVE

	HELIX	residue_id_1  residue_id_2 
		Defines a helix between residue IDs 1 to 2. E.g.
			CHAIN A
			RESIDUE 25
			ATOM CA 0. 0. 0.
			RESIDUE 26
			ATOM CA 5. 0. 0.
			...
			...
			RESIDUE 35
			ATOM CA 5. 0. 0.
			HELIX 25 35

	LIPID	Not in use as yet

	MULTIPLY	number
		Coordinates will be multiplied by number i.e. x = x * number.
		You may have copied over coordinates that may have been
		divided by a factor. Specifying the factor above will
		restore the coordinates.
		
	PLANE	n V1 V2 .... Vn
		Used to defined a ring (also called a plane) formed by
		atoms V1,V2,...,Vn. n is the number of vertices. For example
			PLANE  5   21  22  23  41  42
		The above will form a plane between atoms 21,22,23,41
		and 42. The plane can be displayed by picking the PLANE
		option from the main menu in PREPI. YOU SHOULD TRY AND
		DEFINE THE PLANE IN AN ANTI-CLOCK WISE MANNER OTHERWISE
		STELLATION (IF REQUESTED) MAY BE INWARDS.

	PLANE0	V1 V2 .... Vn
		As with PLANE but the number of verticies does not
		have to be defined. The last letter of the word PLANE0
		can be a ZERO ("0") or the alphabetical letter "O". For example
			PLANE0  21  22  23  41  42
		The above will form a plane between atoms 21,22,23,41
		and 42. The plane can be displayed by picking the PLANE
		option from the main menu in PREPI. YOU SHOULD TRY AND
		DEFINE THE PLANE IN AN ANTI-CLOCK WISE MANNER OTHERWISE
		STELLATION (IF REQUESTED) MAY BE INWARDS.

	POLYGON	Not in use as yet

	POLYHEDRA	Not in use as yet

	POP	Same as CLEAR and GRESTORE. This clear the matrix stack
		i.e. put a unit matrix on stack.

	PUSH	Not in use as yet
		Same as SAVE and GSAVE

	QUADRIC	Not in use as yet

	RES 	residue_id
		Identical to RESIDUE keyword (see below)

	RESIDUE	residue_id [ COL colour_number/colour_name/"NULL"/"CLEAR" ]
		Input data is automatically assigned a residue ID of 1.
		This keyword allows this default to be changed. Any
		coordinates following the RESIDUE keyword will be 
		assigned "residue_id". E.g.
			RESIDUE 25
			ATOM CA 0. 0. 0.
			RESIDUE 26
			ATOM CA 5. 0. 0.
			RESIDUE 26 col magenta
			ATOM CA 5. 0. 0.
		See the COL/COLOR/COLOUR command above for more details on
		the NULL/CLEAR option

	ROTX	angle_value
	ROTY	angle_value
	ROTZ	angle_value
		Rotate all subsequent coordinates by angle_value (degrees).
		For example
			ROTX 20.0
			ROTY -10.0 
		To reset transformation matrix either rotate by -angle_value
		or use the CLEAR/GRESTORE/POP keywords. For Example
			ROTX 20.0
			ROTY -10.0
			Coordinates/Object definitions here ...
			CLEAR
		Is Same as
			ROTX 20.0
			ROTY -10.0
			Object definitions here ...
			ROTY 10.0
			ROTX -20.0
		IT IS RECOMENDED THAT YOU USE THE CLEAR/GRESTORE/POP keywords
		to completely clear the matrix stack.

	TRANS   dx dy dz
		Translate all subsequent coordinates by dx,dy & dz. To
		reset either translate by -dx,-dy & -dz or use the
		CLEAR/GRESTORE/POP ketwords. For Example
		For example
			TRANSLATE  5.0  -2.0  0.0
		To reset transformation matrix either rotate by -angle_value
		or use the CLEAR/GRESTORE/POP keywords. For Example
			TRANSLATE  5.0  -2.0  0.0
			Coordinates/Object definitions here ...
			CLEAR
		Is Same as
			TRANSLATE  5.0  -2.0  0.0
			Object definitions here ...
			TRANSLATE  -5.0  2.0  0.0
		IT IS RECOMENDED THAT YOU USE THE CLEAR/GRESTORE/POP keywords
		to completely clear the matrix stack.

	TUBE	x1 y1 z1 x2 y2 z2 RAD radius_inner radius_outer COL colour_number SIDES no_sides
		Draw a tube with base (x1,y1,z1) and top at (x2,y2,z2).
		This is essentially a solid hollow cylinder of inner radius
		radius_inner and an outer radius of radius_outer
		If the RAD, COL or SIDES keywords are not given then default
		values of 1.0, 4 & 12 are assigned respectively. E.g.
			TUBE 0.0 0.0 0.0 1.0 1.0 1.0 RAD 0.5 1.0 COL 5 SIDES 3
		If the HEIGHT keyword is included then a cylinder of the given
		height is drawn with base (x1,y1,z1) along the vector direction
		(x2,y2,z2)-(x1,y1,z1). E.g.
			TUBE 0.0 0.0 0.0 1.0 1.0 1.0 HEIGHT 5.0 RAD 0.5 1.0 COL 5 SIDES 3

	SAVE	Not in use as yet
		Same as PUSH and GSAVE

	SPHERE	x  y  z  RAD radius_value  COL colour_number

	WAVE	Not in use as yet



[iv] EXAMPLES TO TRY
____________________

Other than the standard examples of molecular structures, there
are examples of the use of PREPI's FREE FORMAT language to build
viral structures and polygons. I have a lot more polyhedra defined
and these can be obtained on request, if you are interested.
If you build any interesting objects please let me know. If you
would like to see additional functions added to the FREE FORMAT
language or have any comments please let me know. However remember
that this was NOT designed as a serious alternative to any other
modelling language (e.g. VRML).


3cro	-	DNA protein complex
		use		% prepi -d 3cro.log


example.pdb -	Proteinase inhibitor (trypsin)
		use		% prepi -d example.log


1tfi.pdb -	Transcription regulation (NMR STRUCTURE)
		use		% prepi -d 1tfi.log


6bna.pdb -	B-dna 
		use		% prepi -d 6bna.log


example.csd -	Small molecule 
		use		% prepi -csd example.csd



phage.fre -	Virus - T4 Bacteriophage model. Built by eye so this
			MODEL IS VERY APPROXIMATE !
		use		% prepi -fre phage.fre
		Notes:	Select PLANE from main menu
			Turn off "C-ALPHA","SIDE-CHAIN" & "MAIN-CHAIN" 
			in main menu as PREPI may show the vertex
			points as "atoms"

polygon.fre -	Small polygon 
		use	% prepi -d polygon.log
		Notes:	Select PLANE from main menu
			Press F8 to cycle through linewidth 
			Press F2 to depth-cue 
			Press F3 for solid-bonds 

plantcomplex.fre -	A very large Complicated plant protein complex !
		use		% prepi -fre plantcomplex.fre
		Notes:	Select PLANE from main menu
			Turn off "C-ALPHA","SIDE-CHAIN" & "MAIN-CHAIN" 
			in main menu as PREPI may show the vertex
			points as "atoms"
