How run vmd from the terminal of OS X
Running any program from the command line is something doable in Mac OS X.
In fact, it is somewhat integrated into the OS, from the open manpages:
NAME
open -- open files and directories
DESCRIPTION
The open command opens a file (or a directory or URL), just as if you had dou-
ble-clicked the file's icon. If no application name is specified, the default
application as determined via LaunchServices is used to open the specified
files.
If you check the full manpage in your computer you'll find out that you can use the open command to access pretty much any file your OS knows how to open. From doc to pdf to xml. It is actually cool and useful. But what about opening a file with an specific program?
Well, open covers that:
open -a /Applications/Your.app your.file
for example,
open -a /Applications/Molecular\ Modelling/VMD\ 1.9.app 3bp8m1.pdb
This example will launch VMD, that I keep in a folder within Applications and load a pdb.
This works, in a pinch. However, I rather type just vmd.
This is taken from my .bashrc (and is in bash syntax):
alias vmd='/Applications/Molecular\ Modelling/VMD\ 1.9.app/Contents/MacOS/startup.command'
Now you can call VMD with just three letter anywhere. This works for most of the structure visualization like UCSF Chimera, SPDBV or Pymol (even if it is installed as PyMOLX11Hybrid).
Here you have the aliases as I wrote them:
alias chimera='/Applications/Molecular\ Modelling/Chimera.app/Contents/MacOS/chimera'
alias spdbv='/Applications/Molecular\ Modelling/SPDBV_4.01_OSX/Swiss-PdbViewer.app/Contents/MacOS/Swiss-PdbViewer'
alias pymol='/Applications/Molecular\ Modelling/PyMOLX11Hybrid.app/Contents/MacOS/MacPyMOL'
Here you go!
In fact, it is somewhat integrated into the OS, from the open manpages:
NAME
open -- open files and directories
DESCRIPTION
The open command opens a file (or a directory or URL), just as if you had dou-
ble-clicked the file's icon. If no application name is specified, the default
application as determined via LaunchServices is used to open the specified
files.
If you check the full manpage in your computer you'll find out that you can use the open command to access pretty much any file your OS knows how to open. From doc to pdf to xml. It is actually cool and useful. But what about opening a file with an specific program?
Well, open covers that:
open -a /Applications/Your.app your.file
for example,
open -a /Applications/Molecular\ Modelling/VMD\ 1.9.app 3bp8m1.pdb
This example will launch VMD, that I keep in a folder within Applications and load a pdb.
This works, in a pinch. However, I rather type just vmd.
This is taken from my .bashrc (and is in bash syntax):
alias vmd='/Applications/Molecular\ Modelling/VMD\ 1.9.app/Contents/MacOS/startup.command'
Now you can call VMD with just three letter anywhere. This works for most of the structure visualization like UCSF Chimera, SPDBV or Pymol (even if it is installed as PyMOLX11Hybrid).
Here you have the aliases as I wrote them:
alias chimera='/Applications/Molecular\ Modelling/Chimera.app/Contents/MacOS/chimera'
alias spdbv='/Applications/Molecular\ Modelling/SPDBV_4.01_OSX/Swiss-PdbViewer.app/Contents/MacOS/Swiss-PdbViewer'
alias pymol='/Applications/Molecular\ Modelling/PyMOLX11Hybrid.app/Contents/MacOS/MacPyMOL'
Here you go!
Comments
thanks
Thank you for the tutorial. I am interested to run VMD in text mode on MAC 10.9.5 OS.
Can you please direct me?
Thank you .
Bharat