Command Line Arguments

ehreact.arguments.py contains all command line arguments, which are processed using the Typed Argument Parser (Tap) package.

Common Arguments

class ehreact.arguments.CommonArgs(*args, underscores_to_dashes: bool = False, explicit_bool: bool = False, config_files: List[str | PathLike] | None = None, **kwargs)[source]

CommonArgs contains arguments that are used in both TrainArgs and PredictArgs.

Variables:
  • verbose (bool, default False) – Whether to print additional information.

  • quiet (bool, default False) – Whether to silence all output.

  • compute_aam (bool, default False) – Whether to compute atom-mappings for reactions.

process_args()[source]

Perform additional argument processing and/or validation.

Train Arguments

class ehreact.arguments.TrainArgs(*args, underscores_to_dashes: bool = False, explicit_bool: bool = False, config_files: List[str | PathLike] | None = None, **kwargs)[source]

TrainArgs includes CommonArgs along with additional arguments used for generating a template tree from a list of reaction smiles.

Variables:
  • data_path (str) – Path to data CSV file.

  • save_path (str, default None) – File to which diagram is saved.

  • save_plot (str, default None) – File to which save image of diagram.

  • train_mode (Literal["single_reactant", "transition_state"], default "transition_state") – Train mode, either transition states extracted from reaction smiles or single reactants extracted from smiles.

  • seed (List[str], default []) – List of SMILES seeds for the reactant algorithm, usually a single seed is given.

  • no_props (bool, default False) – Do not compute any properties, just output the diagram.

  • plot_only_branches (bool, default False) – Plot only substructures that branch off.

process_args()[source]

Perform additional argument processing and/or validation.

Predict Arguments

class ehreact.arguments.PredictArgs(*args, underscores_to_dashes: bool = False, explicit_bool: bool = False, config_files: List[str | PathLike] | None = None, **kwargs)[source]

PredictArgs includes CommonArgs along with additional arguments used for predicting reaction scores from a template tree and a list of reaction smiles.

Variables:
  • load_path (str) – File from which diagram is loaded.

  • test_path (str) – Path to CSV file containing testing data for which predictions will be made.

  • preds_path (str, default None) – Path to CSV file where predictions will be saved.

  • predict_mode (Literal["single_reactant", "multi_reactant", "transition_state"], default "transition_state") – Predict mode, either transition states (input reaction smiles, with train_mode=’transition_state’) or multiple reactants (input list of smiles, with train_mode=’transition_state’) or single reactants (input smiles, compatible with both train_modes).

  • hyper_params (str, default None) – File from which hyperparameters are loaded.

  • stereochemistry (bool, default False) – Whether to use stereochemistry for scoring.

process_args()[source]

Perform additional argument processing and/or validation.