many thanks for your quick response!
The example you sent worked; I will try to rewrite our scripts as Python commands and embed them in "python" blocks...
Thanks again, and have a nice weekend,
On Mit, 10 Mär 2010, Jason Vertrees wrote:
> PyMOL is a multithreaded application and it'll accept input from the
> two locations asynchronously. Sync works until the next command is
> done--so, a script, a series of single commands will not do. Embed
> your scripts inside "python" blocks:
> # your_script.py
> for x in range(10): cmd.ray(1000,1000)
> python end
> While that is running input the following into the terminal:
> cmd.sync(); dele *
> This will sync PyMOL and then delete everything. If your session ends
> up blank, it worked.
> -- Jason
> On Wed, Mar 10, 2010 at 3:41 AM, Markus Wiederstein
> <markii@...> wrote:
> > Hi,
> > starting PyMOL with the '-p' option to let it accept input from stdin is a convenient way to trigger it from external programs.
> > However, it seems that one can run into synchronization problems when this is combined with the '@' command for running scripts.
> > For example, the following setup led to a race condition between script handling and standard input:
> > 1. pymol -p (let PyMOL accept input from standard input)
> > 2. External program sends commands, PyMOL reacts.
> > At some point, PyMOL sends "@ pymol_script.p1m" in order to run commands stored in a script file.
> > 3. When further commands are sent by the external program, they intervene with the commands of the script file.
> > In other words, as soon as the "@" command is sent, PyMOL accepts further input from stdin and seemingly ignores the fact that the commands from the script file may not be finished.
> > Is there a way to temporarily block acceptance of standard input? I have tried to use the "cmd.sync()" command, but did not have any success with it.
> > Thanks for any help on this,
> > kind regards,
> > -Markus
> > --
> > Dr. Markus Wiederstein
> > University of Salzburg
> > Department of Molecular Biology
> > Division of Bioinformatics /
> > Center of Applied Molecular Engineering
> > Hellbrunnerstr. 34
> > A-5020 Salzburg
> > Tel: +43 662 8044 5794
> > Fax: +43 662 8044 176
> > ------------------------------------------------------------------------------
> > Download Intel® Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > _______________________________________________
> > PyMOL-users mailing list (PyMOL-users@...)
> > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> > Archives: http://www.mail-archive.com/pymol-users@...>
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrodinger, LLC
> (e) Jason.Vertrees@...
> (o) +1 (603) 374-7120