Disclaimer: All the contributions displayed on this page were made by subscribers of the PyMOL mailing list at
sourceforge.net and Warren L. DeLano himself. Although i have checked most of the things listed here, i cannot guarantee
that everythings works well. I cannot even guarantee that i have understood everything written on this page. Please be cautious.
Linux:
Whenever PyMol starts, a '.pymolrc' file containing commands is run.
All you need to do is create ".pymolrc" and place it in your
home directory. Alternatively, you can instead create ".pymolrc.py" which
contains actual Python code instead of just PyMOL commands.
Windows:
On Windows, use 'pymolrc', 'pymolrc.py' or 'pymolrc.pym'.
If PYMOL_PATH, LD_LIBRARY_PATH, and TCL_LIBRARY are correctly defined, then you can launch PyMOL from an external Python program as shown in examples/devel/start_pymol.py.
NOTE: This approach is not recommended, since the PyMOL launching process is subject to change without warning.
The recommended approach is to just use PyMOL as your python interpreter:
pymol -r <script.py> pymol -qcr <script.py>
To perform PyMOL commands from stdin (file, pipe) without opening an OpenGL window, try:
pymol -qc
Just type:
feedback disable,all,actions feedback disable,all,results-From Python:
cmd.feedback("disable","all","actions")
cmd.feedback("disable","all","results")
Will suppress most of PyMOL's normal chatter.
Running a Python script from PyMOL, usually the command:
run script.pyIs enough. Of course, the file script.py needs to be in the working directory.
pymol example.py # synchronous, in PyMOL module pymol -r example.py # synchronous in __main__ module pymol -l example.py # asychronous in a new moduleYou can also launch python programs from within PyMOL with the commands:
run example.py # synchronous in pymol module run example.py,main # synchronous in __main__ module spawn example.py # asychronous in a new module spawn example.py,global # asychronous in the PyMOL module spawn example.py,main # asychronous in the __main__ module
Rubor : http://www.rubor.de
Post an Kristian Rother:
kristian.rother@charite.de
Last modified: Wed Apr 28 07:24:35 CEST 2004