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
197eac74
"platforms/vscode:/vscode.git/clone" did not exist on "671419fac9c9f62999d1e71cc98b0697c67b68ac"
Commit
197eac74
authored
Jan 09, 2016
by
Rafal P. Wiewiora
Browse files
rearrange TestPdbFile.py
parent
58d0c548
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
wrappers/python/tests/TestPdbFile.py
wrappers/python/tests/TestPdbFile.py
+12
-11
No files found.
wrappers/python/tests/TestPdbFile.py
View file @
197eac74
...
...
@@ -70,15 +70,6 @@ class TestPdbFile(unittest.TestCase):
pdb
=
PDBFile
(
open
(
'systems/triclinic.pdb'
,
'rb'
))
self
.
assertEqual
(
len
(
pdb
.
positions
),
8
)
def
assertVecAlmostEqual
(
self
,
p1
,
p2
,
tol
=
1e-7
):
unit
=
p1
.
unit
p1
=
p1
.
value_in_unit
(
unit
)
p2
=
p2
.
value_in_unit
(
unit
)
scale
=
max
(
1.0
,
norm
(
p1
),)
for
i
in
range
(
3
):
diff
=
abs
(
p1
[
i
]
-
p2
[
i
])
/
scale
self
.
assertTrue
(
diff
<
tol
)
def
test_ExtraParticles
(
self
):
"""Test reading, and writing and re-reading of a file containing extra particle atoms."""
pdb
=
PDBFile
(
'systems/tip5p.pdb'
)
...
...
@@ -94,5 +85,15 @@ class TestPdbFile(unittest.TestCase):
self
.
assertEqual
(
None
,
atom
.
element
)
def
assertVecAlmostEqual
(
self
,
p1
,
p2
,
tol
=
1e-7
):
unit
=
p1
.
unit
p1
=
p1
.
value_in_unit
(
unit
)
p2
=
p2
.
value_in_unit
(
unit
)
scale
=
max
(
1.0
,
norm
(
p1
),)
for
i
in
range
(
3
):
diff
=
abs
(
p1
[
i
]
-
p2
[
i
])
/
scale
self
.
assertTrue
(
diff
<
tol
)
if
__name__
==
'__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