schrodinger.application.desmond.starter.ui.cmdline module¶
Starter backbone
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.application.desmond.starter.ui.cmdline.Option(name, default, help, dest, other_kwargs)¶ Bases:
tuple-
name¶ Alias for field number 0
-
default¶ Alias for field number 1
-
help¶ Alias for field number 2
-
dest¶ Alias for field number 3
-
other_kwargs¶ Alias for field number 4
-
-
schrodinger.application.desmond.starter.ui.cmdline.define_options(parser: argparse.ArgumentParser, options: List[schrodinger.application.desmond.starter.ui.cmdline.Option])¶ Define the options on a specified parser.
Parameters: - parser – Add options to this parser.
- options – List of options in the format (name, default, help, destination).
-
schrodinger.application.desmond.starter.ui.cmdline.parse_options(usage: str, options: List[schrodinger.application.desmond.starter.ui.cmdline.Option], argv: List[str]) → Tuple[argparse.Namespace, Union[str, NoneType]]¶ Parse and return the parsed options.
Parameters: - usage – Usage to display if no arguments given.
- options – List of options in the format (name, default, help, destination).
- argv – List of input arguments.
Returns: Parsed options.
Raises: SystemExit – If no arguments given, show the usage and exit.
-
schrodinger.application.desmond.starter.ui.cmdline.get_parser(usage: str, options: List[schrodinger.application.desmond.starter.ui.cmdline.Option], add_help: bool = True) → argparse.ArgumentParser¶ Return a parser with the specified options.
Parameters: - usage – Usage to display if no arguments given.
- options – List of options in the format (name, default, help, destination).
- add_help – Whether to add help flag to the parser
Returns: Configured parser
-
schrodinger.application.desmond.starter.ui.cmdline.get_common_options() → List[schrodinger.application.desmond.starter.ui.cmdline.Option]¶ Return list of options common to all fep scripts.
Returns: List of options that are common to all fep scripts.
-
class
schrodinger.application.desmond.starter.ui.cmdline.BaseArgs(opt: argparse.Namespace, inp_file: str = None)¶ Bases:
objectBase class for arguments.
-
validate()¶ Validate the parameters for missing files.
Raises: SystemExit – For invalid parameters.
-
set_restart()¶ Set the RESTART flag if only the checkpoint is given.
-
generate_jobname()¶ If the JOBNAME was not set and not RESTART’ing, automatically generate a job name.
-