Command Line Options

From PyMOLWiki
Revision as of 11:46, 2 August 2013 by Jaredsampson (talk | contribs) (fixed typos)
Jump to navigation Jump to search

PyMOL has lots of options for controlling it immediately from startup. Run 'help launching' from the command line for detailed listings of options for your current version of PyMol. Here is a sample output which should be pretty consistent for recent versions.

Command Line Options

PyMOL Command line Options
Option What it Does
-c Command line mode, no GUI. For batch operations.
-b Runs benchmark.
-i Disable the internal OpenGL GUI (object list, menus, etc.)
-k Suppress the use of the .pymolrc file.
-x Disable the external GUI module.
-t Use Tcl/Tk-based external GUI module (pmg_tk).
-q Quiet launch. Suppress splash screen & other chatter.
-p Listen for commands on standard input.
-e Start in full-screen mode.
-2 Start in two-button mouse mode.
-o Disable security protections for session files.
-R Launch Greg Landrum's XMLRPC listener.
-B Enable blue-line stereo signal (for Mac stereo)
-G Start in Game mode.
-S Force and launch in stereo, if possible.
-M Force mono even when hardware stereo is present.
-X <int> -Y <int> -W <int> -H <int> -V <int> Adjust window geometry.
-f <# line> Controls display of commands and feedback in OpenGL (0=off).
-r <file.py> Run a Python program (in __main__) on startup.
-l <file.py> Spawn a python program in new thread.
-d <string> Run pymol command string upon startup.
-u <script> Load and append to this PyMOL script or program file.
-s <script> Save commands to this PyMOL script or program file.
-g <file.png> Write a PNG file (after evaluating previous arguments)

Supported File Formats

<file> can have one of the following extensions, and all files provided will be loaded or run after PyMOL starts.

PyMOL Supported File Formats
Extension Format
.pml PyMOL command script to be run on startup
.py, .pym, .pyc Python program to be run on startup
.pdb Protein Data Bank format file to be loaded on startup
.mmod Macromodel format to be loaded on startup
.mol MDL MOL file to be loaded on startup
.sdf MDL SD file to be parsed and loaded on startup
.xplor X-PLOR Map file (ASCII) to be loaded on startup
.ccp4 CCP4 map file (BINARY) to be loaded on startup
.cc1, .cc2 ChemDraw 3D cartesian coordinate file
.pkl Pickled ChemPy Model (class "chempy.model.Indexed")
.r3d Raster3D file
.cex CEX file (Metaphorics)
.top AMBER topology file
.crd AMBER coordinate file
.rst AMBER restart file
.trj AMBER trajectory
.pse PyMOL session file
.phi Delphi/Grasp Electrostatic Potential Map

Examples

# load the 3 pdb files and execte the following commands
pymol mol1.pdb mol2.pdb mol3.pdb -d 'as ribbon;spectrum count;set seq_view'

# load the 3 pdbs and run the script
pymol mol1.pdb mol2.pdb mol3.pdb my_script.pml

# Run my_program using PyMOL as the Python interpreter
# passing the 3 pdb files to my_program.py
pymol my_program.py -- mol1.pdb mol2.pdb mol3.pdb