schrodinger.application.livedesign.export_controller module

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.

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)

Bases: object

A class to prepare data for export to LD.

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()

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).

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
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.
schrodinger.application.livedesign.export_controller.zip_dir(zipdir, output_file, split_path=True)

Recursively zips a directory, including the empty directories.

Parameters:
  • zipdir (str) – The path to the directory to zip
  • output_file (str) – Output file to write zip to
  • split_path (bool) – Whether to write archive as abspath or relative to the zipdir
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.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 decrement is True the 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.get_new_file_name(prefix, extension)

Returns a unique filename with the given prefix and extension.

Parameters:
  • prefix (str) – the prefix for the desired file name
  • extension (str) – the extension for the desired file name
Returns:

a file name that begins with prefix, ends with extension, and does not correspond to an existing file

Return type:

str