This is a read-only mirror of pymolwiki.org

Difference between revisions of "Command Line Options"

From PyMOL Wiki
Jump to navigation Jump to search
m (fixed typos)
 
m (1 revision)
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
= Command Line Options =
 
= Command Line Options =
{| width="45%"
+
 
|+ style="font-weight:bold; text-align:center; font-size:150%;" | PyMOL Command line Options
+
shell> pymol --help
! Option !! What it Does
+
 
|-
+
PyMOL 1.8.6.0 Incentive Product
||'''-c''' || Command line mode, no GUI. For batch operations.
+
Copyright (C) Schrodinger, LLC
|-
+
||'''-b''' ||  Runs benchmark.
+
Usage: pymol [OPTIONS]... [FILES]... [-- CUSTOM SCRIPT ARGUMENTS]
|-
+
||'''-i''' || Disable the internal OpenGL GUI (object list, menus, etc.)
+
  Options
|-
+
   
||'''-k''' ||  Suppress the use of the .pymolrc file.
+
  --help    display this help and exit
|-
+
  --version display PyMOL version and exit
||'''-x''' ||  Disable the external GUI module.
+
  --retina use retina resolution (MacPyMOL) and set display_scale_factor=2
|-
+
||'''-t''' || Use Tcl/Tk-based external GUI module (pmg_tk).
+
  -1        config_mouse one_button
|-
+
  -2        config_mouse two_button
||'''-q''' ||  Quiet launch. Suppress splash screen & other chatter.
+
  -a N      alias for -A
|-
+
  -A N      application configuration:
||'''-p''' ||  Listen for commands on standard input.
+
    -A1    simple viewer window          (-qxiF -X 68 -Y 100)
|-
+
    -A3    internal GUI only, no splash (-qx -X 68 -Y 100)
||'''-e''' ||  Start in full-screen mode.
+
    -A4    used by PYMOLVIEWER          (-X 68 -Y 100)
|-
+
    -A5    helper application            (-QxiICUF -X 68 -Y 100)
||'''-2''' ||  Start in two-button mouse mode.
+
    -A6    full screen presentation      (-qxieICUPF)
|-
+
  -b[N]    benchmark wizard
||'''-o''' ||  Disable security protections for session files.
+
  -B        (DEPRECATED)
|-
+
  -c        launch in command-line only mode for batch processing
||'''-R''' ||  Launch Greg Landrum's XMLRPC listener.
+
  -C        don't terminate on Ctrl-C
|-
+
  -d cmd    execute PyMOL command
||'''-B''' ||  Enable blue-line stereo signal (for Mac stereo)
+
  -D N      defer_builds_mode=N
|-
+
  -e       full screen
||'''-G''' ||  Start in Game mode.
+
  -E N      multisampling (GL_MULTISAMPLE_ARB)
|-
+
  -f N      internal_feedback=N
||'''-S''' ||  Force and launch in stereo, if possible.
+
  -F        internal_feedback=0
|-
+
  -g file  save image (png) or movie (mpg)
||'''-M''' ||  Force mono even when hardware stereo is present.
+
  -G        game mode (DEPRECATED)
|-
+
  -h        generic helper application (no controls, no feedback)
||'''-X <int> -Y <int> -W <int> -H <int> -V <int>''' || Adjust window geometry.
+
  -H N      window height in pixels
|-
+
  -i        internal_gui=0
||'''-f <# line>''' || Controls display of commands and feedback in OpenGL (0=off).
+
  -I        auto_reinitialize=1 (Mac only)
|-
+
  -j        side-by-side stereo (stereo_mode=4)
||'''-r <file.py> ''' || Run a Python program (in __main__) on startup.
+
  -J        cd to user's home directory
|-
+
  -k        don't load pymolrc or plugins
||'''-l <file.py> ''' || Spawn a python program in new thread.
+
  -K        keep alive: when running without a GUI, don't quit after the input
|-
+
            is exhausted
||'''-d <string> ''' || Run pymol command string upon startup.
+
  -l file  run python script in thread (spawn)
|-
+
  -L file  load file after everything else (only if something was loaded before)
||'''-u <script> ''' || Load and append to this PyMOL script or program file.
+
  -m        INTERNAL - do not use (mac external GUI)
|-
+
  -M       force mono
||'''-s <script> ''' || Save commands to this PyMOL script or program file.
+
  -n        INTERNAL - do not use (incentive_product=1)
|-
+
  -N name  UNSUPPORTED - external gui type (default: pmg_tk) (same as -w)
||'''-g <file.png> ''' || Write a PNG file (after evaluating previous arguments)
+
  -o        disable security protections
|}
+
  -O N      sphere_mode=N
 +
  -p        read commands from STDIN
 +
  -P        handle scenes as if the session were opened in presentation mode
 +
  -q        supress startup message
 +
  -Q        quiet, suppress all text output
 +
  -r file   run python script
 +
  -R        launch RPC Server
 +
  -s file  log to file
 +
  -S        force stereo
 +
  -t N      stereo_mode=N
 +
  -T name  UNSUPPORTED - Tcl/Tk GUI skin
 +
  -u file  resume log file (execute existing content and append new log output)
 +
  -U        UNSUPPORTED reuse the helper application
 +
  -v        UNUSED
 +
  -V N      external GUI window height in pixels
 +
  -w name  UNSUPPORTED - external gui type (default: pmg_tk) (same as -N)
 +
  -W N      window width in pixels
 +
  -x        no external gui
 +
  -X N      window x position on screen
 +
  -y        exit on error
 +
  -Y N      window y position on screen
 +
  -z N      window_visible=N
 +
  -Z N      zoom_mode=N
  
 
