Shortcuts

Models

class mmic_cmd.models.CmdInput(*, command: List[str], infiles: List[str] = None, outfiles: List[str] = None, outfiles_track: List[str] = [], raise_err: bool = False, as_binary: List[str] = None, scratch_name: str = None, scratch_directory: str = None, scratch_suffix: str = None, scratch_messy: bool = False, scratch_exist_ok: bool = False, blocking_files: List[str] = None, timeout: int = None, interupt_after: int = None, environment: Dict[str, str] = None, shell: bool = False, exit_code: int = 0, config: TaskConfig = None)[source]

Input model for command-line execution.

Parameters
  • command (List[str]) – .

  • infiles (List[str], Optional) – Input files (abs paths) to be written in scratch dir. May be {}.

  • outfiles (List[str], Optional) – Output file name(s).

  • outfiles_track (List[str], Default: []) – Specifies which output files (by name) are tracked and not loaded in memory. The posix paths (instead of file contents) are returned instead in outfiles.

  • raise_err (bool, Default: False) – If set to True, a runtime exception is raised when stderr is not empty.

  • as_binary (List[str], Optional) – Keys of infiles or outfiles to be treated as bytes.

  • scratch_name (str, Optional) – Passed to temporary_directory.

  • scratch_directory (str, Optional) – Passed to temporary_directory.

  • scratch_suffix (str, Optional) – Passed to temporary_directory.

  • scratch_messy (bool, Default: False) – Passed to temporary_directory

  • scratch_exist_ok (bool, Default: False) – Passed to temporary_directory.

  • blocking_files (List[str], Optional) – Files which should stop execution if present beforehand.

  • timeout (int, Optional) – Stop the process after n seconds.

  • interupt_after (int, Optional) – Interupt the process (not hard kill) after n seconds.

  • environment (Dict[str], Optional) – The environment to run in.

  • shell (bool, Default: False) – Run command through the shell.

  • exit_code (int, Default: 0) – The exit code above which the process is considered failure.

  • config (, Optional) – Config class for executing tasks. See mmic.components.base.config.TaskConfig.

class mmic_cmd.models.CmdOutput(*, stdout: str, stderr: str = None, log: str = None, outfiles: Dict[str, Any] = None, proc: subprocess.Popen = None, scratch_directory: pathlib.PosixPath = None)[source]

Output model for commend-line execution.

Parameters
  • stdout (str) – Standard output.

  • stderr (str, Optional) – Standard error.

  • log (str, Optional) – Logging output.

  • outfiles (Dict[Any], Optional) – List of FileOutput objects. See the :class: mmelemental.models.FileOutput.

  • proc (Popen, Optional)

  • scratch_directory (PosixPath, Optional)


© Copyright 2021, MolSSI. Project structure based on the Computational Molecular Science Python Cookiecutter version 1.5.

Built with Sphinx using a theme provided by Read the Docs.