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.
Argument list: None The name of file to display is passed from ccp4i script as system(SCRIPT)
Argument list: None Argument list: <file> <args> Argument list: <file> <format> <ANY> <viewer> The type of viewer to use is determined from the input parameters in order of preference: 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.
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.
Argument list: <filename> filename Name of graph file to display
Argument list: <filename> <args> filename Name of file to display
-format format
Specify format of input file: should be LOG or GRAPH (default LOG)
Argument list: <file> file Name of file to display
Argument list: <file> filename Name of file to display
Argument list: <file> filename Name of file to display
Argument list: <arrayname> 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
Argument list: <arrayname> <mtz_arrayname> arrayname Name of array for fileviewer interface parameters
mtz_arrayname Name of array for mtz_info interface parameters
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
Argument list: <file> file Name of PostScript file
Argument list: <file> file Input xmgr file
Argument list: <file> file Name of plot84 file
Argument list: <file> file Name of plot84 file
Argument list: <file> file Name of mr file
Argument list: <file> file Name of ha file
Argument list: <file> <mode> file Name of mr/ha file
mode File mode - ha or mr
Argument list: <filename> filename Input PDB coordinate file
Argument list: <filename> filename Input PDB coordinate file
Argument list: <filename> filename Input CCP4 format map file
Argument list: <args> Command line arguments to be passed directly to Coot
Argument list: <args> Command line arguments to be passed directly to CCP4mg
Argument list: <args> Command line arguments to be passed directly to DbViewer
Argument list: <filename> <args> 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
Argument list: <arrayname> <w> <increment> <1> arrayname Array for file display interface
w Window id for file display interface
increment
Number of frames to move on from the current frame (default is 1). Increment can be negative, to go to previous frames
Argument list: <arrayname> Internal procedure called by display_next_frame. Returns the number of the current frame.
arrayname Array for file display interface
Argument list: <arrayname> Called by display_next_frame. Returns the number of the current frame.
arrayname Array for file display interface
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
Argument list: <arrayname> <w> arrayname Array for file display interface
w Window id for file display interface
Argument list: <arrayname> <filename> arrayname Array for file display interface
filename Name of file to save text to
Argument list: <mode> <w> <arrayname> mode open or close
w The Tk id for the window
arrayname Name of data array
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)
Argument list: <arrayname> <w> This is not used and may not be fully functional
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
Argument list: <w> <arrayname> w Display text interface window id
arrayname Name of display text interface array
Argument list: <w> <arrayname> w Display text interface window id
arrayname Name of display text interface array
Argument list: <fullText> <summaryTextVar> fullText Input the full text
summaryTextVar Output the text summary
Argument list: <fullText> fullText Input the full text
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)
The procedures in this file provide support for a simple "plugins" mechanism within CCP4i. A "plugin" is another application outside of CCP4i which can be usefully invoked on behalf of the user to view files or perform a new action after a particular task has been run. For example, after a run of Refmac5 it might be useful to launch Coot to further work on the refined structure.
Data about which plugins are available for which task is stored in the ccp4i_plugins global array. Elements of the array are tasknames; the value of each element is a list of plugin names. For each plugin there should be a procedure called plugin_for_$pluginname, which returns a text string and a command for launching the application given the taskname and a list of files output from that task.
The GetPlugins procedure provides an interface to the available plugins: given a taskname and list of files, it returns the available plugin commands that could be invoked.
Argument list: <taskname> <filelist> Given the name of a task plus a list of associated files, this command checks whether any plugins have been specified for that task and attempts to generate commands for launching any that are found.
The result of the command is a list of plugin specifications. Each specification is also a list, the first element being a string of text to be displayed in (e.g.) the "View Files from Job" menu, and the other the command to be invoked to start the plugin application.
If no plugins are found then an empty list is returned.
taskname Name of the task
filelist List of full filenames output from the task
Argument list: <program> <execVar> This command wraps FindExecutable. It returns 1 if the specified executable is found, and the executable path is returned in the specified variable. Otherwise it returns 0.
program Name of the program executable to be found
execVar Name of the variable to return the name in, if found
The functions in this section generate the appropriate commands for launching the plugin applications for specified task contexts and available output files.
Each plugin should have an associated plugin_for_* procedure defined, which should take exactly two arguments: the first is the name of a task, and the second is a list of files from a job. The procedure should contain code specific to the plugin application, and return a list of two elements - the first is a string of text that describes the operation of the plugin when launched, and the second is the actual command to launch the plugin in background.
If no plugin is available then an empty list should be returned.
taskname Name of the task
filelist List of files output from a run of the task
taskname Name of the task
filelist List of files output from a run of the task
taskname Name of the task
filelist List of files output from a run of the task
fileviewer Setup procedure called if file viewer is run stand-alone
ExitFileViewer Called on exiting file viewer - will terminate process in stand-alone mode
FileViewer Display a file
fileviewer0 Display a file
LOGViewer Display a log file
LogGraph_graph Use loggraph to display data from a 'graph' file
LogGraph Display files using ccp4i loggraph
PDBViewer Display PDB file as text
MAPViewer Use mapdump to read map header and display this
MTZViewer Use mtzdump to read mtz header and display this
mtzviewer_info pass-thru to set up new global array
mtzviewer_info0 Handle option for Extra Information when displaying MTZ files
mtzviewer_info_handler Handle the 'Run' command for mtz_info - Run mtzdmp or sftools
mtz_info_review Review and display the output from the mtz_info task
PSViewer Display a postscript file
XMGRViewer Display xmgr file - as output by scala
PLOT84Viewer Use xplot84driver to display a plot84 file
PLOT84PSViewer Convert plot84 format file to PostScript and display with PSViewer
MRViewer Display (and edit) a mr (molecular replacement) file
HAViewer Display (and edit) a ha (heavy atom) file
mr_ha_viewer Pass-thru to mr_edit task which will display & edit mr and ha files
RunRasMol Run RasMol to display coordinates
RunPyMol Run PyMol lto display coordinates
RunMapslicer Run the mapslicer program
RunCoot Run the Coot program
RunCCP4mg Run the CCP4mg program
RunDbviewer Launch the Dbviewer application
DisplayTextFile Display a text file
LoadTextWindow Load the text into the window set up by DisplayTextFile
display_next_frame handle the display of the next frame of text if displaying a very large file
display_read_frame Read a frame from a log file into memory so it can be displayed
display_skip_frame Read through a frame from a log file and discard it
display_text_update_case Handle user changing the respect/ignore case option
display_text_close Handle user clicking Close button.
display_text_save Handle user opting to save contents when using 'edit' mode
display_text_find Handle user hitting Find or 'Close Find' button
display_text_find_string Find and highlight given string in the text
display_links Dispaly links in log file
MonitorFile Read and display a file that is still being written
display_text_summary Handle the 'Show Summary' option
display_text_full Handle the 'Show Full Text' option
ExtractLogSummary Extract the text tagged as 'summary' from a log file
HilightLogSummary Highlight the sections of log file which are tagged as 'summary'
GetViewerList Extract the list of file formats, viewers and full viewer commands from the typedef array
Plugin Utilities (src/plugins.tcl)
Plugin Utilities
GetPlugins Return available plugins for a specific task
get_plugin_executable Helper function: verify and return the executable name
Plugin Command Generation Functions
Plugin Command Generation Functions