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)[source]¶
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)[source]¶
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, failed_ids, prop_keys, task)[source]¶
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
failed_ids (set) – Set of corporate IDs that failed a given task
prop_keys (list) – List of properties that will be written out to the output CSV file
task (str) – Name of the task/stage where the failed IDs come from
- 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)[source]¶
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