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
28fb2918
"vscode:/vscode.git/clone" did not exist on "da6ca24ef7c2594e058def142adfb8f2e31a7f85"
Unverified
Commit
28fb2918
authored
Aug 25, 2024
by
Anton Gorenko
Browse files
Fix docs, comments, remove non-existing types from swigInputConfig.py
parent
f7240731
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
42 deletions
+21
-42
docs-source/usersguide/application/05_add_on_packages.rst
docs-source/usersguide/application/05_add_on_packages.rst
+0
-11
docs-source/usersguide/library/01_introduction.rst
docs-source/usersguide/library/01_introduction.rst
+11
-8
docs-source/usersguide/library/02_compiling.rst
docs-source/usersguide/library/02_compiling.rst
+3
-9
libraries/lepton/src/ParsedExpression.cpp
libraries/lepton/src/ParsedExpression.cpp
+4
-4
wrappers/python/src/swig_doxygen/swigInputConfig.py
wrappers/python/src/swig_doxygen/swigInputConfig.py
+3
-10
No files found.
docs-source/usersguide/application/05_add_on_packages.rst
View file @
28fb2918
...
@@ -104,17 +104,6 @@ For more information, see the OpenMMTools_ website.
...
@@ -104,17 +104,6 @@ For more information, see the OpenMMTools_ website.
..
_OpenMMTools
:
https
://
github
.
com
/
choderalab
/
openmmtools
..
_OpenMMTools
:
https
://
github
.
com
/
choderalab
/
openmmtools
OpenMM
-
HIP
**********
This
package
adds
a
new
platform
that
is
implemented
with
AMD
's HIP framework.
When running on AMD GPUs, it often has much faster performance than the OpenCL
platform. For information about how to install it, see the OpenMM-HIP_ website.
Once it is installed, the new platform can be selected and used exactly like the
ones included in the main OpenMM package.
.. _OpenMM-HIP: https://github.com/StreamHPC/openmm-hip
openmmforcefields
openmmforcefields
*****************
*****************
...
...
docs-source/usersguide/library/01_introduction.rst
View file @
28fb2918
...
@@ -46,7 +46,7 @@ license. This is a very permissive license which allows them to be used in
...
@@ -46,7 +46,7 @@ license. This is a very permissive license which allows them to be used in
almost any way, requiring only that you retain the copyright notice and
almost any way, requiring only that you retain the copyright notice and
disclaimer when distributing them.
disclaimer when distributing them.
The CUDA and OpenCL platforms are distributed under the GNU Lesser General
The CUDA
, HIP,
and OpenCL platforms are distributed under the GNU Lesser General
Public License (LGPL). This also allows you to use, modify, and distribute them
Public License (LGPL). This also allows you to use, modify, and distribute them
in any way you want, but it requires you to also distribute the source code for
in any way you want, but it requires you to also distribute the source code for
your modifications. This restriction applies only to modifications to OpenMM
your modifications. This restriction applies only to modifications to OpenMM
...
@@ -280,8 +280,8 @@ simulation; it is a fairly generic computational API. In addition to defining
...
@@ -280,8 +280,8 @@ simulation; it is a fairly generic computational API. In addition to defining
the generic classes, OpenMM also defines abstract subclasses of KernelImpl
the generic classes, OpenMM also defines abstract subclasses of KernelImpl
corresponding to specific calculations. For example, there is a class called
corresponding to specific calculations. For example, there is a class called
CalcHarmonicBondForceKernel to implement HarmonicBondForce and a class called
CalcHarmonicBondForceKernel to implement HarmonicBondForce and a class called
IntegrateLangevinStepKernel to implement LangevinIntegrator. It is
these
IntegrateLangevin
Middle
StepKernel to implement Langevin
Middle
Integrator. It is
classes for which each Platform must provide a concrete subclass.
these
classes for which each Platform must provide a concrete subclass.
This architecture is designed to allow easy extensibility. To support a new
This architecture is designed to allow easy extensibility. To support a new
hardware platform, for example, you create concrete subclasses of all the
hardware platform, for example, you create concrete subclasses of all the
...
@@ -330,6 +330,9 @@ conventional CPUs.
...
@@ -330,6 +330,9 @@ conventional CPUs.
**CudaPlatform**\ : This platform is implemented using the CUDA language, and
**CudaPlatform**\ : This platform is implemented using the CUDA language, and
performs calculations on Nvidia GPUs.
performs calculations on Nvidia GPUs.
**HipPlatform**\ : This platform is implemented using the HIP language, and
performs calculations on ROCm-compatible AMD GPUs.
**OpenCLPlatform**\ : This platform is implemented using the OpenCL language,
**OpenCLPlatform**\ : This platform is implemented using the OpenCL language,
and performs calculations on a variety of types of GPUs and CPUs.
and performs calculations on a variety of types of GPUs and CPUs.
...
@@ -343,8 +346,8 @@ The choice of which platform to use for a simulation depends on various factors:
...
@@ -343,8 +346,8 @@ The choice of which platform to use for a simulation depends on various factors:
some older computers. Also, for simulations that use certain features
some older computers. Also, for simulations that use certain features
(primarily the various “custom” force classes), it may be faster to use the
(primarily the various “custom” force classes), it may be faster to use the
OpenCL platform running on the CPU.
OpenCL platform running on the CPU.
#. The CUDA platform can
only
be used with NVIDIA GPUs. For using an AMD
or
#. The CUDA platform can be used with NVIDIA GPUs. For using an AMD
GPU,
Intel GPU, use the OpenCL platform.
use the HIP platform (or the OpenCL platform which is usually slower), for
#. The AMOEBA force field only works with the CUDA platform, not with the OpenCL
using an Intel GPU, use the OpenCL platform.
platform. It also works with the Reference and CPU
platforms, but the performance
#. The AMOEBA force field works with all
platforms, but the performance
is usually too slow to be useful
on those platforms
.
of the Reference and CPU platforms
is usually too slow to be useful.
docs-source/usersguide/library/02_compiling.rst
View file @
28fb2918
...
@@ -111,7 +111,7 @@ There are several variables that can be adjusted in the CMake interface:
...
@@ -111,7 +111,7 @@ There are several variables that can be adjusted in the CMake interface:
any reason CMake is unable to find them, set OPENCL_INCLUDE_DIR to point to
any reason CMake is unable to find them, set OPENCL_INCLUDE_DIR to point to
the directory containing the headers (usually /usr/local/cuda/include on Linux)
the directory containing the headers (usually /usr/local/cuda/include on Linux)
and OPENCL_LIBRARY to point to the library (usually /usr/local/cuda/lib64/libOpenCL.so
and OPENCL_LIBRARY to point to the library (usually /usr/local/cuda/lib64/libOpenCL.so
on Linux).
on Linux).
Configure (press “c”) again. Adjust any variables that cause an error.
Configure (press “c”) again. Adjust any variables that cause an error.
...
@@ -167,12 +167,6 @@ fraction of the time. These tests will say so in the error message:
...
@@ -167,12 +167,6 @@ fraction of the time. These tests will say so in the error message:
exception: Assertion failure at TestReferenceLangevinIntegrator.cpp:129. Expected 9.97741,
exception: Assertion failure at TestReferenceLangevinIntegrator.cpp:129. Expected 9.97741,
found 10.7884 (This test is stochastic and may occasionally fail)
found 10.7884 (This test is stochastic and may occasionally fail)
If you get an error message such as :code:`exception: Error launching CUDA compiler: 32512` you need
to specify the path to the CUDA compiler (nvcc) using the :code:`OPENMM_CUDA_COMPILER` environment
variable, for example using something like the following::
OPENMM_CUDA_COMPILER=/<path_to_custom_cuda_dir>/nvcc
Step 3: Install
Step 3: Install
===============
===============
Install your local build of OpenMM using the following command::
Install your local build of OpenMM using the following command::
...
@@ -309,7 +303,7 @@ There are several variables that can be adjusted in the CMake interface:
...
@@ -309,7 +303,7 @@ There are several variables that can be adjusted in the CMake interface:
the directory containing the headers (usually
the directory containing the headers (usually
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/include", except
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/include", except
with the correct version number for the toolkit you installed) and
with the correct version number for the toolkit you installed) and
OPENCL_LIBRARY to point to the library (usually "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/lib/x64/OpenCL.lib").
OPENCL_LIBRARY to point to the library (usually "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/lib/x64/OpenCL.lib").
Press "Configure" again. Adjust any variables that cause an error.
Press "Configure" again. Adjust any variables that cause an error.
...
@@ -437,4 +431,4 @@ Step 3: Install local build of openmm
...
@@ -437,4 +431,4 @@ Step 3: Install local build of openmm
=====================================
=====================================
Now we just install our local build of :code:`openmm` as instructed in
Now we just install our local build of :code:`openmm` as instructed in
:ref:`compiling-openmm-from-source-linux`
:ref:`compiling-openmm-from-source-linux`
\ No newline at end of file
libraries/lepton/src/ParsedExpression.cpp
View file @
28fb2918
...
@@ -152,10 +152,10 @@ ExpressionTreeNode ParsedExpression::substituteSimplerExpression(const Expressio
...
@@ -152,10 +152,10 @@ ExpressionTreeNode ParsedExpression::substituteSimplerExpression(const Expressio
else
else
children
[
i
]
=
cached
->
second
;
children
[
i
]
=
cached
->
second
;
}
}
// Collect some info on constant expressions in children
// Collect some info on constant expressions in children
bool
first_const
=
children
.
size
()
>
0
&&
isConstant
(
children
[
0
]);
// is first child constant?
bool
first_const
=
children
.
size
()
>
0
&&
isConstant
(
children
[
0
]);
// is first child constant?
bool
second_const
=
children
.
size
()
>
1
&&
isConstant
(
children
[
1
]);
// is second child constant?
bool
second_const
=
children
.
size
()
>
1
&&
isConstant
(
children
[
1
]);
// is second child constant?
double
first
,
second
;
// if yes, value of first and second child
double
first
,
second
;
// if yes, value of first and second child
if
(
first_const
)
if
(
first_const
)
first
=
getConstantValue
(
children
[
0
]);
first
=
getConstantValue
(
children
[
0
]);
...
@@ -205,7 +205,7 @@ ExpressionTreeNode ParsedExpression::substituteSimplerExpression(const Expressio
...
@@ -205,7 +205,7 @@ ExpressionTreeNode ParsedExpression::substituteSimplerExpression(const Expressio
break
;
break
;
}
}
case
Operation
::
MULTIPLY
:
case
Operation
::
MULTIPLY
:
{
{
if
((
first_const
&&
first
==
0.0
)
||
(
second_const
&&
second
==
0.0
))
// Multiply by 0
if
((
first_const
&&
first
==
0.0
)
||
(
second_const
&&
second
==
0.0
))
// Multiply by 0
return
ExpressionTreeNode
(
new
Operation
::
Constant
(
0.0
));
return
ExpressionTreeNode
(
new
Operation
::
Constant
(
0.0
));
if
(
first_const
&&
first
==
1.0
)
// Multiply by 1
if
(
first_const
&&
first
==
1.0
)
// Multiply by 1
...
@@ -247,7 +247,7 @@ ExpressionTreeNode ParsedExpression::substituteSimplerExpression(const Expressio
...
@@ -247,7 +247,7 @@ ExpressionTreeNode ParsedExpression::substituteSimplerExpression(const Expressio
case
Operation
::
DIVIDE
:
case
Operation
::
DIVIDE
:
{
{
if
(
children
[
0
]
==
children
[
1
])
if
(
children
[
0
]
==
children
[
1
])
return
ExpressionTreeNode
(
new
Operation
::
Constant
(
1.0
));
// Dividing anything
from
itself is
0
return
ExpressionTreeNode
(
new
Operation
::
Constant
(
1.0
));
// Dividing anything
by
itself is
1
if
(
first_const
&&
first
==
0.0
)
// 0 divided by something
if
(
first_const
&&
first
==
0.0
)
// 0 divided by something
return
ExpressionTreeNode
(
new
Operation
::
Constant
(
0.0
));
return
ExpressionTreeNode
(
new
Operation
::
Constant
(
0.0
));
if
(
first_const
&&
first
==
1.0
)
// 1 divided by something
if
(
first_const
&&
first
==
1.0
)
// 1 divided by something
...
...
wrappers/python/src/swig_doxygen/swigInputConfig.py
View file @
28fb2918
...
@@ -43,21 +43,18 @@ SKIP_METHODS = [('State', 'getPositions'),
...
@@ -43,21 +43,18 @@ SKIP_METHODS = [('State', 'getPositions'),
(
'CalcGBSAOBCForceKernel'
,),
(
'CalcGBSAOBCForceKernel'
,),
(
'CalcHarmonicAngleForceKernel'
,),
(
'CalcHarmonicAngleForceKernel'
,),
(
'CalcHarmonicBondForceKernel'
,),
(
'CalcHarmonicBondForceKernel'
,),
(
'CalcKineticEnergyKernel'
,),
(
'CalcNonbondedForceKernel'
,),
(
'CalcNonbondedForceKernel'
,),
(
'CalcPeriodicTorsionForceKernel'
,),
(
'CalcPeriodicTorsionForceKernel'
,),
(
'CalcRBTorsionForceKernel'
,),
(
'CalcRBTorsionForceKernel'
,),
(
'ComputationInfo'
,),
(
'ComputationInfo'
,),
(
'ConstraintInfo'
,),
(
'ConstraintInfo'
,),
(
'CudaKernelFactory'
,),
(
'CudaKernelFactory'
,),
(
'
CudaStream
Factory'
,),
(
'
HipKernel
Factory'
,),
(
'ExceptionInfo'
,),
(
'ExceptionInfo'
,),
(
'ExclusionInfo'
,),
(
'ExclusionInfo'
,),
(
'FunctionInfo'
,),
(
'FunctionInfo'
,),
(
'GlobalParameterInfo'
,),
(
'GlobalParameterInfo'
,),
(
'InitializeForcesKernel'
,),
(
'IntegrateBrownianStepKernel'
,),
(
'IntegrateBrownianStepKernel'
,),
(
'IntegrateLangevinStepKernel'
,),
(
'IntegrateNoseHooverStepKernel'
,),
(
'IntegrateNoseHooverStepKernel'
,),
(
'IntegrateVariableLangevinStepKernel'
,),
(
'IntegrateVariableLangevinStepKernel'
,),
(
'IntegrateVariableVerletStepKernel'
,),
(
'IntegrateVariableVerletStepKernel'
,),
...
@@ -75,23 +72,19 @@ SKIP_METHODS = [('State', 'getPositions'),
...
@@ -75,23 +72,19 @@ SKIP_METHODS = [('State', 'getPositions'),
(
'RBTorsionInfo'
,),
(
'RBTorsionInfo'
,),
(
'RemoveCMMotionKernel'
,),
(
'RemoveCMMotionKernel'
,),
(
'SplineFitter'
,),
(
'SplineFitter'
,),
(
'StreamFactory'
,),
(
'TorsionInfo'
,),
(
'TorsionInfo'
,),
(
'TorsionTorsionGridInfo'
,),
(
'TorsionTorsionGridInfo'
,),
(
'TorsionTorsionInfo'
,),
(
'TorsionTorsionInfo'
,),
(
'UpdateStateDataKernel'
,),
(
'UpdateStateDataKernel'
,),
(
'UpdateTimeKernel'
,),
(
'VdwInfo'
,),
(
'VdwInfo'
,),
(
'WcaDispersionInfo'
,),
(
'WcaDispersionInfo'
,),
(
'Context'
,
'getIntegrator'
),
(
'Context'
,
'getIntegrator'
),
(
'Context'
,
'createCheckpoint'
),
(
'Context'
,
'createCheckpoint'
),
(
'Context'
,
'loadCheckpoint'
),
(
'Context'
,
'loadCheckpoint'
),
(
'CudaPlatform'
,),
(
'CudaPlatform'
,),
(
'HipPlatform'
,),
(
'Force'
,
'Force'
),
(
'Force'
,
'Force'
),
(
'ParticleParameterInfo'
,),
(
'ParticleParameterInfo'
,),
(
'Platform'
,
'createStream'
),
(
'Platform'
,
'getDefaultStreamFactory'
),
(
'Platform'
,
'registerStreamFactory'
),
(
'Platform'
,
'contextCreated'
),
(
'Platform'
,
'contextCreated'
),
(
'Platform'
,
'contextDestroyed'
),
(
'Platform'
,
'contextDestroyed'
),
(
'Platform'
,
'createKernel'
),
(
'Platform'
,
'createKernel'
),
...
@@ -113,7 +106,7 @@ SKIP_METHODS = [('State', 'getPositions'),
...
@@ -113,7 +106,7 @@ SKIP_METHODS = [('State', 'getPositions'),
# The build script assumes method args that are non-const references are
# The build script assumes method args that are non-const references are
# used to output values. This list gives exc
p
etions to this rule.
# used to output values. This list gives exce
p
tions to this rule.
NO_OUTPUT_ARGS
=
[(
'LocalEnergyMinimizer'
,
'minimize'
,
'context'
),
NO_OUTPUT_ARGS
=
[(
'LocalEnergyMinimizer'
,
'minimize'
,
'context'
),
(
'Platform'
,
'setPropertyValue'
,
'context'
),
(
'Platform'
,
'setPropertyValue'
,
'context'
),
(
'AmoebaTorsionTorsionForce'
,
'setTorsionTorsionGrid'
,
'grid'
),
(
'AmoebaTorsionTorsionForce'
,
'setTorsionTorsionGrid'
,
'grid'
),
...
...
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