CCP4 web logo CCP4i: Graphical User Interface
Documentation for Programmers
CreateLabinLine

next button previous button top button

NAME

CreateLabinLine, CreateLabinLine4 - draw a line for the user to select labelled columns from an input file

SYNOPSIS

CreateLabinLine line_id message_text filenameVar label column_labelVar priority_name_list

Optional Arguments:

-sigma labeln column_labelVarn priority_name_listn
-dependent labeln column_labelVarn priority_name_listn
-help help_target
-command command
-toggle_display controlVar status control_value_list

DESCRIPTION

Create a line which enables the user to select labelled columns from a list of the appropriate columns extracted from the input file. Return the id of the line line_id. The line is drawn with a text label label and the message message_text will appear in the message line when the cursor is over the input widgets in the line. filenameVar is the name of the variable which will contain the name of the input file. When an input file is selected, it is read and the names of the labelled columns are stored in the CCP4i program.

CreateLabelLine will create one or (if the -sigma and/or -dependent arguments are used) more menus (up to four) that list all labelled columns in the input MTZ file of the appropriate type for the variable column_labelVar.

The appropriate type depends on the data type of the variable which is set in the taskname.def file. The first column label of the appropriate type will be set as the default value for column_labelVar unless the MTZ file contains a label with one of the names listed in priority_name_list in which case it is set as the default.

The priority_name_list can be useful if, for example, you know the user probably wants to select the FP but is not useful in other instances when it can be set to "".

-sigma labeln column_labelVarn priority_name_listn
-dependent labeln column_labelVarn priority_name_listn
The labin line can have an additional menu to select an additional labelled column column_labelVarn which is the sigma, weight or other dependent quantity of the first column_labelVar. The additional variable will be updated automatically to keep in sync when the user changes the first. The additional menu has a label labeln and can have a priority_name_listn.
-help help_target
The user can access on-line help by clicking the right mouse button on a widget. The help file is defined by the preceding SetProgramHelpFile command. The help_target is the target within that file to go to when the user clicks on any widget in the line
-command command
Allows the user to specify a command that will be executed whenever any of labels are updated by the user (or by an update to the labels for example when loading a new MTZ file). Note that the same command is associated with all labels in the line.
-toggle_display controlVar status control_value_list
Whether the line is displayed is dependent on the value of the parameter called controlVar. If the value of controlVar is one of the values in control_value_list, the line will be displayed if status is open or hidden if status is hide. The opposite status will be adopted if the value of control_var is not one of those in the control_value_list.

Note that the CreateLabinLine4 command is now just a wrapper for CreateLabinLine, which incorporates the functionality outlined above.

EXAMPLES

The following are standard examples of using the CreateLabinLine for different situations:

Example for specifying structure factor amplitudes plus a dependent sigma:

CreateLabinLine line \
    "Enter labels for native" HKLIN \ 
    "FPH" F { F } -sigma "SigFPH" SIGF { NULL }

Example of Friedel pairs:

CreateLabinLine line \
    "Enter labels for Friedel pairs" HKLIN \ 
    "F(+)" Fp { F } \
    -sigma "SigF(+)" SIGFp { NULL } \
    -dependent "F(-)" Fm { NULL } \
    -sigma2 "SigF(-)" SIGFm { NULL }

Example with anomalous difference data:

CreateLabinLine line \
    "Enter labels for derivative with anomalous differences" HKLIN \ 
    "FPH" F { F } \
    -sigma "SigFPH" SIGF { NULL } \
    -dependent "DPH" D { NULL } \
    -sigma "SigDPH" SIGD { NULL }

Example with Hendrickson-Lattman coefficients:

CreateLabinLine line \
    "Enter labels for Hendrickson-Lattman coefficients" HKLIN \ 
    "HLA" HLA { H } \
    -dependent "HLB" HLB { NULL } \
    -dependent "HLC" HLC { NULL } \
    -dependent "HLD" HLD { NULL }

KEYWORDS