This is a read-only mirror of pymolwiki.org

Launching From a Script

From PyMOL Wiki
Revision as of 20:23, 17 February 2005 by Jcorn (talk | contribs) (/* Launching From a Script /*)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

You can also script your launch. Here is an example script that launches PyMol for stereo viewing on a VisBox. It runs PyMol fullscreen stereo, and disables the internal gui.

#!/usr/bin/env python

# Tell PyMOL we don't want any GUI features.
import __main__
__main__.pymol_argv = [ 'pymol', '-Gi' ]

# Importing the PyMOL module will create the window.

import pymol

# Call the function below before using any PyMOL modules.

pymol.finish_launching()

from pymol import cmd
cmd.stereo('walleye')
cmd.set('stereo_shift', 0.23)
cmd.set('stereo_angle', 1.0)