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
f4a4e273
Commit
f4a4e273
authored
5 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
simple unit test for lga binding
parent
8ab1af86
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/bindings/tests/CMakeLists.txt
+1
-0
1 addition, 0 deletions
modules/bindings/tests/CMakeLists.txt
modules/bindings/tests/test_lga.py
+30
-0
30 additions, 0 deletions
modules/bindings/tests/test_lga.py
with
31 additions
and
0 deletions
modules/bindings/tests/CMakeLists.txt
+
1
−
0
View file @
f4a4e273
...
...
@@ -8,6 +8,7 @@ set(OST_BINDINGS_UNIT_TESTS
test_cadscore.py
test_tmtools.py
test_ialign.py
test_lga.py
)
ost_unittest
(
MODULE bindings
...
...
This diff is collapsed.
Click to expand it.
modules/bindings/tests/test_lga.py
0 → 100644
+
30
−
0
View file @
f4a4e273
import
unittest
from
ost
import
*
from
ost
import
settings
from
ost.bindings
import
lga
from
ost
import
testutils
class
TestLGABindings
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
protein
=
io
.
LoadEntity
(
"
testfiles/testprotein.pdb
"
)
self
.
chain_a
=
self
.
protein
.
Select
(
"
cname=A
"
)
def
testLGA
(
self
):
try
:
lga_path
=
settings
.
Locate
(
'
lga
'
)
except
:
print
(
"
Could not find lga executable: ignoring unit tests
"
)
return
lga_result
=
lga
.
GDT
(
self
.
chain_a
,
self
.
chain_a
,
reference_length
=
len
(
self
.
chain_a
.
residues
))
expected_transform
=
geom
.
Mat4
(
1
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
1
)
self
.
assertEqual
(
lga_result
.
gdt_ts
,
100.0
)
self
.
assertEqual
(
lga_result
.
gdt_ha
,
100.0
)
self
.
assertEqual
(
lga_result
.
GetTransform
(),
expected_transform
)
if
__name__
==
"
__main__
"
:
testutils
.
RunTests
()
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