Benchmark Daemon
HADDOCK3 benchmark submission daemon.
For more information read our benchmark tutorial at docs/benchmark.tut in HADDOCK3 repository site: https://github.com/haddocking/haddock3:
(_) L|J
(") |
/_\--|
_/\ / |
_W_ |
Usage:
haddock3-dmn -h
haddock3-dmn <benchmark folder> --job-limit <num> [OPTIONS]
- class haddock.clis.cli_dmn.Job(job_f: Path, launch_command: str)[source]
Bases:
object
Job task.
Controls the status of each job.
- Parameters:
job_f (pathlib.Path) – The path to the job file.
launch_command (str) – The command to launch the job. For example sbatch.
- get_status() str | None [source]
Get job status.
The job status depends on the present of files: AVAILABLE, RUNNING, DONE, and FAIL created by haddock-bm jobs.
Status is assigned to self.status and returned.
- haddock.clis.cli_dmn.calc_size(job_path: Path) int [source]
Calculate the size of the job.
Expects the job file to be in a folder structure as defined by haddock3-bm.
The size of the jobs is defined by the number of carbon-alpha lines in the target.pdb file.
- haddock.clis.cli_dmn.cli(ap: ArgumentParser, main: Callable[[...], None]) None [source]
Command-line interface entry point.
- haddock.clis.cli_dmn.filter_by_status(job_list: list[Job], status: str = 'AVAILABLE') list[Job] [source]
Filter jobs by their status.
Only jobs with status are accepted.
- Parameters:
job_list (list of Job objects.)
- Returns:
list – The list with the Job`s with matching `status.
- haddock.clis.cli_dmn.get_current_jobs(grep: str = 'BM5') int [source]
Get current number of jobs for which job-name has the grep word.
List of jobs is retrieve using the command qstat.
- Parameters:
grep (str) – The string to search job-names for.
- Returns:
int – The number of jobs with the word grep in their name.
- haddock.clis.cli_dmn.load_args(ap: ArgumentParser) Namespace [source]
Load argument parser args.
- haddock.clis.cli_dmn.main(benchmark_path: Path, job_limit: int = 10, manager: str = 'slurm', restart: bool = False, sort_first: bool = False) None [source]
Execute the benchmark daemon.
The parameters defined here are the same as defined in the client arguments.
This is the main function of the client. If you want to run the daemon withOUT using the command line and instead importing its functionalities and setting it up from another pythong script, you should import this function.
>>> from haddock.clis.cli_dmn import main
- Parameters:
benchmark_path (pathlib.Path) – The path of the benchmark folder as created by the haddock3-bm interface.
job_limit (int) – The max number of jobs to send to the queue.
manager (str) – A key to the workload_manager_launch dictionary. Selects the queue management system.
restart (bool) – Whether to restart the RUNNING jobs that might have been halted in previous daemon runs. Defaults to False.
sort_first (bool) – Whether to sort jobs by their size in ascending manner. That is, the sorted jobs first. Defaults to False, the longer first.
- haddock.clis.cli_dmn.workload_manager_launch = {'slurm': 'sbatch', 'torque': 'qsub'}
options for the different job queue systems supported