
Hi Javier, It's not exactly what you were asking, but you can save the attribute to an attribute file, and then to reassign later (when the same structure is already open), you just open that attribute file. See <https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#attributes> <https://rbvi.ucsf.edu/chimerax/docs/user/formats/defattr.html> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 30, 2025, at 11:43 PM, Greg Couch via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Sorry, right now, the only, non-programming, way to preserve custom attributes is to save a ChimeraX session. When you restore a session, you can use either (A) the "Render/Select by Attribute" dialog to see that all of the alignt_rmsd values are 5, or (B) the "info atoms attr align_rmsd" command to see what the values are.
But I find your idea intriguing. The ChimeraX mmCIF code is optimized for a subset of the information in a mmCIF file. Adding support for custom attributes for both writing and reading would require some work. For writing, there needs to be a way to choose which custom attributes to write. And it would be useful to know what precision the floating point numbers should be written with. For reading, a ChimeraX specific table that listed the custom attribute information would be needed. I can envision wanting some of ChimeraX's built-in custom attributes in the mmCIF output.
I'll create a ticket for this.
-- Greg
On 3/30/2025 12:20 PM, Javier via ChimeraX-users wrote:
Hello!
I am trying to create a new attribute in a cif file called align_rmsd. For the example, assume I want all atoms to have this attribute equal to 5. For this, I am opening the file in ChimeraX and applying the following command: setattr atoms align_rmsd 5.0 create true type float With the following result: Assigning align_rmsd attribute to 145 items
However, when I do "save new.cif" I don't see any new attribute in the loop _atom_site.align_rmsd nor any value equal to 5. How can I store this values in a new cif file so that I see the values equal to 5?
Thank you in advance! Javier _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/