Skip to content
Snippets Groups Projects
Commit 3aa8bdb1 authored by Bienchen's avatar Bienchen
Browse files

Add option --num-multimer-predictions-per-model

parent 6a14f8a0
Branches
Tags 4.0.2
No related merge requests found
Changes in Release 3.1.0
=================================================================================
* `run_af2` Python package:
* Add command line option `--num-multimer-predictions-per-model`
* Switch default value of option `--use-gpu-relax` to False
Changes in Release 3.0.0
=================================================================================
......
......@@ -128,7 +128,15 @@ def parse_af2_arguments(parser):
"--use-gpu-relax",
action="store_true",
help="Use GPU for relaxation (if GPU is enabled).",
default=True,
default=False,
)
af2_group.add_argument(
"--num-multimer-predictions-per-model",
type=int,
help="Number of models per prediction. Only applies with "
+ "--model-preset=multimer.",
metavar="<NUMBER>",
default=5,
)
af2_group.add_argument(
"--version",
......@@ -244,6 +252,16 @@ def parse_af2_arguments(parser):
flush=True,
)
# check that --use-gpu-relax is only enabled together with --use-gpu
if opts.use_gpu_relax and not opts.use_gpu:
print(
"WARNING: Enabling --use-gpu-relax on non-gpu compute nodes "
+ "will fail. You are seeing this warning since you enabled "
+ "--use-gpu-relax but not --use-gpu.",
file=sys.stderr,
flush=True,
)
if opts.singularity_image is not None:
if not os.path.exists(opts.singularity_image):
print(
......
......@@ -119,6 +119,7 @@ def _assemble_singularity_call( # pylint: disable=too-many-arguments
use_precomputed_msas,
no_run_relax,
use_gpu_relax,
num_multimer_predictions_per_model,
data_paths,
extra_arg_list,
):
......@@ -152,6 +153,8 @@ def _assemble_singularity_call( # pylint: disable=too-many-arguments
f"--max_template_date={max_template_date}",
f"--db_preset={db_preset}",
f"--model_preset={model_preset}",
"--num_multimer_predictions_per_model="
+ f"{num_multimer_predictions_per_model}",
"--logtostderr",
]
)
......@@ -207,7 +210,8 @@ def run_af2_singularity_image( # pylint: disable=too-many-arguments
model_preset="monomer",
use_precomputed_msas=False,
no_run_relax=False,
use_gpu_relax=True,
use_gpu_relax=False,
num_multimer_predictions_per_model=5,
af2_image_file=None,
# af2_image_dir="/export/soft/singularity-containers/alphafold",
af2_image_dir="/scicore/home/schwede/GROUP/alphafold_data/",
......@@ -280,6 +284,12 @@ def run_af2_singularity_image( # pylint: disable=too-many-arguments
:param use_gpu_relax: Run relaxation on GPU. Corresponds to the
use_gpu_relax parameter in AF2.
:type use_gpu_relax: :class:`bool`
:param num_multimer_predictions_per_model: In multimer mode, no. of
predictions per model.
Corresponds to the
num_multimer_predictions_per_model
parameter in AF2.
:type num_multimer_predictions_per_model: :class:`int`
:param af2_image_file: Declare a Singularity image to run the AF2 pipeline
from. If None, an image from af2_image_dir will be
used.
......@@ -410,6 +420,7 @@ def run_af2_singularity_image( # pylint: disable=too-many-arguments
use_precomputed_msas,
no_run_relax,
use_gpu_relax,
num_multimer_predictions_per_model,
data_paths,
extra_arg_list,
)
......@@ -481,6 +492,7 @@ def main():
opts.use_precomputed_msas,
opts.no_run_relax,
opts.use_gpu_relax,
opts.num_multimer_predictions_per_model,
opts.singularity_image,
extra_arg_list=extra_arg_list,
**data_paths,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment