Opened 6 years ago

Closed 6 years ago

#2037 closed defect (fixed)

"measure sasa" not setting attribute?

Reported by: Elaine Meng Owned by: Tom Goddard
Priority: major Milestone:
Component: Structure Analysis Version:
Keywords: Cc: pett
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

After I open any protein and then use

measure sasa protein setAttribute true

(or without the latter option which is supposed to be default true)
... I still can't color by that attribute:

color byattribute area palette piyg
No known/registered attribute area

Did I get the attribute name wrong? It's in the documentation.

Change History (3)

comment:1 by Tom Goddard, 6 years ago

Cc: pett added

The measure sasa code appears to be setting atom.area and residue.area attributes in Python. Perhaps the area attribute also has to be registered in some way for color byattribute to work. Eric would know the answer to that.

comment:2 by pett, 6 years ago

Yes, in order for an attribute to be used in that command (and to be saved in sessions!) it has to be registered. Register it with:

Atom.register_attr(session, "area", "Measure SASA", attr_type=float)
Residue.register_attr(session, "area", "Measure SASA", attr_type=float)

The 3rd argument is used in informative error messages in the unlikely case of registration of the same attribute name with different types.

comment:3 by Tom Goddard, 6 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Registered area attribute so color byattribute knows about it.

Note: See TracTickets for help on using tickets.