schrodinger.application.livedesign.export_controller module

class schrodinger.application.livedesign.export_controller.ExportType

Bases: enum.Enum

An enumeration.

SDF = 'SDF'
MAESTRO = 'MAESTRO'
CUSTOM = 'Custom'
schrodinger.application.livedesign.export_controller.ignore_cleanup_window(funct)

Decorator to temporarily disable the “Project cleanup in progress” window. This can decorate a class method or function.

class schrodinger.application.livedesign.export_controller.DataMapWriter(output_file_path)

Bases: object

Custom TSV mapping file writer.

__init__(output_file_path)
Parameters:output_file_path (str) – output file name with path
append(corporate_id, model_name, target_entry_id, ligand_entry_id)

Append a row to the TSV file.

Parameters:
  • corporate_id (str) – Compound corporate id, needed by LD
  • model_name (str) – the model name for 3D data
  • target_entry_id (str) – Entry id associated with the target structure. Required even for Ligands data type.
  • ligand_entry_id (str) – Entry id associated with the ligand structures.
close()

Close the file handle associated with the TSV writer.

class schrodinger.application.livedesign.export_controller.ExportController(maestro_data, export_data_list, match_existing_compounds_by=None)

Bases: object

A class to prepare data for export to LD.

__init__(maestro_data, export_data_list, match_existing_compounds_by=None)
Parameters:
  • maestro_data (maestro_data_types.BaseMaestroData) – Maestro data to export to LD
  • export_data_list (list(panel_components.ExportData)) – list of things to export to LiveDesign
  • match_existing_compounds_by (str) – property data name to copy over under the Corporate ID structure property so LD can match existing compounds by ID instead of structure.
exportBatched(batch_size=50)

Export data to LD in batches.

Parameters:batch_size (int) – Number of structures to export per batch
Returns:list of batched data for export
Return type:list(ExportBatch)
exportData(rl_map, export_3d)

Write the specified structures to an appropriate file type (.prjzip or .sdf) and produce other data (.tsv mapping file and SMARTS map) necessary for successful export. Return an ExportBatch object that contains this information.

Parameters:
  • rl_map (data_classes.ReceptorLigandMap) – the receptor-ligand map containing the strucutres to be exported
  • export_3d (bool) – whether to prepare and return 3D data for export
Returns:

all data necessary for exporting the supplied receptor-ligand map to LiveDesign

Return type:

ExportBatch

export_3d_requested
Returns:whether 3D export was requested
Return type:bool
addTemporaryProperties()

Context manager for temporarily adding a copy of the title and corporate ID (if requested) to the structures in the project table, so that they will be present in the created prjzip file (used for 3D exports).

createDataMapFile(rl_map)

Generate the map file for the provided receptor-ligand map, which is necessary for upload to LiveDesign. If applicable, also generate a dict that maps each ligand’s dummy corporate ID to the SMARTS string of its corresponding companion ligand. This is necessary for uploads that require the 3D column to show a structure different from the rest of the row.

The map file is a tab-delimited .tsv file with four columns, something like

Corporate ID Model Name Target Key Ligand Key d60c83da-6dd8-4c9b-a3d9-5c34ff985c40 x 4 5 85a4557e-6b86-4860-92a6-5d8b6e5f91e2 x 6 7 e39011d0-2878-41be-9601-c75f31f369b0 x 8 9

The corporate ID values will either be a dummy string which has no use or a UUID string which will be replaced during the export process. The model name is selected by the user in the GUI. The target and ligand keys are either dummy values (2D export) or the entry ID used to identify structures within the .prjzip file (3D export).

Parameters:rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
Returns:a 2-tuple containing the name of the data mapping file and a companion SMARTS dictionary (empty if not applicable to this system)
Return type:tuple(str, dict(str, str))
appendAdditionalViewInformation()

Adding view info. of the structures to a file, will be used in LD for displaying the structures.

createAdditionalViewInformation()

Creates additional view information for LD. The info. needs to be in the right order.

Returns:View info.
Return type:str
createPrjzip(**kwargs)

This is the actual functionality encapsulating the decorated method.

ensurePrjzipCreationComplete(proj_file_name)

Since the maestro command to create a project returns before the prjzip has been built, we need to wait for the file to be successfully finished.

Parameters:proj_file_name (str) – The project file to wait on.
class schrodinger.application.livedesign.export_controller.ExportBatch(data_file_path, map_file_path, export_type=None, companion_smarts_map=None)

Bases: object

Data class composed of all the data necessary to export a single batch to LiveDesign.

Variables:
  • data_file_path (str) – the path to the file containing structure data; this file should either be a .prjzip (3D data) or .sdf (non-3D data)
  • map_file_path – the path to the file containing the mapping data; this file should be a .tsv
  • export_type (ExportType) – the data type for this batch
  • companion_smarts_map (dict(str, str)) – used for ligand “alternative” structure export batches; a dictionary mapping the dummy corporate ID string for each alternate ligand to the SMARTS string of the companion ligand structure. Prior to upload, this data will be used to replace the dummy corporate ID with the actual corporate ID of the companion structures, allowing the alternate ligand structures to be uploaded as 3D data even if the ligand and alternate ligand do not have the same SMARTS representation.
Varype map_file_path:
 

str

__init__(data_file_path, map_file_path, export_type=None, companion_smarts_map=None)

Initialize self. See help(type(self)) for accurate signature.