Command Line Options: Difference between revisions

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

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.
-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