Google

CCP4i Documentation for Programmers: Core Documentation

Contents

File Viewer (src/fileviewer.tcl)

File Viewer

The procedures in the file src/fileselect.tcl are concerned with display of files. A procedure to display a specific file type such as LOG is called LOGViewer.

fileviewer Setup procedure called if file viewer is run stand-alone

Argument list: None

The name of file to display is passed from ccp4i script as system(SCRIPT)

ExitFileViewer Called on exiting file viewer - will terminate process in stand-alone mode

Argument list: None

FileViewer Display a file

Argument list: <file> <args>

See Programmers Documentation

fileviewer0 Display a file

Argument list: <file> <format> <ANY> <viewer>

The type of viewer to use is determined from the input parameters in order of perference: the specified viewer, the default viewer for the file type, the default viewer for the file type that is inferred from the file extension. If the file type can not be inferred then the file will be displayed as a text file.

file Name of file to display

format (Optional) The file format - should correspond to a file format defined in etc/types.def

viewer The viewer to use to display the file.

LOGViewer Display a log file

Argument list: <filename> <args>

The first few lines of file are read for an indication that the file is html. If it is then it is displayed in Netscape.

filename Name of log file to display

-summary

Display only the summary from the log file. Note that in the non-html \display there is an option to toggle between full and summary display.

LogGraph_graph Use loggraph to display data from a 'graph' file

Argument list: <filename>

filename Name of graph file to display

LogGraph Display files using ccp4i loggraph

Argument list: <filename> <args>

filename Name of file to display

-format format

Specify format of input file: should be LOG or GRAPH (default LOG)

PDBViewer Display PDB file as text

Argument list: <file>

file Name of file to display

MAPViewer Use mapdump to read map header and display this

Argument list: <file>

filename Name of file to display

MTZViewer Use mtzdump to read mtz header and display this

Argument list: <file>

filename Name of file to display

mtzviewer_info pass-thru to set up new global array

Argument list: <arrayname>

mtzviewer_info0 Handle option for Extra Information when displaying MTZ files

Argument list: <arrayname> <mtz_arrayname>

mtz_info behaves like a usual task interface - this procedure creates a 'mtz_info' task window

arrayname Name of array for fileviewer interface parameters

mtz_arrayname Name of array for mtz_info interface parameters

mtzviewer_info_handler Handle the 'Run' command for mtz_info - Run mtzdmp or sftools

Argument list: <arrayname> <mtz_arrayname>

arrayname Name of array for fileviewer interface parameters

mtz_arrayname Name of array for mtz_info interface parameters

mtz_info_review Review and display the output from the mtz_info task

Argument list: <mtz_arrayname> <job_id>

This procedure is called automatically after the mtz_info job has finished when been run by 'run_command'

mtz_arrayname Name of array for mtz_info interface parameters

job_id Job id for the mtz_info job which has just completed

PSViewer Display a postscript file

Argument list: <file>

file Name of PostScript file

XMGRViewer Display xmgr file - as output by scala

Argument list: <file>

file Input xmgr file

PLOT84Viewer Use xplot84driver to display a plot84 file

Argument list: <file>

file Name of plot84 file

PLOT84PSViewer Convert plot84 format file to PostScript and display with PSViewer

Argument list: <file>

file Name of plot84 file

MRViewer Display (and edit) a mr (molecular replacement) file

Argument list: <file>

file Name of mr file

HAViewer Display (and edit) a ha (heavy atom) file

Argument list: <file>

file Name of ha file

mr_ha_viewer Pass-thru to mr_edit task which will display & edit mr and ha files

Argument list: <file> <mode>

file Name of mr/ha file

mode File mode - ha or mr

RunRasMol Run RasMol to display coordinates

Argument list: <filename>

filename Input PDB coordinate file

RunMapslicer Run the mapslicer program

Argument list: <filename>

filename Input CCP4 format map file

DisplayTextFile Display a text file

Argument list: <filename> <args>

LoadTextWindow Load the text into the window set up by DisplayTextFile

Argument list: <arrayname> <text_list> <args>

arrayname Array for file display interface

text_list The text to insert - may be in the form of a list.

-append

Append new text to any test already in the window

display_next_frame handle the display of the next frame of text if displlaying a very large file

Argument list: <arrayname> <w>

arrayname Array for file display interface

w Window id for file display interface

display_text_update_case Handle user changing the respect/ignore case option

Argument list: <field> <arrayname> <w>

field The user selection ignore or respect

arrayname Array for file display interface

w Window id for file display interface

display_text_close Handle user clicking Close button.

Argument list: <arrayname> <w>

arrayname Array for file display interface

w Window id for file display interface

display_text_save Handle user opting to save contents when using 'edit' mode

Argument list: <arrayname> <filename>

arrayname Array for file display interface

filename Name of file to save text to

display_text_find Handle user hitting Find or 'Close Find' button

Argument list: <mode> <w> <arrayname>

mode open or close

w The Tk id for the window

arrayname Name of data array

display_text_find_string Find and highlight given string in the text

Argument list: <mode> <arrayname> <args>

mode Mode of action: next= Just move to next instance of the search string previous= Just move to previous instance of the search string hilight= Just highlight the instances of the search string update= Search the text for the search string, highlight hits

arrayname Array for file display interface

-position position

In update mode do search from position (used when file is still been read in)

display_links Dispaly links in log file

Argument list: <arrayname> <w>

This is not used and may not be fully functional

MonitorFile Read and display a file that is still being written

Argument list: <w> <arrayname> <file> <mtime> <size> <delay> <terminator>

This procedure works by re-calling itself after a small time delay. If the file is not increasing in size then the time delay is increased. The procedure searches the file for some specified text string which indicates the file is complete and then MonitorFile will stop re-calling itself.

w Tk id of the text window

arrayname Array for file display interface

file Name of file to display

mtime The time at which file was last modified (a negative value signifies the first call to MonitorFile

size The size of the file when last modified

delay The delay before re-calling MonitorFile

terminator A text string whose presence in the file would indicate the end of the file

display_text_summary Handle the 'Show Summary' option

Argument list: <w> <arrayname>

w Display text interface window id

arrayname Name of display text interface array

display_text_full Handle the 'Show Full Text' option

Argument list: <w> <arrayname>

w Display text interface window id

arrayname Name of display text interface array

ExtractLogSummary Extract the text tagged as 'summary' from a log file

Argument list: <fullText> <summaryTextVar>

fullText Input the full text

summaryTextVar Output the text summary

HilightLogSummary Highlight the sections of log file which are tagged as 'summary'

Argument list: <fullText>

fullText Input the full text

GetViewerList Extract the list of file formats, viewers and full viewer commands from the typedef array

Argument list: <format> <viewerVar> <viewercmdVar>

The definitions have been read from the etc/types.def file into the typedef array. This procedure reformats the information as lists which are easier to handle.

format Output list of supported file formats

viewer Output list of viewer names (corresponding to format list) which is the name of the viewer as seen by the user

viewercmd Output list of the commands required to run viewers (corresponding to format and viewer lists)