Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
ma-wilkins-import
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor 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
ma-wilkins-import
Commits
628a91e8
Commit
628a91e8
authored
2 years ago
by
B13nch3n
Browse files
Options
Downloads
Patches
Plain Diff
Abort if model of requested rank is not found.
parent
31feca02
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
translate2modelcif.py
+7
-2
7 additions, 2 deletions
translate2modelcif.py
with
7 additions
and
2 deletions
translate2modelcif.py
+
7
−
2
View file @
628a91e8
...
@@ -46,9 +46,10 @@ def _parse_args():
...
@@ -46,9 +46,10 @@ def _parse_args():
+
"'
<UniProtKB AC>-<UniProtKB AC>
'"
,
+
"'
<UniProtKB AC>-<UniProtKB AC>
'"
,
)
)
parser
.
add_argument
(
parser
.
add_argument
(
"
--rank
"
,
type
=
str
,
"
--rank
"
,
type
=
str
,
default
=
None
,
default
=
None
,
help
=
"
Only process the model with this rank.
"
help
=
"
Only process the model with this rank.
"
,
)
)
parser
.
add_argument
(
parser
.
add_argument
(
"
--out_dir
"
,
"
--out_dir
"
,
...
@@ -946,12 +947,14 @@ def _main():
...
@@ -946,12 +947,14 @@ def _main():
config_data
=
_parse_colabfold_config
(
cnfg
)
config_data
=
_parse_colabfold_config
(
cnfg
)
# iterate model directory
# iterate model directory
found_ranked
=
False
for
fle
in
sorted
(
os
.
listdir
(
opts
.
model_dir
)):
for
fle
in
sorted
(
os
.
listdir
(
opts
.
model_dir
)):
# iterate PDB files
# iterate PDB files
if
not
fle
.
endswith
(
"
.pdb
"
):
if
not
fle
.
endswith
(
"
.pdb
"
):
continue
continue
if
opts
.
rank
is
not
None
and
f
"
rank_
{
opts
.
rank
}
"
not
in
fle
:
if
opts
.
rank
is
not
None
and
f
"
rank_
{
opts
.
rank
}
"
not
in
fle
:
continue
continue
found_ranked
=
True
print
(
f
"
translating
{
fle
}
...
"
)
print
(
f
"
translating
{
fle
}
...
"
)
pdb_start
=
timer
()
pdb_start
=
timer
()
file_prfx
,
uid
=
_check_model_extra_files_present
(
opts
.
model_dir
,
fle
)
file_prfx
,
uid
=
_check_model_extra_files_present
(
opts
.
model_dir
,
fle
)
...
@@ -983,6 +986,8 @@ def _main():
...
@@ -983,6 +986,8 @@ def _main():
)
)
print
(
f
"
... done with
{
fle
}
(
{
timer
()
-
pdb_start
:
.
2
f
}
s).
"
)
print
(
f
"
... done with
{
fle
}
(
{
timer
()
-
pdb_start
:
.
2
f
}
s).
"
)
if
opts
.
rank
and
not
found_ranked
:
_abort_msg
(
f
"
Could not find model of requested rank
'
{
opts
.
rank
}
'"
)
print
(
f
"
... done with
{
opts
.
model_dir
}
.
"
)
print
(
f
"
... done with
{
opts
.
model_dir
}
.
"
)
...
...
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