<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>Hello all,</div><div>I am using Chimera as a visualization tool for small-molecule electron densities obtained by ab initio structure solution. I want to create a small script that will make Chimera read and display the intermediate electron densities as they are produced during the iterative structure solution process. I am not skilled in Python, but I could make a simple Python script by copying and modifying scripts previously posted in this list. Here is the script:</div><div><br></div><div>from chimera import runCommand as run</div><div>from os.path import exists</div><div>from time import sleep</div><div>map_file= 'test.xplor'</div><div>while exists(map_file):</div><div> run('close all')</div><div> run('open ' + map_file)</div><div> sleep(1)</div><div><br></div><div>I am sure this is not the most elegant way to achieve what I need, but it should do the job. What the script should in my opinion do is to read and display the file test.xplor, then wait one second, close the map and reopen it again, until the file test.xplor is deleted. The script does >>almost<< that, it opens the volume viewer, reads the map, but it does not display the map in the main Chimera window. Only after the file test.xplor is deleted, the last map is displayed. Can anybody give me a hint what am I doing wrong? I am using Chimera 1.2540 on Mac OS X 10.4.</div><div><br></div><div>Thanks in advance for any help.</div><div><br></div><div>Best regards</div><div><br></div><div>Lukas</div><div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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; "><br class="Apple-interchange-newline"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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><br class="khtml-block-placeholder"></div><div>Lukas Palatinus</div><div>Laboratoire de Cristallographie</div><div>EPFL Lausanne</div><div><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-family: Verdana; "><span class="Apple-style-span" style="font-family: Verdana; "><span class="Apple-style-span" style="font-family: Verdana; ">Tel.: +41 (0)21 693 0639</span></span></span></font></div><div>mailto: <a href="mailto:palat@fzu.cz">palat@fzu.cz</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span> </div><br></body></html>