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
fcee03aa
Commit
fcee03aa
authored
Jun 21, 2022
by
Sam DeLuca
Browse files
wip
parent
15a8c321
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
4 deletions
+30
-4
run_pretrained_openfold.py
run_pretrained_openfold.py
+3
-4
test.sh
test.sh
+27
-0
tests/test_data/sample_feats.pickle.gz
tests/test_data/sample_feats.pickle.gz
+0
-0
No files found.
run_pretrained_openfold.py
View file @
fcee03aa
...
...
@@ -207,7 +207,6 @@ def load_models_from_command_line(args, config):
# Create the output directory
os
.
makedirs
(
args
.
output_dir
,
exist_ok
=
True
)
if
args
.
jax_param_path
:
for
path
in
args
.
jax_param_path
.
split
(
","
):
model
=
AlphaFold
(
config
)
model
=
model
.
eval
()
...
...
@@ -217,7 +216,7 @@ def load_models_from_command_line(args, config):
model
=
model
.
to
(
args
.
model_device
)
yield
model
,
None
if
args
.
openfold_checkpoint_path
:
for
path
in
args
.
openfold_checkpoint_path
:
for
path
in
args
.
openfold_checkpoint_path
.
split
(
","
)
:
model
=
AlphaFold
(
config
)
model
=
model
.
eval
()
checkpoint_basename
=
None
...
...
@@ -234,7 +233,7 @@ def load_models_from_command_line(args, config):
if
not
os
.
path
.
isfile
(
ckpt_path
):
convert_zero_checkpoint_to_fp32_state_dict
(
args
.
openfold_checkpoint_
path
,
path
,
ckpt_path
,
)
else
:
...
...
@@ -244,7 +243,7 @@ def load_models_from_command_line(args, config):
model
.
load_state_dict
(
d
[
"ema"
][
"params"
])
model
=
model
.
to
(
args
.
model_device
)
yield
model
,
checkpoint_basename
else
:
if
not
args
.
jax_param_path
and
not
args
.
openfold_checkpoint_path
:
raise
ValueError
(
"At least one of jax_param_path or openfold_checkpoint_path must "
"be specified."
...
...
test.sh
0 → 100644
View file @
fcee03aa
#!/bin/bash
# the alphafold script has a few frustrating behaviors in how it parses input flags, this script reduces the need for
# code duplication in the argo workflow
set
-x
database_path
=
$1
fasta_path
=
$2
base_arguments
=(
${
fasta_path
}
"
${
database_path
}
/pdb_mmcif/mmcif_files/"
"--uniref90_database_path"
"
${
database_path
}
/uniref90/uniref90.fasta"
"--mgnify_database_path"
"
${
database_path
}
/mgnify/mgy_clusters_2018_12.fa"
"--pdb70_database_path"
"
${
database_path
}
/pdb70/pdb70"
"--uniclust30_database_path"
"
${
database_path
}
/uniclust30/uniclust30_2018_08/uniclust30_2018_08"
"--output_dir"
"out"
"--bfd_database_path"
"
${
database_path
}
/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt"
"--model_device"
"cuda:0"
"--jackhmmer_binary_path"
"/home/samdeluca/miniconda3/envs/openfold_venv/bin/jackhmmer"
"--hhblits_binary_path"
"/home/samdeluca/miniconda3/envs/openfold_venv/bin/hhblits"
"--hhsearch_binary_path"
"/home/samdeluca/miniconda3/envs/openfold_venv/bin/hhsearch"
"--kalign_binary_path"
"/home/samdeluca/miniconda3/envs/openfold_venv/bin/kalign"
"--openfold_checkpoint_path"
"/mnt/openfold_params/101-80999.ckpt,/mnt/openfold_params/116-84749.ckpt,/mnt/openfold_params/94-79249.ckpt"
)
python3 run_pretrained_openfold.py
${
base_arguments
[*]
}
tests/test_data/sample_feats.pickle.gz
deleted
100755 → 0
View file @
15a8c321
File deleted
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