[Chimera-users] Get map contour level with python script or command

Tom Goddard goddard at sonic.net
Wed Aug 28 14:00:05 PDT 2019


Hi Kyle,

  In Python with a Volume model v you can get its surface level(s) with v.surface_levels.

>>> import chimera
>>> ml = chimera.openModels.list()
>>> ml
[<VolumeViewer.volume.Volume object at 0x7f8c914f2d88>]
>>> v = ml[0]
>>> v.surface_levels
[0.97360895273109072]

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.

	Tom


> 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,
> Kyle
> _______________________________________________
> 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 mailing list