
Hi Jeff, The Chimera path tracer markers accommodate extra attributes that are read and written to the XML marker files. There is no user interface to define new marker attributes in Chimera. A user interface to define new marker attributes does not seem hard. You could specify an attribute name and value in a command or dialog that assigns that attribute for all selected markers. For these new attributes to be of any use within Chimera more capabilities would be needed. For example some command or dialog that would allow you to select all markers with a certain attribute and value (e.g. is_filament = true). These kinds of capabilities already exist for attributes of atoms of molecules. For example, see the "setattr" and "defattr" commands, and "Render/Select by Attribute" tool, and atom specifiers that can test for specific attribute values. http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/setattr.html http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/defattr.html http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/render/render.html http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/atom_spec.html#descrip... These will work with path tracer markers since markers are implemented as atoms. But there are problems. For example "defattr" uses names of atoms and the names of the path tracer atoms are not meaningful. Probably "setattr" is more useful and you can set an attribute for all currently selected atoms. The main weakness is that these atom attributes will not be saved in marker XML files. That is probably easy to fix but I would need to investigate how atom attributes are implemented. For markers the attributes are kept in a Python dictionary marker.extra_attributes. I do not know if atom attributes on markers will be saved in Chimera session files. Would have to test that. Tom Jeff wrote:
Tom,
how hard would it be to add other attribute(s) to the markers generated with the volume path tracer tool, aside from marker-to-marker connectivity? Such as the ability to enumerate individual filaments/objects within a single marker set, or a flag that would tell whether a set/group is composed of filaments, or surfaces, or just a point cloud? Either of of these (enumeration, or object type) could be stored as an integer.
-Jeff

Hi Jeff, I checked with Eric Pettersen and found that Chimera sessions do not contain atom attributes set with "setattr" or "defattr". So there is currently no convenient way to save an manipulate marker attributes. Tom

Jeff wrote:
do you think there is a way to address the request with minimal effort from the developers?
Hi Jeff, The code could be changed so that whenever you open markers (XML file or session) their extra attributes become atom attributes, and whenever you save markers (XML file or session) the atom attributes become marker attributes (hence are saved). This would be trivial except that the implementation of atom attributes is hard to use. Finding atom attributes involves checking all the Python attributes of each atom and throwing out ones based on "smart" rules: the name can't start with "_" or with a capital letter, can't be in a standard list (radius, serialNumber, drawMode, ...), has to have a numeric value, .... All of these rules are currently inaccessible to other code in the render by attribute tool, though that could be changed. If all these special rules about atom attributes in the future are not adequate then when you save markers you will get unintended junk attributes in your XML files and sessions. If the above change were made it still looks cumbersome to use -- so cumbersome that noone would use it. Could you explain just how you would use it? including all commands you would type, what would get selected by hand, how you would operationally use the attributes. Tom
participants (1)
-
Tom Goddard