libsubprocess: subprocess execution functions
Run subprocess jobs.
- class haddock.libs.libsubprocess.BaseJob(input_: Path, output: Path, executable: Path, *args: Any)[source]
Bases:
objectBase class for a subprocess job.
- class haddock.libs.libsubprocess.CNSJob(input_file: str | Path, output_file: str | Path | None = None, error_file: str | Path | None = None, envvars: dict[str, Any] | None = None, cns_exec: str | Path | None = None)[source]
Bases:
objectA CNS job script.
- run(compress_inp: bool = False, compress_out: bool = True, compress_seed: bool = False, compress_err: bool = True) bytes[source]
Run this CNS job script.
- Parameters:
compress_inp (bool) – Compress the
*.inpfile to ‘.gz’ after the run. Defaults toFalse.compress_out (bool) – Compress the
*.outfile to ‘.gz’ after the run. Defaults toTrue.compress_seed (bool) – Compress the
*.seedfile to ‘.gz’ after the run. Defaults toFalse.
- class haddock.libs.libsubprocess.Job(input_: Path, output: Path, executable: Path, *args: Any)[source]
Bases:
BaseJobInstantiate a standard job.
Runs with the following scheme:
$ cmd ARGS INPUT