Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
OpenFold
Commits
a2ab7ab7
Commit
a2ab7ab7
authored
Jun 22, 2022
by
Sam DeLuca
Browse files
more fixes
parent
ce042962
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
run_pretrained_openfold.py
run_pretrained_openfold.py
+13
-8
No files found.
run_pretrained_openfold.py
View file @
a2ab7ab7
...
@@ -237,14 +237,13 @@ def load_models_from_command_line(args, config):
...
@@ -237,14 +237,13 @@ def load_models_from_command_line(args, config):
for
path
in
args
.
openfold_checkpoint_path
.
split
(
","
):
for
path
in
args
.
openfold_checkpoint_path
.
split
(
","
):
model
=
AlphaFold
(
config
)
model
=
AlphaFold
(
config
)
model
=
model
.
eval
()
model
=
model
.
eval
()
checkpoint_basename
=
None
if
os
.
path
.
isdir
(
path
):
# A DeepSpeed checkpoint
checkpoint_basename
=
os
.
path
.
splitext
(
checkpoint_basename
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
os
.
path
.
basename
(
os
.
path
.
normpath
(
path
)
os
.
path
.
normpath
(
path
)
)
)
)[
0
]
)[
0
]
if
os
.
path
.
isdir
(
path
):
# A DeepSpeed checkpoint
ckpt_path
=
os
.
path
.
join
(
ckpt_path
=
os
.
path
.
join
(
args
.
output_dir
,
args
.
output_dir
,
checkpoint_basename
+
".pt"
,
checkpoint_basename
+
".pt"
,
...
@@ -313,7 +312,7 @@ def main(args):
...
@@ -313,7 +312,7 @@ def main(args):
for
fasta_file
in
os
.
listdir
(
args
.
fasta_dir
):
for
fasta_file
in
os
.
listdir
(
args
.
fasta_dir
):
batch
,
tag
,
feature_dict
=
generate_batch
(
batch
_data
=
generate_batch
(
fasta_file
,
fasta_file
,
args
.
fasta_dir
,
args
.
fasta_dir
,
alignment_dir
,
alignment_dir
,
...
@@ -321,6 +320,12 @@ def main(args):
...
@@ -321,6 +320,12 @@ def main(args):
feature_processor
,
feature_processor
,
prediction_dir
)
prediction_dir
)
if
batch_data
is
None
:
# this file has already been processed
continue
batch
,
tag
,
feature_dict
=
batch_data
for
model
,
model_version
in
load_models_from_command_line
(
args
,
config
):
for
model
,
model_version
in
load_models_from_command_line
(
args
,
config
):
working_batch
=
deepcopy
(
batch
)
working_batch
=
deepcopy
(
batch
)
...
...
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