Next: , Previous: Delete Command Syntax, Up: Deleting from Tables


17.4.2 Deletion from Standard Tables

Each of the six options specifies deletion by different rules. However, in many of the options, the word, EXCEPT, may be specified. Its usage dictates that the complement of whatever has been specified will be deleted. This allows one to specify what parts of the table one wishes to keep in a concise way.

17.4.2.1 Deletion of Segments

Deletion by the SEGID option specifies that entire segments in the table are to be deleted. One specifies what segments to delete by the segment identifier. If EXCEPT is specified, then only those segments which are named are kept; all the others are deleted.

17.4.2.2 Deletion of Residues

Deletion by RESID or RESNAME option specifies that residues are to be deleted. Each option may specify either one segment from which residues are deleted or all segments using the ALLSEG word. The difference between the two options is that RESID specifies deletion by residue identifier; RESNAME specifies deletion by the residue name.

The EXCEPT sub-option works in a more complicated way for these two commands. In order to understand what is done, we must examine the algorithm more closely. Before these two commands are interpreted, two marking arrays are allocated. All residues which are specified by the RESID sub-command are marked in the first mark array, and all residues specified in the RESNAME command are marked in the second mark array. If EXCEPT is specified in the RESID option, then its mark array is complemented. Likewise, if EXCEPT is specified in the RESNAME option, then its array is complemented. Then, any residue which is marked in either array is deleted.

For example, if we build a table on atom properties of pancreatic trypsin inhibitor (PTI), the command,

     DELETE RESID EXCEPT 1 2 3 4 5 6 7 8 9 10 -
            11 12 13 14 15 16 17 18 19 20 $ -
            RESNAME EXCEPT GLY ALA

will delete every residue after the twentieth and every residue which is not a glycine or an alanine. In other words, the table will consist of the glycine and alanine residues in the first 20 residues of PTI.

17.4.2.3 Deletion of Data

There are three methods provided for deleting data in a table, by tag, by value, or by identifiers. By tag allows you select data for deletion based on its tag in the table; by value allows you to delete data based on a relational test on values of properties; by identifier allows you to delete by all the identifiers in the table using the atom selection syntax described in Atom Selection.

The TAGS option specifies the deletion of data by tag. After the optional EXCEPT, one may use ALLSEG or a segment identifier. ALLSEG means that the search for the tag will go over all segments; a segment identifier means that the search will take place over only the specified segment. Next, one must specify either ALLRES or a residue identifier. If we specify ALLRES, then the search is done over all residues within the searchable segments. If a residue identifier is specified, then only residues with that identifier will be searched. Finally, all data points within the searched residues which have tags as specified in the command will be deleted. If EXCEPT is given, then all data points which are found during the search are kept, and all others are deleted.

The VALUE option specifies deletion by property values. The marking of cells to be deleted is done by comparing values for properties against a real number you specify using a relational test you specify. All six Fortran relational tests are specified with the data in the table going on the left side of the comparison and the number you specify on the right. For example, LT 10 will delete all cells in which the property value is less than 10. The relational test is obligatory for this command.

The specification of a property to be checked is optional. If a property is specified, only that property's values will be checked; otherwise, all properties in the cells will be checked. The ABS option specifies that the absolute values are to be taken of numbers before they are compared.

For example, the following two commands will produce a difference torsion angle table where all torsion angle changes whose magnitude is less than 10 degrees will be eliminated. This would be useful for looking for conformational changes between coordinates.

     BUILD DIFF TORSION GEOMETRY $ ENERGY $
     DELETE VALUE PROPERTY GEOMETRY $ ABS LT 10 $$

The IDENT option allows deletion based on all the identifiers at once. A variant of the atom selection syntax is used, see Atom Selection. Recall that the structure of a table mirrors that of the PSF – segments composed of residues composed of cells (atoms in the PSF). For this option, the table is treated as if it were a PSF where the tags replace the atom names. The same atom selection syntax can then be applied. Any tags included in the selection are deleted from the table. The initial state of the selection is empty, ie. DELETE IDENT del does nothing.

For example, to set up a table which has data only from residues whose resid is divisible by 5, one would build the table and then use the following delete command:

     DELETE IDENT CLEAR CELL * #5 * CELL * #0 * $
17.4.2.4 Cleaning of the Table

Once the deletion process is complete, all empty entries in the table are deleted. I.e., any residues which have no cells are deleted, and any segments which have no residues are deleted. This simplifies the use of the SELECT command, see Select Command, when it is used for making two dimensional scatter plots.