Define Attribute Define Attribute icon

H-ras (121p) rendered by residue percentExposed
(see examples)
121p rendered by percentExposure

Atoms, residues, and molecule models have attributes (properties) that can be:

Attribute values can be rendered visually (Render by Attribute, rangecolor) and used in atom specification and selection (Select by Attribute).

Define Attribute allows assignment of attribute values to atoms, residues, and models. New attributes can be created or values (re)assigned for existing attributes. Define Attribute is also implemented as the command defattr.

There are several ways to start Define Attribute, a tool in the Structure Analysis category. Starting Define Attribute brings up a dialog for opening an input attribute assignment file.

One or more molecule models should be chosen from the Restrict to models list; only these will be considered during attribute assignment. Individual models or blocks of models can be chosen with the left mouse button. Ctrl-click toggles the status of an individual model. To choose a block of models without dragging, click on the first (or last) and then Shift-click on the last (or first) in the desired block.

Additional options:

OK performs the assignment and dismisses the dialog, whereas Apply performs the assignment without dismissing the dialog. Close simply dismisses the dialog. Help opens this manual page in a browser window.

Assignments can only affect molecule models that are open when the attribute is defined/assigned. For example, atoms in models opened after radii have been assigned by element will have the default radii, not the element-based ones.


Examples are provided below.

A hash symbol # at the beginning of a line indicates a comment. Basic properties of an attribute are described in control lines of the form:

identifier: value
Possible control line contents:
identifier value description
alphanumeric string without spaces; can include underscores; cannot begin with a digit, underscore, or capital letter attribute name, existing or new
match mode
any (default)
expected matches per assignment line (an error message will be sent to the Reply Log when a line's match behavior differs from the match mode)
atoms (default)
level of attribute assignment

The attribute assignments are described in assignment lines:

Any kind of atom specification can be used.

Control lines and comments can be interspersed with assignment lines. However, if multiple attributes are defined in the same file, the attribute control line should precede all other lines for the corresponding attribute.

Allowed attr-value types are:

New numerical attributes will appear in the attribute lists of Render/Select by Attribute; boolean and string attributes will be listed only in the Select by Attribute portion; color attributes will not be listed.


UCSF Computer Graphics Laboratory / February 2006