<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 10, 2012, at 6:02 AM, Dan Cohen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hello,<br><br>I would like to use Chimera python classes from a python script running outside Chimera (part of a larger python project).<br>I saw another post that explained that this could be done but I was unclear which of the Chimera functionality can be used<br> in this case. In case I want to create an image (e.g. load pdb files, do some editing and then create an image to a file) - can I use<br>the "chimera" class or do I need to use something else? (I saw a reference to "midas" classes)<br> <br>Is there an example for doing that? Processing a file and creating an image in a non-GUI scenario running outside chimera?</div></blockquote><br></div><div>Hi Dany,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>You probably want to look over the Chimera Programmer's Guide here:</div><div><br></div><div><a href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html">http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html</a></div><div><br></div><div>and particularly the "basic primer" here:</div><div><br></div><div><a href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html">http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html</a></div><div><br></div><div>which covers almost exactly what you're asking for: making images via a script. As Greg mentioned in his reply, it is far easier to run Python scripts using Chimera as the Python interpreter than using a separate Python and importing Chimera modules. Also as Greg mentioned, you would need to use the "headless" version of Chimera if you don't want the Chimera interface displayed as the script runs (which is also mentioned in the latter link above).</div><div><br></div><div>--Eric</div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>Eric Pettersen</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>UCSF Computer Graphics Lab</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> </span><a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a></font></p><br class="Apple-interchange-newline"></div></span> </div><br></body></html>