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
2e9c418a
Commit
2e9c418a
authored
May 05, 2016
by
peastman
Browse files
Merge branch 'master' into gayberne
parents
8f532e31
a4d327f5
Changes
254
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
683 additions
and
106 deletions
+683
-106
.travis.yml
.travis.yml
+14
-4
README.md
README.md
+1
-1
devtools/packaging/scripts/linux/build.sh
devtools/packaging/scripts/linux/build.sh
+10
-8
devtools/packaging/scripts/linux/prepare.sh
devtools/packaging/scripts/linux/prepare.sh
+7
-7
devtools/packaging/scripts/osx/build.sh
devtools/packaging/scripts/osx/build.sh
+3
-1
devtools/packaging/scripts/osx/prepare.sh
devtools/packaging/scripts/osx/prepare.sh
+1
-1
devtools/packaging/scripts/source/build.sh
devtools/packaging/scripts/source/build.sh
+3
-1
devtools/packaging/scripts/source/prepare.sh
devtools/packaging/scripts/source/prepare.sh
+8
-7
docs-source/CMakeLists.txt
docs-source/CMakeLists.txt
+11
-4
docs-source/developerguide/license.rst
docs-source/developerguide/license.rst
+1
-1
docs-source/developerguide/make.bat
docs-source/developerguide/make.bat
+263
-0
docs-source/usersguide/application.rst
docs-source/usersguide/application.rst
+28
-27
docs-source/usersguide/library.rst
docs-source/usersguide/library.rst
+28
-28
docs-source/usersguide/license.rst
docs-source/usersguide/license.rst
+1
-1
docs-source/usersguide/make.bat
docs-source/usersguide/make.bat
+263
-0
examples/benchmark.py
examples/benchmark.py
+4
-10
libraries/irrxml/include/CXMLReaderImpl.h
libraries/irrxml/include/CXMLReaderImpl.h
+31
-2
libraries/lepton/src/CompiledExpression.cpp
libraries/lepton/src/CompiledExpression.cpp
+2
-1
olla/include/openmm/Platform.h
olla/include/openmm/Platform.h
+3
-1
olla/include/openmm/kernels.h
olla/include/openmm/kernels.h
+1
-1
No files found.
.travis.yml
View file @
2e9c418a
...
...
@@ -17,6 +17,7 @@ env:
matrix
:
include
:
-
sudo
:
required
dist
:
trusty
env
:
==CPU_OPENCL==
OPENCL=true
CUDA=false
...
...
@@ -33,7 +34,9 @@ matrix:
-DOPENMM_BUILD_AMOEBA_PLUGIN=OFF
-DOPENMM_BUILD_PYTHON_WRAPPERS=OFF
-DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=OFF
-DOPENMM_BUILD_EXAMPLES=OFF"
-DOPENMM_BUILD_EXAMPLES=OFF
-DOPENCL_INCLUDE_DIR=$HOME/AMDAPPSDK/include
-DOPENCL_LIBRARY=$HOME/AMDAPPSDK/lib/x86_64/libOpenCL.so"
addons
:
{
apt
:
{
packages
:
[]}}
-
sudo
:
required
...
...
@@ -107,9 +110,16 @@ before_install:
sudo easy_install pytest;
fi
-
if [[ "$OPENCL" == "true" ]]; then
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse";
sudo apt-get -yq update > /dev/null 2>&1 ;
sudo apt-get install -qq fglrx=2:8.960-0ubuntu1 opencl-headers;
wget https://jenkins.choderalab.org/userContent/AMD-APP-SDKInstaller-v3.0.130.135-GA-linux64.tar.bz2;
tar -xjf AMD-APP-SDK*.tar.bz2;
AMDAPPSDK=${HOME}/AMDAPPSDK;
export OPENCL_VENDOR_PATH=${AMDAPPSDK}/etc/OpenCL/vendors;
mkdir -p ${OPENCL_VENDOR_PATH};
sh AMD-APP-SDK*.sh --tar -xf -C ${AMDAPPSDK};
echo libamdocl64.so > ${OPENCL_VENDOR_PATH}/amdocl64.icd;
export LD_LIBRARY_PATH=${AMDAPPSDK}/lib/x86_64:${LD_LIBRARY_PATH};
chmod +x ${AMDAPPSDK}/bin/x86_64/clinfo;
${AMDAPPSDK}/bin/x86_64/clinfo;
fi
# Install swig for Python wrappers. However, testing CUDA and OpenCL, we
# skip the Python wrapper for speed. We're not using anaconda python,
...
...
README.md
View file @
2e9c418a
...
...
@@ -18,7 +18,7 @@ Need Help? Check out the [documentation](http://docs.openmm.org/) and [discussio
Badges
------
*
Travis CI
`linux`
and
`osx`
integration tests:
*
GitHub master
[

](https://travis-ci.org/pandegroup/openmm)
*
GitHub master
[

](https://travis-ci.org/pandegroup/openmm)
*
`openmm-dev`
recipe
[

](https://travis-ci.org/omnia-md/conda-dev-recipes)
*
Anaconda Cloud
`openmm`
conda release:
[

](https://anaconda.org/omnia/openmm)
*
Anaconda Cloud
`openmm-dev`
conda package:
[

](https://anaconda.org/omnia/openmm-dev)
devtools/packaging/scripts/linux/build.sh
View file @
2e9c418a
...
...
@@ -19,13 +19,14 @@ CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
# 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+
=
" -DCUDA_CUDART_LIBRARY=/usr/local/cuda-7.0/lib64/libcudart.so"
CMAKE_FLAGS+
=
" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-7.0/bin/nvcc"
CMAKE_FLAGS+
=
" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-7.0/"
CMAKE_FLAGS+
=
" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-7.0/include"
CMAKE_FLAGS+
=
" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-7.0/"
CMAKE_FLAGS+
=
" -DOPENCL_INCLUDE_DIR=/opt/AMDAPPSDK-2.9-1/include/"
CMAKE_FLAGS+
=
" -DOPENCL_LIBRARY=/opt/AMDAPPSDK-2.9-1/lib/x86_64/libOpenCL.so"
CMAKE_FLAGS+
=
" -DCUDA_CUDART_LIBRARY=/usr/local/cuda-7.5/lib64/libcudart.so"
CMAKE_FLAGS+
=
" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-7.5/bin/nvcc"
CMAKE_FLAGS+
=
" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-7.5/"
CMAKE_FLAGS+
=
" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-7.5/include"
CMAKE_FLAGS+
=
" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-7.5/"
CMAKE_FLAGS+
=
" -DOPENCL_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include/"
CMAKE_FLAGS+
=
" -DOPENCL_LIBRARY=/opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so"
CMAKE_FLAGS+
=
" -DOPENMM_GENERATE_API_DOCS=ON"
# Set location for FFTW3
PREFIX
=
"
$WORKSPACE
/miniconda"
...
...
@@ -40,7 +41,8 @@ fi
mkdir
build
cd
build
cmake ../openmm
$CMAKE_FLAGS
make
-j4
all DoxygenApiDocs sphinxpdf
make
-j4
all
install
make
-j4
PythonInstall C++ApiDocs PythonApiDocs sphinxpdf
# Install.
make
install
devtools/packaging/scripts/linux/prepare.sh
View file @
2e9c418a
#!/bin/
tc
sh
#!/bin/
ba
sh
# Prepare for build by ensuring necessary prerequisites are locally installed.
...
...
@@ -6,16 +6,16 @@
export
WORKSPACE
=
`
pwd
`
# Install miniconda
export
VERSION
=
"
L
atest"
export
VERSION
=
"
l
atest"
export
PLATFORM
=
"Linux"
export
ARCH
=
"x86_64"
export
MINICONDA
=
"Miniconda-
$VERSION
-
$PLATFORM
-
$ARCH
.sh"
export
MINICONDA
=
"Miniconda
2
-
$VERSION
-
$PLATFORM
-
$ARCH
.sh"
if
[
-f
miniconda
]
;
then
echo
"miniconda already exists"
else
echo
"Downloading miniconda..."
rm
-rf
Miniconda-
*
rm
-rf
Miniconda-
*
miniconda ~/.condarc
wget
--quiet
http://repo.continuum.io/miniconda/
${
MINICONDA
}
bash
${
MINICONDA
}
-b
-p
miniconda
PIP_ARGS
=
"-U"
...
...
@@ -25,6 +25,6 @@ fi
export
PATH
=
$WORKSPACE
/miniconda/bin:
$PATH
# Ensure configuration is up to date.
conda config
--add
channels
http://conda.binstar.org/
omnia
conda
install
--yes
--quiet
swig fftw3f pip
pip
install
sphinxcontrib-bibtex
conda config
--add
channels omnia
conda
install
--yes
--quiet
swig fftw3f pip
doxygen sphinx sphinxcontrib-bibtex sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen lxml cmake
devtools/packaging/scripts/osx/build.sh
View file @
2e9c418a
...
...
@@ -22,6 +22,7 @@ CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
CMAKE_FLAGS+
=
" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
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+
=
" -DOPENMM_GENERATE_API_DOCS=ON"
# Build in subdirectory.
# Set location for FFTW3
...
...
@@ -37,7 +38,8 @@ fi
mkdir
build
cd
build
cmake ../openmm
$CMAKE_FLAGS
make
-j4
all DoxygenApiDocs sphinxpdf
make
-j4
all
install
make
-j4
PythonInstall C++ApiDocs PythonApiDocs sphinxpdf
# Install.
make
install
devtools/packaging/scripts/osx/prepare.sh
View file @
2e9c418a
...
...
@@ -27,4 +27,4 @@ export PATH=$WORKSPACE/miniconda/bin:$PATH
# Ensure configuration is up to date.
conda config
--add
channels http://conda.binstar.org/omnia
conda
install
--yes
--quiet
swig fftw3f pip
pip
install
sphinxcontrib-bibtex
pip
install
sphinxcontrib-bibtex
sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen
devtools/packaging/scripts/source/build.sh
View file @
2e9c418a
...
...
@@ -28,6 +28,7 @@ CMAKE_FLAGS+=" -DOPENMM_BUILD_DRUDE_OPENCL_LIB=OFF"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_OPENCL_LIB=OFF"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_RPMD_CUDA_LIB=OFF"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_RPMD_OPENCL_LIB=OFF"
CMAKE_FLAGS+
=
" -DOPENMM_GENERATE_API_DOCS=ON"
# Set location for FFTW3
#PREFIX="$WORKSPACE/miniconda"
...
...
@@ -42,7 +43,8 @@ fi
mkdir
build
cd
build
cmake ../openmm
$CMAKE_FLAGS
make
-j4
all DoxygenApiDocs sphinxpdf
make
-j4
all
install
make
-j4
PythonInstall C++ApiDocs PythonApiDocs sphinxpdf
# Install.
make
install
devtools/packaging/scripts/source/prepare.sh
View file @
2e9c418a
#!/bin/
tc
sh
#!/bin/
ba
sh
# Prepare for build by ensuring necessary prerequisites are locally installed.
# Set relative workspace path.
export
WORKSPACE
=
`
pwd
`
# Install miniconda
export
VERSION
=
"
L
atest"
export
VERSION
=
"
l
atest"
export
PLATFORM
=
"Linux"
export
ARCH
=
"x86_64"
export
MINICONDA
=
"Miniconda-
$VERSION
-
$PLATFORM
-
$ARCH
.sh"
export
MINICONDA
=
"Miniconda
2
-
$VERSION
-
$PLATFORM
-
$ARCH
.sh"
if
[
-f
miniconda
]
;
then
echo
"miniconda already exists"
else
echo
"Downloading miniconda..."
rm
-rf
Miniconda-
*
rm
-rf
Miniconda-
*
miniconda ~/.condarc
wget
--quiet
http://repo.continuum.io/miniconda/
${
MINICONDA
}
bash
${
MINICONDA
}
-b
-p
miniconda
PIP_ARGS
=
"-U"
...
...
@@ -25,6 +26,6 @@ fi
export
PATH
=
$WORKSPACE
/miniconda/bin:
$PATH
# Ensure configuration is up to date.
conda config
--add
channels
http://conda.binstar.org/
omnia
conda
install
--yes
--quiet
swig fftw3f pip
pip
install
sphinxcontrib-bibtex
conda config
--add
channels omnia
conda
install
--yes
--quiet
swig fftw3f pip
doxygen sphinx sphinxcontrib-bibtex sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen lxml cmake
docs-source/CMakeLists.txt
View file @
2e9c418a
...
...
@@ -27,16 +27,23 @@ FILE(MAKE_DIRECTORY "${SPHINX_BUILD_DIR}")
FILE
(
GLOB_RECURSE USER_GUIDE_FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/usersguide/*
)
FILE
(
GLOB_RECURSE DEVELOPER_GUIDE_FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/developerguide/*
)
IF
(
WIN32
)
SET
(
SPHINX_MAKE_USERGUIDE_COMMAND
"
${
CMAKE_COMMAND
}
"
-E env
"OPENMM_VERSION=
${
OPENMM_MAJOR_VERSION
}
.
${
OPENMM_MINOR_VERSION
}
"
"BUILDDIR=
${
SPHINX_BUILD_DIR
}
/userguide"
make.bat
)
SET
(
SPHINX_MAKE_DEVELOPERGUIDE_COMMAND
"
${
CMAKE_COMMAND
}
"
-E env
"OPENMM_VERSION=
${
OPENMM_MAJOR_VERSION
}
.
${
OPENMM_MINOR_VERSION
}
"
"BUILDDIR=
${
SPHINX_BUILD_DIR
}
/developerguide"
make.bat
)
ELSE
(
WIN32
)
SET
(
SPHINX_MAKE_USERGUIDE_COMMAND
"
${
CMAKE_MAKE_PROGRAM
}
"
OPENMM_VERSION=
"
${
OPENMM_MAJOR_VERSION
}
.
${
OPENMM_MINOR_VERSION
}
"
BUILDDIR=
"
${
SPHINX_BUILD_DIR
}
/userguide"
)
SET
(
SPHINX_MAKE_DEVELOPERGUIDE_COMMAND
"
${
CMAKE_MAKE_PROGRAM
}
"
OPENMM_VERSION=
"
${
OPENMM_MAJOR_VERSION
}
.
${
OPENMM_MINOR_VERSION
}
"
BUILDDIR=
"
${
SPHINX_BUILD_DIR
}
/developerguide"
)
ENDIF
(
WIN32
)
ADD_CUSTOM_COMMAND
(
OUTPUT
"
${
SPHINX_BUILD_DIR
}
/userguide/latex/OpenMMUsersGuide.pdf"
COMMAND
"
${
CMAKE_MAKE_PROGRAM
}
"
BUILDDIR=
"
${
SPHINX_BUILD_DIR
}
/userguide"
OPENMM_VERSION=
"
${
OPENMM_MAJOR_VERSION
}
.
${
OPENMM_MINOR_VERSION
}
"
latexpdf
COMMAND
${
SPHINX_MAKE_USERGUIDE_COMMAND
}
latexpdf
DEPENDS
${
USER_GUIDE_FILES
}
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/usersguide"
COMMENT
"Generating PDF user guide"
)
ADD_CUSTOM_COMMAND
(
OUTPUT
"
${
SPHINX_BUILD_DIR
}
/developerguide/latex/OpenMMDeveloperGuide.pdf"
COMMAND
"
${
CMAKE_MAKE_PROGRAM
}
"
BUILDDIR=
"
${
SPHINX_BUILD_DIR
}
/developerguide"
OPENMM_VERSION=
"
${
OPENMM_MAJOR_VERSION
}
.
${
OPENMM_MINOR_VERSION
}
"
latexpdf
COMMAND
${
SPHINX_MAKE_DEVELOPERGUIDE_COMMAND
}
latexpdf
DEPENDS
${
DEVELOPER_GUIDE_FILES
}
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/developerguide"
COMMENT
"Generating PDF developer guide"
...
...
@@ -47,14 +54,14 @@ ADD_CUSTOM_TARGET(sphinxpdf
ADD_CUSTOM_COMMAND
(
OUTPUT
"
${
SPHINX_BUILD_DIR
}
/userguide/html/index.html"
COMMAND
"
${
CMAKE_MAKE_PROGRAM
}
"
BUILDDIR=
"
${
SPHINX_BUILD_DIR
}
/userguide"
OPENMM_VERSION=
"
${
OPENMM_MAJOR_VERSION
}
.
${
OPENMM_MINOR_VERSION
}
"
html
COMMAND
${
SPHINX_MAKE_USERGUIDE_COMMAND
}
html
DEPENDS
${
USER_GUIDE_FILES
}
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/usersguide"
COMMENT
"Generating HTML user guide"
)
ADD_CUSTOM_COMMAND
(
OUTPUT
"
${
SPHINX_BUILD_DIR
}
/developerguide/html/index.html"
COMMAND
"
${
CMAKE_MAKE_PROGRAM
}
"
BUILDDIR=
"
${
SPHINX_BUILD_DIR
}
/developerguide"
OPENMM_VERSION=
"
${
OPENMM_MAJOR_VERSION
}
.
${
OPENMM_MINOR_VERSION
}
"
html
COMMAND
${
SPHINX_MAKE_DEVELOPERGUIDE_COMMAND
}
html
DEPENDS
${
DEVELOPER_GUIDE_FILES
}
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/developerguide"
COMMENT
"Generating HTML developer guide"
...
...
docs-source/developerguide/license.rst
View file @
2e9c418a
Portions copyright (c) 2011-201
5
Stanford University and the Authors
Portions copyright (c) 2011-201
6
Stanford University and the Authors
Contributors: Peter Eastman
...
...
docs-source/developerguide/make.bat
0 → 100644
View file @
2e9c418a
@ECHO
OFF
REM Command file for Sphinx documentation
if
"
%SPHINXBUILD%
"
==
""
(
set
SPHINXBUILD
=
sphinx
-build
)
REM set BUILDDIR=_build
set
ALLSPHINXOPTS
=
-d
%BUILDDIR%
/doctrees
%SPHINXOPTS%
.
set
I18NSPHINXOPTS
=
%SPHINXOPTS%
.
if
NOT
"
%PAPER%
"
==
""
(
set
ALLSPHINXOPTS
=
-D
latex_paper_size
=
%PAPER%
%ALLSPHINXOPTS%
set
I18NSPHINXOPTS
=
-D
latex_paper_size
=
%PAPER%
%I1
8
NSPHINXOPTS
%
)
if
"
%
1"
==
""
goto
help
if
"
%
1"
==
"help"
(
:help
echo
.Please
use
`make
^<
target
^>
`
where
^<
target
^>
is
one
of
echo
.
html
to
make
standalone
HTML
files
echo
.
dirhtml
to
make
HTML
files
named
index
.html
in
directories
echo
.
singlehtml
to
make
a
single
large
HTML
file
echo
.
pickle
to
make
pickle
files
echo
.
json
to
make
JSON
files
echo
.
htmlhelp
to
make
HTML
files
and
a
HTML
help
project
echo
.
qthelp
to
make
HTML
files
and
a
qthelp
project
echo
.
devhelp
to
make
HTML
files
and
a
Devhelp
project
echo
.
epub
to
make
an
epub
echo
.
latex
to
make
LaTeX
files
,
you
can
set
PAPER
=
a4
or
PAPER
=
letter
echo
.
text
to
make
text
files
echo
.
man
to
make
manual
pages
echo
.
texinfo
to
make
Texinfo
files
echo
.
gettext
to
make
PO
message
catalogs
echo
.
changes
to
make
an
overview
over
all
changed
/added/deprecated
items
echo
.
xml
to
make
Docutils
-native
XML
files
echo
.
pseudoxml
to
make
pseudoxml
-XML
files
for
display
purposes
echo
.
linkcheck
to
check
all
external
links
for
integrity
echo
.
doctest
to
run
all
doctests
embedded
in
the
documentation
if
enabled
echo
.
coverage
to
run
coverage
check
of
the
documentation
if
enabled
goto
end
)
if
"
%
1"
==
"clean"
(
for
/d
%%i
in
(
%BUILDDIR%
\
*)
do
rmdir
/q /s
%%i
del
/q /s
%BUILDDIR%
\
*
goto
end
)
REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD%
2
>
nul
if
errorlevel
9009
goto
sphinx_python
goto
sphinx_ok
:sphinx
_python
set
SPHINXBUILD
=
python
-m
sphinx
.__init__
%SPHINXBUILD%
2
>
nul
if
errorlevel
9009
(
echo
.
echo
.The
'sphinx-build'
command
was
not
found
.
Make
sure
you
have
Sphinx
echo
.installed
,
then
set
the
SPHINXBUILD
environment
variable
to
point
echo
.to
the
full
path
of
the
'sphinx-build'
executable
.
Alternatively
you
echo
.may
add
the
Sphinx
directory
to
PATH
.
echo
.
echo
.If
you
don
't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
:sphinx_ok
if "
%
1" == "html" (
%SPHINXBUILD%
-b html
%ALLSPHINXOPTS%
%BUILDDIR%
/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in
%BUILDDIR%
/html.
goto end
)
if "
%
1" == "dirhtml" (
%SPHINXBUILD%
-b dirhtml
%ALLSPHINXOPTS%
%BUILDDIR%
/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in
%BUILDDIR%
/dirhtml.
goto end
)
if "
%
1" == "singlehtml" (
%SPHINXBUILD%
-b singlehtml
%ALLSPHINXOPTS%
%BUILDDIR%
/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in
%BUILDDIR%
/singlehtml.
goto end
)
if "
%
1" == "pickle" (
%SPHINXBUILD%
-b pickle
%ALLSPHINXOPTS%
%BUILDDIR%
/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "
%
1" == "json" (
%SPHINXBUILD%
-b json
%ALLSPHINXOPTS%
%BUILDDIR%
/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "
%
1" == "htmlhelp" (
%SPHINXBUILD%
-b htmlhelp
%ALLSPHINXOPTS%
%BUILDDIR%
/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the
^
.hhp project file in
%BUILDDIR%
/htmlhelp.
goto end
)
if "
%
1" == "qthelp" (
%SPHINXBUILD%
-b qthelp
%ALLSPHINXOPTS%
%BUILDDIR%
/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the
^
.qhcp project file in
%BUILDDIR%
/qthelp, like this:
echo.
^>
qcollectiongenerator
%BUILDDIR%
\qthelp\OpenMM.qhcp
echo.To view the help file:
echo.
^>
assistant -collectionFile
%BUILDDIR%
\qthelp\OpenMM.ghc
goto end
)
if "
%
1" == "devhelp" (
%SPHINXBUILD%
-b devhelp
%ALLSPHINXOPTS%
%BUILDDIR%
/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "
%
1" == "epub" (
%SPHINXBUILD%
-b epub
%ALLSPHINXOPTS%
%BUILDDIR%
/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in
%BUILDDIR%
/epub.
goto end
)
if "
%
1" == "latex" (
%SPHINXBUILD%
-b latex
%ALLSPHINXOPTS%
%BUILDDIR%
/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in
%BUILDDIR%
/latex.
goto end
)
if "
%
1" == "latexpdf" (
%SPHINXBUILD%
-b latex
%ALLSPHINXOPTS%
%BUILDDIR%
/latex
cd
%BUILDDIR%
/latex
make all-pdf
cd
%~dp0
echo.
echo.Build finished; the PDF files are in
%BUILDDIR%
/latex.
goto end
)
if "
%
1" == "latexpdfja" (
%SPHINXBUILD%
-b latex
%ALLSPHINXOPTS%
%BUILDDIR%
/latex
cd
%BUILDDIR%
/latex
make all-pdf-ja
cd
%~dp0
echo.
echo.Build finished; the PDF files are in
%BUILDDIR%
/latex.
goto end
)
if "
%
1" == "text" (
%SPHINXBUILD%
-b text
%ALLSPHINXOPTS%
%BUILDDIR%
/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in
%BUILDDIR%
/text.
goto end
)
if "
%
1" == "man" (
%SPHINXBUILD%
-b man
%ALLSPHINXOPTS%
%BUILDDIR%
/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in
%BUILDDIR%
/man.
goto end
)
if "
%
1" == "texinfo" (
%SPHINXBUILD%
-b texinfo
%ALLSPHINXOPTS%
%BUILDDIR%
/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in
%BUILDDIR%
/texinfo.
goto end
)
if "
%
1" == "gettext" (
%SPHINXBUILD%
-b gettext
%I1
8NSPHINXOPTS
%
%BUILDDIR%
/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in
%BUILDDIR%
/locale.
goto end
)
if "
%
1" == "changes" (
%SPHINXBUILD%
-b changes
%ALLSPHINXOPTS%
%BUILDDIR%
/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in
%BUILDDIR%
/changes.
goto end
)
if "
%
1" == "linkcheck" (
%SPHINXBUILD%
-b linkcheck
%ALLSPHINXOPTS%
%BUILDDIR%
/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output
^
or in
%BUILDDIR%
/linkcheck/output.txt.
goto end
)
if "
%
1" == "doctest" (
%SPHINXBUILD%
-b doctest
%ALLSPHINXOPTS%
%BUILDDIR%
/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the
^
results in
%BUILDDIR%
/doctest/output.txt.
goto end
)
if "
%
1" == "coverage" (
%SPHINXBUILD%
-b coverage
%ALLSPHINXOPTS%
%BUILDDIR%
/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the
^
results in
%BUILDDIR%
/coverage/python.txt.
goto end
)
if "
%
1" == "xml" (
%SPHINXBUILD%
-b xml
%ALLSPHINXOPTS%
%BUILDDIR%
/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in
%BUILDDIR%
/xml.
goto end
)
if "
%
1" == "pseudoxml" (
%SPHINXBUILD%
-b pseudoxml
%ALLSPHINXOPTS%
%BUILDDIR%
/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in
%BUILDDIR%
/pseudoxml.
goto end
)
:end
docs-source/usersguide/application.rst
View file @
2e9c418a
...
...
@@ -395,7 +395,7 @@ files in the newer PDBx/mmCIF format: just change :class:`PDBFile` to :class:`PD
This
line
specifies
the
force
field
to
use
for
the
simulation
.
Force
fields
are
defined
by
XML
files
.
OpenMM
includes
XML
files
defining
lots
of
standard
force
fields
(
see
Section
:
ref
:`
force
-
fields
`).
If
you
find
you
need
to
extend
the
repertoire
of
force
fields
available
,
you
can
find
more
information
on
how
to
create
these
XML
files
in
Section
:
ref
:`
creating
-
force
-
fields
`.
you
can
find
more
information
on
how
to
create
these
XML
files
in
Chapter
:
ref
:`
creating
-
force
-
fields
`.
In
this
case
we
load
two
of
those
files
:
:
file
:`
amber99sb
.
xml
`,
which
contains
the
Amber99SB
force
field
,
and
:
file
:`
tip3p
.
xml
`,
which
contains
the
TIP3P
water
model
.
The
:
class
:`
ForceField
`
object
is
assigned
to
a
variable
called
:
code
:`
forcefield
`\
.
...
...
@@ -417,10 +417,8 @@ Note the way we specified the cutoff distance 1 nm using :code:`1*nanometer`:
This
is
an
example
of
the
powerful
units
tracking
and
automatic
conversion
facility
built
into
the
OpenMM
Python
API
that
makes
specifying
unit
-
bearing
quantities
convenient
and
less
error
-
prone
.
We
could
have
equivalently
specified
:
code
:`
10
*
angstrom
`
instead
of
:
code
:`
1
*
nanometer
`
and
achieved
the
same
result
,
but
had
we
specified
the
wrong
dimensions
,
such
as
:
code
:`
1
*(
nanometer
**
2
)`
or
:
code
:`
1
*
picoseconds
`,
OpenMM
would
have
thrown
an
exception
.
The
units
system
will
be
described
in
more
detail
later
,
in
Section
:
ref
:`
units
-
and
-
dimensional
-
analysis
`.
:
code
:`
10
*
angstrom
`
instead
of
:
code
:`
1
*
nanometer
`
and
achieved
the
same
result
.
The
units
system
will
be
described
in
more
detail
later
,
in
Section
:
ref
:`
units
-
and
-
dimensional
-
analysis
`.
::
integrator
=
LangevinIntegrator
(
300
*
kelvin
,
1
/
picosecond
,
0.002
*
picoseconds
)
...
...
@@ -748,7 +746,7 @@ double precision:
::
platform
=
Platform
.
getPlatformByName
(
'CUDA'
)
properties
=
{
'
Cuda
DeviceIndex'
:
'0,1'
,
'
Cuda
Precision'
:
'double'
}
properties
=
{
'DeviceIndex'
:
'0,1'
,
'Precision'
:
'double'
}
simulation
=
Simulation
(
prmtop
.
topology
,
system
,
integrator
,
platform
,
properties
)
..
_force
-
fields
:
...
...
@@ -1322,11 +1320,12 @@ Writing Trajectories
====================
OpenMM
can
save
simulation
trajectories
to
disk
in
t
wo
formats
:
PDB_
and
DCD_
.
Both
of
these
are
widely
supported
formats
,
so
you
should
be
able
to
read
them
into
most
analysis
and
visualization
programs
.
OpenMM
can
save
simulation
trajectories
to
disk
in
t
hree
formats
:
PDB_
,
`
PDBx
/
mmCIF
`
_
,
and
DCD_
.
All
of
these
are
widely
supported
formats
,
so
you
should
be
able
to
read
them
into
most
analysis
and
visualization
programs
.
..
_PDB
:
http
://
www
.
wwpdb
.
org
/
documentation
/
format33
/
v3
.3
.
html
..
_PDBx
/
mmCIF
:
http
://
mmcif
.
wwpdb
.
org
..
_DCD
:
http
://
www
.
ks
.
uiuc
.
edu
/
Research
/
vmd
/
plugins
/
molfile
/
dcdplugin
.
html
To
save
a
trajectory
,
just
add
a
“
reporter
”
to
the
simulation
,
as
shown
in
the
...
...
@@ -1336,9 +1335,9 @@ example scripts above:
simulation
.
reporters
.
append
(
PDBReporter
(
'output.pdb'
,
1000
))
The
two
parameters
of
the
:
class
:`
PDBReporter
`
are
the
output
filename
and
how
often
(
in
number
of
time
steps
)
output
structures
should
be
written
.
To
use
DCD
format
,
just
replace
:
class
:`
PDBReporter
`
with
:
class
:`
DCD
Reporter
`
.
The
parameters
represent
the
same
values
:
number
of
time
steps
)
output
structures
should
be
written
.
To
use
PDBx
/
mmCIF
or
DCD
format
,
just
replace
:
class
:`
PDBReporter
`
with
:
class
:`
PDBx
Reporter
`
or
:
class
:`
DCDReporter
`.
The
parameters
represent
the
same
values
:
::
simulation
.
reporters
.
append
(
DCDReporter
(
'output.dcd'
,
1000
))
...
...
@@ -1771,8 +1770,8 @@ not an arbitrary choice.
Extracting and Reporting Forces (and other data)
************************************************
OpenMM provides reporters for t
wo
output formats: PDB_
and DCD_. Both of those
formats store only positions, not velocities, forces, or other data. In this
OpenMM provides reporters for t
hree
output formats: PDB_
, `PDBx/mmCIF`_ and DCD_.
All of those
formats store only positions, not velocities, forces, or other data. In this
section, we create a new reporter that outputs forces. This illustrates two
important things: how to write a reporter, and how to query the simulation for
forces or other data.
...
...
@@ -1862,7 +1861,7 @@ the potential energy of each one. Assume we have already created our :class:`Sy
pdb = PDBFile(os.path.join('
structures
', file))
simulation.context.setPositions(pdb.positions)
state = simulation.context.getState(getEnergy=True)
print
file, state.getPotentialEnergy()
print
(
file, state.getPotentialEnergy()
)
.. caption::
...
...
@@ -2068,9 +2067,9 @@ Missing residue templates
=========================
.. CAUTION::
These features are experimental, and
its
API is subject to change.
These features are experimental, and
their
API is subject to change.
You can use the :meth
od
:`getUnmatchedResidues()` method to get a list of residues
You can use the :meth:`getUnmatchedResidues()` method to get a list of residues
in the provided :code:`topology` object that do not currently have a matching
residue template defined in the :class:`ForceField`.
::
...
...
@@ -2084,7 +2083,7 @@ with residue template definitions, or identifying which additional residues need
to be parameterized.
As a convenience for parameterizing new residues, you can also get a list of
residues and empty residue templates using :meth
od
:`generateTemplatesForUnmatchedResidues`
residues and empty residue templates using :meth:`generateTemplatesForUnmatchedResidues`
::
pdb = PDBFile('
input
.
pdb
')
...
...
@@ -2098,7 +2097,7 @@ residues and empty residue templates using :method:`generateTemplatesForUnmatche
forcefield.registerResidueTemplate(template)
If you find that templates seem to be incorrectly matched, another useful
function :meth
od
:`getMatchingTemplates()` can help you identify which templates
function :meth:`getMatchingTemplates()` can help you identify which templates
are being matched:
::
...
...
@@ -2106,7 +2105,7 @@ are being matched:
forcefield = ForceField('
amber99sb
.
xml
', '
tip3p
.
xml
')
templates = forcefield.getMatchingTemplates(topology)
for (residue, template) in zip(pdb.topology.residues(), templates):
print
"Residue %d %s matched template %s" % (residue.id, residue.name, template.name)
print
(
"Residue %d %s matched template %s" % (residue.id, residue.name, template.name)
)
<HarmonicBondForce>
===================
...
...
@@ -2916,17 +2915,19 @@ This :code:`generator` function must conform to the following API:
-------
success : bool
If the generator is able to successfully parameterize the residue, `True` is returned.
If the generator cannot parameterize the residue, it should return `False` and not modify `forcefield`.
If the generator cannot parameterize the residue, it should return `False` and not
modify `forcefield`.
The generator should either register a residue template directly with `forcefield.registerResidueTemplate(template)`
or it should call `forcefield.loadFile(file)` to load residue definitions from an ffxml file.
The generator should either register a residue template directly with
`forcefield.registerResidueTemplate(template)` or it should call `forcefield.loadFile(file)`
to load residue definitions from an ffxml file.
It can also use the `ForceField` programmatic API to add additional atom types (via
`forcefield.registerAtomType(parameters)`)
or additional parameters.
It can also use the `ForceField` programmatic API to add additional atom types (via
`forcefield.registerAtomType(parameters)`)
or additional parameters.
"""
The
:
c
ode
:`
ForceField
`
object
will
be
modified
by
the
residue
template
generator
as
residues
without
previously
defined
templates
are
encountered
.
Because
these
templates
are
added
to
`
ForceField
`
as
new
residue
The
:
c
lass
:`
ForceField
`
object
will
be
modified
by
the
residue
template
generator
as
residues
without
previously
defined
templates
are
encountered
.
Because
these
templates
are
added
to
the
:
class
:
`
ForceField
`
as
new
residue
types
are
encountered
,
subsequent
residues
will
be
parameterized
using
the
same
residue
templates
without
calling
the
:
code
:`
generator
`
again
.
docs-source/usersguide/library.rst
View file @
2e9c418a
...
...
@@ -347,11 +347,6 @@ The choice of which platform to use for a simulation depends on various factors:
OpenCL
platform
running
on
the
CPU
.
#.
The
CUDA
platform
can
only
be
used
with
NVIDIA
GPUs
.
For
using
an
AMD
or
Intel
GPU
,
use
the
OpenCL
platform
.
#.
When
running
on
recent
NVIDIA
GPUs
(
Fermi
and
Kepler
generations
),
the
CUDA
platform
is
usually
faster
and
should
be
used
.
On
older
GPUs
,
the
OpenCL
platform
is
likely
to
be
faster
.
Also
,
some
very
old
GPUs
(
GeForce
8000
and
9000
series
)
are
only
supported
by
the
OpenCL
platform
,
not
by
the
CUDA
platform
.
#.
The
AMOEBA
force
field
only
works
with
the
CUDA
platform
,
not
with
the
OpenCL
platform
.
It
also
works
with
the
Reference
and
CPU
platforms
,
but
the
performance
is
usually
too
slow
to
be
useful
on
those
platforms
.
...
...
@@ -393,14 +388,9 @@ Mac and Linux: clang or gcc
Use
clang
or
gcc
on
Mac
/
Linux
.
OpenMM
should
compile
correctly
with
all
recent
versions
of
these
compilers
.
We
recommend
clang
since
it
produces
faster
code
,
especially
when
using
the
CPU
platform
.
If
you
do
not
already
have
a
compiler
installed
,
you
will
need
to
download
and
install
it
.
On
Mac
OS
X
,
this
means
downloading
the
Xcode
Tools
from
the
App
Store
.
(
With
Xcode
4.3
,
you
must
then
launch
Xcode
,
open
the
Preferences
window
,
go
to
the
Downloads
tab
,
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
.)
especially
when
using
the
CPU
platform
.
If
you
do
not
already
have
a
compiler
installed
,
you
will
need
to
download
and
install
it
.
On
Mac
OS
X
,
this
means
downloading
the
Xcode
Tools
from
the
App
Store
.
Windows
:
Visual
Studio
----------------------
...
...
@@ -545,6 +535,8 @@ There are several variables that can be adjusted in the CMake interface:
and
documentation
.
*
Set
the
variable
CMAKE_INSTALL_PREFIX
to
the
location
where
you
want
to
install
OpenMM
.
*
Set
the
variable
PYTHON_EXECUTABLE
to
the
Python
interpreter
you
plan
to
use
OpenMM
with
.
Configure
(
press
“
c
”
)
again
.
Adjust
any
variables
that
cause
an
...
...
@@ -1844,7 +1836,7 @@ Context constructor:
Platform& platform = Platform::getPlatformByName("OpenCL");
map<string, string> properties;
properties["
OpenCL
DeviceIndex"] = "1";
properties["DeviceIndex"] = "1";
Context context(system, integrator, platform, properties);
After a Context is created, you can use the Platform’s \
...
...
@@ -1855,7 +1847,7 @@ OpenCL Platform
The OpenCL Platform recognizes the following Platform-specific properties:
*
OpenCL
Precision: This selects what numeric precision to use for calculations.
* Precision: This selects what numeric precision to use for calculations.
The allowed values are “single”, “mixed”, and “double”. If it is set to
“single”, nearly all calculations are done in single precision. This is the
fastest option but also the least accurate. If it is set to “mixed”, forces are
...
...
@@ -1863,7 +1855,7 @@ The OpenCL Platform recognizes the following Platform-specific properties:
gives much better energy conservation with only a slight decrease in speed.
If it is set to “double”, all calculations are done in double precision. This
is the most accurate option, but is usually much slower than the others.
*
OpenCL
UseCpuPme: This selects whether to use the CPU-based PME
* UseCpuPme: This selects whether to use the CPU-based PME
implementation. The allowed values are “true” or “false”. Depending on your
hardware, this might (or might not) improve performance. To use this option,
you must have FFTW (single precision, multithreaded) installed, and your CPU
...
...
@@ -1873,19 +1865,19 @@ The OpenCL Platform recognizes the following Platform-specific properties:
zero-based index of the platform (in the OpenCL sense, not the OpenMM sense) to use,
in the order they are returned by the OpenCL platform API. This is useful, for
example, in selecting whether to use a GPU or CPU based OpenCL implementation.
*
OpenCL
DeviceIndex: When multiple OpenCL devices are available on your
* DeviceIndex: When multiple OpenCL devices are available on your
computer, this is used to select which one to use. The value is the zero-based
index of the device to use, in the order they are returned by the OpenCL device
API.
The OpenCL Platform also supports parallelizing a simulation across multiple
GPUs. To do that, set the
OpenCL
DeviceIndex property to a comma separated list
GPUs. To do that, set the DeviceIndex property to a comma separated list
of values. For example,
.. code-block:: c
properties["
OpenCL
DeviceIndex"] = "0,1";
properties["DeviceIndex"] = "0,1";
This tells it to use both devices 0 and 1, splitting the work between them.
...
...
@@ -1894,7 +1886,7 @@ CUDA Platform
The CUDA Platform recognizes the following Platform-specific properties:
*
Cuda
Precision: This selects what numeric precision to use for calculations.
* Precision: This selects what numeric precision to use for calculations.
The allowed values are “single”, “mixed”, and “double”. If it is set to
“single”, nearly all calculations are done in single precision. This is the
fastest option but also the least accurate. If it is set to “mixed”, forces are
...
...
@@ -1902,7 +1894,7 @@ The CUDA Platform recognizes the following Platform-specific properties:
gives much better energy conservation with only a slight decrease in speed.
If it is set to “double”, all calculations are done in double precision. This
is the most accurate option, but is usually much slower than the others.
*
Cuda
UseCpuPme: This selects whether to use the CPU-based PME implementation.
* UseCpuPme: This selects whether to use the CPU-based PME implementation.
The allowed values are “true” or “false”. Depending on your hardware, this
might (or might not) improve performance. To use this option, you must have
FFTW (single precision, multithreaded) installed, and your CPU must support SSE
...
...
@@ -1920,28 +1912,36 @@ The CUDA Platform recognizes the following Platform-specific properties:
appends \nvcc.exe to it. That environment variable is set by the CUDA
installer, so it usually is present.
*
Cuda
TempDirectory: This specifies a directory where temporary files can be
* TempDirectory: This specifies a directory where temporary files can be
written while compiling kernels. OpenMM usually can locate your operating
system’s temp directory automatically (for example, by looking for the TEMP
environment variable), so you rarely need to specify this.
*
Cuda
DeviceIndex: When multiple CUDA devices are available on your computer,
* DeviceIndex: When multiple CUDA devices are available on your computer,
this is used to select which one to use. The value is the zero-based index of
the device to use, in the order they are returned by the CUDA API.
*
Cuda
UseBlockingSync: This is used to control how the CUDA runtime
* UseBlockingSync: This is used to control how the CUDA runtime
synchronizes between the CPU and GPU. If this is set to “true” (the default),
CUDA will allow the calling thread to sleep while the GPU is performing a
computation, allowing the CPU to do other work. If it is set to “false”, CUDA
will spin-lock while the GPU is working. Setting it to "false" can improve performance slightly,
but also prevents the CPU from doing anything else while the GPU is working.
* DeterministicForces: In some cases, the CUDA platform may compute forces
in ways that are not fully deterministic (typically differing in what order a
set of numbers get added together). This means that if you compute the forces
twice for the same particle positions, there may be tiny differences in the
results. In most cases this is not a problem, but certain algorithms depend
on forces being exactly reproducible to the last bit. If you set this
property to "true", it will instead do these calculations in a way that
produces fully deterministic results, at the cost of a small decrease in
performance.
The CUDA Platform also supports parallelizing a simulation across multiple GPUs.
To do that, set the
Cuda
DeviceIndex property to a comma separated list of
To do that, set the DeviceIndex property to a comma separated list of
values. For example,
.. code-block:: c
properties["
Cuda
DeviceIndex"] = "0,1";
properties["DeviceIndex"] = "0,1";
This tells it to use both devices 0 and 1, splitting the work between them.
...
...
@@ -1950,7 +1950,7 @@ CPU Platform
The CPU Platform recognizes the following Platform-specific properties:
*
Cpu
Threads: This specifies the number of CPU threads to use. If you do not
* Threads: This specifies the number of CPU threads to use. If you do not
specify this, OpenMM will select a default number of threads as follows:
* If an environment variable called OPENMM_CPU_THREADS is set, its value is
...
...
docs-source/usersguide/license.rst
View file @
2e9c418a
Portions copyright (c) 2008-201
5
Stanford University and the Authors
Portions copyright (c) 2008-201
6
Stanford University and the Authors
Contributors: Kyle Beauchamp, Christopher Bruns, John Chodera, Peter Eastman, Mark
Friedrichs, Joy P. Ku, Tom Markland, Vijay Pande, Randy Radmer, Michael Sherman,
...
...
docs-source/usersguide/make.bat
0 → 100644
View file @
2e9c418a
@ECHO
OFF
REM Command file for Sphinx documentation
if
"
%SPHINXBUILD%
"
==
""
(
set
SPHINXBUILD
=
sphinx
-build
)
REM set BUILDDIR=_build
set
ALLSPHINXOPTS
=
-d
%BUILDDIR%
/doctrees
%SPHINXOPTS%
.
set
I18NSPHINXOPTS
=
%SPHINXOPTS%
.
if
NOT
"
%PAPER%
"
==
""
(
set
ALLSPHINXOPTS
=
-D
latex_paper_size
=
%PAPER%
%ALLSPHINXOPTS%
set
I18NSPHINXOPTS
=
-D
latex_paper_size
=
%PAPER%
%I1
8
NSPHINXOPTS
%
)
if
"
%
1"
==
""
goto
help
if
"
%
1"
==
"help"
(
:help
echo
.Please
use
`make
^<
target
^>
`
where
^<
target
^>
is
one
of
echo
.
html
to
make
standalone
HTML
files
echo
.
dirhtml
to
make
HTML
files
named
index
.html
in
directories
echo
.
singlehtml
to
make
a
single
large
HTML
file
echo
.
pickle
to
make
pickle
files
echo
.
json
to
make
JSON
files
echo
.
htmlhelp
to
make
HTML
files
and
a
HTML
help
project
echo
.
qthelp
to
make
HTML
files
and
a
qthelp
project
echo
.
devhelp
to
make
HTML
files
and
a
Devhelp
project
echo
.
epub
to
make
an
epub
echo
.
latex
to
make
LaTeX
files
,
you
can
set
PAPER
=
a4
or
PAPER
=
letter
echo
.
text
to
make
text
files
echo
.
man
to
make
manual
pages
echo
.
texinfo
to
make
Texinfo
files
echo
.
gettext
to
make
PO
message
catalogs
echo
.
changes
to
make
an
overview
over
all
changed
/added/deprecated
items
echo
.
xml
to
make
Docutils
-native
XML
files
echo
.
pseudoxml
to
make
pseudoxml
-XML
files
for
display
purposes
echo
.
linkcheck
to
check
all
external
links
for
integrity
echo
.
doctest
to
run
all
doctests
embedded
in
the
documentation
if
enabled
echo
.
coverage
to
run
coverage
check
of
the
documentation
if
enabled
goto
end
)
if
"
%
1"
==
"clean"
(
for
/d
%%i
in
(
%BUILDDIR%
\
*)
do
rmdir
/q /s
%%i
del
/q /s
%BUILDDIR%
\
*
goto
end
)
REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD%
2
>
nul
if
errorlevel
9009
goto
sphinx_python
goto
sphinx_ok
:sphinx
_python
set
SPHINXBUILD
=
python
-m
sphinx
.__init__
%SPHINXBUILD%
2
>
nul
if
errorlevel
9009
(
echo
.
echo
.The
'sphinx-build'
command
was
not
found
.
Make
sure
you
have
Sphinx
echo
.installed
,
then
set
the
SPHINXBUILD
environment
variable
to
point
echo
.to
the
full
path
of
the
'sphinx-build'
executable
.
Alternatively
you
echo
.may
add
the
Sphinx
directory
to
PATH
.
echo
.
echo
.If
you
don
't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
:sphinx_ok
if "
%
1" == "html" (
%SPHINXBUILD%
-b html
%ALLSPHINXOPTS%
%BUILDDIR%
/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in
%BUILDDIR%
/html.
goto end
)
if "
%
1" == "dirhtml" (
%SPHINXBUILD%
-b dirhtml
%ALLSPHINXOPTS%
%BUILDDIR%
/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in
%BUILDDIR%
/dirhtml.
goto end
)
if "
%
1" == "singlehtml" (
%SPHINXBUILD%
-b singlehtml
%ALLSPHINXOPTS%
%BUILDDIR%
/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in
%BUILDDIR%
/singlehtml.
goto end
)
if "
%
1" == "pickle" (
%SPHINXBUILD%
-b pickle
%ALLSPHINXOPTS%
%BUILDDIR%
/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "
%
1" == "json" (
%SPHINXBUILD%
-b json
%ALLSPHINXOPTS%
%BUILDDIR%
/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "
%
1" == "htmlhelp" (
%SPHINXBUILD%
-b htmlhelp
%ALLSPHINXOPTS%
%BUILDDIR%
/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the
^
.hhp project file in
%BUILDDIR%
/htmlhelp.
goto end
)
if "
%
1" == "qthelp" (
%SPHINXBUILD%
-b qthelp
%ALLSPHINXOPTS%
%BUILDDIR%
/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the
^
.qhcp project file in
%BUILDDIR%
/qthelp, like this:
echo.
^>
qcollectiongenerator
%BUILDDIR%
\qthelp\OpenMM.qhcp
echo.To view the help file:
echo.
^>
assistant -collectionFile
%BUILDDIR%
\qthelp\OpenMM.ghc
goto end
)
if "
%
1" == "devhelp" (
%SPHINXBUILD%
-b devhelp
%ALLSPHINXOPTS%
%BUILDDIR%
/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "
%
1" == "epub" (
%SPHINXBUILD%
-b epub
%ALLSPHINXOPTS%
%BUILDDIR%
/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in
%BUILDDIR%
/epub.
goto end
)
if "
%
1" == "latex" (
%SPHINXBUILD%
-b latex
%ALLSPHINXOPTS%
%BUILDDIR%
/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in
%BUILDDIR%
/latex.
goto end
)
if "
%
1" == "latexpdf" (
%SPHINXBUILD%
-b latex
%ALLSPHINXOPTS%
%BUILDDIR%
/latex
cd
%BUILDDIR%
/latex
make all-pdf
cd
%~dp0
echo.
echo.Build finished; the PDF files are in
%BUILDDIR%
/latex.
goto end
)
if "
%
1" == "latexpdfja" (
%SPHINXBUILD%
-b latex
%ALLSPHINXOPTS%
%BUILDDIR%
/latex
cd
%BUILDDIR%
/latex
make all-pdf-ja
cd
%~dp0
echo.
echo.Build finished; the PDF files are in
%BUILDDIR%
/latex.
goto end
)
if "
%
1" == "text" (
%SPHINXBUILD%
-b text
%ALLSPHINXOPTS%
%BUILDDIR%
/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in
%BUILDDIR%
/text.
goto end
)
if "
%
1" == "man" (
%SPHINXBUILD%
-b man
%ALLSPHINXOPTS%
%BUILDDIR%
/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in
%BUILDDIR%
/man.
goto end
)
if "
%
1" == "texinfo" (
%SPHINXBUILD%
-b texinfo
%ALLSPHINXOPTS%
%BUILDDIR%
/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in
%BUILDDIR%
/texinfo.
goto end
)
if "
%
1" == "gettext" (
%SPHINXBUILD%
-b gettext
%I1
8NSPHINXOPTS
%
%BUILDDIR%
/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in
%BUILDDIR%
/locale.
goto end
)
if "
%
1" == "changes" (
%SPHINXBUILD%
-b changes
%ALLSPHINXOPTS%
%BUILDDIR%
/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in
%BUILDDIR%
/changes.
goto end
)
if "
%
1" == "linkcheck" (
%SPHINXBUILD%
-b linkcheck
%ALLSPHINXOPTS%
%BUILDDIR%
/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output
^
or in
%BUILDDIR%
/linkcheck/output.txt.
goto end
)
if "
%
1" == "doctest" (
%SPHINXBUILD%
-b doctest
%ALLSPHINXOPTS%
%BUILDDIR%
/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the
^
results in
%BUILDDIR%
/doctest/output.txt.
goto end
)
if "
%
1" == "coverage" (
%SPHINXBUILD%
-b coverage
%ALLSPHINXOPTS%
%BUILDDIR%
/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the
^
results in
%BUILDDIR%
/coverage/python.txt.
goto end
)
if "
%
1" == "xml" (
%SPHINXBUILD%
-b xml
%ALLSPHINXOPTS%
%BUILDDIR%
/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in
%BUILDDIR%
/xml.
goto end
)
if "
%
1" == "pseudoxml" (
%SPHINXBUILD%
-b pseudoxml
%ALLSPHINXOPTS%
%BUILDDIR%
/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in
%BUILDDIR%
/pseudoxml.
goto end
)
:end
examples/benchmark.py
View file @
2e9c418a
...
...
@@ -81,18 +81,12 @@ def runOneTest(testName, options):
print
(
'Step Size: %g fs'
%
dt
.
value_in_unit
(
unit
.
femtoseconds
))
properties
=
{}
initialSteps
=
5
if
options
.
device
is
not
None
:
if
platform
.
getName
()
==
'CUDA'
:
properties
[
'CudaDeviceIndex'
]
=
options
.
device
elif
platform
.
getName
()
==
'OpenCL'
:
properties
[
'OpenCLDeviceIndex'
]
=
options
.
device
if
options
.
device
is
not
None
and
platform
.
getName
()
in
(
'CUDA'
,
'OpenCL'
):
properties
[
'DeviceIndex'
]
=
options
.
device
if
','
in
options
.
device
or
' '
in
options
.
device
:
initialSteps
=
250
if
options
.
precision
is
not
None
:
if
platform
.
getName
()
==
'CUDA'
:
properties
[
'CudaPrecision'
]
=
options
.
precision
elif
platform
.
getName
()
==
'OpenCL'
:
properties
[
'OpenCLPrecision'
]
=
options
.
precision
if
options
.
precision
is
not
None
and
platform
.
getName
()
in
(
'CUDA'
,
'OpenCL'
):
properties
[
'Precision'
]
=
options
.
precision
# Run the simulation.
...
...
libraries/irrxml/include/CXMLReaderImpl.h
View file @
2e9c418a
...
...
@@ -2,6 +2,8 @@
// This file is part of the "Irrlicht Engine" and the "irrXML" project.
// For conditions of distribution and use, see copyright notice in irrlicht.h and/or irrXML.h
// MODIFIED by Peter Eastman, Feb. 4, 2016, to support numeric escape sequences
#ifndef __ICXML_READER_IMPL_H_INCLUDED__
#define __ICXML_READER_IMPL_H_INCLUDED__
...
...
@@ -529,10 +531,37 @@ private:
pos
+=
SpecialCharacters
[
specialChar
].
size
();
}
else
{
int
semicolonPos
=
origstr
.
findNext
(
L';'
,
pos
);
if
(
semicolonPos
!=
-
1
&&
origstr
.
c_str
()[
pos
+
1
]
==
L'#'
)
{
// it is a numeric character reference
int
number
;
core
::
string
<
char
>
numberString
;
if
(
origstr
.
c_str
()[
pos
+
2
]
==
L'x'
)
{
// hex value
for
(
int
i
=
pos
+
3
;
i
<
semicolonPos
;
++
i
)
numberString
.
append
((
char
)
origstr
[
i
]);
sscanf
(
numberString
.
c_str
(),
"%x"
,
&
number
);
}
else
{
// decimal value
for
(
int
i
=
pos
+
2
;
i
<
semicolonPos
;
++
i
)
numberString
.
append
((
char
)
origstr
[
i
]);
sscanf
(
numberString
.
c_str
(),
"%d"
,
&
number
);
}
newstr
.
append
(
origstr
.
subString
(
oldPos
,
pos
-
oldPos
));
newstr
.
append
((
char_type
)
number
);
pos
=
semicolonPos
+
1
;
}
else
{
newstr
.
append
(
origstr
.
subString
(
oldPos
,
pos
-
oldPos
+
1
));
pos
+=
1
;
}
}
// find next &
oldPos
=
pos
;
...
...
libraries/lepton/src/CompiledExpression.cpp
View file @
2e9c418a
...
...
@@ -78,6 +78,7 @@ CompiledExpression& CompiledExpression::operator=(const CompiledExpression& expr
for
(
int
i
=
0
;
i
<
(
int
)
operation
.
size
();
i
++
)
operation
[
i
]
=
expression
.
operation
[
i
]
->
clone
();
#ifdef LEPTON_USE_JIT
if
(
workspace
.
size
()
>
0
)
generateJitCode
();
#endif
return
*
this
;
...
...
olla/include/openmm/Platform.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2008-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -236,7 +236,9 @@ protected:
*/
const
ContextImpl
&
getContextImpl
(
const
Context
&
context
)
const
;
std
::
vector
<
std
::
string
>
platformProperties
;
std
::
map
<
std
::
string
,
std
::
string
>
deprecatedPropertyReplacements
;
private:
friend
class
ContextImpl
;
std
::
map
<
std
::
string
,
KernelFactory
*>
kernelFactories
;
std
::
map
<
std
::
string
,
std
::
string
>
defaultProperties
;
static
std
::
vector
<
Platform
*>&
getPlatforms
();
...
...
olla/include/openmm/kernels.h
View file @
2e9c418a
...
...
@@ -188,7 +188,7 @@ public:
* @param b the vector defining the second edge of the periodic box
* @param c the vector defining the third edge of the periodic box
*/
virtual
void
setPeriodicBoxVectors
(
ContextImpl
&
context
,
const
Vec3
&
a
,
const
Vec3
&
b
,
const
Vec3
&
c
)
const
=
0
;
virtual
void
setPeriodicBoxVectors
(
ContextImpl
&
context
,
const
Vec3
&
a
,
const
Vec3
&
b
,
const
Vec3
&
c
)
=
0
;
/**
* Create a checkpoint recording the current state of the Context.
*
...
...
Prev
1
2
3
4
5
…
13
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