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
9db8dc36
Commit
9db8dc36
authored
Feb 20, 2023
by
Jose Duarte
Browse files
Adding output_cif as CLI argument
parent
4f662f83
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
20 deletions
+30
-20
run_pretrained_openfold.py
run_pretrained_openfold.py
+30
-20
No files found.
run_pretrained_openfold.py
View file @
9db8dc36
...
@@ -270,11 +270,17 @@ def main(args):
...
@@ -270,11 +270,17 @@ def main(args):
args
.
subtract_plddt
args
.
subtract_plddt
)
)
unrelaxed_file_suffix
=
"_unrelaxed.pdb"
if
args
.
cif_output
:
unrelaxed_file_suffix
=
"_unrelaxed.cif"
unrelaxed_output_path
=
os
.
path
.
join
(
unrelaxed_output_path
=
os
.
path
.
join
(
output_directory
,
f
'
{
output_name
}
_
unrelaxed
.pdb
'
output_directory
,
f
'
{
output_name
}
{
unrelaxed
_file_suffix
}
'
)
)
with
open
(
unrelaxed_output_path
,
'w'
)
as
fp
:
with
open
(
unrelaxed_output_path
,
'w'
)
as
fp
:
if
args
.
cif_output
:
fp
.
write
(
protein
.
to_modelcif
(
unrelaxed_protein
))
else
:
fp
.
write
(
protein
.
to_pdb
(
unrelaxed_protein
))
fp
.
write
(
protein
.
to_pdb
(
unrelaxed_protein
))
logger
.
info
(
f
"Output written to
{
unrelaxed_output_path
}
..."
)
logger
.
info
(
f
"Output written to
{
unrelaxed_output_path
}
..."
)
...
@@ -373,6 +379,10 @@ if __name__ == "__main__":
...
@@ -373,6 +379,10 @@ if __name__ == "__main__":
"--long_sequence_inference"
,
action
=
"store_true"
,
default
=
False
,
"--long_sequence_inference"
,
action
=
"store_true"
,
default
=
False
,
help
=
"""enable options to reduce memory usage at the cost of speed, helps longer sequences fit into GPU memory, see the README for details"""
help
=
"""enable options to reduce memory usage at the cost of speed, helps longer sequences fit into GPU memory, see the README for details"""
)
)
parser
.
add_argument
(
"--cif_output"
,
action
=
"store_true"
,
default
=
False
,
help
=
"Output predicted models in ModelCIF format instead of PDB format (default)"
)
add_data_args
(
parser
)
add_data_args
(
parser
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
...
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