NOTE: As of OpenMD version 2.0, the build system has changed significantly. We have an updated set of instructions to build and install OpenMD 2.0.

We’re going to assume here that you have already built and installed all of the prerequisites. If you haven’t done that, go install all of the required stuff and come back. We’ll wait.

OK, now that you’ve got all the stuff you need, we’ll branch to the same three architectures and give the instructions separately:

On a Mac (OS X 10.5 or greater)

  1. Download the latest release of the OpenMD:
    curl -o openmd-1.1.5.tar.gz http://openmd.org/releases/openmd-1.1.5.tar.gz
  2. Unpack the file:
    tar -zxvf openmd-1.1.5.tar.gz
  3. Change into the OpenMD directory:
    cd openmd-1.1.5
  4. Set the compiler variables to your preferred compilers:
    export CC=/opt/local/bin/openmpicc
    export CXX=/opt/local/bin/openmpic++
    export FC=/opt/local/bin/openmpif90
    export MPICC=$CC
    export MPICXX=$CXX
    export MPIFC=$FC

    All of the previous lines assume you are using /bin/sh or /bin/bash as your shell. If you are a csh/tcsh person, those environment variable lines will look like this:

    setenv CC /opt/local/bin/openmpicc
    setenv CXX /opt/local/bin/openmpic++
    setenv FC /opt/local/bin/openmpif90
    setenv MPICC $CC
    setenv MPICXX $CXX
    setenv MPIFC $FC
  5. Run the configure script with all of the arguments set to point to the correct locations for the optional software:
    ./configure --with-openbabel=/opt/local --with-qhull=/opt/local \
    --with-fftw=/opt/local --prefix=/opt/local
  6. Make OpenMD:
    make

    (This would be a good time to grab coffee. Perhaps lunch. Or maybe a quick trip to the pub would be in order.)

  7. Install OpenMD:
    sudo make install
  8. That’s it! When these steps are complete, OpenMD has been installed in the directory /opt/local/openmd. All of the programs are installed in the bin subdirectory, and samples are in the samples subdirectory, and required data files are in the forceFields directory.

On Linux

  1. Download the latest release of the OpenMD:
    curl -o openmd-1.1.5.tar.gz http://openmd.org/releases/openmd-1.1.5.tar.gz
  2. Unpack the file:
    tar -zxvf openmd-1.1.5.tar.gz
  3. Change into the OpenMD directory:
    cd openmd-1.1.5
  4. Set the compiler variables to your preferred compilers:
    export CC=/usr/bin/openmpicc
    export CXX=/usr/bin/openmpic++
    export FC=/usr/bin/openmpif90
    export MPICC=$CC
    export MPICXX=$CXX
    export MPIFC=$FC

    All of the previous lines assume you are using /bin/sh or /bin/bash as your shell. If you are a csh/tcsh person, those environment variable lines will look like this:

    setenv CC /usr/bin/openmpicc
    setenv CXX /usr/bin/openmpic++
    setenv FC /usr/bin/openmpif90
    setenv MPICC $CC
    setenv MPICXX $CXX
    setenv MPIFC $FC
  5. Run the configure script with all of the arguments set to point to the correct locations for the optional software:
    ./configure --with-openbabel=/usr --with-qhull=/usr \
    --with-fftw=/usr --prefix=/opt/local
  6. Make OpenMD:
    make

    (This would be a good time to grab coffee. Perhaps lunch. Or maybe a quick trip to the pub would be in order.)

  7. Install OpenMD:
    sudo make install
  8. That’s it! When these steps are complete, OpenMD has been installed in the directory /opt/local/openmd. All of the programs are installed in the bin subdirectory, and samples are in the samples subdirectory, and required data files are in the forceFields directory.

On Windows

You’re largely on your own here, because we don’t have a windows machine on which to test OpenMD, but if you have cygwin installed, it should be quite similar build instructions to Linux.