Setattr sets an attribute (existing or new) to a specified single value. The attribute may remain multi-valued, however, as the assignment may affect only a subset of the entities with the attribute. To assign multiple values simultaneously, use defattr. For attr_name (attribute name) lookup, see the balloon help of attribute inspector dialogs (more...).
Although setattr does not contain restrictions on which attributes can be affected, it may not make sense to change certain attributes. It is possible, however, to set an attribute that is also used in the atom-spec because the specification will be evaluated before the attribute value is changed.
The attribute level can specified as:
If the attribute already exists, attr_value should be of the appropriate type. Allowed attribute types:
setattr a label "pick me!" element.S- label all sulfur atoms with the text pick me!
setattr s density 5.0- set molecular surface vertex density to 5.0
setattr r isHelix false :30-45.a- remove any helix assignment from residues 30-45 in chain A (without changing the structure itself)
setattr p color hot pink ions za<5- color pseudobonds between atoms within 5 Å of ions hot pink
setattr g lineWidth 3- use linewidth 3 for all pseudobond groups