[Chimera-users] Get map contour level with python script or command
goddard at sonic.net
Wed Aug 28 14:00:05 PDT 2019
In Python with a Volume model v you can get its surface level(s) with v.surface_levels.
>>> import chimera
>>> ml = chimera.openModels.list()
[<VolumeViewer.volume.Volume object at 0x7f8c914f2d88>]
>>> v = ml
Not sure what you are trying to do so it is hard to advise. You could simply edit the Chimera Python code for the volume command sdLevel option to print the level so it appears in the reply log. The code to modify would be in chimera/share/VolumeViewer/volumecommand.py, search for sdLevel in that file.
Alternatively why not use the "measure mapStats #0" command which prints the SD to the reply log
emd_1080.map: mean = 0.081329, SD = 0.32454, RMS = 0.33457
then whatever code you have that is parsing the reply log could multiply that SD value by 3.
> On Aug 27, 2019, at 5:55 AM, Kyle Morris <kylelmorris at gmail.com> wrote:
> Dear chimera users and dev,
> Is there a chimera or python command that can report the current contour level of a volume that is in model number #n back to the reply log or equivalent?
> I want to do this after executing 'volume #n sdLevel 3’ such that I can programmatically retrieve the contour level associated with a particular sigma level of a currently loaded volume.
> Apologies if in my searching I have missed this on the boards, I think this is a novel question though. Thanks as always for your help.
> Best wishes,
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
More information about the Chimera-users