2 Highly Optimized Object-oriented Many-particle Dynamics -- Blue Edition
3 (HOOMD-blue) Open Source Software License Copyright 2008-2011 Ames Laboratory
4 Iowa State University and The Regents of the University of Michigan All rights
7 HOOMD-blue may contain modifications ("Contributions") provided, and to which
8 copyright is held, by various Contributors who have granted The Regents of the
9 University of Michigan the right to modify and/or distribute such Contributions.
11 You may redistribute, use, and create derivate works of HOOMD-blue, in source
12 and binary forms, provided you abide by the following conditions:
14 * Redistributions of source code must retain the above copyright notice, this
15 list of conditions, and the following disclaimer both in the code and
16 prominently in any materials provided with the distribution.
18 * Redistributions in binary form must reproduce the above copyright notice, this
19 list of conditions, and the following disclaimer in the documentation and/or
20 other materials provided with the distribution.
22 * All publications and presentations based on HOOMD-blue, including any reports
23 or published results obtained, in whole or in part, with HOOMD-blue, will
24 acknowledge its use according to the terms posted at the time of submission on:
25 http://codeblue.umich.edu/hoomd-blue/citations.html
27 * Any electronic documents citing HOOMD-Blue will link to the HOOMD-Blue website:
28 http://codeblue.umich.edu/hoomd-blue/
30 * Apart from the above required attributions, neither the name of the copyright
31 holder nor the names of HOOMD-blue's contributors may be used to endorse or
32 promote products derived from this software without specific prior written
37 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' AND
38 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
39 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR ANY
40 WARRANTIES THAT THIS SOFTWARE IS FREE OF INFRINGEMENT ARE DISCLAIMED.
42 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
43 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
44 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
45 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
46 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
47 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
48 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53 \page page_compile_guide_mac Compiling HOOMD-blue on Mac OS X
56 - \ref sec_build_mac_prereq
57 - \ref sec_build_mac_compile
60 \section sec_build_mac_prereq Software Prerequisites
62 HOOMD-blue requires a number of prerequisite software packages and libraries to be installed before it can be compiled.
63 Macports (http://www.macports.org) greatly simplifies the installation of these.
65 This page assumes that you have a standard terminal window open in some cases. Commands to run in the terminal will
66 be indicated as below:
71 " $ " indicates a shell prompt. As demonstrated above, if you type "echo hello", then you should see the same
72 output obtained above on the next line: "hello"
74 <b>1. Install macports</b>
75 Go to http://www.macports.org and download the appropriate dmg for your system. Mount the dmg by double-clicking on it.
76 Double-click on the pkg installer for macports and follow the on-screen instructions to complete the install.
78 If you have not yet installed the Apple developer tools (Xcode) on your system, you will need to do so now. Follow
79 the instructions in the macports documentation: http://guide.macports.org/
81 Finally, run macports' selfupdate command to bring your install fully up to date:
83 $ sudo port selfupdate
87 <b>2. Install cmake, boost, and python</b>
89 With macports, installing cmake, boost, and python is easy. Just run the following command in a terminal.
91 $ sudo port install cmake boost +python27 python_select
93 The process can take up to 4 hours, so be patient or leave it to run overnight.
95 After macports finishes the above command, run
97 $ sudo port select python python27
99 to select the python that macports installed. This step is crucial, or else you will get python <i>version mismatch</i>
100 or <i>'NoneType'</i> errors when trying to run hoomd.
102 You can switch back to the Apple installed python at any time by running
104 $ sudo port select python python26-apple
106 or see a list of all python installations you can switch between with
111 <b>3. (optional) Install the NVIDIA CUDA toolkit and driver</b>
113 Download the NVIDIA CUDA Toolkit (version 3.0 beta or newer) appropriate for your system from
114 http://www.nvidia.com/object/cuda_get.html . To install, open Finder, navigate to the directory where you downloaded
115 the file and double-click on it. Follow the on screen prompts to complete the installation.
117 If you have an NVIDIA GPU, Download the CUDA drivers for your GPU from http://www.nvidia.com/object/cuda_get.html .
118 To install, open Finder, navigate to the directory where you downloaded the file and double-click on it.
119 Follow the on screen prompts to complete the installation.
121 <b>4. (optional) Install doxygen</b>
123 Download the doxygen dmg from http://www.stack.nl/~dimitri/doxygen/ . Mount the dmg by double-clicking on it. Install
124 by dragging Doxygen to your /Applications directory.
126 <b>5. (optional) Install git.</b>
128 Download the git dmg from http://git-scm.com/ and install the software.
130 \section sec_build_mac_compile Compile hoomd
132 Now that all of the prerequisite software is installed, you are ready to compile hoomd.
134 <b>Step 1: Get a copy of the source code</b>
135 There are two ways to get the source code for HOOMD-blue. You can download it
136 (http://codeblue.umich.edu/hoomd-blue/download.html) or you can clone the git repository:
140 $ git clone https://codeblue.umich.edu/git/hoomd-blue code
142 By default, the \em master branch will be checked out. This branch includes new features tested and
143 validated for the next feature release. Using the command <code>git checkout</code> \em branchname
144 you can access bugfixes applied to the previous tagged release (\em maint) or experimental features
145 still under development (\em next).
147 To access a tagged release, check out the tag (for example 0.10.0):
149 $ git checkout v0.10.0
152 You can verify that the tagged release is exactly as it appeared to the developers when it was created if you
155 $ git cat-file blob 175bf6edfc8ac23c067df1d9bd7b5dd41982be3c | gpg --import
159 <b>Step 2 (option A): Compile and install hoomd with makefiles</b>
164 $ cmake ../code -DCMAKE_INSTALL_PREFIX=~/hoomd-install
167 The -j4 option to make allows it to compile many files in parallel. Set the number to the number of CPU cores in your
176 <b>Step 2 (option B): Compile and install hoomd with Xcode</b>
181 $ cmake ../code -GXcode -DCMAKE_INSTALL_PREFIX=~/hoomd-install
182 $ open HOOMD.xcodeproj
184 Press command-B to build hoomd. Build the INSTALL target to install the built hoomd to CMAKE_INSTALL_PREFIX.
185 <b>Note:</b> Xcode defaults to Debug builds!
187 To run the tests, build the test_all target. Then run the following command in the build/ directory
189 $ CONFIGURATION=Debug ctest -CDebug
191 assuming you build the Debug configuration. Change Debug to Release in both locations on the command line to test
194 <b>Step 3: Setup your PATH</b>
198 and add the following line to the end
200 export PATH=$PATH:${HOME}/hoomd-install/bin
202 assuming that you set CMAKE_INSTALL_PREFIX to ~/hoomd-install above. If you prefer to install hoomd to a different
203 location, simply set CMAKE_INSTALL_PREFIX to the desired directory in the cmake command in step 2.