You must already have the OpenMM binaries installed from SimTK.org/home/OpenMM. Pay careful attention to the installation
There is a Makefile for use on Linux and Mac, and an NMakefile
for use with Microsoft's "nmake" program. For Fortran, the
Makefile expects gfortran to be in the path while NMakefile
expects "ifort" (Intel Fortran).
You must already have the OpenMM binaries installed from
SimTK.org/home/OpenMM. Pay careful attention to the installation
instructions -- if you are hoping to get GPU acceleration you
instructions -- if you are hoping to get GPU acceleration you
may also have to install appropriate vendor libraries and a driver.
may also have to install appropriate vendor libraries and a driver.
You may need to slightly edit the Makefile to make it run on your system, depending where you installed OpenMM and the particular requirements of your version of gcc for mixed Fortran/C++ programming. There is a copy of the Makefile called 'Makefile.mac' which uses a library that worked for us on Mac.
You may need to slightly edit the Makefile or NMakefile to make
it run on your system, depending where you installed OpenMM and
the particular requirements of your compiler versions for mixed
Fortran/C++ programming.
Type "make" (or "make default") to get just one C++ example built
Type "make" (or "make default") to get just one C++ example built
(HelloArgon). Make sure it runs.
(HelloArgon). Make sure it runs.
To compile all example programs type "make all". That includes Fortran
To compile all example programs type "make all". That includes Fortran
examples though so you will see failures unless you have gfortran
examples though so you will see failures unless you have gfortran
installed. However, the C++ and C examples should compile with just
installed (Linux and Mac) or ifort installed (Windows). However,
g++.
the C++ and C examples should compile with just g++ or cl.
To build just one example, type "make HelloArgonInC" or whatever.
To build just one example, type "make HelloArgonInC" or whatever.
Before you run the executables, remember to add the OpenMM dynamic library directory to your library path.
Before you run the executables, remember to add the OpenMM dynamic
library directory to your library path.
The simplest way to do this is to type the following commands:
The simplest way to do this is to type the following commands:
For linux (for the bash shell, assuming installation was done in the default location: /usr/local/openmm):
For linux (for the bash shell, assuming installation was done in
the default location: /usr/local/openmm):
$ export LD_LIBRARY_PATH=/usr/local/openmm/lib
$ export LD_LIBRARY_PATH=/usr/local/openmm/lib
For MAC (for the bash shell, assuming installation was done in the default location: /usr/local/openmm):
For MAC (for the bash shell, assuming installation was done
in the default location: /usr/local/openmm):
$ export DYLD_LIBRARY_PATH=/usr/local/openmm/lib
$ export DYLD_LIBRARY_PATH=/usr/local/openmm/lib
For Windows (command tool, assuming installation was done
in the default location: C:/Program Files/OpenMM):
@@ -6,10 +6,19 @@ See https://simtk.org/home/openmm.
...
@@ -6,10 +6,19 @@ See https://simtk.org/home/openmm.
For help go to the Advanced/Public Forums tab and post to the
For help go to the Advanced/Public Forums tab and post to the
"help" forum there.
"help" forum there.
OpenMM is part of SimTK, the Simbios simulation Toolkit, from the Simbios National Center for Physics-based Simulation of Biological Structures funded by the National Institutes of Health
OpenMM is part of SimTK, the Simbios simulation Toolkit, from
through the NIH Roadmap for Medical Research, Grant U54 GM072970. Information on the National Centers for Biomedical Computing can be obtained here: http://nihroadmap.nih.gov/bioinformatics/.
the Simbios National Center for Physics-based Simulation of
Biological Structures funded by the National Institutes of Health
OpenMM is developed under the supervision of Simbios P.I. Vijay Pande at Stanford. Any work that uses OpenMM should cite the following paper: M. S. Friedrichs, P. Eastman, V. Vaidyanathan, M. Houston, S. LeGrand, A. L. Beberg, D. L. Ensign, C. M. Bruns, V. S. Pande. “Accelerating Molecular Dynamic Simulation on Graphics Processing Units.” J. Comp. Chem., (2009), 30(6):864-872.
through the NIH Roadmap for Medical Research, Grant U54 GM072970.
Information on the National Centers for Biomedical Computing can
be obtained here: http://nihroadmap.nih.gov/bioinformatics/.
OpenMM is developed under the supervision of Simbios P.I. Vijay
Pande at Stanford. Any work that uses OpenMM should cite the
following paper: M. S. Friedrichs, P. Eastman, V. Vaidyanathan,
M. Houston, S. LeGrand, A. L. Beberg, D. L. Ensign, C. M. Bruns,
V. S. Pande. “Accelerating Molecular Dynamic Simulation on
Graphics Processing Units.” J. Comp. Chem., (2009), 30(6):864-872.
These simple "hello world" examples were developed by
These simple "hello world" examples were developed by
Christopher Bruns and Michael Sherman for the OpenMM
Christopher Bruns and Michael Sherman for the OpenMM
...
@@ -17,11 +26,14 @@ workshop on June 24, 2009 at Stanford.
...
@@ -17,11 +26,14 @@ workshop on June 24, 2009 at Stanford.
In addition to the example programs here, there are also two sets of prototype wrappers to enable C and Fortran 95 to call the OpenMM API. However, even if your calling code is in C or Fortran, please consider instead writing your OpenMM-calling routines in C++, using 'extern "C"'
In addition to the example programs here, there are also two sets
so that your main program can call them. If that isn't feasible
of prototype wrappers to enable C and Fortran 95 to call the
for you, try out our prototype wrappers and let us know what
OpenMM API. However, even if your calling code is in C or Fortran,
troubles or better ideas you have. (Post to the OpenMM Forum
please consider instead writing your OpenMM-calling routines in
at the above URL.)
C++, using 'extern "C"' so that your main program can call them.
If that isn't feasible for you, try out our prototype wrappers
and let us know what troubles or better ideas you have. (Post to
the OpenMM Forum at the above URL.)
Building the examples
Building the examples
---------------------
---------------------
...
@@ -30,6 +42,10 @@ This directory includes a Makefile suitable for building the
...
@@ -30,6 +42,10 @@ This directory includes a Makefile suitable for building the
examples under Mac or Linux and possibly Cygwin, using the
examples under Mac or Linux and possibly Cygwin, using the
gcc compiler suite. See MakefileNotes.txt for more info.
gcc compiler suite. See MakefileNotes.txt for more info.
There is a file "NMakefile" which can be used with Microsoft's
NMake program to build the examples using Microsoft's "cl" compiler
for C++ and C, and Intel's "ifort" Fortran compiler.
There is a subdirectory here providing Visual Studio "solutions"
There is a subdirectory here providing Visual Studio "solutions"
for building HelloArgon in C++ or C. You will have to make your
for building HelloArgon in C++ or C. You will have to make your
own for the other examples or just substitute a different source
own for the other examples or just substitute a different source