schrodinger.application.peptide_workflow.driver_utils module

Contains functions and variables associated with running PeptideWorkflow drivers from beam or JC. - Workflow config options - Input/Keyword parsing - Argument parsing - Splitting and creating files

class schrodinger.application.peptide_workflow.driver_utils.PeptideConfig(input_file: str, output_file: str, jobname: str, replicates_jobname: list[str])

Bases: object

Peptide dataclass to hold configuration information for the peptide subjob.

Variables:
  • input_file – Input file containing the peptide.

  • output_file – Output file name for the peptide poses.

  • jobname – Jobname for this peptide simulation.

  • replicates_jobname – List of replicate jobnames.

input_file: str
output_file: str
jobname: str
replicates_jobname: list[str]
__init__(input_file: str, output_file: str, jobname: str, replicates_jobname: list[str]) None
class schrodinger.application.peptide_workflow.driver_utils.PrintKeywordsAction(option_strings, dest, **k)

Bases: Action

Arparse action class that prints the input config list and exits as soon as the command-line option is processed.

__init__(option_strings, dest, **k)
schrodinger.application.peptide_workflow.driver_utils.parse_input_file(input_file)

Parse the input_file.in, validate the values against the spec

Parameters:

input_file (str) – input file with config options

Returns:

key, value pairs of input config specs

Return type:

InputConfig object

schrodinger.application.peptide_workflow.driver_utils.parse_glide_keywords(args)

Parse keywords in the [GLIDE_MINIMIZER_OPTIONS] section and log if any are being overriden or unusable by the peptide workflow. Defaults REWARD_INTRA_HBONDS keyword to true.

Parameters:

args (argparse.Namespace) – job settings

schrodinger.application.peptide_workflow.driver_utils.has_at_least_n_structures(file, nstruct)

Checks to see if the file has at least n structures.

Parameters:
  • file (str) – File path for structures.

  • nstruct (int) – Min number of structures the file should have.

Return type:

bool

Returns:

True if there are at least nstructs, false otherwise.

schrodinger.application.peptide_workflow.driver_utils.create_conformer_files_and_config(args)

Separate the input peptide file into single conformer files for subjobs. Creates a PeptideConfig for each subjob with its input file, shared output file, subjob name and its replicates. The replicates are taken from the set of conformers.

Examples:

If 5 conformers are available in the peptide file, but only 3 simulations are requested, the first 3 conformers will be used to run and the rest won’t be used. If 5 conformers are available but 10 simluations are requested, the algorithm will loop over all available conformers twice such that 2 replicates of each conformer will be run.

Parameters:

args (argparse.Namespace) – job settings

Return type:

List[PeptideConfig].

Returns:

A list of peptide info required to run each peptide subjob.

schrodinger.application.peptide_workflow.driver_utils.create_peptide_files_and_config(args)

Separate the input peptide file into single peptide files for subjobs. Creates a PeptideConfig for each subjob with its input file, output file, subjob name and its replicates.

Parameters:

args (argparse.Namespace) – job settings

Return type:

List[PeptideConfig].

Returns:

A list of peptide info required to run each peptide subjob.

schrodinger.application.peptide_workflow.driver_utils.split_peptide_file(args)

Split the peptide file into multiple input files if it contains more than 1 structure, and creates input and output names based on the peptide structure titles as well the jobname.

Parameters:

args (argparse.Namespace) – job settings

Return type:

List[PeptideConfig].

Returns:

A list of peptide info required to run each peptide subjob.

Raises:

RuntimeError – If using -are_conformers but the peptides are not conformers.

schrodinger.application.peptide_workflow.driver_utils.check_conformers(args)

Check if all the peptides are conformers.

Parameters:

args (argparse.Namespace) – job settings

Return type:

bool

Returns:

If the peptides are conformers

schrodinger.application.peptide_workflow.driver_utils.get_partial_parser(workflow_name, argv=None)

Create partial command-line argument parser. Contains arguments that are not passed on to the subjobs.

Parameters:
  • workflow_name (str) – name of the workflow

  • argv (list of str or NoneType) – argument list (optional, defaulting to sys.argv)

Returns:

parser

Return type:

argparse.ArgumentParser

schrodinger.application.peptide_workflow.driver_utils.parse_args(workflow_name, argv=None)

Parse the command-line arguments. Optionally parse an input file with the input config options.

Parameters:
  • workflow_name (str) – name of the workflow

  • argv (list of str or NoneType) – argument list (optional, defaulting to sys.argv)

Returns:

argument namespace

Return type:

argparse.Namespace