schrodinger.application.livedesign.export_controller module¶
-
class
schrodinger.application.livedesign.export_controller.DataMapWriter(output_file_path)¶ Bases:
future.types.newobject.newobjectCustom TSV mapping file writer.
-
append(corporate_id, model_name, target_entry_id, ligand_entry_id)¶ Append a row to the TSV file.
Parameters:
-
close()¶ Close the file handle associated with the TSV writer.
-
-
class
schrodinger.application.livedesign.export_controller.ExportController(maestro_data, export_data_list)¶ Bases:
future.types.newobject.newobjectA class to prepare data for export to LD.
-
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
-
createDataMapFile(rl_map)¶ Generate the data mapping file for the provided receptor-ligand map TSV format. When exporting 3D Data, the mapping file will include entry IDs for the receptors. Otherwise, the receptor entry IDs are set to
None, as they are not included in 2D exports.Parameters: rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map Returns: name of the data mapping file Return type: str
-
createPrjzip(*args, **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.
-
exportBatched(batch_size=50)¶ Export data to LD in batches.
Parameters: batch_size (int) – Number of structures to export per batch
-
exportData(rl_map)¶ Export data to LD.
Returns: A tuple of pose file, mapping file and export type. Pose file will be either in prjzip (if doing 3d export) or sdf format. Return type: tuple
-
titleCopiesAdded(*args, **kwds)¶ Context manager for temporarily adding a copy of the title to the structures in the project table, so that they will be present in the created prjzip file (used for 3D exports).
-
-
schrodinger.application.livedesign.export_controller.convert_prj(input_prj, decrement=False)¶ Runs $SCHRODINGER/utilities/project_convert on a project. This can be used to convert a project to the current format, or if
decrementisTruethe project will be converted to the immediate previous version.Parameters: - input_prj (str) – The path to the project to convert
- decrement (bool) – Whether to decrement the project’s version
Returns: Path to the converted project
-
schrodinger.application.livedesign.export_controller.convert_prjzip(prjzip, decrement=False)¶ Runs $SCHRODINGER/utilities/project_convert on a zipped project. The project is then re-zipped with the same filename.
Parameters: - prjzip (str) – The path to the zipped project to be converted
- decrement (bool) – Whether to decrement the project’s version
-
schrodinger.application.livedesign.export_controller.extract_prjzip(prjzip)¶ Extracts a .prjzip or .prz.zip file to a temp dir. The project’s directory name is not altered.
Parameters: prjzip (str) – The path to the project to unzip Returns: Path to the unzipped project
-
schrodinger.application.livedesign.export_controller.get_new_file_name(prefix, extension)¶ Returns a unique filename with the given prefix and extension.
Parameters: Returns: a file name that begins with
prefix, ends withextension, and does not correspond to an existing fileReturn type:
-
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.
-
schrodinger.application.livedesign.export_controller.zip_dir(zipdir, output_file, split_path=True)¶ Recursively zips a directory, including the empty directories.
Parameters: