Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
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
ProMod3
Commits
acdf5eb5
Commit
acdf5eb5
authored
10 years ago
by
Bienchen
Browse files
Options
Downloads
Patches
Plain Diff
More pithonic module loading
parent
da958feb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
meld/tests/test_raw_modeling.py
+8
-8
8 additions, 8 deletions
meld/tests/test_raw_modeling.py
with
8 additions
and
8 deletions
meld/tests/test_raw_modeling.py
+
8
−
8
View file @
acdf5eb5
import
unittest
from
promod3
import
*
from
promod3
.meld
import
*
from
promod3
import
meld
from
ost
import
conop
,
seq
,
io
,
mol
class
RawModelingTests
(
unittest
.
TestCase
):
...
...
@@ -13,14 +13,14 @@ class RawModelingTests(unittest.TestCase):
# test that BuildRawModel throws exception when no view is attached
aln
=
seq
.
CreateAlignment
(
seq
.
CreateSequence
(
'
A
'
,
'
acdef
'
),
seq
.
CreateSequence
(
'
B
'
,
'
ac-ef
'
))
self
.
assertRaises
(
RuntimeError
,
BuildRawModel
,
aln
)
self
.
assertRaises
(
RuntimeError
,
meld
.
BuildRawModel
,
aln
)
def
testModeledSequence
(
self
):
# test if the model has the sequence we want.
tpl
=
io
.
LoadPDB
(
'
data/raw-modeling/gly.pdb
'
)
aln
=
io
.
LoadAlignment
(
'
data/raw-modeling/seq.fasta
'
)
aln
.
AttachView
(
1
,
tpl
.
CreateFullView
())
result
=
BuildRawModel
(
aln
)
result
=
meld
.
BuildRawModel
(
aln
)
seq1
=
seq
.
SequenceFromChain
(
'
MODEL
'
,
result
.
model
.
chains
[
0
])
self
.
assertEqual
(
seq1
.
string
,
aln
.
sequences
[
0
].
string
)
...
...
@@ -29,7 +29,7 @@ class RawModelingTests(unittest.TestCase):
tpl
=
io
.
LoadPDB
(
'
data/raw-modeling/gly.pdb
'
)
aln
=
io
.
LoadAlignment
(
'
data/raw-modeling/del.fasta
'
)
aln
.
AttachView
(
1
,
tpl
.
CreateFullView
())
result
=
BuildRawModel
(
aln
)
result
=
meld
.
BuildRawModel
(
aln
)
residues
=
result
.
model
.
residues
self
.
assertEqual
(
len
(
result
.
gaps
),
1
)
self
.
assertEqual
(
result
.
gaps
[
0
].
before
,
residues
[
2
])
...
...
@@ -41,7 +41,7 @@ class RawModelingTests(unittest.TestCase):
tpl
=
io
.
LoadPDB
(
'
data/raw-modeling/gly.pdb
'
)
aln
=
io
.
LoadAlignment
(
'
data/raw-modeling/ins.fasta
'
)
aln
.
AttachView
(
1
,
tpl
.
CreateFullView
())
result
=
BuildRawModel
(
aln
)
result
=
meld
.
BuildRawModel
(
aln
)
residues
=
result
.
model
.
residues
self
.
assertEqual
(
len
(
result
.
gaps
),
1
)
self
.
assertEqual
(
result
.
gaps
[
0
].
before
,
residues
[
1
])
...
...
@@ -54,7 +54,7 @@ class RawModelingTests(unittest.TestCase):
tpl
=
io
.
LoadPDB
(
'
data/raw-modeling/gly.pdb
'
)
aln
=
io
.
LoadAlignment
(
'
data/raw-modeling/ter.fasta
'
)
aln
.
AttachView
(
1
,
tpl
.
CreateFullView
())
result
=
BuildRawModel
(
aln
)
result
=
meld
.
BuildRawModel
(
aln
)
residues
=
result
.
model
.
residues
self
.
assertEqual
(
len
(
result
.
gaps
),
2
)
self
.
assertEqual
(
result
.
gaps
[
0
].
before
,
mol
.
ResidueHandle
())
...
...
@@ -69,7 +69,7 @@ class RawModelingTests(unittest.TestCase):
tpl
=
io
.
LoadPDB
(
'
data/raw-modeling/sep.pdb
'
)
aln
=
io
.
LoadAlignment
(
'
data/raw-modeling/sep.fasta
'
)
aln
.
AttachView
(
1
,
tpl
.
CreateFullView
())
result
=
BuildRawModel
(
aln
)
result
=
meld
.
BuildRawModel
(
aln
)
residues
=
result
.
model
.
residues
self
.
assertEqual
(
len
(
residues
),
1
)
self
.
assertEqual
(
len
(
residues
[
0
].
atoms
),
6
)
...
...
@@ -85,7 +85,7 @@ class RawModelingTests(unittest.TestCase):
tpl
=
io
.
LoadPDB
(
'
data/raw-modeling/cbeta.pdb
'
)
aln
=
io
.
LoadAlignment
(
'
data/raw-modeling/cbeta.fasta
'
)
aln
.
AttachView
(
1
,
tpl
.
CreateFullView
())
result
=
BuildRawModel
(
aln
)
result
=
meld
.
BuildRawModel
(
aln
)
residues
=
result
.
model
.
residues
assert
not
residues
[
0
].
FindAtom
(
"
CB
"
).
IsValid
()
assert
not
residues
[
1
].
FindAtom
(
"
CB
"
).
IsValid
()
...
...
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