[Chimera-users] Flushing output during the script execution

Lukas Palatinus palat at fzu.cz
Mon Oct 27 09:42:56 PDT 2008

Hello all,
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:

from chimera import runCommand as run
from os.path import exists
from time import sleep
map_file= 'test.xplor'
while exists(map_file):
    run('close all')
    run('open ' + map_file)

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.

Thanks in advance for any help.

Best regards


Lukas Palatinus
Laboratoire de Cristallographie
EPFL Lausanne
Tel.: +41 (0)21 693 0639
mailto: palat at fzu.cz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20081027/8457a67d/attachment.html>

More information about the Chimera-users mailing list