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
75bedabe
Commit
75bedabe
authored
Jun 16, 2019
by
huangj
Browse files
Correct the way to compare vector and to do assertAlmostEqual rather than assertEqual.
parent
3d04a92e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
wrappers/python/tests/TestCharmmFiles.py
wrappers/python/tests/TestCharmmFiles.py
+5
-2
No files found.
wrappers/python/tests/TestCharmmFiles.py
View file @
75bedabe
...
...
@@ -149,12 +149,15 @@ class TestCharmmFiles(unittest.TestCase):
con
.
setPositions
(
crd
.
positions
)
init_coor
=
con
.
getState
(
getPositions
=
True
).
getPositions
()
# move the position of the lonepair and recompute its coordinates
crd
.
positions
[
12
]
=
Vec3
(
0.5
,
1.0
,
1.5
)
*
angstrom
plp
=
12
crd
.
positions
[
plp
]
=
Vec3
(
0.5
,
1.0
,
1.5
)
*
angstrom
con
.
setPositions
(
crd
.
positions
)
con
.
computeVirtualSites
()
new_coor
=
con
.
getState
(
getPositions
=
True
).
getPositions
()
self
.
assertEqual
(
init_coor
,
new_coor
)
self
.
assertAlmostEqual
(
init_coor
[
plp
][
0
]
/
nanometers
,
new_coor
[
plp
][
0
]
/
nanometers
)
self
.
assertAlmostEqual
(
init_coor
[
plp
][
1
]
/
nanometers
,
new_coor
[
plp
][
1
]
/
nanometers
)
self
.
assertAlmostEqual
(
init_coor
[
plp
][
2
]
/
nanometers
,
new_coor
[
plp
][
2
]
/
nanometers
)
def
test_InsCode
(
self
):
""" Test the parsing of PSF files that contain insertion codes in their residue numbers """
...
...
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