schrodinger.application.livedesign.import_controller module¶
- class schrodinger.application.livedesign.import_controller.ImportController(ld_client)[source]¶
Bases:
object
- importTabularData(lr_id, lr_col_ids)[source]¶
Import the tabular data from a Live Report given the live report id. This data will include identifiers for data in attachment columns, which can be imported with further calls to ImportController.
- Parameters
lr_id (str) – the live report id
lr_col_ids (
None
, orlist
ofint
) – ids of the desired columns from the live report. IfNone
, all column data will be downloaded.
- Returns
structures containing all the tabular data
- import3DColumns(lr_id, lr_columns, tabular_data_sts, lr_rows, callback=<function ImportController.<lambda>>)[source]¶
Downloads 3D data for any columns in
lr_columns
with a 3D value type, and creates new structures from the 3D data if there is any, copying properties corresponding to columns inlr_columns
fromtabular_data_sts
. Combines the 2D tabular data, which is always included as the first member of the resulting ordered dictionary. Then any 3D data columns are appended in order. The output is structured as an ordered dictionary with fields representing columns, including the 2D data. Each column consists of an ordered dictionary of {pose_id: ligand} mappings and an ordered dictionary of {protein: pose_id} mappings.- Parameters
lr_id (str) – The live report id
lr_columns ([ld_models.Column]) – the desired columns from the live report
tabular_data_sts ([structure.Structure]) – The tabular data imported from LiveDesign
lr_rows (
dict
) – a dictionary containing row information downloaded from the LiveDesign servercallback (callable) – a callback function that takes the name of the current column as its only argument, ie callback(str)
- Returns
An ordered dictionary by column name of pairs or ordered dictionaries containing the pose_id: ligand and protein: pose_id mappings.
- Return type
{str: ({int: structure.Structure}, {structure.Structure: int})}
- schrodinger.application.livedesign.import_controller.cache_entity_IDs(sts, ld_id_dict)[source]¶
Store the corporate ID (AKA the entity ID) as a structure property for each imported structure
- Parameters
sts (list(structure.Structure)) – List of structures to set properties for
ld_id_dict (Dict[Structure, str]) – Live Design structure to entity ID dictionary
- schrodinger.application.livedesign.import_controller.get_st_entity_id_map(ld_client, sts, lr_id)[source]¶
Generate a dictionary mapping each compound’s structure to its entity id for easier access.
For LD versions < 8.1: the primary LD ID is used as an entity ID
For LD versions >= 8.1: Every structure holds multiple LD IDs, out of which, one is the entity ID. We use the live report metadata to obtain the correct ID.
- Parameters
ld_client (LDClient) – LiveReport client
sts (structure.Structure) – structures to get map for
lr_id (str) – the live report id
- Returns
dictionary mapping structure to entitiy id
- Return type
dict(structure.Structure, str)