[Chimera-users] Values at at atom position.
Hernando J Sosa
hernando.sosa at einstein.yu.edu
Sun Apr 9 21:09:37 PDT 2017
As usual your response was very helpful. I ended up using option A) and then a little script to parse the resulting file to get what I wanted.
From: Elaine Meng [mailto:meng at cgl.ucsf.edu]
Sent: Friday, April 7, 2017 9:54 PM
To: Hernando J Sosa
Cc: chimera-users at cgl.ucsf.edu BB
Subject: Re: [Chimera-users] Values at at atom position.
(A) Saving a list of values for all atoms or just selected/specified atoms. After assigning the values with “Values at Atom Positions”, you can write out a list of the atoms and their values (attribute values) from the Render by Attribute dialog menu: "File… Save Attributes”. The Render by Attribute dialog is the one that shows the histogram of attribute values. The attribute-saving dialog has a choice to restrict the output to only the atoms you have selected.
Alternatively you can assign values to only certain atoms specified in the “measure mapValues” command instead of using the “Values at Atom Positions” tool. Saving to a file would be the same as described above. However, the command also has a “report” option to send the list to the Reply Log, so yet another possibility would be to use that and then save the Reply Log to file or just copy those lines from the Reply Log and manually paste into some file, if there aren’t too many lines.
(B) Getting a sum or average. You can use the Attribute Calculator tool (in menu under Tools… Structure Analysis) to get a sum or average of the attributes for all atoms or selected atoms. Maybe one slightly tricky thing is that you need to specify you are calculating a new attribute of “molecules” since you only want one sum or average of the atomic values, not per residue (I assume… although you could do that too!).
I hope this helps,
Elaine C. Meng, Ph.D.
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
> On Apr 7, 2017, at 1:58 PM, Hernando J Sosa <hernando.sosa at einstein.yu.edu> wrote:
> Dear Chimera,
> I wonder if there is an easy way to get the density values of a volume map at selected atom positions in a fitted structure.
> There is the button "Values at Atom Positions" in Volume Viewer->Tools that I believe does something very close to what I am looking for. However, In addition to this I would also like to:
> 1- Get a list of all the values for all the atoms (e.g to calculate
> the sum or average of all) in addition to the given histogram
> 2- Being able to get the values for selected atoms rather than whole models.
More information about the Chimera-users