Python script for reading volume values at atom positions

Dear chimera dev and users, Can anyone confirm with the latest chimera version (i’m running v1.11.2 build 41376) if this python script for measuring map values at atoms works for them? The script was reported previously on the users list here: http://plato.cgl.ucsf.edu/pipermail/chimera-users/2007-May/001587.html For me I get a python import error: from VolumeViewer import Data_Region, full_region, Rendering_Options Thanks for your insight! Best wishes, Kyle

Hi Kyle, I can’t answer about the old script, but if it is feasible for you to do interactively, there is a "Values at Atom Positions" tool included in Chimera. It’s in the menu under Tools… Volume Data, and it assigns the interpolated values as an atom attribute. You can write out the values using the File menu of the Render by Attribute tool, which automatically pops up when you click the Histogram button to assign the values. <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/density/density.html> I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 18, 2017, at 7:36 PM, Kyle Morris <kylelmorris@berkeley.edu> wrote:
Dear chimera dev and users,
Can anyone confirm with the latest chimera version (i’m running v1.11.2 build 41376) if this python script for measuring map values at atoms works for them?
The script was reported previously on the users list here: http://plato.cgl.ucsf.edu/pipermail/chimera-users/2007-May/001587.html
For me I get a python import error: from VolumeViewer import Data_Region, full_region, Rendering_Options
Thanks for your insight!
Best wishes, Kyle

Hi Elaine, Thanks for this, absolutely excellent tool but I really need to script this, command line or python. I have 28 maps and 6 models per map you see... I don't think there's a command line implementation of this? Thanks, Kyle
On 19 Jan 2017, at 09:46, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Kyle, I can’t answer about the old script, but if it is feasible for you to do interactively, there is a "Values at Atom Positions" tool included in Chimera. It’s in the menu under Tools… Volume Data, and it assigns the interpolated values as an atom attribute. You can write out the values using the File menu of the Render by Attribute tool, which automatically pops up when you click the Histogram button to assign the values.
<http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/density/density.html>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 18, 2017, at 7:36 PM, Kyle Morris <kylelmorris@berkeley.edu> wrote:
Dear chimera dev and users,
Can anyone confirm with the latest chimera version (i’m running v1.11.2 build 41376) if this python script for measuring map values at atoms works for them?
The script was reported previously on the users list here: http://plato.cgl.ucsf.edu/pipermail/chimera-users/2007-May/001587.html
For me I get a python import error: from VolumeViewer import Data_Region, full_region, Rendering_Options
Thanks for your insight!
Best wishes, Kyle

Hi Kyle, Yes, it is also implemented as the command “measure mapValues”, see: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/measure.html#mapValues> It includes a “report” option to send the values to the Reply Log. Then you could save Reply Log contents to a file, but that requires a bit of python shown at the bottom of this page: <http://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html> Another possibility is in “measure mapValues” use name “bfactor” and then save as PDB file with “write” command. That would force rounding to fit into the bfactor column, however. So maybe that script would be more efficient, if it works or could be modified to work, but somebody else would have to help with that! Best, Elaine
On Jan 19, 2017, at 9:54 AM, Kyle Morris <kylelmorris@berkeley.edu> wrote:
Hi Elaine,
Thanks for this, absolutely excellent tool but I really need to script this, command line or python. I have 28 maps and 6 models per map you see...
I don't think there's a command line implementation of this?
Thanks, Kyle
On 19 Jan 2017, at 09:46, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Kyle, I can’t answer about the old script, but if it is feasible for you to do interactively, there is a "Values at Atom Positions" tool included in Chimera. It’s in the menu under Tools… Volume Data, and it assigns the interpolated values as an atom attribute. You can write out the values using the File menu of the Render by Attribute tool, which automatically pops up when you click the Histogram button to assign the values.
<http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/density/density.html>
I hope this helps, Elaine
On Jan 18, 2017, at 7:36 PM, Kyle Morris <kylelmorris@berkeley.edu> wrote:
Dear chimera dev and users,
Can anyone confirm with the latest chimera version (i’m running v1.11.2 build 41376) if this python script for measuring map values at atoms works for them?
The script was reported previously on the users list here: http://plato.cgl.ucsf.edu/pipermail/chimera-users/2007-May/001587.html
For me I get a python import error: from VolumeViewer import Data_Region, full_region, Rendering_Options
Thanks for your insight!
Best wishes, Kyle

