Wit!P> list /*will produce a list of all nodes at level 1 in the tree. These nodes are direct descendants of the root node "/" at level 0 (in good mathematical tradition, we start numbering things at 0). In our example, there is just one node (/4apr) which is of type mol. The name of the node was generated from the name of the file from which the molecular structure was read in. The contents of this node may be listed by
Wit!P> list //*which reveals that there are two nodes at the 2nd level of the tree (/4apr/Xcn of type xtal and /4apr/A of type mol). The first of these is used to store some crystallographic information about the structure (space group, unit cell,...) and does not have any descendants in the tree (you may confirm this by list //Xcn/*). For a complete list of nodes at level 3, type
Wit!P> list ///*which is the same thing as list //A/* since A is the only level 2 node which has descendants, and incidentally the same thing as list //a/* since node names in Wit!P are not case sensitive. The list ///* command produces a rather long list. Hit Shift-F1 to make the message window take up all the available space (the 3D window will disappear), and scroll back to the top of the list using the Shift-CurUp and/or the PageUp keys. Most of the level three nodes have names that start with HOH, followed by and underscore, ("_") followed by a number. These are water molecules. Besides the the water molecules, there are two other nodes (at the top of the output produced by the list command), E and I (both of type mol). These are used to store the structure of chains E ("enzyme") and I ("inhibitor") of the original PDB file. Hit Shift-F1 again to shrink the message box to the usual 5 lines (the 3D window will reappear) and
Wit!P> list ///I/*which will tell you that the inhibitor consists of 5 residues (PRO_3 ... LEU_7), and finally (if you haven't become to bored by now)
Wit!P> list ///I//*for a list of all descendants of residue nodes of the inhibitor (they are all of type atom). Use the function keys and keyboard shortcuts to scroll through the longish list produced by the last command.
The following diagram shows a schematic of what we have learned about the structure of the molecular data tree (upside down, in the usual Computer Science manner) after the read pdb /db/pdb/4apr command:
Not all files lead to tree structures which are as complex as the one for the PDB file used in our example (which is typical for crystallographic PDB files). E.g. molecules read from old SYBYL .mol files are stored in a 2 level subtree structure, in which all atoms are direct descendants of the "file" node. Knowing the structure of the molecular data tree (esp. at which level of the tree atoms are stored) is important when using atomselections (e.g. to delete atoms, modify atom colors, etc...). Using the list command to explore the structure of the molecular data tree each time a molecule was read in would be extremely tedious. Fortunately, finding out the full name of a displayed atom (and hence the level at which this atom is stored in the tree) is as easy as a simple mouse click:
Press the shift key and pick an atom (i.e. move the cursor on the atom and right-click, with the shift key still down): the full atom name will be reported in the last line of the message box. This may report several atom names (up to five), if more than one atom lies inside the picking window represented by the small (16x16 pixels) square surrounding the cursors hot spot. (Note: the Windows versions of Wit!P use an arrow cursor, with hot spot at the tip of the arrow, w/o visible boundaries of the picking window).
The display data tree corresponding to the molecular data tree above is much simpler:
![]() |
In fact, this is a rather sad tree, with no branches. There are only
three nodes, two of type GLBL ("global") and one of type MDL ("molecular
display list"). GLBL nodes have associated display transformations which
may be manipulated through the display rotate, display translate ... commands
or more commonly through mouse commands, as we have seen in the previous
section. GLBL nodes in the display tree are associated with nodes in the
molecular data tree (the associated molecular node is shown in parentheses
in the diagram on the left).
The node of type MDL stores the display attributes (colors, line width, labels,...) of the molecule /4apr in the molecular data tree. |
The next section will discuss atomselections.