<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Stu,<div class=""><br class=""></div><div class=""> To find out about Python functions that control volume display in Chimera that you could use from your Tkinter gui take a look at the Chimera Python scripts web page:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts" class="">http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts</a></div><div class=""><br class=""></div><div class="">for example the readvol.py example shows how to access volume data values. In Python you can make use of commands that would be normally typed at the Chimera command-line in the following way</div><div class=""><br class=""></div><div class=""> from chimera import runCommand</div><div class=""> runCommand(‘volume #0 level 12.5 color pink’)</div><div class=""><br class=""></div><div class="">or you could directly call functions in Python that change volume display, for example,</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>import VolumeViewer as vv</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>v0 = vv.volume_list()[0]</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>v0.set_parameters(surface_levels = [12.5], surface_colors = [(1,.5,.5,1)])</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span></div><div class="">To find those functions you can look at the Chimera Volume class Python code in your Chimera distribution</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>chimera/share/VolumeViewer/volume.py</div><div class=""><br class=""></div><div class="">(on Mac in Chimera.app/Contents/Resources/share/VolumeViewer/volume.py), and you can look at how the Chimera “volume” command does it</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>chimera/share/VolumeViewer/volumecommand.py</div><div class=""><br class=""></div><div class="">For making a Tk GUI look at a simple example in the Chimera distribution, for example, the values at atom positions dialog</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>chimera/share/AtomDensity/gui.py</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> Tom</div><div class=""><br class=""><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 6, 2015, at 12:16 PM, hy liao wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><div dir="ltr" id="yui_3_16_0_1_1425672217874_2557" class="">Hi, I am developing a GUI with Tkinter, using anaconda's python 2.7.9. I like how chimera displays volumes (density maps), so I would like to a chimera-volume-display in my GUI. I am now disregarding anaconda and developing all within chimera's IDLE. However, I do not know which chimera commands I could use for my purpose; could you please point to some choices?</div><div id="yui_3_16_0_1_1425672217874_2920" class=""><br class=""></div><div id="yui_3_16_0_1_1425672217874_2805" dir="ltr" class="">I am new with developing chimera extension and tkinter, and I mostly look for code examples. I had a look at <a style="" class="" id="yui_3_16_0_1_1425672594948_5289" rel="nofollow" shape="rect" target="_blank" href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/">http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/</a>, "Working with the Chimera Extension Manager," but I do not know which commands I could use to have chimera display a volume in a grid of my GUI. <br class=""></div><div id="yui_3_16_0_1_1425672217874_2919" class=""><br class=""></div><div id="yui_3_16_0_1_1425672217874_2958" dir="ltr" class="">Thanks!</div><div id="yui_3_16_0_1_1425672217874_2918" dir="ltr" class="">Stu<br class=""></div></div></div>_______________________________________________<br class="">Chimera-dev mailing list<br class=""><a href="mailto:Chimera-dev@cgl.ucsf.edu" class="">Chimera-dev@cgl.ucsf.edu</a><br class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>