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
875c973f
"platforms/vscode:/vscode.git/clone" did not exist on "68c89df6507f9df36c9a3488d86c2f67eed79243"
Commit
875c973f
authored
Mar 14, 2015
by
kyleabeauchamp
Browse files
Added test.
parent
c212839e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
wrappers/python/tests/TestAmberPrmtopFile.py
wrappers/python/tests/TestAmberPrmtopFile.py
+20
-0
No files found.
wrappers/python/tests/TestAmberPrmtopFile.py
View file @
875c973f
...
@@ -275,5 +275,25 @@ class TestAmberPrmtopFile(unittest.TestCase):
...
@@ -275,5 +275,25 @@ class TestAmberPrmtopFile(unittest.TestCase):
diff
=
norm
(
f1
-
f2
)
diff
=
norm
(
f1
-
f2
)
self
.
assertTrue
(
diff
<
0.1
or
diff
/
norm
(
f1
)
<
1e-4
)
self
.
assertTrue
(
diff
<
0.1
or
diff
/
norm
(
f1
)
<
1e-4
)
def
test_with_dcd_reporter
(
self
):
"""Check that an amber simulation like the docs example works with a DCD reporter."""
temperature
=
50
*
kelvin
prmtop
=
prmtop4
# Mg + water
inpcrd
=
inpcrd4
# Mg + water
system
=
prmtop
.
createSystem
(
nonbondedMethod
=
PME
,
nonbondedCutoff
=
1
*
nanometer
,
constraints
=
HBonds
)
system
.
addForce
(
MonteCarloBarostat
(
1.0
*
atmospheres
,
temperature
,
1
))
integrator
=
LangevinIntegrator
(
temperature
,
1.0
/
picosecond
,
0.0001
*
picoseconds
)
simulation
=
Simulation
(
prmtop
.
topology
,
system
,
integrator
)
simulation
.
context
.
setPositions
(
inpcrd
.
positions
)
simulation
.
context
.
setPeriodicBoxVectors
(
*
inpcrd
.
boxVectors
)
simulation
.
reporters
.
append
(
DCDReporter
(
'output.dcd'
,
1
))
# This is an explicit test for the bugs in issue #850
simulation
.
step
(
5
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
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