
Hi Martin, Here's some example Python code that opens a map an sets the contour level to 1.2 and displays it. from chimera import openModels vlist = openModels.open('/Users/goddard/Downloads/Chimera/EMDB/emd_1080.map') v = vlist[0] v.set_parameters(surface_levels = [1.2]) v.show() Or you can simply run a Chimera command from Python from chimera import runCommand runCommand("volume #0 level 1.2") There are more examples of Python code at the Chimera Python scripts web page http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts Unfortunately there is not a reference manual listing all the available Python functions -- something we will remedy in Chimera 2, but that will not be out for perhaps a year. The density map data structure called "Volume" is defined in Python code included in Chimera chimera/share/VolumeViewer/volume.py so you can look at what Python methods are available by looking at that source code. Tom On Nov 18, 2013, at 6:10 AM, Martin Turk <turk@lmb.uni-muenchen.de> wrote:
Hi,
I am trying to write a simple python script that will iterate over opened volumes and adjust the contour level to a certain mass. This shouldn't be more than ~10 lines. However, I can't find chimera's python library reference to look up the class structure and operator names.
Does someone know how, for example, set volume level to 0.01 would look like in python? in the command line it would be for all models: volume #0-99 level 0.01
for models I've found chimera.openModels and then you can list over them, but that's about it.
Thanks, Martin Turk _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev