[chimerax-users] Attribute files in ChimeraX

Elaine Meng meng at cgl.ucsf.edu
Wed Mar 3 10:51:54 PST 2021


Hi David,
The attribute name is just "area".  It would be easier to answer this (and for other people to read) if you entered the commands you used as text instead of a bunch of images, but I will try to summarize here by typing them in myself.

You used:

save sasa.defattr attrName r:area=sasa [...other options...]

Instead should be something like:

save sasa.defattr attrName r:area [...other options...]

Command usage given here:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#attributes>

The table of attributes shows not just the names but also how you would give their values to specify certain atoms.
<https://rbvi.ucsf.edu/chimerax/docs/user/attributes.html#residue>

So the "area=sasa" that you see in the table is the name "area" plus how to specify residues with certain areas in a command, e.g. to select all residues with area values =10:

select ::area=10.0

Normally there wouldn't be residues with exactly the value of 10.0, so that wouldn't select anything.  However, the "=" in that table is a shorthand for indicating that one could use other mathematical relationship symbols including  less than (<), greater than (>) etc. as listed here:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html#attributes>

For example, to select all residues with area values >10:

select ::area>10.0

I hope this helps,
Elaine

> On Mar 3, 2021, at 9:25 AM, David Leeming <david.leeming at student.manchester.ac.uk> wrote:
> 
> Hi Elaine, 
> 
> Thank you very much for the advice, I have updated to the daily build and that was causing the issue I was reporting. 
> However, I'm still a little unsure about how to correctly use the save command 
> <image.png>
> I'm getting this error message when I attempt to run the code on the latest version, however, I'm not sure what's causing this error 
> <image.png>
> I'm basing my code on the guide featured below: (https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html)
> 
> <image.png>
> using the attribute-name from the help online again featured below (https://rbvi.ucsf.edu/chimerax/docs/user/attributes.html#attrnames)
> 
> <image.png>
> 
> Would it be possible to provide an example of a working command as I'm unsure what exactly is giving me this error? 
> Apologies if I'm missing something obvious, thank you very much for continued your time and support. 
> 
> Kind regards, 
> David 
> From: Elaine Meng <meng at cgl.ucsf.edu>
> Sent: 03 March 2021 16:47
> To: David Leeming <david.leeming at student.manchester.ac.uk>
> Cc: chimerax-users at cgl.ucsf.edu <chimerax-users at cgl.ucsf.edu>
> Subject: Re: [chimerax-users] Attribute files in ChimeraX
>  
> Hi David,
> I don't know python, but assuming you are using the "save" command correctly, you probably just need to get a newer version of ChimeraX.  If you report problems, it's helpful to include version and platform.
> 
>  From looking at the ChimeraX change log, you need to get ChimeraX version 1.2 daily build from Oct 19, 2020 or newer, since that's when the ability to write this file type was added:
> <https://www.rbvi.ucsf.edu/trac/ChimeraX/wiki/ChangeLog>
> 
> Attribute files:
> <https://rbvi.ucsf.edu/chimerax/docs/user/formats/defattr.html>
> 
> Saving an attribute file:
> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#attributes>
> 
> I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.                       
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
> 
> > On Mar 3, 2021, at 7:32 AM, David Leeming <david.leeming at student.manchester.ac.uk> wrote:
> > 
> > Dear ChimeraX users, 
> > 
> > I'm trying to write a script that will export an attribute file in ChimeraX, (specifically the attribute sasa) I'm looking for a similar output to that of the attribute calculator function in Chimera (see image below) 
> > <image.png>
> > I'm currently trying to run the command below to export the attribute file:
> > <image.png>
> > However, when I run this script, it produces the error: "No known data format for file suffix '.defattr'" 
> > 
> > Any advice on how I can better go about producing this file or how I can modify my script to prevent this error would be greatly appreciated. 
> > Thank you for your time. 
> > 
> > Kind regards,
> > David




More information about the ChimeraX-users mailing list