Re: [PyMOL] Start PyMOL from command line

2010-09-01 Thread Michael Lerner
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).

3) From within PyMOL, you can type

from glob import glob
for f in glob.glob(*.pdb): cmd.load(f)

and it will load them all.


There's more information to be found on the wiki (
http://www.pymolwiki.org/index.php/Launching_PyMOL), including information
on how to set up aliases so that you can just type pymol to launch it.
It's worth noting that pymol -c will launch PyMOL in batch mode without
the GUI, which may not be what you want.

Cheers,

-Michael


On Wed, Sep 1, 2010 at 9:44 AM, Martin Hediger ma@bluewin.ch wrote:

  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


 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
 Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
 Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net




-- 
Michael Lerner, Ph.D.
IRTA Postdoctoral Fellow
Laboratory of Computational Biology NIH/NHLBI
5635 Fishers Lane, Room T909, MSC 9314
Rockville, MD 20852 (UPS/FedEx/Reality)
Bethesda MD 20892-9314 (USPS)
--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Start PyMOL from command line

2010-09-01 Thread Michael F. Summers
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



On Sep 1, 2010, at 9:44 AM, Martin Hediger wrote:

  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
 
 --
 This SF.net Dev2Dev email is sponsored by:
 
 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
 Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
 Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
 


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net