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
532f2bd6
Commit
532f2bd6
authored
Jul 07, 2015
by
Robert McGibbon
Browse files
Update some docstrings
parent
5246ed6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
40 deletions
+17
-40
wrappers/python/setup.py
wrappers/python/setup.py
+11
-16
wrappers/python/simtk/openmm/__init__.py
wrappers/python/simtk/openmm/__init__.py
+6
-9
wrappers/python/src/swig_doxygen/OpenMM.i
wrappers/python/src/swig_doxygen/OpenMM.i
+0
-15
No files found.
wrappers/python/setup.py
View file @
532f2bd6
#
__author__
=
"Peter Eastman"
"""
setup.py: Used for building python wrappers for Simbios' OpenMM library.
"""
__author__
=
"Randall J. Radmer"
__version__
=
"1.0"
__version__
=
"1.0"
import
ast
import
ast
...
@@ -159,11 +154,11 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
...
@@ -159,11 +154,11 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
setupKeywords
[
"description"
]
=
\
setupKeywords
[
"description"
]
=
\
"Python wrapper for OpenMM (a C++ MD package)"
"Python wrapper for OpenMM (a C++ MD package)"
setupKeywords
[
"long_description"
]
=
\
setupKeywords
[
"long_description"
]
=
\
"""OpenMM is a
library which provides
tool
s
for mo
dern mo
lecular
"""OpenMM is a tool
kit
for molecular
simulation. It can be used either as a
model
ing simulation
. A
s a library
it can be hooked into any code,
stand-alone application for runn
ing simulation
s, or a
s a library
you call
allowing that code to do molecular modeling with minimal extra
from your own code. It provides a combination of extreme flexibility
coding (https://simtk.org/home/openmm). This Python packag
e
(through custom forces and integrators), openness, and high performanc
e
gives access to the OpenMM API
.
(especially on recent GPUs) that make it truly unique among simulation codes
.
"""
"""
define_macros
=
[(
'MAJOR_VERSION'
,
major_version_num
),
define_macros
=
[(
'MAJOR_VERSION'
,
major_version_num
),
...
@@ -182,7 +177,7 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
...
@@ -182,7 +177,7 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
for
ii
in
range
(
len
(
libraries
)):
for
ii
in
range
(
len
(
libraries
)):
libraries
[
ii
]
=
"%s_d"
%
libraries
[
ii
]
libraries
[
ii
]
=
"%s_d"
%
libraries
[
ii
]
sys
.
stdout
.
write
(
"%s
\n
"
%
libraries
[
ii
])
sys
.
stdout
.
write
(
"%s
\n
"
%
libraries
[
ii
])
openmm_include_path
=
os
.
getenv
(
'OPENMM_INCLUDE_PATH'
)
openmm_include_path
=
os
.
getenv
(
'OPENMM_INCLUDE_PATH'
)
if
not
openmm_include_path
:
if
not
openmm_include_path
:
reportError
(
"Set OPENMM_INCLUDE_PATH to point to the include directory for OpenMM"
)
reportError
(
"Set OPENMM_INCLUDE_PATH to point to the include directory for OpenMM"
)
...
@@ -199,8 +194,8 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
...
@@ -199,8 +194,8 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
extra_compile_args
.
append
(
'/EHsc'
)
extra_compile_args
.
append
(
'/EHsc'
)
else
:
else
:
if
platform
.
system
()
==
'Darwin'
:
if
platform
.
system
()
==
'Darwin'
:
extra_compile_args
+=
[
'-stdlib=libc++'
,
'-mmacosx-version-min=10.7'
]
extra_compile_args
+=
[
'-stdlib=libc++'
,
'-mmacosx-version-min=10.7'
]
extra_link_args
+=
[
'-stdlib=libc++'
,
'-mmacosx-version-min=10.7'
,
'-Wl'
,
'-rpath'
,
openmm_lib_path
]
extra_link_args
+=
[
'-stdlib=libc++'
,
'-mmacosx-version-min=10.7'
,
'-Wl'
,
'-rpath'
,
openmm_lib_path
]
library_dirs
=
[
openmm_lib_path
]
library_dirs
=
[
openmm_lib_path
]
include_dirs
=
openmm_include_path
.
split
(
';'
)
include_dirs
=
openmm_include_path
.
split
(
';'
)
...
@@ -223,11 +218,11 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
...
@@ -223,11 +218,11 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
for
key
in
sorted
(
iter
(
setupKeywords
)):
for
key
in
sorted
(
iter
(
setupKeywords
)):
value
=
setupKeywords
[
key
]
value
=
setupKeywords
[
key
]
outputString
+=
key
.
rjust
(
firstTab
)
+
str
(
value
).
rjust
(
secondTab
)
+
"
\n
"
outputString
+=
key
.
rjust
(
firstTab
)
+
str
(
value
).
rjust
(
secondTab
)
+
"
\n
"
sys
.
stdout
.
write
(
"%s"
%
outputString
)
sys
.
stdout
.
write
(
"%s"
%
outputString
)
return
setupKeywords
return
setupKeywords
def
main
():
def
main
():
if
sys
.
version_info
<
(
2
,
6
):
if
sys
.
version_info
<
(
2
,
6
):
...
...
wrappers/python/simtk/openmm/__init__.py
View file @
532f2bd6
"""OpenMM is a toolkit for molecular simulation. It can be used either as a
stand-alone application for running simulations, or as a library you call
from your own code. It provides a combination of extreme flexibility
(through custom forces and integrators), openness, and high performance
(especially on recent GPUs) that make it truly unique among simulation codes.
"""
"""
Package simtk.openmm
__author__
=
"Peter Eastman"
This package wraps the simtk.openmm.openmm module.
When imported, it loads the swig module and then does some magic
to make the POSIX function "dlopen" work on Linux.
It also tries to load any plugin modules it can find.
"""
__author__
=
"Randall J. Radmer"
import
os
,
os
.
path
import
os
,
os
.
path
import
sys
import
sys
...
...
wrappers/python/src/swig_doxygen/OpenMM.i
View file @
532f2bd6
%
define
DOCSTRING
"PyOpenMM is a Python application programming interface (API) to be
used for performing molecular dynamics (MD) simulations on various
computer architectures (including GPUs). It is implemented in Python
and C/C++, and provides a Python interface to the OpenMM libraries
(see https://simtk.org/home/openmm for OpenMM details). The primary
motivation for creating PyOpenMM is to make it possible to write
GPU-accelerated MD code in pure Python.
See https://simtk.org/home/pyopenmm for details"
%
enddef
%
module
(
docstring
=
DOCSTRING
)
openmm
%
include
"factory.i"
%
include
"factory.i"
%
include
"std_string.i"
%
include
"std_string.i"
%
include
"std_iostream.i"
%
include
"std_iostream.i"
...
...
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