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
(3 intermediate revisions by the same user 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 =
+
{| width="45%"
  -c   Command line mode, no GUI.  For batch opeations.
+
|+ style="font-weight:bold; text-align:center; font-size:150%;" | PyMOL Command line Options
  -i   Disable the internal OpenGL GUI (object list, menus, etc.)
+
! Option !! What it Does
  -x   Disable the external GUI module.
+
|-
  -t   Use Tcl/Tk based external GUI module (pmg_tk).
+
||'''-c''' ||  Command line mode, no GUI.  For batch opeations.
  -q   Quiet launch. Suppress splash screen & other chatter.
+
|-
  -p   Listen for commands on standard input.
+
||'''-b''' ||  Runs benchmark.
  -e   Start in full-screen mode.
+
|-
  -2   Start in two-button mouse mode.
+
||'''-i''' ||  Disable the internal OpenGL GUI (object list, menus, etc.)
  -o   Disable security protections for session files.
+
|-
  -R   Launch Greg Landrum's XMLRPC listener.
+
||'''-k''' ||  Supress the use of the .pymolrc file.
  -B   Enable blue-line stereo signal (for Mac stereo)
+
|-
  -G   Start in Game mode.
+
||'''-x''' ||  Disable the external GUI module.
  -S   Force and launch in stereo, if possible.
+
|-
  -M   Force mono even when hardware stereo is present.
+
||'''-t''' ||  Use Tcl/Tk based external GUI module (pmg_tk).
+
|-
  -X <int> -Y <int> -W <int> -H <int> -V <int> Adjust window geometry.
+
||'''-q''' ||  Quiet launch. Suppress splash screen & other chatter.
+
|-
  -f <# line> Controls display of commands and feedback in OpenGL (0=off).
+
||'''-p''' ||  Listen for commands on standard input.
  -r <file.py> Run a Python program (in __main__) on startup.
+
|-
  -l <file.py> Spawn a python program in new thread.
+
||'''-e''' ||  Start in full-screen mode.
  -d <string> Run pymol command string upon startup.
+
|-
  -u <script> Load and append to this PyMOL script or program file.
+
||'''-2''' ||  Start in two-button mouse mode.
  -s <script> Save commands to this PyMOL script or program file.
+
|-
  -g <file.png> Write a PNG file (after evaluating previous arguments)
+
||'''-o''' ||  Disable security protections for session files.
   
+
|-
  <file> can have one of the following extensions, and all
+
||'''-R''' ||  Launch Greg Landrum's XMLRPC listener.
  files provided will be loaded or run after PyMOL starts.
+
|-
+
||'''-B''' ||  Enable blue-line stereo signal (for Mac stereo)
    .pml           PyMOL command script to be run on startup
+
|-
    .py, .pym, .pyc Python program to be run on startup
+
||'''-G''' ||  Start in Game mode.
    .pdb           Protein Data Bank format file to be loaded on startup
+
|-
    .mmod           Macromodel format to be loaded on startup
+
||'''-S''' ||  Force and launch in stereo, if possible.
    .mol           MDL MOL file to be loaded on startup
+
|-
    .sdf           MDL SD file to be parsed and loaded on startup
+
||'''-M''' ||  Force mono even when hardware stereo is present.
    .xplor         X-PLOR Map file (ASCII) to be loaded on startup
+
|-
    .ccp4          CCP4 map file (BINARY) to be loaded on startup
+
||'''-X <int> -Y <int> -W <int> -H <int> -V <int>''' || Adjust window geometry.
    .cc1, .cc2     ChemDraw 3D cartesian coordinate file
+
|-
    .pkl           Pickled ChemPy Model (class "chempy.model.Indexed")
+
||'''-f <# line>''' || Controls display of commands and feedback in OpenGL (0=off).
    .r3d           Raster3D file
+
|-
    .cex           CEX file (Metaphorics)
+
||'''-r <file.py> ''' || Run a Python program (in __main__) on startup.
    .top           AMBER topology file
+
|-
    .crd           AMBER coordinate file
+
||'''-l <file.py> ''' || Spawn a python program in new thread.
    .rst           AMBER restart file
+
|-
    .trj           AMBER trajectory
+
||'''-d <string> ''' || Run pymol command string upon startup.
    .pse           PyMOL session file
+
|-
    .phi           Delphi/Grasp Electrostatic Potential Map
+
||'''-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.
 +
 
 +
{| 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>

Revision as of 13:22, 15 January 2009

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 opeations.
-b Runs benchmark.
-i Disable the internal OpenGL GUI (object list, menus, etc.)
-k Supress 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