= Supported File Formats  =
 
= Supported File Formats  =

Latest revision as of 04:31, 26 June 2017

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

shell> pymol --help
PyMOL 1.8.6.0 Incentive Product
Copyright (C) Schrodinger, LLC

Usage: pymol [OPTIONS]... [FILES]... [-- CUSTOM SCRIPT ARGUMENTS]

Options

  --help    display this help and exit
  --version display PyMOL version and exit
  --retina  use retina resolution (MacPyMOL) and set display_scale_factor=2

  -1        config_mouse one_button
  -2        config_mouse two_button
  -a N      alias for -A
  -A N      application configuration:
    -A1     simple viewer window          (-qxiF -X 68 -Y 100)
    -A3     internal GUI only, no splash  (-qx -X 68 -Y 100)
    -A4     used by PYMOLVIEWER           (-X 68 -Y 100)
    -A5     helper application            (-QxiICUF -X 68 -Y 100)
    -A6     full screen presentation      (-qxieICUPF)
  -b[N]     benchmark wizard
  -B        (DEPRECATED)
  -c        launch in command-line only mode for batch processing
  -C        don't terminate on Ctrl-C
  -d cmd    execute PyMOL command
  -D N      defer_builds_mode=N
  -e        full screen
  -E N      multisampling (GL_MULTISAMPLE_ARB)
  -f N      internal_feedback=N
  -F        internal_feedback=0
  -g file   save image (png) or movie (mpg)
  -G        game mode (DEPRECATED)
  -h        generic helper application (no controls, no feedback)
  -H N      window height in pixels
  -i        internal_gui=0
  -I        auto_reinitialize=1 (Mac only)
  -j        side-by-side stereo (stereo_mode=4)
  -J        cd to user's home directory
  -k        don't load pymolrc or plugins
  -K        keep alive: when running without a GUI, don't quit after the input
            is exhausted
  -l file   run python script in thread (spawn)
  -L file   load file after everything else (only if something was loaded before)
  -m        INTERNAL - do not use (mac external GUI)
  -M        force mono
  -n        INTERNAL - do not use (incentive_product=1)
  -N name   UNSUPPORTED - external gui type (default: pmg_tk) (same as -w)
  -o        disable security protections
  -O N      sphere_mode=N
  -p        read commands from STDIN
  -P        handle scenes as if the session were opened in presentation mode
  -q        supress startup message
  -Q        quiet, suppress all text output
  -r file   run python script
  -R        launch RPC Server
  -s file   log to file
  -S        force stereo
  -t N      stereo_mode=N
  -T name   UNSUPPORTED - Tcl/Tk GUI skin
  -u file   resume log file (execute existing content and append new log output)
  -U        UNSUPPORTED reuse the helper application
  -v        UNUSED
  -V N      external GUI window height in pixels
  -w name   UNSUPPORTED - external gui type (default: pmg_tk) (same as -N)
  -W N      window width in pixels
  -x        no external gui
  -X N      window x position on screen
  -y        exit on error
  -Y N      window y position on screen
  -z N      window_visible=N
  -Z N      zoom_mode=N

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