Module: Molecule Label ()
This module allows you to label certain parts of the molecule. If a Molecule Label module is connected to an object of type Molecule, all clicks in the viewing window normally handled by a viewing module connected to the same molecule will instead be handled by the Molecule Label module, by default. Handling of a click by the Molecule Label module means that it will change the labeling, i.e., add or remove a label. The kind of label to be displayed depends on the viewing module and the current selection mode. For example, if the selection mode is atoms, a label for the selected atom will be displayed; if it is residues, a label for the residue the atom belongs to will be displayed. Up to two data items per label can be displayed. Which data is displayed, can be set in the Attributes port (see below).The user interface is built as follows. The levels port allows you to choose a label level. The other ports, except the last one, Options, correspond to this level. They allow you to specify how the labels of the selected level will be displayed, i.e., what data is displayed for each label, and in which color and size labels are displayed. Do not assume that a label of the selected level will appear if you click parts of the molecule. This solely depends on the selection mode as mentioned above. You may also hide all labels of the current level.
The last port, Options, does not refer to any level, but determines the overall behavior of the module.
There are a few Tcl commands that allow you to set labels. The setLabelString command enables you to set arbitrary labels to an atom or a group of atoms. See the description of commands at the end of this page for more information.
Data [required]
The molecule to be labeled.
Options
Overall options. If the first option is selected, clicks that are normally handled by the viewing modules will instead be handled by the Molecule Label module, resulting in new labels being displayed and already visible labels being removed. The second option allows you to compose labels of one level differently. If the option is not set, the currently displayed labels will not be changed if the Attribute port changes, otherwise they will.
Levels and Attributes
Levels
Choose a level to change the display properties of all labels of this level. The Attributes, Level Option, Buttons, Font size, and Color ports have individual values for each level.Level Option
If the level option is visible is set, all currently selected labels of this level are displayed. In order to hide all labels of a certain level without removing them, deselect this option.Attributes
Port to select two attributes that will make up the label string for the current level. By default, only one attribute is displayed.
Labeling Options
Labels
The four buttons of this port affect only the labels of the current level. The first button displays all labels, the second adds a label for each completely highlighted group, the third button removes all labels. Finally, the fourth button updates the label strings according to the currently selected attributes, then updates the positions of the labels to display them as well as possible.Font size
Change the font size of the level's labels.Color
Color of the level's labels. To change the color, click on the Color button. As result, a color editor will be displayed in which you can choose the color you wish.
There are a few commands to set labels via the command line interface.
setLabel <levelName/{groupName|groupRange}> [<attr1>] [<attr2>]
This command sets new labels for a group or a range of groups specified by the first argument. If one or two attributes are given (as strings), those attributes will be assigned as labels to the group(s). If no attribute is given, the currently selected attributes of the level are used. For more information about specifying a group or a range of groups, see the list command in the description of Molecule.
Example:
setLabel residues/NIL14-NIL98 name indexunsetLabel <levelName/{groupName|groupRange}>
Hides the labels of the specified group or range of groups.setLabelString <levelName/groupName> <string>
Assign the label `string' to the specified group.