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 (1 revision)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
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.
+
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.
  
  PyMOL COMMAND LINE OPTIONS
+
= Command Line Options =
 +
 
 +
shell> pymol --help
 +
 
 +
  PyMOL 1.8.6.0 Incentive Product
 +
Copyright (C) Schrodinger, LLC
 
   
 
   
  -c  Command line mode, no GUI. For batch opeations.
+
  Usage: pymol [OPTIONS]... [FILES]... [-- CUSTOM SCRIPT ARGUMENTS]
  -i  Disable the internal OpenGL GUI (object list, menus, etc.)
 
  -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.
+
Options
 
   
 
   
   -f <# line> Controls display of commands and feedback in OpenGL (0=off).
+
   --help    display this help and exit
   -r <file.py> Run a Python program (in __main__) on startup.
+
   --version display PyMOL version and exit
  -l <file.py> Spawn a python program in new thread.
+
   --retina  use retina resolution (MacPyMOL) and set display_scale_factor=2
  -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)
 
 
   
 
   
   <file> can have one of the following extensions, and all
+
   -1        config_mouse one_button
  files provided will be loaded or run after PyMOL starts.
+
  -2        config_mouse two_button
+
  -a N      alias for -A
    .pml           PyMOL command script to be run on startup
+
  -A N      application configuration:
    .py, .pym, .pyc Python program to be run on startup
+
    -A1    simple viewer window          (-qxiF -X 68 -Y 100)
    .pdb           Protein Data Bank format file to be loaded on startup
+
    -A3    internal GUI only, no splash  (-qx -X 68 -Y 100)
    .mmod           Macromodel format to be loaded on startup
+
    -A4    used by PYMOLVIEWER          (-X 68 -Y 100)
    .mol           MDL MOL file to be loaded on startup
+
    -A5    helper application            (-QxiICUF -X 68 -Y 100)
    .sdf           MDL SD file to be parsed and loaded on startup
+
    -A6    full screen presentation      (-qxieICUPF)
    .xplor         X-PLOR Map file (ASCII) to be loaded on startup
+
  -b[N]    benchmark wizard
    .ccp4          CCP4 map file (BINARY) to be loaded on startup
+
  -B        (DEPRECATED)
    .cc1, .cc2     ChemDraw 3D cartesian coordinate file
+
  -c        launch in command-line only mode for batch processing
    .pkl           Pickled ChemPy Model (class "chempy.model.Indexed")
+
  -C        don't terminate on Ctrl-C
    .r3d           Raster3D file
+
  -d cmd    execute PyMOL command
    .cex           CEX file (Metaphorics)
+
  -D N      defer_builds_mode=N
    .top           AMBER topology file
+
  -e        full screen
    .crd           AMBER coordinate file
+
  -E N      multisampling (GL_MULTISAMPLE_ARB)
    .rst           AMBER restart file
+
  -f N      internal_feedback=N
    .trj           AMBER trajectory
+
  -F        internal_feedback=0
    .pse           PyMOL session file
+
  -g file  save image (png) or movie (mpg)
    .phi           Delphi/Grasp Electrostatic Potential Map
+
  -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.
 +
 
 +
{| width="45%"
 +
|+ style="font-weight:bold; text-align:center; font-size:150%;" | 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 =
 +
<source lang="bash">
 +
# 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
 +
</source>
 +
 
 +
[[Category:Launching]]

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