Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
df2b723d
Commit
df2b723d
authored
Jul 03, 2015
by
leeping
Browse files
Merge branch 'master' of github.com:SimTk/openmm
parents
a0f16cc0
7be6e8fb
Changes
66
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
68 additions
and
168 deletions
+68
-168
.travis.yml
.travis.yml
+4
-1
CMakeLists.txt
CMakeLists.txt
+7
-1
cmake_modules/FindOpenCL.cmake
cmake_modules/FindOpenCL.cmake
+2
-0
devtools/conda-recipe/README.md
devtools/conda-recipe/README.md
+0
-16
devtools/conda-recipe/build.sh
devtools/conda-recipe/build.sh
+0
-53
devtools/conda-recipe/meta.yaml
devtools/conda-recipe/meta.yaml
+0
-19
devtools/conda-recipe/plugin-dir.patch
devtools/conda-recipe/plugin-dir.patch
+0
-17
devtools/packaging/install.sh
devtools/packaging/install.sh
+0
-0
devtools/packaging/scripts/linux/build.sh
devtools/packaging/scripts/linux/build.sh
+7
-7
devtools/packaging/scripts/linux/package.sh
devtools/packaging/scripts/linux/package.sh
+1
-1
devtools/packaging/scripts/osx/build.sh
devtools/packaging/scripts/osx/build.sh
+0
-5
devtools/packaging/scripts/osx/package.sh
devtools/packaging/scripts/osx/package.sh
+1
-1
docs-source/usersguide/application.rst
docs-source/usersguide/application.rst
+8
-28
docs-source/usersguide/library.rst
docs-source/usersguide/library.rst
+3
-6
libraries/lepton/src/ExpressionTreeNode.cpp
libraries/lepton/src/ExpressionTreeNode.cpp
+1
-1
libraries/pthreads/include/pthread.h
libraries/pthreads/include/pthread.h
+4
-1
olla/include/openmm/Platform.h
olla/include/openmm/Platform.h
+15
-9
olla/src/Platform.cpp
olla/src/Platform.cpp
+11
-2
openmmapi/src/BrownianIntegrator.cpp
openmmapi/src/BrownianIntegrator.cpp
+2
-0
openmmapi/src/CustomIntegrator.cpp
openmmapi/src/CustomIntegrator.cpp
+2
-0
No files found.
.travis.yml
View file @
df2b723d
...
@@ -3,6 +3,9 @@ compiler:
...
@@ -3,6 +3,9 @@ compiler:
-
clang
-
clang
env
:
env
:
matrix
:
-
OPENMM_BUILD_STATIC_LIB="OFF"
-
OPENMM_BUILD_STATIC_LIB="ON"
global
:
global
:
# encrypted AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to push docs to s3
# encrypted AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to push docs to s3
-
secure
:
"
VVKz+yOMbKsskR+PfU1HfKBWdGYYrmIXNWQz4nqXCjtg2MRCQmjDulFZaPVDvsBzis9BUhnzAQrBYUrAtN8bZSTYRg7ADFVGdPFicg3Sv0owcghTQwokIvbw3G+HDz/WAnFmqEhqm3t5pNVWNinyHpMM3zYZOVKagyj53cwAM0M="
-
secure
:
"
VVKz+yOMbKsskR+PfU1HfKBWdGYYrmIXNWQz4nqXCjtg2MRCQmjDulFZaPVDvsBzis9BUhnzAQrBYUrAtN8bZSTYRg7ADFVGdPFicg3Sv0owcghTQwokIvbw3G+HDz/WAnFmqEhqm3t5pNVWNinyHpMM3zYZOVKagyj53cwAM0M="
...
@@ -17,7 +20,7 @@ before_install:
...
@@ -17,7 +20,7 @@ before_install:
-
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.3
-
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.3
script
:
script
:
-
cmake -DCMAKE_INSTALL_PREFIX=$HOME/OpenMM .
-
cmake -DCMAKE_INSTALL_PREFIX=$HOME/OpenMM
-DOPENMM_BUILD_STATIC_LIB=$OPENMM_BUILD_STATIC_LIB
.
-
make -j2
-
make -j2
-
make -j2 install
-
make -j2 install
-
sudo make PythonInstall
-
sudo make PythonInstall
...
...
CMakeLists.txt
View file @
df2b723d
...
@@ -470,10 +470,12 @@ FILE(GLOB CORE_HEADERS include/*.h */include/*.h)
...
@@ -470,10 +470,12 @@ FILE(GLOB CORE_HEADERS include/*.h */include/*.h)
FILE
(
GLOB TOP_HEADERS include/openmm/*.h */include/openmm/*.h
)
FILE
(
GLOB TOP_HEADERS include/openmm/*.h */include/openmm/*.h
)
FILE
(
GLOB INTERNAL_HEADERS include/openmm/internal/*.h */include/openmm/internal/*.h
)
FILE
(
GLOB INTERNAL_HEADERS include/openmm/internal/*.h */include/openmm/internal/*.h
)
FILE
(
GLOB REFERENCE_HEADERS platforms/reference/include/*.h
)
FILE
(
GLOB REFERENCE_HEADERS platforms/reference/include/*.h
)
FILE
(
GLOB LEPTON_HEADERS libraries/lepton/include/lepton/*.h
)
INSTALL_FILES
(
/include FILES
${
CORE_HEADERS
}
)
INSTALL_FILES
(
/include FILES
${
CORE_HEADERS
}
)
INSTALL_FILES
(
/include/openmm FILES
${
TOP_HEADERS
}
)
INSTALL_FILES
(
/include/openmm FILES
${
TOP_HEADERS
}
)
INSTALL_FILES
(
/include/openmm/internal FILES
${
INTERNAL_HEADERS
}
)
INSTALL_FILES
(
/include/openmm/internal FILES
${
INTERNAL_HEADERS
}
)
INSTALL_FILES
(
/include/openmm/reference FILES
${
REFERENCE_HEADERS
}
)
INSTALL_FILES
(
/include/openmm/reference FILES
${
REFERENCE_HEADERS
}
)
INSTALL_FILES
(
/include/lepton FILES
${
LEPTON_HEADERS
}
)
# Serialization support
# Serialization support
...
@@ -528,6 +530,10 @@ ADD_SUBDIRECTORY(docs-source)
...
@@ -528,6 +530,10 @@ ADD_SUBDIRECTORY(docs-source)
IF
(
BUILD_TESTING
)
IF
(
BUILD_TESTING
)
ADD_SUBDIRECTORY
(
tests
)
ADD_SUBDIRECTORY
(
tests
)
ENDIF
(
BUILD_TESTING
)
ENDIF
(
BUILD_TESTING
)
ADD_SUBDIRECTORY
(
examples
)
SET
(
OPENMM_BUILD_EXAMPLES ON CACHE BOOL
"Build example executables"
)
IF
(
OPENMM_BUILD_EXAMPLES
)
ADD_SUBDIRECTORY
(
examples
)
ENDIF
(
OPENMM_BUILD_EXAMPLES
)
ENDIF
(
NOT cmv EQUAL
"2.4"
)
# This whole file...
ENDIF
(
NOT cmv EQUAL
"2.4"
)
# This whole file...
cmake_modules/FindOpenCL.cmake
View file @
df2b723d
...
@@ -33,6 +33,7 @@ find_path(OPENCL_INCLUDE_DIR
...
@@ -33,6 +33,7 @@ find_path(OPENCL_INCLUDE_DIR
"/usr/local/cuda"
"/usr/local/cuda"
"/usr/local/streamsdk"
"/usr/local/streamsdk"
"/usr"
"/usr"
"
${
CUDA_TOOLKIT_ROOT_DIR
}
"
PATH_SUFFIXES
"include"
PATH_SUFFIXES
"include"
)
)
...
@@ -78,6 +79,7 @@ find_library(OPENCL_LIBRARY
...
@@ -78,6 +79,7 @@ find_library(OPENCL_LIBRARY
"/usr/local/cuda"
"/usr/local/cuda"
"/usr/local/streamsdk"
"/usr/local/streamsdk"
"/usr"
"/usr"
"
${
CUDA_TOOLKIT_ROOT_DIR
}
"
PATH_SUFFIXES
${
path_suffixes
}
"lib"
PATH_SUFFIXES
${
path_suffixes
}
"lib"
)
)
...
...
devtools/conda-recipe/README.md
deleted
100644 → 0
View file @
a0f16cc0
This is a recipe for building the current development package into a conda binary.
The installation on travis-ci is done by building the conda package, installing
it, running the tests, and then if successful pushing the package to binstar
(and the docs to AWS S3). The binstar auth token is an encrypted environment
variable generated using:
binstar auth -n openmm-travis -o omnia --max-age 22896000 -c --scopes api:write
and then saved in the environment variable BINSTAR_TOKEN.
You can set up travis to store an encrypted token via
gem install travis travis encrypt BINSTAR_TOKEN=xx
where xx is the token output by binstar. The final command should print a line (containing 'secure') for inclusion in your .travis.yml file.
devtools/conda-recipe/build.sh
deleted
100755 → 0
View file @
a0f16cc0
#!/bin/bash
CMAKE_FLAGS
=
"-DCMAKE_INSTALL_PREFIX=
$PREFIX
"
if
[[
"
$OSTYPE
"
==
"linux-gnu"
]]
;
then
# setting the rpath so that libOpenMMPME.so finds the right libfftw3
CMAKE_FLAGS+
=
" -DCMAKE_INSTALL_RPATH=.."
CMAKE_FLAGS+
=
" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+
=
" -DOPENCL_LIBRARY=/opt/AMDAPP/lib/x86_64/libOpenCL.so"
# TEST
elif
[[
"
$OSTYPE
"
==
"darwin"
*
]]
;
then
export
MACOSX_DEPLOYMENT_TARGET
=
"10.7"
CMAKE_FLAGS+
=
" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
fi
# Set location for FFTW3 on both linux and mac
CMAKE_FLAGS+
=
" -DFFTW_INCLUDES=
$PREFIX
/include"
if
[[
"
$OSTYPE
"
==
"linux-gnu"
]]
;
then
CMAKE_FLAGS+
=
" -DFFTW_LIBRARY=
$PREFIX
/lib/libfftw3f.so"
CMAKE_FLAGS+
=
" -DFFTW_THREADS_LIBRARY=
$PREFIX
/lib/libfftw3f_threads.so"
elif
[[
"
$OSTYPE
"
==
"darwin"
*
]]
;
then
CMAKE_FLAGS+
=
" -DFFTW_LIBRARY=
$PREFIX
/lib/libfftw3f.dylib"
CMAKE_FLAGS+
=
" -DFFTW_THREADS_LIBRARY=
$PREFIX
/lib/libfftw3f_threads.dylib"
fi
# Copy source to current directory.
cp
-r
$RECIPE_DIR
/../..
.
# Build in subdirectory.
mkdir
build
cd
build
cmake ..
$CMAKE_FLAGS
make
-j4
make
install
# Run C tests.
# Exclude OpenCL tests because @peastman suspects mesa on travis implementation is broken.
# @jchodera and @pgrinaway suspect travis is working, but AMD OpenCL tests are actually failing due to a bug.
#ctest -j2 -V -E "[A-Za-z]+OpenCL[A-Za-z]+"
# Install Python wrappers.
export
OPENMM_INCLUDE_PATH
=
$PREFIX
/include
export
OPENMM_LIB_PATH
=
$PREFIX
/lib
cd
python
$PYTHON
setup.py
install
cd
..
# Remove one random file
#rm $PREFIX/bin/TestReferenceHarmonicBondForce
# Copy all tests to bin directory so they will be distributed with install package.
cp
`
find
.
-name
"Test*"
-type
f
-maxdepth
1
`
$PREFIX
/bin
devtools/conda-recipe/meta.yaml
deleted
100644 → 0
View file @
a0f16cc0
package
:
name
:
openmm
version
:
!!str
dev
requirements
:
build
:
-
cmake
-
python
-
fftw3f
-
swig
run
:
-
python
-
fftw3f
-
numpy
about
:
home
:
https://simtk.org/home/openmm
license
:
GPL
devtools/conda-recipe/plugin-dir.patch
deleted
100644 → 0
View file @
a0f16cc0
diff --git wrappers/python/simtk/openmm/__init__.py wrappers/python/simtk/openmm/__init__.py
index 7e47b11..0ef290a 100644
--- wrappers/python/simtk/openmm/__init__.py
+++ wrappers/python/simtk/openmm/__init__.py
@@ -13,6 +13,10 @@
import os, os.path
from simtk.openmm.openmm import *
from simtk.openmm.vec3 import Vec3
from simtk.openmm import version
-if os.getenv('OPENMM_PLUGIN_DIR') is None and os.path.isdir(version.openmm_library_path):
+_plugin_dir = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..', 'plugins'))
+if os.path.isdir(_plugin_dir):
+ pluginLoadedLibNames = Platform.loadPluginsFromDirectory(_plugin_dir)
+ del _plugin_dir
+elif os.getenv('OPENMM_PLUGIN_DIR') is None and os.path.isdir(version.openmm_library_path):
pluginLoadedLibNames = Platform.loadPluginsFromDirectory(os.path.join(version.openmm_library_path, 'plugins'))
else:
pluginLoadedLibNames = Platform.loadPluginsFromDirectory(Platform.getDefaultPluginsDirectory())
\ No newline at end of file
install.sh
→
devtools/packaging/
install.sh
View file @
df2b723d
File moved
devtools/packaging/scripts/linux/build.sh
View file @
df2b723d
...
@@ -19,13 +19,13 @@ CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
...
@@ -19,13 +19,13 @@ CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
# setting the rpath so that libOpenMMPME.so finds the right libfftw3
# setting the rpath so that libOpenMMPME.so finds the right libfftw3
#CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.."
#CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.."
CMAKE_FLAGS+
=
" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+
=
" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+
=
" -DCUDA_CUDART_LIBRARY=/usr/local/cuda-
6.5
/lib64/libcudart.so"
CMAKE_FLAGS+
=
" -DCUDA_CUDART_LIBRARY=/usr/local/cuda-
7.0
/lib64/libcudart.so"
CMAKE_FLAGS+
=
" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-
6.5
/bin/nvcc"
CMAKE_FLAGS+
=
" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-
7.0
/bin/nvcc"
CMAKE_FLAGS+
=
" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-
6.5
/"
CMAKE_FLAGS+
=
" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-
7.0
/"
CMAKE_FLAGS+
=
" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-
6.5
/include"
CMAKE_FLAGS+
=
" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-
7.0
/include"
CMAKE_FLAGS+
=
" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-
6.5
/"
CMAKE_FLAGS+
=
" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-
7.0
/"
CMAKE_FLAGS+
=
" -DOPENCL_INCLUDE_DIR=/usr/local/cuda-
6.5
/include"
CMAKE_FLAGS+
=
" -DOPENCL_INCLUDE_DIR=/usr/local/cuda-
7.0
/include"
CMAKE_FLAGS+
=
" -DOPENCL_LIBRARY=/usr/local/cuda-
6.5
/lib64/libOpenCL.so"
CMAKE_FLAGS+
=
" -DOPENCL_LIBRARY=/usr/local/cuda-
7.0
/lib64/libOpenCL.so"
# Set location for FFTW3
# Set location for FFTW3
PREFIX
=
"
$WORKSPACE
/miniconda"
PREFIX
=
"
$WORKSPACE
/miniconda"
...
...
devtools/packaging/scripts/linux/package.sh
View file @
df2b723d
...
@@ -25,7 +25,7 @@ for filename in $( cat openmm/devtools/packaging/manifests/binary/manifest.txt )
...
@@ -25,7 +25,7 @@ for filename in $( cat openmm/devtools/packaging/manifests/binary/manifest.txt )
done
done
# Add the install.sh script
# Add the install.sh script
CMD
=
"cp -r openmm/install.sh
$PACKAGE_DIR
/
$PACKAGE_SUBDIR
"
CMD
=
"cp -r openmm/
devtools/packaging/
install.sh
$PACKAGE_DIR
/
$PACKAGE_SUBDIR
"
echo
$CMD
echo
$CMD
`
$CMD
`
`
$CMD
`
...
...
devtools/packaging/scripts/osx/build.sh
View file @
df2b723d
...
@@ -22,11 +22,6 @@ CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
...
@@ -22,11 +22,6 @@ CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
CMAKE_FLAGS+
=
" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+
=
" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+
=
" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9"
CMAKE_FLAGS+
=
" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9"
CMAKE_FLAGS+
=
" -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"
CMAKE_FLAGS+
=
" -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_OPENCL_LIB=OFF"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_DRUDE_OPENCL_LIB=OFF"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_RPMD_OPENCL_LIB=OFF"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_OPENCL_TESTS=FALSE"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_OPENCL_DOUBLE_PRECISION_TESTS=FALSE"
# Build in subdirectory.
# Build in subdirectory.
# Set location for FFTW3
# Set location for FFTW3
...
...
devtools/packaging/scripts/osx/package.sh
View file @
df2b723d
...
@@ -22,7 +22,7 @@ for filename in $( cat openmm/devtools/packaging/manifests/binary/manifest.txt )
...
@@ -22,7 +22,7 @@ for filename in $( cat openmm/devtools/packaging/manifests/binary/manifest.txt )
done
done
# Add the install.sh script
# Add the install.sh script
CMD
=
"cp -r openmm/install.sh
$PACKAGE_DIR
/
$PACKAGE_SUBDIR
"
CMD
=
"cp -r openmm/
devtools/packaging/
install.sh
$PACKAGE_DIR
/
$PACKAGE_SUBDIR
"
echo
$CMD
echo
$CMD
`
$CMD
`
`
$CMD
`
...
...
docs-source/usersguide/application.rst
View file @
df2b723d
...
@@ -61,7 +61,7 @@ and tell it to install the command line tools. With Xcode 4.2 and earlier, the
...
@@ -61,7 +61,7 @@ and tell it to install the command line tools. With Xcode 4.2 and earlier, the
command
line
tools
are
automatically
installed
when
you
install
Xcode
.)
command
line
tools
are
automatically
installed
when
you
install
Xcode
.)
3.
(
Optional
)
If
you
have
an
Nvidia
GPU
and
want
to
use
the
CUDA
platform
,
3.
(
Optional
)
If
you
have
an
Nvidia
GPU
and
want
to
use
the
CUDA
platform
,
download
CUDA
6.5
from
https
://
developer
.
nvidia
.
com
/
cuda
-
downloads
.
Be
sure
to
download
CUDA
7.0
from
https
://
developer
.
nvidia
.
com
/
cuda
-
downloads
.
Be
sure
to
install
both
the
drivers
and
toolkit
.
install
both
the
drivers
and
toolkit
.
4.
(
Optional
)
If
you
plan
to
use
the
CPU
platform
,
it
is
recommended
that
you
4.
(
Optional
)
If
you
plan
to
use
the
CPU
platform
,
it
is
recommended
that
you
...
@@ -96,15 +96,6 @@ This will affect only the particular Terminal window you type it into. If you
...
@@ -96,15 +96,6 @@ This will affect only the particular Terminal window you type it into. If you
want
to
run
OpenMM
in
another
Terminal
window
,
you
must
type
the
above
command
want
to
run
OpenMM
in
another
Terminal
window
,
you
must
type
the
above
command
in
the
new
window
.
in
the
new
window
.
If
you
plan
to
use
the
CUDA
platform
,
OpenMM
also
needs
to
locate
the
CUDA
kernel
compiler
(:
program
:`
nvcc
`).
By
default
it
looks
for
it
in
the
location
:
file
:`/
usr
/
local
/
cuda
/
bin
/
nvcc
`.
If
you
have
installed
the
CUDA
toolkit
in
a
different
location
,
you
can
set
:
envvar
:`
OPENMM_CUDA_COMPILER
`
to
tell
OpenMM
where
to
find
it
.
For
example
,
::
export
OPENMM_CUDA_COMPILER
=/
opt
/
CUDA
/
cuda
-
6.0
/
bin
/
nvcc
7.
Verify
your
installation
by
typing
the
following
command
:
7.
Verify
your
installation
by
typing
the
following
command
:
::
::
...
@@ -135,7 +126,7 @@ into a console window.
...
@@ -135,7 +126,7 @@ into a console window.
3.
(
Optional
)
If
you
want
to
run
OpenMM
on
a
GPU
,
install
CUDA
and
/
or
OpenCL
.
3.
(
Optional
)
If
you
want
to
run
OpenMM
on
a
GPU
,
install
CUDA
and
/
or
OpenCL
.
*
If
you
have
an
Nvidia
GPU
,
download
CUDA
6.5
from
*
If
you
have
an
Nvidia
GPU
,
download
CUDA
7.0
from
https
://
developer
.
nvidia
.
com
/
cuda
-
downloads
.
Be
sure
to
install
both
the
https
://
developer
.
nvidia
.
com
/
cuda
-
downloads
.
Be
sure
to
install
both
the
drivers
and
toolkit
.
OpenCL
is
included
with
the
CUDA
drivers
.
drivers
and
toolkit
.
OpenCL
is
included
with
the
CUDA
drivers
.
*
If
you
have
an
AMD
GPU
,
download
the
latest
version
of
the
Catalyst
driver
*
If
you
have
an
AMD
GPU
,
download
the
latest
version
of
the
Catalyst
driver
...
@@ -175,15 +166,6 @@ This will affect only the particular console window you type it into. If you
...
@@ -175,15 +166,6 @@ This will affect only the particular console window you type it into. If you
want
to
run
OpenMM
in
another
console
window
,
you
must
type
the
above
command
in
want
to
run
OpenMM
in
another
console
window
,
you
must
type
the
above
command
in
the
new
window
.
the
new
window
.
If
you
plan
to
use
the
CUDA
platform
,
OpenMM
also
needs
to
locate
the
CUDA
kernel
compiler
(:
program
:`
nvcc
`).
By
default
it
looks
for
it
in
the
location
:
file
:`/
usr
/
local
/
cuda
/
bin
/
nvcc
`.
If
you
have
installed
the
CUDA
toolkit
in
a
different
location
,
you
can
set
:
envvar
:`
OPENMM_CUDA_COMPILER
`
to
tell
OpenMM
where
to
find
it
.
For
example
,
::
export
OPENMM_CUDA_COMPILER
=/
opt
/
CUDA
/
cuda
-
6.0
/
bin
/
nvcc
7.
Verify
your
installation
by
typing
the
following
command
:
7.
Verify
your
installation
by
typing
the
following
command
:
::
::
...
@@ -199,10 +181,9 @@ Installing on Windows
...
@@ -199,10 +181,9 @@ Installing on Windows
*********************
*********************
1.
Download
the
pre
-
compiled
binary
of
OpenMM
for
Windows
,
then
double
click
the
1.
Download
the
pre
-
compiled
binary
of
OpenMM
for
Windows
,
then
double
click
the
.
zip
file
to
expand
it
.
Move
the
files
to
:
file
:`
C
:\\
Program
Files
\\
OpenMM
`.
(
On
64
bit
.
zip
file
to
expand
it
.
Move
the
files
to
:
file
:`
C
:\\
Program
Files
\\
OpenMM
`.
Windows
,
use
:
file
:`
C
:\\
Program
Files
(
x86
)\\
OpenMM
`).
2.
Make
sure
you
have
the
32
-
bit
version
of
Python
3.3
(
other
versions
will
not
2.
Make
sure
you
have
the
64
-
bit
version
of
Python
3.3
or
3.4
(
other
versions
will
not
work
)
installed
on
your
computer
.
To
do
this
,
launch
the
Python
program
(
either
work
)
installed
on
your
computer
.
To
do
this
,
launch
the
Python
program
(
either
the
command
line
version
or
the
GUI
version
).
The
first
line
in
the
Python
the
command
line
version
or
the
GUI
version
).
The
first
line
in
the
Python
window
will
indicate
the
version
you
have
,
as
well
as
whether
you
have
a
32
-
bit
window
will
indicate
the
version
you
have
,
as
well
as
whether
you
have
a
32
-
bit
...
@@ -216,7 +197,7 @@ and ignore it.)
...
@@ -216,7 +197,7 @@ and ignore it.)
4.
(
Optional
)
If
you
want
to
run
OpenMM
on
a
GPU
,
install
CUDA
and
/
or
OpenCL
.
4.
(
Optional
)
If
you
want
to
run
OpenMM
on
a
GPU
,
install
CUDA
and
/
or
OpenCL
.
*
If
you
have
an
Nvidia
GPU
,
download
CUDA
6.5
from
*
If
you
have
an
Nvidia
GPU
,
download
CUDA
7.0
from
https
://
developer
.
nvidia
.
com
/
cuda
-
downloads
.
Be
sure
to
install
both
the
https
://
developer
.
nvidia
.
com
/
cuda
-
downloads
.
Be
sure
to
install
both
the
drivers
and
toolkit
.
OpenCL
is
included
with
the
CUDA
drivers
.
drivers
and
toolkit
.
OpenCL
is
included
with
the
CUDA
drivers
.
*
If
you
have
an
AMD
GPU
,
download
the
latest
version
of
the
Catalyst
driver
*
If
you
have
an
AMD
GPU
,
download
the
latest
version
of
the
Catalyst
driver
...
@@ -225,9 +206,8 @@ and ignore it.)
...
@@ -225,9 +206,8 @@ and ignore it.)
5.
(
Optional
)
If
you
plan
to
use
the
CPU
platform
,
it
is
recommended
that
you
5.
(
Optional
)
If
you
plan
to
use
the
CPU
platform
,
it
is
recommended
that
you
install
FFTW
.
Precompiled
binaries
are
available
from
http
://
www
.
fftw
.
org
.
install
FFTW
.
Precompiled
binaries
are
available
from
http
://
www
.
fftw
.
org
.
Even
on
64
-
bit
machines
you
should
use
the
32
-
bit
version
since
the
OpenMM
OpenMM
will
still
work
without
FFTW
,
but
the
performance
of
particle
mesh
Ewald
binary
is
32
-
bit
.
OpenMM
will
still
work
without
FFTW
,
but
the
performance
of
(
PME
)
will
be
much
worse
.
particle
mesh
Ewald
(
PME
)
will
be
much
worse
.
6.
Before
running
OpenMM
,
you
must
add
the
OpenMM
and
FFTW
libraries
to
your
6.
Before
running
OpenMM
,
you
must
add
the
OpenMM
and
FFTW
libraries
to
your
PATH
environment
variable
.
You
may
also
need
to
add
the
Python
executable
to
PATH
environment
variable
.
You
may
also
need
to
add
the
Python
executable
to
...
@@ -266,7 +246,7 @@ your PATH.
...
@@ -266,7 +246,7 @@ your PATH.
If
you
installed
OpenMM
somewhere
other
than
the
default
location
,
you
must
also
If
you
installed
OpenMM
somewhere
other
than
the
default
location
,
you
must
also
set
:
envvar
:`
OPENMM_PLUGIN_DIR
`
to
point
to
the
plugins
directory
.
If
this
variable
is
set
:
envvar
:`
OPENMM_PLUGIN_DIR
`
to
point
to
the
plugins
directory
.
If
this
variable
is
not
set
,
it
will
assume
plugins
are
in
the
default
location
(:
file
:`
C
:\\
Program
not
set
,
it
will
assume
plugins
are
in
the
default
location
(:
file
:`
C
:\\
Program
Files
\\
OpenMM
\\
lib
\\
plugins
`
or
:
file
:`
C
:\\
Program
Files
(
x86
)\\
OpenMM
\\
lib
\\
plugins
`
).
Files
\\
OpenMM
\\
lib
\\
plugins
`).
7.
Verify
your
installation
by
typing
the
following
command
:
7.
Verify
your
installation
by
typing
the
following
command
:
::
::
...
...
docs-source/usersguide/library.rst
View file @
df2b723d
...
@@ -1850,7 +1850,8 @@ The CUDA Platform recognizes the following Platform-specific properties:
...
@@ -1850,7 +1850,8 @@ The CUDA Platform recognizes the following Platform-specific properties:
might
(
or
might
not
)
improve
performance
.
To
use
this
option
,
you
must
have
might
(
or
might
not
)
improve
performance
.
To
use
this
option
,
you
must
have
FFTW
(
single
precision
,
multithreaded
)
installed
,
and
your
CPU
must
support
SSE
FFTW
(
single
precision
,
multithreaded
)
installed
,
and
your
CPU
must
support
SSE
4.1
.
4.1
.
*
CudaCompiler
:
This
specifies
the
path
to
the
CUDA
kernel
compiler
.
If
you
do
*
CudaCompiler
:
This
specifies
the
path
to
the
CUDA
kernel
compiler
.
Versions
of
CUDA
before
7.0
require
a
separate
compiler
executable
.
If
you
do
not
specify
this
,
OpenMM
will
try
to
locate
the
compiler
itself
.
Specify
this
not
specify
this
,
OpenMM
will
try
to
locate
the
compiler
itself
.
Specify
this
only
when
you
want
to
override
the
default
location
.
The
logic
used
to
pick
the
only
when
you
want
to
override
the
default
location
.
The
logic
used
to
pick
the
default
location
depends
on
the
operating
system
:
default
location
depends
on
the
operating
system
:
...
@@ -2711,10 +2712,6 @@ multiply operator (‘*’) or the explicit Quantity constructor:
...
@@ -2711,10 +2712,6 @@ multiply operator (‘*’) or the explicit Quantity constructor:
# or more verbosely
# or more verbosely
bond_length = Quantity(value=1.53, unit=nanometer)
bond_length = Quantity(value=1.53, unit=nanometer)
When working with Numpy arrays you *must* use the explicit constructor. You cannot
multiply them by a unit, because the Numpy array class overloads the multiply operator.
Arithmetic with units
Arithmetic with units
---------------------
---------------------
...
@@ -2864,7 +2861,7 @@ in and out.
...
@@ -2864,7 +2861,7 @@ in and out.
[[10.0, 20.0, 30.0], [40.0, 50.0, 60.0]]
[[10.0, 20.0, 30.0], [40.0, 50.0, 60.0]]
>>> import numpy
>>> import numpy
>>> a =
Quantity(
numpy.array([1,2,3])
,
centimeter
)
>>> a = numpy.array([1,2,3])
*
centimeter
>>> print(a)
>>> print(a)
[1 2 3] cm
[1 2 3] cm
>>> print(a/millimeter)
>>> print(a/millimeter)
...
...
libraries/lepton/src/ExpressionTreeNode.cpp
View file @
df2b723d
...
@@ -59,7 +59,7 @@ ExpressionTreeNode::ExpressionTreeNode(Operation* operation) : operation(operati
...
@@ -59,7 +59,7 @@ ExpressionTreeNode::ExpressionTreeNode(Operation* operation) : operation(operati
throw
Exception
(
"wrong number of arguments to function: "
+
operation
->
getName
());
throw
Exception
(
"wrong number of arguments to function: "
+
operation
->
getName
());
}
}
ExpressionTreeNode
::
ExpressionTreeNode
(
const
ExpressionTreeNode
&
node
)
:
operation
(
&
node
.
getO
peration
()
==
NULL
?
NULL
:
node
.
getO
peration
().
clone
()),
children
(
node
.
getChildren
())
{
ExpressionTreeNode
::
ExpressionTreeNode
(
const
ExpressionTreeNode
&
node
)
:
operation
(
node
.
o
peration
==
NULL
?
NULL
:
node
.
o
peration
->
clone
()),
children
(
node
.
getChildren
())
{
}
}
ExpressionTreeNode
::
ExpressionTreeNode
()
:
operation
(
NULL
)
{
ExpressionTreeNode
::
ExpressionTreeNode
()
:
operation
(
NULL
)
{
...
...
libraries/pthreads/include/pthread.h
View file @
df2b723d
...
@@ -54,9 +54,12 @@
...
@@ -54,9 +54,12 @@
#include <sys/timeb.h>
#include <sys/timeb.h>
#include <process.h>
#include <process.h>
#ifndef ETIMEDOUT
#define ETIMEDOUT 110
#define ETIMEDOUT 110
#endif
#ifndef ENOTSUP
#define ENOTSUP 134
#define ENOTSUP 134
#endif
#define PTHREAD_CANCEL_DISABLE 0
#define PTHREAD_CANCEL_DISABLE 0
#define PTHREAD_CANCEL_ENABLE 0x01
#define PTHREAD_CANCEL_ENABLE 0x01
...
...
olla/include/openmm/Platform.h
View file @
df2b723d
...
@@ -171,6 +171,10 @@ public:
...
@@ -171,6 +171,10 @@ public:
* Get a registered Platform by index.
* Get a registered Platform by index.
*/
*/
static
Platform
&
getPlatform
(
int
index
);
static
Platform
&
getPlatform
(
int
index
);
/**
* Get any failures caused during the last call to loadPluginsFromDirectory
*/
static
std
::
vector
<
std
::
string
>
getPluginLoadFailures
();
/**
/**
* Get the registered Platform with a particular name. If no Platform with that name has been
* Get the registered Platform with a particular name. If no Platform with that name has been
* registered, this throws an exception.
* registered, this throws an exception.
...
@@ -201,7 +205,7 @@ public:
...
@@ -201,7 +205,7 @@ public:
* Load multiple dynamic libraries (DLLs) which contain OpenMM plugins from a single directory.
* Load multiple dynamic libraries (DLLs) which contain OpenMM plugins from a single directory.
* This method loops over every file contained in the specified directory and calls loadPluginLibrary()
* This method loops over every file contained in the specified directory and calls loadPluginLibrary()
* for each one. If an error occurs while trying to load a particular file, that file is simply
* for each one. If an error occurs while trying to load a particular file, that file is simply
* ignored.
* ignored.
You can retrieve a list of all such errors by calling getPluginLoadFailures().
*
*
* @param directory the path to the directory containing libraries to load
* @param directory the path to the directory containing libraries to load
* @return the names of all files which were successfully loaded as libraries
* @return the names of all files which were successfully loaded as libraries
...
@@ -233,8 +237,10 @@ private:
...
@@ -233,8 +237,10 @@ private:
std
::
map
<
std
::
string
,
KernelFactory
*>
kernelFactories
;
std
::
map
<
std
::
string
,
KernelFactory
*>
kernelFactories
;
std
::
map
<
std
::
string
,
std
::
string
>
defaultProperties
;
std
::
map
<
std
::
string
,
std
::
string
>
defaultProperties
;
static
std
::
vector
<
Platform
*>&
getPlatforms
();
static
std
::
vector
<
Platform
*>&
getPlatforms
();
static
std
::
vector
<
std
::
string
>
pluginLoadFailures
;
};
};
}
// namespace OpenMM
}
// namespace OpenMM
#endif
/*OPENMM_PLATFORM_H_*/
#endif
/*OPENMM_PLATFORM_H_*/
olla/src/Platform.cpp
View file @
df2b723d
...
@@ -51,6 +51,8 @@
...
@@ -51,6 +51,8 @@
using
namespace
OpenMM
;
using
namespace
OpenMM
;
using
namespace
std
;
using
namespace
std
;
std
::
vector
<
std
::
string
>
Platform
::
pluginLoadFailures
;
static
int
registerPlatforms
()
{
static
int
registerPlatforms
()
{
// Register the Platforms built into the main library. This should eventually be moved elsewhere.
// Register the Platforms built into the main library. This should eventually be moved elsewhere.
...
@@ -140,6 +142,10 @@ Platform& Platform::getPlatform(int index) {
...
@@ -140,6 +142,10 @@ Platform& Platform::getPlatform(int index) {
throw
OpenMMException
(
"Invalid platform index"
);
throw
OpenMMException
(
"Invalid platform index"
);
}
}
std
::
vector
<
std
::
string
>
Platform
::
getPluginLoadFailures
()
{
return
pluginLoadFailures
;
}
Platform
&
Platform
::
getPlatformByName
(
const
string
&
name
)
{
Platform
&
Platform
::
getPlatformByName
(
const
string
&
name
)
{
for
(
int
i
=
0
;
i
<
getNumPlatforms
();
i
++
)
for
(
int
i
=
0
;
i
<
getNumPlatforms
();
i
++
)
if
(
getPlatform
(
i
).
getName
()
==
name
)
if
(
getPlatform
(
i
).
getName
()
==
name
)
...
@@ -196,8 +202,9 @@ static void* loadOneLibrary(const string& file) {
...
@@ -196,8 +202,9 @@ static void* loadOneLibrary(const string& file) {
throw
OpenMMException
(
"Loading dynamic libraries is not supported on PNaCl"
);
throw
OpenMMException
(
"Loading dynamic libraries is not supported on PNaCl"
);
#else
#else
void
*
handle
=
dlopen
(
file
.
c_str
(),
RTLD_LAZY
|
RTLD_GLOBAL
);
void
*
handle
=
dlopen
(
file
.
c_str
(),
RTLD_LAZY
|
RTLD_GLOBAL
);
if
(
handle
==
NULL
)
if
(
handle
==
NULL
)
{
throw
OpenMMException
(
"Error loading library "
+
file
+
": "
+
dlerror
());
throw
OpenMMException
(
"Error loading library "
+
file
+
": "
+
dlerror
());
}
return
handle
;
return
handle
;
#endif
#endif
}
}
...
@@ -261,12 +268,14 @@ vector<string> Platform::loadPluginsFromDirectory(const string& directory) {
...
@@ -261,12 +268,14 @@ vector<string> Platform::loadPluginsFromDirectory(const string& directory) {
vector
<
void
*>
plugins
;
vector
<
void
*>
plugins
;
#endif
#endif
vector
<
string
>
loadedLibraries
;
vector
<
string
>
loadedLibraries
;
pluginLoadFailures
.
resize
(
0
);
for
(
unsigned
int
i
=
0
;
i
<
files
.
size
();
++
i
)
{
for
(
unsigned
int
i
=
0
;
i
<
files
.
size
();
++
i
)
{
try
{
try
{
plugins
.
push_back
(
loadOneLibrary
(
directory
+
dirSeparator
+
files
[
i
]));
plugins
.
push_back
(
loadOneLibrary
(
directory
+
dirSeparator
+
files
[
i
]));
loadedLibraries
.
push_back
(
files
[
i
]);
loadedLibraries
.
push_back
(
files
[
i
]);
}
catch
(
OpenMMException
&
ex
)
{
}
catch
(
OpenMMException
&
ex
)
{
// Just ignore it.
pluginLoadFailures
.
push_back
(
ex
.
what
());
}
}
}
}
initializePlugins
(
plugins
);
initializePlugins
(
plugins
);
...
...
openmmapi/src/BrownianIntegrator.cpp
View file @
df2b723d
...
@@ -72,6 +72,8 @@ double BrownianIntegrator::computeKineticEnergy() {
...
@@ -72,6 +72,8 @@ double BrownianIntegrator::computeKineticEnergy() {
}
}
void
BrownianIntegrator
::
step
(
int
steps
)
{
void
BrownianIntegrator
::
step
(
int
steps
)
{
if
(
context
==
NULL
)
throw
OpenMMException
(
"This Integrator is not bound to a context!"
);
for
(
int
i
=
0
;
i
<
steps
;
++
i
)
{
for
(
int
i
=
0
;
i
<
steps
;
++
i
)
{
context
->
updateContextState
();
context
->
updateContextState
();
context
->
calcForcesAndEnergy
(
true
,
false
);
context
->
calcForcesAndEnergy
(
true
,
false
);
...
...
openmmapi/src/CustomIntegrator.cpp
View file @
df2b723d
...
@@ -94,6 +94,8 @@ double CustomIntegrator::computeKineticEnergy() {
...
@@ -94,6 +94,8 @@ double CustomIntegrator::computeKineticEnergy() {
}
}
void
CustomIntegrator
::
step
(
int
steps
)
{
void
CustomIntegrator
::
step
(
int
steps
)
{
if
(
context
==
NULL
)
throw
OpenMMException
(
"This Integrator is not bound to a context!"
);
globalsAreCurrent
=
false
;
globalsAreCurrent
=
false
;
for
(
int
i
=
0
;
i
<
steps
;
++
i
)
{
for
(
int
i
=
0
;
i
<
steps
;
++
i
)
{
kernel
.
getAs
<
IntegrateCustomStepKernel
>
().
execute
(
*
context
,
*
this
,
forcesAreValid
);
kernel
.
getAs
<
IntegrateCustomStepKernel
>
().
execute
(
*
context
,
*
this
,
forcesAreValid
);
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment