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)
- 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
- Unpack the file:
tar -zxvf openmd-1.1.5.tar.gz
- Change into the OpenMD directory:
cd openmd-1.1.5
- 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=$FCAll 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 - 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 - 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.)
- Install OpenMD:
sudo make install
- 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
- 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
- Unpack the file:
tar -zxvf openmd-1.1.5.tar.gz
- Change into the OpenMD directory:
cd openmd-1.1.5
- 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=$FCAll 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 - 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 - 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.)
- Install OpenMD:
sudo make install
- 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.
Pingback: Converting a protein structure for use with OpenMD « OpenMD
Pingback: Simple liquid simulations using OpenMD « OpenMD
#1 by Lynn Meredith on January 18, 2012 - 2:48 pm
Warning: Undefined variable $my_comment_count in /Users/Gezelter/openmd/wordpress/wp-content/themes/arclite/functions.php on line 714
Quote
Got an error trying to install …
/opt/local/bin/openmpic++ -DSVN_REV=”” -DFRC_PATH=”/opt/local/openmd/forceFields” -Os -c -I../../src -I/opt/local/include -I/opt/local/include -I/opt/local/include/openbabel-2.0 RigidBody.cpp -o ../../obj/RigidBody.o
In file included from RigidBody.cpp:43:
In file included from ../../src/primitives/RigidBody.hpp:54:
In file included from ../../src/primitives/StuntDouble.hpp:56:
../../src/math/SquareMatrix3.hpp:420:5: error: use of undeclared identifier ‘jacobi’
jacobi(a, w, v);
^
RigidBody.cpp:191:14: note: in instantiation of member function ‘OpenMD::SquareMatrix3::diagonalize’
requested here
Mat3x3d::diagonalize(Itmp, evals, sU_);
^
../../src/math/SquareMatrix.hpp:207:16: note: must qualify identifier to find this declaration in dependent base
class
static int jacobi(SquareMatrix& a, Vector& d,
^
1 error generated.
make[1]: *** [../../obj/RigidBody.o] Error 1
/opt/local/bin/openmpic++ -DSVN_REV=”” -DFRC_PATH=”/opt/local/openmd/forceFields” -DIS_MPI -Os -c -I../../src -I/opt/local/include -I/opt/local/include -I/opt/local/include/openbabel-2.0 RigidBody.cpp -o ../../MPIobj/RigidBody.o
In file included from RigidBody.cpp:43:
In file included from ../../src/primitives/RigidBody.hpp:54:
In file included from ../../src/primitives/StuntDouble.hpp:56:
../../src/math/SquareMatrix3.hpp:420:5: error: use of undeclared identifier ‘jacobi’
jacobi(a, w, v);
^
RigidBody.cpp:191:14: note: in instantiation of member function ‘OpenMD::SquareMatrix3::diagonalize’
requested here
Mat3x3d::diagonalize(Itmp, evals, sU_);
^
../../src/math/SquareMatrix.hpp:207:16: note: must qualify identifier to find this declaration in dependent base
class
static int jacobi(SquareMatrix& a, Vector& d,
^
1 error generated.
make[1]: *** [../../MPIobj/RigidBody.o] Error 1
make[1]: Target `_installall’ not remade because of errors.
make: *** [src/primitives/.install] Error 2
#2 by Dan Gezelter on January 18, 2012 - 3:51 pm
Warning: Undefined variable $my_comment_count in /Users/Gezelter/openmd/wordpress/wp-content/themes/arclite/functions.php on line 714
Quote
Lynn,
I just uploaded a maintenance release (1.1.5) that should fix this problem. I’m guessing that your version of openmpi was compiled with a relatively new version of gcc / g++, which is more strict about namespaces. We’ve fixed the problem in SquareMatrix, and it should be OK with the newer compilers.
#3 by Lynn Meredith on January 19, 2012 - 10:49 am
Warning: Undefined variable $my_comment_count in /Users/Gezelter/openmd/wordpress/wp-content/themes/arclite/functions.php on line 714
Quote
OK, I got it compiled and installed. However, when I executed opened I get the following error:
openmd(48775) malloc: *** error for object 0x104c4a440: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort
It’s probably something simple, but I don’t see it.
Thanks, Lynn