schrodinger.application.phase.packages.phase_screen_utils module

Module with common functionality for Phase screening backends.

Copyright Schrodinger LLC, All Rights Reserved.

schrodinger.application.phase.packages.phase_screen_utils.add_database_options(parser)

Adds database screening options to the provided parser and returns the argument group object that holds those options.

Parameters:parser (argparser.ArgumentParser) – Argument parser object
Returns:Argument group object
Return type:argparse._ArgumentGroup
schrodinger.application.phase.packages.phase_screen_utils.add_reporting_options(parser, sort_prop)

Adds reporting options to the provided parser and returns the argument group object that holds those options.

Parameters:
  • parser (argparser.ArgumentParser) – Argument parser object
  • sort_prop (str) – Sort property name to display in help message
Returns:

Argument group object

Return type:

argparse._ArgumentGroup

schrodinger.application.phase.packages.phase_screen_utils.combine_hit_files(hit_files_in, hit_file_out, max_hits=None, sort_prop=None)

Combines a list of hit files.

Parameters:
  • hit_files_in (list(str)) – Hit files to combine (Maestro format)
  • hit_file_out – Destination hit file (Maestro or SD format)
  • max_hits – Maximum number of sorted hits, or None if not sorting
Sort_prop:

CT-level property for decreasing sort, or None if not sorting

Type:

sort_prop: str

schrodinger.application.phase.packages.phase_screen_utils.get_max_hits(args)

Returns the maximum number of hits to keep.

Parameters:args (argparser.Namespace) – argparser.Namespace with command line options
Returns:Maximum number of hits
Return type:int
schrodinger.application.phase.packages.phase_screen_utils.get_subset_file(args)

Returns the name of the input subset file if -isub was specified on the the command line. The leading path to the subset file is not modified. Returns an empty string if -isub was not specified.

Parameters:args (argparse.Namespace) – Command line arguments
Returns:Subset file name or empty string
Return type:str
schrodinger.application.phase.packages.phase_screen_utils.run_glide_sort(hit_files, hit_file_out, max_hits, sort_prop)

Invokes glide_sort to sort subjob hit_files by decreasing group fitness.

Parameters:
  • hit_files (list(str)) – Subjob hit files in Maestro format
  • hit_file_out (str) – Output hit file (*.maegz)
  • max_hits (int) – Number of hits to keep
  • sort_prop (str) – CT-level property for decreasing sort
schrodinger.application.phase.packages.phase_screen_utils.validate_source_dbs(source_dbs)

Checks the validity of Phase databases to be screened. Existence is checked only if the current process is running under job control.

Parameters:source_dbs (list(str)) – Phase database names
Returns:tuple of validity and error message if not valid
Return type:bool, str
schrodinger.application.phase.packages.phase_screen_utils.validate_subset(args)

Checks for the existence of the input subset file, where we allow it to be missing at startup time only if it’s specified using an absolute path.

Parameters:args (argparser.Namespace) – argparser.Namespace with command line options
Returns:tuple of validity and error message if required file is missing
Return type:bool, str