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
f7e4653a
Commit
f7e4653a
authored
Sep 18, 2015
by
Jason Swails
Browse files
Add a test for AmoebaTorsionTorsionForce that fails because stripUnits doesn't
work for the input variable type.
parent
ed3e8a11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
devtools/forcefield-scripts/processTinkerForceField.py
devtools/forcefield-scripts/processTinkerForceField.py
+0
-1
wrappers/python/tests/TestAPIUnits.py
wrappers/python/tests/TestAPIUnits.py
+14
-0
No files found.
devtools/forcefield-scripts/processTinkerForceField.py
View file @
f7e4653a
...
@@ -1017,7 +1017,6 @@ if( isAmoeba ):
...
@@ -1017,7 +1017,6 @@ if( isAmoeba ):
torsionTorsionUnit
=
1.0
torsionTorsionUnit
=
1.0
outputString
=
""" <AmoebaTorsionTorsionForce >"""
outputString
=
""" <AmoebaTorsionTorsionForce >"""
tinkerXmlFile
.
write
(
"%s
\n
"
%
(
outputString
)
)
tinkerXmlFile
.
write
(
"%s
\n
"
%
(
outputString
)
)
conversion
=
41.84
/
radian
torsionTorsions
=
forces
[
'tortors'
]
torsionTorsions
=
forces
[
'tortors'
]
for
(
index
,
torsionTorsion
)
in
enumerate
(
torsionTorsions
):
for
(
index
,
torsionTorsion
)
in
enumerate
(
torsionTorsions
):
torInfo
=
torsionTorsion
[
0
]
torInfo
=
torsionTorsion
[
0
]
...
...
wrappers/python/tests/TestAPIUnits.py
View file @
f7e4653a
...
@@ -792,5 +792,19 @@ class TestAPIUnits(unittest.TestCase):
...
@@ -792,5 +792,19 @@ class TestAPIUnits(unittest.TestCase):
self
.
assertEqual
(
k2
,
12
*
kilocalories_per_mole
/
angstroms
/
radians
)
self
.
assertEqual
(
k2
,
12
*
kilocalories_per_mole
/
angstroms
/
radians
)
self
.
assertIs
(
k2
.
unit
,
kilojoules_per_mole
/
nanometers
/
radians
)
self
.
assertIs
(
k2
.
unit
,
kilojoules_per_mole
/
nanometers
/
radians
)
def
testAmoebaTorsionTorsionForce
(
self
):
""" Tests the AmoebaTorsionTorsionForce API features """
force
=
AmoebaTorsionTorsionForce
()
grid1
=
[[[
i
,
j
,
random
.
random
(),
random
.
random
(),
random
.
random
(),
random
.
random
()]
for
j
in
range
(
-
180
,
180
,
24
)]
for
i
in
range
(
-
180
,
180
,
24
)]
kcal
=
kilocalories_per_mole
grid2
=
[[[
i
*
degrees
,
j
*
degrees
,
random
.
random
()
*
kcal
,
random
.
random
()
*
kcal
/
radians
,
random
.
random
()
*
kcal
/
radians
,
random
.
random
()
*
kcal
/
radians
**
2
]
for
j
in
range
(
-
180
,
0
,
10
)]
for
i
in
range
(
-
180
,
0
,
10
)]
force
.
setTorsionTorsionGrid
(
0
,
grid1
)
force
.
setTorsionTorsionGrid
(
0
,
grid2
)
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