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
1d450fd8
Commit
1d450fd8
authored
Jan 12, 2015
by
Robert McGibbon
Browse files
.message -> str()
parent
7cdeded0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
wrappers/python/simtk/testInstallation.py
wrappers/python/simtk/testInstallation.py
+8
-8
No files found.
wrappers/python/simtk/testInstallation.py
View file @
1d450fd8
...
@@ -6,7 +6,7 @@ import sys
...
@@ -6,7 +6,7 @@ import sys
class
TestingError
(
Exception
):
class
TestingError
(
Exception
):
"""
"""
An error is encountered when
An error is encountered when
"""
"""
pass
pass
...
@@ -16,7 +16,7 @@ try:
...
@@ -16,7 +16,7 @@ try:
from
simtk.unit
import
*
from
simtk.unit
import
*
except
ImportError
as
err
:
except
ImportError
as
err
:
simtk_import_failed
=
True
simtk_import_failed
=
True
simtk_import_error
=
err
.
message
simtk_import_error
=
str
(
err
)
else
:
else
:
simtk_import_failed
=
False
simtk_import_failed
=
False
...
@@ -59,9 +59,9 @@ def run_tests():
...
@@ -59,9 +59,9 @@ def run_tests():
pdb
=
PDBFile
(
os
.
path
.
join
(
data_dir
,
'test.pdb'
))
pdb
=
PDBFile
(
os
.
path
.
join
(
data_dir
,
'test.pdb'
))
forcefield
=
ForceField
(
'amber99sb.xml'
,
'tip3p.xml'
)
forcefield
=
ForceField
(
'amber99sb.xml'
,
'tip3p.xml'
)
system
=
forcefield
.
createSystem
(
pdb
.
topology
,
nonbondedMethod
=
PME
,
nonbondedCutoff
=
1
*
nanometer
,
constraints
=
HBonds
)
system
=
forcefield
.
createSystem
(
pdb
.
topology
,
nonbondedMethod
=
PME
,
nonbondedCutoff
=
1
*
nanometer
,
constraints
=
HBonds
)
# List all installed platforms and compute forces with each one.
# List all installed platforms and compute forces with each one.
numPlatforms
=
Platform
.
getNumPlatforms
()
numPlatforms
=
Platform
.
getNumPlatforms
()
print
(
"There are"
,
numPlatforms
,
"Platforms available:"
)
print
(
"There are"
,
numPlatforms
,
"Platforms available:"
)
print
()
print
()
...
@@ -80,15 +80,15 @@ def run_tests():
...
@@ -80,15 +80,15 @@ def run_tests():
except
:
except
:
print
(
"- Error computing forces with"
,
platform
.
getName
(),
"platform"
)
print
(
"- Error computing forces with"
,
platform
.
getName
(),
"platform"
)
platformErrors
[
platform
.
getName
()]
=
sys
.
exc_info
()[
1
]
platformErrors
[
platform
.
getName
()]
=
sys
.
exc_info
()[
1
]
# Give details of any errors.
# Give details of any errors.
for
platform
in
platformErrors
:
for
platform
in
platformErrors
:
print
()
print
()
print
(
"%s platform error: %s"
%
(
platform
,
platformErrors
[
platform
]))
print
(
"%s platform error: %s"
%
(
platform
,
platformErrors
[
platform
]))
# See how well the platforms agree.
# See how well the platforms agree.
if
numPlatforms
>
1
:
if
numPlatforms
>
1
:
print
()
print
()
print
(
"Median difference in forces between platforms:"
)
print
(
"Median difference in forces between platforms:"
)
...
...
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