Discussion:
[PyMOL] Start PyMOL from command line
Martin Hediger
2010-09-01 13:44:04 UTC
Permalink
Dear All
I'm using Mac OS X and would like to start PyMOL from the command line,
so I can open up .pdb files from a command line argument by issuing $
pymol -c /directory/*pdb (for some reason, within pymol it seems to be
not possible to issue 'PyMOL > *pdb').
When I enter 'pymol' in the Terminal, the Shell freezes and I have to
kill the process.
What is required to do so PyMOL becomes launchable from the command line.

Thanks for suggestions.

Martin
Michael Lerner
2010-09-01 14:14:32 UTC
Permalink
Hi Martin,

I know a few ways to do this:

1) If you've set your Mac up to load PDB files with PyMOL by default, you
can just type "open *.pdb" from the command line.

2) Instead of using OS X's open command, you can launch PyMOL directly via
"/Applications/PyMOLX11Hybrid.app/Contents/MacOS/MacPyMOL *.pdb" (you may
have to change that depending on where you have PyMOL installed).
Michael F. Summers
2010-09-01 13:55:32 UTC
Permalink
My favorite way to do this is to add the following to an alias file that is sourced upon login:

alias pm '/Applications/MacPyMol.app/Contents/MacOS/MacPyMOL $*'


With this approach, you can "cd" to any directory that contains a pdb file of interest,
and type: pm filename.pdb

Pymol launches, opens the pdb file, and uses the current directory.

Mike
Post by Martin Hediger
Dear All
I'm using Mac OS X and would like to start PyMOL from the command line,
so I can open up .pdb files from a command line argument by issuing $
pymol -c /directory/*pdb (for some reason, within pymol it seems to be
not possible to issue 'PyMOL > *pdb').
When I enter 'pymol' in the Terminal, the Shell freezes and I have to
kill the process.
What is required to do so PyMOL becomes launchable from the command line.
Thanks for suggestions.
Martin
------------------------------------------------------------------------------
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Jason Vertrees
2010-09-01 20:54:18 UTC
Permalink
Michael,

That's a great idea.

You can also specify which MacPyMOL you want via:

open -a MacPyMOL
open -a PyMOLX11Hybrid
open -a PyMOLX11Zalman

Just make sure you have those copies of MacPyMOL installed before
issuing the command.

Cheers,

-- Jason

On Wed, Sep 1, 2010 at 9:55 AM, Michael F. Summers
Post by Michael F. Summers
alias pm '/Applications/MacPyMol.app/Contents/MacOS/MacPyMOL $*'
With this approach, you can "cd" to any directory that contains a pdb file of interest,
and type:  pm filename.pdb
Pymol launches, opens the pdb file, and uses the current directory.
Mike
 Dear All
I'm using Mac OS X and would like to start PyMOL from the command line,
so I can open up .pdb files from a command line argument by issuing $
pymol -c /directory/*pdb (for some reason, within pymol it seems to be
not possible to issue 'PyMOL > *pdb').
When I enter 'pymol' in the Terminal, the Shell freezes and I have to
kill the process.
What is required to do so PyMOL becomes launchable from the command line.
Thanks for suggestions.
Martin
------------------------------------------------------------------------------
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
------------------------------------------------------------------------------
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
--
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC

(e) ***@schrodinger.com
(o) +1 (603) 374-7120
Martin Hediger
2010-09-02 08:18:05 UTC
Permalink
Indeed batch mode would not be what I wanted.
Thanks for the hints, I'll give it a try.

I guess I'll also have to look at the glob module.
Post by Michael F. Summers
alias pm '/Applications/MacPyMol.app/Contents/MacOS/MacPyMOL $*'
With this approach, you can "cd" to any directory that contains a pdb file of interest,
and type: pm filename.pdb
Pymol launches, opens the pdb file, and uses the current directory.
Mike
Post by Martin Hediger
Dear All
I'm using Mac OS X and would like to start PyMOL from the command line,
so I can open up .pdb files from a command line argument by issuing $
pymol -c /directory/*pdb (for some reason, within pymol it seems to be
not possible to issue 'PyMOL> *pdb').
When I enter 'pymol' in the Terminal, the Shell freezes and I have to
kill the process.
What is required to do so PyMOL becomes launchable from the command line.
Thanks for suggestions.
Martin
------------------------------------------------------------------------------
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Loading...