schrodinger.application.livedesign.io_utils module

LiveDesign protocol io utils

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.application.livedesign.io_utils.get_structure_ids(infile)

Create a set of titles for all structures found in the input file

Parameters

infile (str) – Input SD file

Returns

Set containing all structure titles

Return type

set

schrodinger.application.livedesign.io_utils.apply_random_color(st)

Apply a random color scheme to the structure

Parameters

st (schrodinger.structure.Structure) – Structure to be colored

schrodinger.application.livedesign.io_utils.record_failures(results_list, header, failures)

Create a dictionary with empty values for the corporate ID that failed a stage in a LiveDesign protocol and updated the list that is passed in.

Parameters
  • results_list (list) – List of dictionaries where each dictionary contains the required data to write to the CSV file

  • header (dict_keys) – Header in the CSV file

  • failures (list) – List of list where each nested list contains a list of IDs that failed the task, and the task name

Returns

Update list of dictionaries where each dictionary contains the required data to write to the output CSV file

Return type

list

schrodinger.application.livedesign.io_utils.create_csv(results_list, csv_file)

Write a CSV file from a list of dictionaries. The output file name ‘results.csv’, is required by LiveDesign so the module-level constant will always be used

Parameters
  • results_list (list) – List of dictionaries where each dictionary contains the required data to write to the CSV file. Column headers will be take from the keys of the first dict

  • csv_file (str) – CSV filename

schrodinger.application.livedesign.io_utils.create_postmortem(job_ids: list[str]) list[str]

Run postmortem on for the given job_ids

Parameters

job_ids – List of job_control/jobserver job ids

Returns

List of postmortem file names

schrodinger.application.livedesign.io_utils.str_remove_suffix(s: str, suffix: str) str

Remove a suffix from a string

Parameters
  • s – String to remove the suffix from

  • suffix – Suffix to remove

Returns

String with suffix removed

schrodinger.application.livedesign.io_utils.license_check(required_licenses: list) None

Check the existance of all required licenses If any license is missing, process will exit

Parameters

required_licenses – List of license to check for