Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
ff2ca641
Commit
ff2ca641
authored
5 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
increase test coverage of msms binding
parent
4bb22415
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/bindings/tests/test_msms.py
+20
-12
20 additions, 12 deletions
modules/bindings/tests/test_msms.py
with
20 additions
and
12 deletions
modules/bindings/tests/test_msms.py
+
20
−
12
View file @
ff2ca641
...
...
@@ -12,24 +12,32 @@ class TestMSMSBindings(unittest.TestCase):
self
.
num_vert
=
55762
self
.
ases
=
20051.928
self
.
asas
=
21574.324
self
.
volume
=
60229.848
def
testCalculateSurface
(
self
):
surf
=
msms
.
CalculateSurface
(
self
.
protein
,
msms_env
=
'
MSMSSERVER
'
,
density
=
3
,
radius
=
1.4
)[
0
]
assert
self
.
num_vert
==
len
(
surf
.
GetVertexIDList
())
\
and
self
.
num_tri
==
len
(
surf
.
GetTriIDList
()),
\
"
Number of surface vertices (%i) or triangles (%i) do not match precalculated values (%i/%i)
"
%
(
len
(
surf
.
GetVertexIDList
()),
len
(
surf
.
GetTriIDList
()),
self
.
num_vert
,
self
.
num_tri
)
def
testCalculateSurfaceAres
(
self
):
(
msms_ases
,
msms_asas
)
=
msms
.
CalculateSurfaceArea
(
self
.
protein
,
\
msms_env
=
'
MSMSSERVER
'
,
density
=
3
,
radius
=
1.4
)
assert
self
.
ases
==
msms_ases
[
0
]
and
self
.
asas
==
msms_asas
[
0
],
\
"
SASA (%f) or SESA (%f) do not match precalculated values (%f/%f)
"
%
(
msms_asas
[
0
],
msms_ases
[
0
],
self
.
asas
,
self
.
ases
)
radius
=
1.4
,
attach_asa
=
"
asa
"
,
attach_esa
=
"
esa
"
)[
0
]
self
.
assertEqual
(
self
.
num_vert
,
len
(
surf
.
GetVertexIDList
()))
self
.
assertEqual
(
self
.
num_tri
,
len
(
surf
.
GetTriIDList
()))
def
testCalculateSurfaceArea
(
self
):
(
msms_ases
,
msms_asas
)
=
msms
.
CalculateSurfaceArea
(
self
.
protein
,
\
msms_env
=
'
MSMSSERVER
'
,
density
=
3
,
radius
=
1.4
)
self
.
assertEqual
(
self
.
ases
,
msms_ases
[
0
])
self
.
assertEqual
(
self
.
asas
,
msms_asas
[
0
])
def
testCalculateSurfaceVolume
(
self
):
volume
=
msms
.
CalculateSurfaceVolume
(
self
.
protein
,
\
msms_env
=
'
MSMSSERVER
'
,
density
=
3
,
radius
=
1.4
)
self
.
assertEqual
(
self
.
volume
,
volume
)
if
__name__
==
"
__main__
"
:
# test if msms package is available on system, otherwise ignore tests
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment