I’m writing this as how-to reference for installing useful software for MD research. I already wrote most of this a long time ago but is somewhere hidden in my GitHub, so I’m putting it here for easier access. Hopefully it’s also useful for someone else although this is all pretty much really basic and I decided write it down because I easily forget things.
Follow Jason Swail’s guide.
In essence, these are the necessary things for AmberTools to work on a Mac:
Enable command-line tools
Use macports to install the compilers for AmberTools to work
The gcc version 4.8 (known bug in here failed for me so I installed the 4.9 version. The commands were:
sudo port install gcc49 sudo port install mpich-gcc49 sudo port select --set gcc mp-gcc49 sudo port select --set mpi mpich-gcc49-fortran
Once you complete all of the above steps without errors, you can actually start the installation of AmberTools:
- Everything worked for me using the most simple installation (
If you do
make test in your
$AMBERHOME directory and everything is OK, you should see the following (after a lot of output):
All the tests PASSED 1382 file comparisons passed 0 file comparisons failed 0 tests experienced errors Test log file saved as /usr/local/amber15/logs/test_at_serial/2015-10-28_15-26-42.log No test diffs to save!
Here are all of the downloadables.
I chose the latest version (1.9.2) and the MacOS X OpenGL (32-bit Intel x86) link.
.dmg file is downloaded. Open it and then drag the VMD icon to the Applications folder. Done!
It won’t let you just open it yet: Apple blocks applications from non-verified distributors (a.k.a non-Apple) so you have to go to System Preferences > Security & Privacy and click on the General tab. There, click on the lower-left lock icon, and then select the Anywhere option under the Allow apps downloaded from: section. Now you can use vmd.
How to use vmd from the command line
Using VMD from the command line is very convenient as you can directly load the topology and trajectories files, or several PDBs very quickly. If you open VMD manually from the Dock it points every time to your home directory and you loose a lot of time manually navigating to wherever the files you want to visualize are.
Remove the space from the name of the Application (i.e. VMD1.9.2). This is best done from the Finder (spaces in the command line are a pain to work with).
Add this to your
vmdappdir='/Applications/VMD1.9.2.app/Contents' alias vmd='"$vmdappdir/Resources/VMD.app/Contents/MacOS/VMD" $*'
NOTE: VMD only has 32-bit version for Mac OS X. This is bad because you’ll only be able to open trajectories that are half the size of your RAM. More info on this issue here.
I’ve come up with a solution to this :heavy_exclamation_mark:
Copy or download the script below and save it somewhere in your
$PATH (for example,
usr/local/bin). Then make it an executable with
chmod +x load_big_trajs.sh.
Take a look at line 40 in the script and change the path to your VMD executable if it’s different!
If you’ve followed the previous steps it should be the same as the one in the script, though. Now you’ll be able to load multiple trajectory files
from the command line like so:
load_big_trajs.sh topology.prmtop trajectories*.nc (provided you have a sensible naming scheme of your trajectories
and they show up sequentially. Check this by doing
Installing UCSF Chimera
Here are all the downloadables.
Same procedure as VMD. Click on .dmg file, drag Chimera icon to the Applications folder.
The binary is in
How to use chimera from the command line
- Create an alias in your
alias chimera = '/Applications/Chimera.app/Contents/MacOS/chimera'
- Do a symbolic link to somewhere in your
$PATHwith, for example:
sudo ln -s /Applications/Chimera.app/Contents/MacOS/chimera /usr/local/bin/chimera
Either option should work.
/usr/local/bin is in the default $PATH, check it by typing
echo $PATH and looking for it.
If not create it (with sudo) and append it to the $PATH in your