The Attribute Calculator Attribute Calculator icon

The Attribute Calculator generates new numerical attributes from existing ones; it can be used to calculate totals or averages of a given numerical attribute over all atoms (residues, molecule models) present or just those that are selected.

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

There are several ways to start the Attribute Calculator, a tool in the Structure Analysis category.

One must specify a name for the attribute to be created and whether it will be an attribute of atoms, residues, or molecule models. The name must be an alphanumeric string without spaces; it can include underscores but cannot begin with a digit or a capital letter.

The Formula is an arithmetic expression. Supported operators are + (addition), (subtraction), * (multiplication), and / (division). Parentheses can be used for grouping.

Terms in the expression can be: Several options further affect the calculation and attribute assignment:

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

The formula is not reevaluated automatically; if any constituent attribute values change, OK or Apply must be used again to recalculate the result with the new values.


UCSF Computer Graphics Laboratory / April 2005