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