Hi Kyle, Here is the fixed script avalnogui.py to report density map values at atom positions. It is also at the Chimera Python scripts web page. https://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts <https://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts> I made it take the file paths on the command line, for instance, $ chimera --nogui --silent --script "avalnogui.py 1a0m.pdb 1a0m.omap" #1:1.A@N 3.722 #1:1.A@CA 3.345 #1:1.A@C 4.04 ... Tom
On Jan 18, 2017, at 7:36 PM, Kyle Morris <kylelmorris@berkeley.edu> wrote:
Dear chimera dev and users,
Can anyone confirm with the latest chimera version (i’m running v1.11.2 build 41376) if this python script for measuring map values at atoms works for them?
The script was reported previously on the users list here: http://plato.cgl.ucsf.edu/pipermail/chimera-users/2007-May/001587.html
For me I get a python import error: from VolumeViewer import Data_Region, full_region, Rendering_Options
Thanks for your insight!
Best wishes, Kyle _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Dear Elaine and Tom, Thank you both for the instruction over this, both methods are perfect for what I wanted to try!! I’ll get on with it then. Confirming the python script works for me with the latest version. Awesome. Kyle
On 19 Jan 2017, at 15:05, Tom Goddard <goddard@sonic.net> wrote:
Hi Kyle,
Here is the fixed script avalnogui.py to report density map values at atom positions. It is also at the Chimera Python scripts web page.
https://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts <https://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts>
I made it take the file paths on the command line, for instance,
$ chimera --nogui --silent --script "avalnogui.py 1a0m.pdb 1a0m.omap" #1:1.A@N 3.722 #1:1.A@CA 3.345 #1:1.A@C 4.04 ...
Tom
<avalnogui.py>
On Jan 18, 2017, at 7:36 PM, Kyle Morris <kylelmorris@berkeley.edu <mailto:kylelmorris@berkeley.edu>> wrote:
Dear chimera dev and users,
Can anyone confirm with the latest chimera version (i’m running v1.11.2 build 41376) if this python script for measuring map values at atoms works for them?
The script was reported previously on the users list here: http://plato.cgl.ucsf.edu/pipermail/chimera-users/2007-May/001587.html <http://plato.cgl.ucsf.edu/pipermail/chimera-users/2007-May/001587.html>
For me I get a python import error: from VolumeViewer import Data_Region, full_region, Rendering_Options
Thanks for your insight!
Best wishes, Kyle _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>

Hi Kyle, Here is the fixed script avalnogui.py to report density map values at atom positions. It is also at the Chimera Python scripts web page (I sent this before with a wrong URL that required a password) http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts <http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts> I made it take the file paths on the command line, for instance, $ chimera --nogui --silent --script "avalnogui.py 1a0m.pdb 1a0m.omap" #1:1.A@N 3.722 #1:1.A@CA 3.345 #1:1.A@C 4.04 ... Tom
On Jan 18, 2017, at 7:36 PM, Kyle Morris <kylelmorris@berkeley.edu <mailto:kylelmorris@berkeley.edu>> wrote:
Dear chimera dev and users,
Can anyone confirm with the latest chimera version (i’m running v1.11.2 build 41376) if this python script for measuring map values at atoms works for them?
The script was reported previously on the users list here: http://plato.cgl.ucsf.edu/pipermail/chimera-users/2007-May/001587.html <http://plato.cgl.ucsf.edu/pipermail/chimera-users/2007-May/001587.html>
For me I get a python import error: from VolumeViewer import Data_Region, full_region, Rendering_Options
Thanks for your insight!
Best wishes, Kyle _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
participants (3)
-
Elaine Meng
-
Kyle Morris
-
Tom Goddard