Command Line Options: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
(pymol --help 1.8.6)
 
(5 intermediate revisions by 3 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 =
   
 
  -c  Command line mode, no GUI.  For batch opeations.
  shell> pymol --help
  -i  Disable the internal OpenGL GUI (object list, menus, etc.)


  -x  Disable the external GUI module.
PyMOL 1.8.6.0 Incentive Product
  -t  Use Tcl/Tk based external GUI module (pmg_tk).
Copyright (C) Schrodinger, LLC
  -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.
Usage: pymol [OPTIONS]... [FILES]... [-- CUSTOM SCRIPT ARGUMENTS]
   
   
  -f <# line> Controls display of commands and feedback in OpenGL (0=off).
Options
  -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)
   
   
   <file> can have one of the following extensions, and all
   --help    display this help and exit
   files provided will be loaded or run after PyMOL starts.
   --version display PyMOL version and exit
  --retina  use retina resolution (MacPyMOL) and set display_scale_factor=2
   
   
     .pml           PyMOL command script to be run on startup
  -1        config_mouse one_button
    .py, .pym, .pyc Python program to be run on startup
  -2        config_mouse two_button
    .pdb           Protein Data Bank format file to be loaded on startup
  -a N      alias for -A
    .mmod           Macromodel format to be loaded on startup
  -A N      application configuration:
    .mol           MDL MOL file to be loaded on startup
    -A1    simple viewer window          (-qxiF -X 68 -Y 100)
    .sdf           MDL SD file to be parsed and loaded on startup
    -A3    internal GUI only, no splash  (-qx -X 68 -Y 100)
    .xplor         X-PLOR Map file (ASCII) to be loaded on startup
    -A4    used by PYMOLVIEWER          (-X 68 -Y 100)
    .ccp4          CCP4 map file (BINARY) to be loaded on startup
    -A5     helper application            (-QxiICUF -X 68 -Y 100)
    .cc1, .cc2     ChemDraw 3D cartesian coordinate file
    -A6    full screen presentation      (-qxieICUPF)
    .pkl           Pickled ChemPy Model (class "chempy.model.Indexed")
  -b[N]    benchmark wizard
    .r3d           Raster3D file
  -B        (DEPRECATED)
    .cex           CEX file (Metaphorics)
  -c        launch in command-line only mode for batch processing
    .top           AMBER topology file
  -C        don't terminate on Ctrl-C
    .crd           AMBER coordinate file
  -d cmd    execute PyMOL command
    .rst           AMBER restart file
  -D N      defer_builds_mode=N
    .trj           AMBER trajectory
  -e        full screen
    .pse           PyMOL session file
  -E N      multisampling (GL_MULTISAMPLE_ARB)
    .phi           Delphi/Grasp Electrostatic Potential Map
  -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.
 
{| 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 01:43, 31 May 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