This will be a quick and unpolished walkthrough of how you get a version of AmberTools17 and in the same manner Amber16 (if you have a licence) installed using the package manager MacPorts. I will supply a walkthrough using Homebrew at a later point in time and try to polish this post up to a more thorough appealing guide, maybe including pictures.
I switched computer at work a little while ago just running on routine I installed MacPorts as the package manager and started to fill the blanks. During this process though, I kept coming back to the fact that I found a lot of information comparing MacPorts and Homebrew where there is either a small amount of “true believers” or a growing majority of users that recommends Homebrew over MacPorts for various resons. I will not get into the details here though I will make an effort of presenting the details regarding my experience of switching package manager.
As stated in the heading, I am using a relatively new Mac running 10.13.3 at work, though the process should be the same for most OS X versions. I have semi-confirmed this by repeating the process on a 2009 year model MacBook Pro running 10.11 as well.
You have to be an administrator/have administrative rights on the computer you are attempting to install amber on, regardless of which method you choose later on since both MacPorts and Homebrew both requires an administrator password at some point during the installation process.
To install using MacPorts, do the following
- Install Xcode from AppStore
- Open a new terminal session (cmd+space, write and search for terminal and open the Terminal.app) and run the following commands to install additional components and approve the license agreement.
- Launch Xcode and install any updates
- Go to MacPorts hemsida, download and install according to instructions
- Go to XQuartz hemsida in order to download and install XQuartz (the replacement for Apples X11 that is no longer available)
- Start a new terminal session
- Run the following commands
sudo port selfupdate
sudo port upgrade outdated
sudo port install gcc6
sudo port install mpich-gcc6
sudo port select --set gcc mp-gcc6
sudo port select --set mpi mpich-gcc6-fortran
- Register and download AmberTools/Amber from the download site
- You’ll receive a file/archive with a name similar to AmberToolsXX.tar.bz2, find this in Finder (likely in your downloads folder), don’t forget to replace XX to the numbers your file actually has. Place this file/archive in a folder where you have read/write permission and where you want to install the package. I will create a folder in my “Home” folder that is called “Software” where I will install AmberTools so this is where I’ll place my downloaded archive file. You can do this in finder using your keyboard and mouse or in the Terminal.app running commands similar to this:
mv ~/Downloads/AmberToolsXX.tar.bz2 ~/Software/
- If you know how to use the terminal, just “cd” into the directory with the archive file, alternatively if you used the keyboard and mouse/trackpad combo, open a new terminal session, type “cd ” at the $ prompt, don’t forget to ad a trailing space and then “drag-and-drop” the folder icon containing the archive in “Finder”, drag it to the Terminal window and drop it there. This should print out the path to that folder so then just press “enter”/”return” on your keyboard.
- When placed in the correct directory in the terminal, run this command
tar xvf AmberToolsXX.tar.bz2
to extract the archive.
- Then run this command
(again, replace XX to the correct numbers)
- Then run this command to place yourself in the correct subdirectory
- and run this command
./configure -macAccelerate gnu
Then compile the serial version first
- Once this process has finished, you’ll be presented with some info and be prompted to perform some actions. This can be performed as following, open a new terminal window (do not close the install terminal yet!) and do the following
Press “i” on your keyboard to activate “edit” mode, in the “install terminal” highlight and copy the line reading something similar to below and paste this in the “.profile” terminal in a new line
test -f ~/Software/amberXX//amber.sh && source ~/Software/amberXX//amber.sh
Press the “esc” key, hold down “shift” and press the “z” key twice (shift+z+z) to save and exit the editor. In both terminals, type
- Close both terminal windows, quit out of Terminal.app and then start a brand new terminal session. Then runt the following
- If the tests looks OK you now have a working serial installation of Amber/AmberTools. What remains is the parallell version, if inclined then run the following
./configure -macAccelerate -mpi gnu
export DO_PARALLEL='mpirun -np 2'
export DO-PARALLEL='mpirun -np 4'
- If the tests work and no large issues are encountered the complete installation is now finished.
This post looks kind of awful, I’ll try to work in some CSS modifications at some point in time.