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
73183c61
"libraries/vecmath/vscode:/vscode.git/clone" did not exist on "0412e25d00f4560f2a666cb67e051f10541a3b9d"
Commit
73183c61
authored
May 31, 2016
by
ChayaSt
Browse files
resolved conflict
parents
0e218233
32e08b87
Changes
267
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
673 additions
and
108 deletions
+673
-108
README.md
README.md
+1
-1
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
+25
-24
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/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
olla/src/Platform.cpp
olla/src/Platform.cpp
+13
-3
openmmapi/include/openmm/CMAPTorsionForce.h
openmmapi/include/openmm/CMAPTorsionForce.h
+9
-5
openmmapi/include/openmm/CustomAngleForce.h
openmmapi/include/openmm/CustomAngleForce.h
+9
-5
openmmapi/include/openmm/CustomBondForce.h
openmmapi/include/openmm/CustomBondForce.h
+9
-5
openmmapi/include/openmm/CustomCentroidBondForce.h
openmmapi/include/openmm/CustomCentroidBondForce.h
+9
-5
openmmapi/include/openmm/CustomCompoundBondForce.h
openmmapi/include/openmm/CustomCompoundBondForce.h
+9
-5
openmmapi/include/openmm/CustomIntegrator.h
openmmapi/include/openmm/CustomIntegrator.h
+4
-4
openmmapi/include/openmm/CustomTorsionForce.h
openmmapi/include/openmm/CustomTorsionForce.h
+8
-4
No files found.
README.md
View file @
73183c61
...
...
@@ -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)
docs-source/CMakeLists.txt
View file @
73183c61
...
...
@@ -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 @
73183c61
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 @
73183c61
@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 @
73183c61
...
...
@@ -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,7 +2067,7 @@ 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:`getUnmatchedResidues()` method to get a list of residues
in the provided :code:`topology` object that do not currently have a matching
...
...
@@ -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 @
73183c61
...
...
@@ -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 @
73183c61
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 @
73183c61
@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 @
73183c61
...
...
@@ -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/lepton/src/CompiledExpression.cpp
View file @
73183c61
...
...
@@ -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 @
73183c61
...
...
@@ -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 @
73183c61
...
...
@@ -187,7 +187,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.
*
...
...
olla/src/Platform.cpp
View file @
73183c61
...
...
@@ -6,7 +6,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: *
* *
...
...
@@ -89,15 +89,21 @@ void Platform::setPropertyValue(Context& context, const string& property, const
}
const
string
&
Platform
::
getPropertyDefaultValue
(
const
string
&
property
)
const
{
map
<
string
,
string
>::
const_iterator
value
=
defaultProperties
.
find
(
property
);
string
propertyName
=
property
;
if
(
deprecatedPropertyReplacements
.
find
(
property
)
!=
deprecatedPropertyReplacements
.
end
())
propertyName
=
deprecatedPropertyReplacements
.
find
(
property
)
->
second
;
map
<
string
,
string
>::
const_iterator
value
=
defaultProperties
.
find
(
propertyName
);
if
(
value
==
defaultProperties
.
end
())
throw
OpenMMException
(
"getPropertyDefaultValue: Illegal property name"
);
return
value
->
second
;
}
void
Platform
::
setPropertyDefaultValue
(
const
string
&
property
,
const
string
&
value
)
{
string
propertyName
=
property
;
if
(
deprecatedPropertyReplacements
.
find
(
property
)
!=
deprecatedPropertyReplacements
.
end
())
propertyName
=
deprecatedPropertyReplacements
.
find
(
property
)
->
second
;
for
(
int
i
=
0
;
i
<
(
int
)
platformProperties
.
size
();
i
++
)
if
(
platformProperties
[
i
]
==
property
)
{
if
(
platformProperties
[
i
]
==
property
Name
)
{
defaultProperties
[
property
]
=
value
;
return
;
}
...
...
@@ -314,7 +320,11 @@ const string& Platform::getDefaultPluginsDirectory() {
#define STRING(x) STRING1(x)
const
string
&
Platform
::
getOpenMMVersion
()
{
#if OPENMM_BUILD_VERSION == 0
static
const
string
version
=
STRING
(
OPENMM_MAJOR_VERSION
)
"."
STRING
(
OPENMM_MINOR_VERSION
);
#else
static
const
string
version
=
STRING
(
OPENMM_MAJOR_VERSION
)
"."
STRING
(
OPENMM_MINOR_VERSION
)
"."
STRING
(
OPENMM_BUILD_VERSION
);
#endif
return
version
;
}
...
...
openmmapi/include/openmm/CMAPTorsionForce.h
View file @
73183c61
...
...
@@ -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) 2010-201
5
Stanford University and the Authors. *
* Portions copyright (c) 2010-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -159,15 +159,18 @@ public:
* new bonds and torsions cannot be added.
*/
void
updateParametersInContext
(
Context
&
context
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -175,6 +178,7 @@ private:
class
CMAPTorsionInfo
;
std
::
vector
<
MapInfo
>
maps
;
std
::
vector
<
CMAPTorsionInfo
>
torsions
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/CustomAngleForce.h
View file @
73183c61
...
...
@@ -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) 2010-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2010-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -203,15 +203,18 @@ public:
* the Context. The set of particles involved in a angle cannot be changed, nor can new angles be added.
*/
void
updateParametersInContext
(
Context
&
context
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -222,6 +225,7 @@ private:
std
::
vector
<
AngleParameterInfo
>
parameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
AngleInfo
>
angles
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/CustomBondForce.h
View file @
73183c61
...
...
@@ -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: *
* *
...
...
@@ -200,15 +200,18 @@ public:
* the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added.
*/
void
updateParametersInContext
(
Context
&
context
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -219,6 +222,7 @@ private:
std
::
vector
<
BondParameterInfo
>
parameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
BondInfo
>
bonds
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/CustomCentroidBondForce.h
View file @
73183c61
...
...
@@ -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
5
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -324,15 +324,18 @@ public:
* bonds be added.
*/
void
updateParametersInContext
(
Context
&
context
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -348,6 +351,7 @@ private:
std
::
vector
<
GroupInfo
>
groups
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
FunctionInfo
>
functions
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/CustomCompoundBondForce.h
View file @
73183c61
...
...
@@ -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
4
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -298,15 +298,18 @@ public:
* the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added.
*/
void
updateParametersInContext
(
Context
&
context
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -320,6 +323,7 @@ private:
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
FunctionInfo
>
functions
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/CustomIntegrator.h
View file @
73183c61
...
...
@@ -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) 2011-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2011-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -266,15 +266,15 @@ public:
/**
* Begin an "if" block.
*/
Begin
IfBlock
=
6
,
IfBlock
Start
=
6
,
/**
* Begin a while" block.
*/
Begin
WhileBlock
=
7
,
WhileBlock
Start
=
7
,
/**
* End an "if" or "while" block.
*/
End
Block
=
8
Block
End
=
8
};
/**
* Create a CustomIntegrator.
...
...
openmmapi/include/openmm/CustomTorsionForce.h
View file @
73183c61
...
...
@@ -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) 2010-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2010-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -206,15 +206,18 @@ public:
* the Context. The set of particles involved in a torsion cannot be changed, nor can new torsions be added.
*/
void
updateParametersInContext
(
Context
&
context
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -225,6 +228,7 @@ private:
std
::
vector
<
TorsionParameterInfo
>
parameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
TorsionInfo
>
torsions
;
bool
usePeriodic
;
};
/**
...
...
Prev
1
2
3
4
5
…
14
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