diff --git a/.gitignore b/.gitignore index 5f570dc..f22b40e 100644 --- a/.gitignore +++ b/.gitignore @@ -69,5 +69,6 @@ Snakemake #temp test out examples/CyclophilinD_data/abfe/ -examples/abfe_out* +examples/abfe_*out* +examples/output /src/abfe/_version.py diff --git a/environment_dev.yml b/environment_dev.yml new file mode 100644 index 0000000..c2a6888 --- /dev/null +++ b/environment_dev.yml @@ -0,0 +1,34 @@ +name: abfe +channels: + - bioconda + - openbiosim + - conda-forge + - defaults +dependencies: + - python>=3.8 + - pip + - conda-build + + - snakemake=7.8.5 + - tabulate=0.8.10 + + - gromacs>=2022.2 + + - matplotlib + - numpy=1.22.4 + - scipy=1.7.3 + - pandas + + - mdanalysis + - parmed + - pdbfixer + - biosimspace + - openff-toolkit + - openff-interchange + - black + + - pip: + - alchemlyb==2.0.0 + - pymbar==4.0.1 + - MDRestraintsGenerator + diff --git a/src/abfe_cli/ABFECalculator.py b/src/abfe_cli/ABFECalculator.py index a234e0f..f7e2616 100755 --- a/src/abfe_cli/ABFECalculator.py +++ b/src/abfe_cli/ABFECalculator.py @@ -36,20 +36,25 @@ def main(): sdf_paths = glob.glob(args.ligand_sdf_dir + "/*.sdf") - if (args.nosubmit): - if (args.nogpu): - cluster_config = json.load(open(f"{default_slurm_config_path}", "r")) - cluster_config["Snakemake_job"]["queue_job_options"]["cpus-per-task"] = int(args.number_of_parallel_receptor_jobs) - cluster_config["Sub_job"]["queue_job_options"]["cpus-per-task"] = int(args.number_of_cpus_per_ligand_job) - - else: - cluster_config = json.load(open(f"{default_slurm_config_path}", "r")) - cluster_config["Snakemake_job"]["queue_job_options"]["cpus-per-task"] = int(args.number_of_parallel_receptor_jobs) - cluster_config["Sub_job"]["queue_job_options"]["cpus-per-task"] = int(args.number_of_parallel_ligand_jobs) - cluster_config["Sub_job"]["queue_job_options"]["partition"] = "gpu" + if args.nogpu: + cluster_config = json.load(open(f"{default_slurm_config_path}", "r")) + cluster_config["Snakemake_job"]["queue_job_options"]["cpus-per-task"] = int( + args.number_of_parallel_receptor_jobs + ) + cluster_config["Sub_job"]["queue_job_options"]["cpus-per-task"] = int( + args.number_of_cpus_per_ligand_job + ) else: - cluster_config = None + cluster_config = json.load(open(f"{default_slurm_config_path}", "r")) + cluster_config["Snakemake_job"]["queue_job_options"]["cpus-per-task"] = int( + args.number_of_parallel_receptor_jobs + ) + cluster_config["Sub_job"]["queue_job_options"]["cpus-per-task"] = int( + args.number_of_parallel_ligand_jobs + ) + cluster_config["Sub_job"]["queue_job_options"]["partition"] = "gpu" + res = calculate_abfe(protein_pdb_path=args.protein_pdb_path, ligand_sdf_paths=sdf_paths, out_root_folder_path=args.output_dir_path, cofactor_sdf_path=args.cofactor_sdf_path, approach_name=args.project_name, diff --git a/src/abfe_cli/ABFECalculatorGmx.py b/src/abfe_cli/ABFECalculatorGmx.py index bb44c19..ceed980 100755 --- a/src/abfe_cli/ABFECalculatorGmx.py +++ b/src/abfe_cli/ABFECalculatorGmx.py @@ -33,19 +33,24 @@ def main(): args = parser.parse_args() - if args.nosubmit: - cluster_config = None + if args.nogpu: + cluster_config = json.load(open(f"{default_slurm_config_path}", "r")) + cluster_config["Snakemake_job"]["queue_job_options"]["cpus-per-task"] = int( + args.number_of_parallel_receptor_jobs + ) + cluster_config["Sub_job"]["queue_job_options"]["cpus-per-task"] = int( + args.number_of_parallel_ligand_jobs + ) + else: - if args.nogpu: - cluster_config = json.load(open(f"{default_slurm_config_path}", "r")) - cluster_config["Snakemake_job"]["queue_job_options"]["cpus-per-task"] = int(args.number_of_parallel_receptor_jobs) - cluster_config["Sub_job"]["queue_job_options"]["cpus-per-task"] = int(args.number_of_parallel_ligand_jobs) - - else: - cluster_config = json.load(open(f"{default_slurm_config_path}", "r")) - cluster_config["Snakemake_job"]["queue_job_options"]["cpus-per-task"] = int(args.number_of_parallel_receptor_jobs) - cluster_config["Sub_job"]["queue_job_options"]["cpus-per-task"] = int(args.number_of_parallel_ligand_jobs) - cluster_config["Sub_job"]["queue_job_options"]["partition"] = "gpu" + cluster_config = json.load(open(f"{default_slurm_config_path}", "r")) + cluster_config["Snakemake_job"]["queue_job_options"]["cpus-per-task"] = int( + args.number_of_parallel_receptor_jobs + ) + cluster_config["Sub_job"]["queue_job_options"]["cpus-per-task"] = int( + args.number_of_parallel_ligand_jobs + ) + cluster_config["Sub_job"]["queue_job_options"]["partition"] = "gpu" print(args.gmx_files_root_dir)