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
ed252f75
Commit
ed252f75
authored
Jan 12, 2023
by
zhuww
Browse files
add add_data_args to inference and config relax
parent
694f8ba0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
5 deletions
+63
-5
openfold/np/relax/amber_minimize.py
openfold/np/relax/amber_minimize.py
+1
-1
openfold/utils/script_utils.py
openfold/utils/script_utils.py
+3
-3
run_pretrained_openfold.py
run_pretrained_openfold.py
+42
-1
run_pretrained_openfold.sh
run_pretrained_openfold.sh
+17
-0
No files found.
openfold/np/relax/amber_minimize.py
View file @
ed252f75
...
...
@@ -105,7 +105,7 @@ def _openmm_minimize(
_add_restraints
(
system
,
pdb
,
stiffness
,
restraint_set
,
exclude_residues
)
integrator
=
openmm
.
LangevinIntegrator
(
0
,
0.01
,
0.0
)
platform
=
openmm
.
Platform
.
getPlatformByName
(
"
CUDA
"
if
use_gpu
else
"CPU"
)
platform
=
openmm
.
Platform
.
getPlatformByName
(
"
HIP
"
if
use_gpu
else
"CPU"
)
simulation
=
openmm_app
.
Simulation
(
pdb
.
topology
,
system
,
integrator
,
platform
)
...
...
openfold/utils/script_utils.py
View file @
ed252f75
...
...
@@ -235,12 +235,12 @@ def relax_protein(config, model_device, unrelaxed_protein, output_directory, out
)
t
=
time
.
perf_counter
()
visible_devices
=
os
.
getenv
(
"
CUDA
_VISIBLE_DEVICES"
,
default
=
""
)
visible_devices
=
os
.
getenv
(
"
HIP
_VISIBLE_DEVICES"
,
default
=
""
)
if
"cuda"
in
model_device
:
device_no
=
model_device
.
split
(
":"
)[
-
1
]
os
.
environ
[
"
CUDA
_VISIBLE_DEVICES"
]
=
device_no
os
.
environ
[
"
HIP
_VISIBLE_DEVICES"
]
=
device_no
relaxed_pdb_str
,
_
,
_
=
amber_relaxer
.
process
(
prot
=
unrelaxed_protein
)
os
.
environ
[
"
CUDA
_VISIBLE_DEVICES"
]
=
visible_devices
os
.
environ
[
"
HIP
_VISIBLE_DEVICES"
]
=
visible_devices
relaxation_time
=
time
.
perf_counter
()
-
t
logger
.
info
(
f
"Relaxation time:
{
relaxation_time
}
"
)
...
...
run_pretrained_openfold.py
View file @
ed252f75
...
...
@@ -55,7 +55,48 @@ from openfold.utils.trace_utils import (
pad_feature_dict_seq
,
trace_model_
,
)
from
scripts.utils
import
add_data_args
from
datetime
import
date
# from scripts.utils import add_data_args
def
add_data_args
(
parser
:
argparse
.
ArgumentParser
):
parser
.
add_argument
(
'--uniref90_database_path'
,
type
=
str
,
default
=
None
,
)
parser
.
add_argument
(
'--mgnify_database_path'
,
type
=
str
,
default
=
None
,
)
parser
.
add_argument
(
'--pdb70_database_path'
,
type
=
str
,
default
=
None
,
)
parser
.
add_argument
(
'--uniclust30_database_path'
,
type
=
str
,
default
=
None
,
)
parser
.
add_argument
(
'--bfd_database_path'
,
type
=
str
,
default
=
None
,
)
parser
.
add_argument
(
'--jackhmmer_binary_path'
,
type
=
str
,
default
=
'/usr/bin/jackhmmer'
)
parser
.
add_argument
(
'--hhblits_binary_path'
,
type
=
str
,
default
=
'/usr/bin/hhblits'
)
parser
.
add_argument
(
'--hhsearch_binary_path'
,
type
=
str
,
default
=
'/usr/bin/hhsearch'
)
parser
.
add_argument
(
'--kalign_binary_path'
,
type
=
str
,
default
=
'/usr/bin/kalign'
)
parser
.
add_argument
(
'--max_template_date'
,
type
=
str
,
default
=
date
.
today
().
strftime
(
"%Y-%m-%d"
),
)
parser
.
add_argument
(
'--obsolete_pdbs_path'
,
type
=
str
,
default
=
None
)
parser
.
add_argument
(
'--release_dates_path'
,
type
=
str
,
default
=
None
)
TRACING_INTERVAL
=
50
...
...
run_pretrained_openfold.sh
0 → 100644
View file @
ed252f75
python3 run_pretrained_openfold.py
\
fasta
\
/data/pdb_mmcif/mmcif_files/
\
--uniref90_database_path
/data/uniref90/uniref90.fasta
\
--mgnify_database_path
/data/mgnify/mgy_clusters_2018_12.fa
\
--pdb70_database_path
/data/pdb70/pdb70
\
--uniclust30_database_path
/data/uniclust30/uniclust30_2018_08/uniclust30_2018_08
\
--output_dir
./
\
--bfd_database_path
/data/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt
\
--model_device
"cuda:0"
\
--jackhmmer_binary_path
`
which jackhmmer
`
\
--hhblits_binary_path
`
which hhblits
`
\
--hhsearch_binary_path
`
which hhsearch
`
\
--kalign_binary_path
`
which kalign
`
\
--config_preset
"model_1"
\
--jax_param_path
/data/params/params_model_1.npz
\
--use_precomputed_alignments
alignments/
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