Commit 9db8dc36 authored by Jose Duarte's avatar Jose Duarte
Browse files

Adding output_cif as CLI argument

parent 4f662f83
...@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment