schrodinger.application.livedesign.ld_export module

Classes used for LiveDesign export GUIs.

Copyright Schrödinger, LLC. All rights reserved.

class schrodinger.application.livedesign.ld_export.AbstractExportPanel(*args, **kwargs)

Bases: schrodinger.application.livedesign.ld_base_classes.ImportExportBasePanel

Abstract panel class for specifying how to export the data to LD.

Derived classes should define the following class variables: :cvar HELP_TOPIC: help topic string :vartype HELP_TOPIC: str

Variables:
EXPORT_TEXT = ''
HELP_TOPIC = ''
INVALID_MAP_NAME_MSG = 'Please enter a valid name for saving a new map.'
MAP_ERROR_MSG = 'Error: The selected mapping could not be successfully applied. One or more property rows in the export table may be incorrect.'
MAP_EXISTS_MSG = 'The following map name already exists: {0}\nPlease enter a new name.'
MAP_SELECT_TEXT = 'Select Map...'
SELECT_TEXT = ''
TABLE_MODEL_CLASS = None
TABLE_VIEW_CLASS

alias of ExportTableView

THREAD_RUNNER_CLASS

alias of ExportThreadRunner

TITLE_BASE = ''
addNewLiveReport(name)

Add a new Live Report to the current project.

Parameters:name (str) – the new generated live report name.
definePanelSettings()

See parent class for method documentation.

deleteExportMap()

Delete the currently selected “map”.

enableMappingWidgets(state=True)

Helper function to enable / disable all mapping widgets.

Parameters:state (bool) – whether to enable the widget
getExportData()
Returns:a list of data items scheduled for export
Return type:list(data_classes.ExportData)
getExportGlobal()

Returns whether to export globally.

getLRName()

Returns the name of a new live report.

initLayOut()

See parent class for method documentation.

initSetDefaults()
initSetOptions()
initSetUp()
onLiveReportSelected(lr_id)

Slot invoked when a Live Report is chosen from the combobox.

Parameters:lr_id (str) – id of current live report chosen in tree view.
onMissingFields(missing_fields)

If any required fields are missing when a user is trying to export sets table model to highlight the missing fields. Emits a signal to trigger an update of the missing fields background color.

onPropSelectChanged()

Called when Maestro project table properties selection is changed.

onShowColumns()

Slot invoked when ‘Show More’ or ‘Show Less’ button is clicked.

openExportMap()

Open the currently selected “map” and use the mappings to populate the export table. This method resets the property selection tree along with the export table.

processSettings(settings=None, runner=None)

See parent class for method documentation.

resetMapComboBox()

Reset the mappings combo box to include the placeholder text and the available mappings.

saveExportMap()

Save the current export table’s state as a “map”. All rows in the export table are saved except for the 3D data property as it is dependent on the setup criteria, and may not be set for all exports.

setExportData(export_data)
setExportGlobal(exp_global)

Sets whether to export globally

Parameters:exp_global (bool) – Export globally
setLRName(lr_name)

Sets the name of the new live report.

setLiveReportDefaults()

See superclass for docs

setupMappingWidgets()

Setup mapping widget connections and state. The widgets are initially hidden and disabled. Once a LD Project and LR are chosen, the widgets are enabled.

class schrodinger.application.livedesign.ld_export.AbstractExportSetupPanel(*args, **kwargs)

Bases: schrodinger.ui.qt.appframework2.wizards.BaseWizardPanel

A panel to process selected entries from Maestro or from file. Subclasses must define two class variables: TITLE_BASE and ENTRY_TYPES.

Variables:
ENTRY_TYPES = []
TITLE_BASE = ''
currentDataType()

Returns the current entry data type.

Returns:Entry data type.
Return type:maestro_data_types.BaseMaestroData
definePanelSettings()

See parent class for method documentation.

export_3d
getReceptorLigandMap()
Returns:a receptor-ligand map containing all structures specified for export to LiveDesign
Return type:data_classes.ReceptorLigandMap
initLayOut()
initSetDefaults()
initSetOptions()
initSetUp()
loadLDClient()

Loads the LDClient and models from the separate login panel.

onDataChanged()

Called when input data source is changed.

onEntryTypeChanged()

Function called when entry type is changed.

populateEntryTypes()

Populates entry types for the “Entry type” combobox.

processNext()

Called when “Next” is pressed.

run(prev_panel_state=None)

See parent class BaseWizardPanel for method documentation.

Resets the panel to default state before running.

class schrodinger.application.livedesign.ld_export.ExportMap(map_name, map_file_path, host=None, project=None, export_rows=None)

Bases: object

A wrapper for holding fields required for repopulating the export table.

readMapFile()

Read mappings file and set up

writeMapToFile()

Write the mapping as json to file with name ‘self.map_name’.

class schrodinger.application.livedesign.ld_export.ExportMapManager(host, proj_id)

Bases: object

Interface to manage Export Map files.

MAESTRO_EXPORT_MAP_DIR_PATH = '/home/buildbot/.schrodinger/maestro_export_mappings'
deleteMapping(map_name)

Delete the mapping under giving map_name from disk.

Parameters:map_name (str) – name of map to delete
getAvailableMappings()

Return a list of mappings available for use.

Returns:list of available mappings
Return type:list of str
getMapFilePath(map_name)

Given the map name, generate the file path.

Parameters:map_name (str) – name of map to generate file path for
Returns:file path to map on disk
Return type:str
openMapping(map_name)

Open and read the mapping under given map_name from disk.

Parameters:map_name (str) – name of map to retrieve
Returns:mapping of rows of the export table
Return type:[panel_components.ExportRow]
saveNewMapping(map_name, export_rows)

Save the given mapping to disk under given map_name.

Parameters:
exception schrodinger.application.livedesign.ld_export.ExportMapTypeError

Bases: exceptions.TypeError

The map’s type (specified by its host and project values) is inconsistent with the currently selected host and project, and therefore is of a different type.

class schrodinger.application.livedesign.ld_export.ExportThreadRunner(*args, **kwargs)

Bases: schrodinger.application.livedesign.ld_base_classes.ImportExportThreadRunner

Perform the actual export in a thread to not block Maestro.

checkFields()
missingFieldsDetected
preStart()
process_type = 'export'
reportAndReturnStatus(num_success, num_failure, live_report_url, result_urls, curr_name)

Pulling out the reporting code :param num_success: number of successfully uploaded compounds :param num_failure: number of unsuccessfully uploaded compounds :param live_report_url: the url of the live report :param result_urls: the urls of each upload task result :param curr_name: name of the task

runMain(task)

See tasks.BaseFunctionRunner for documentation.

updatePropNames(prop_dicts)

Edit the properties to accommodate renaming behavior in SD files; these expect the structure title to have a specific name.

Parameters:prop_dicts (list(OrderedDict(str, str))) – a list of dictionaries each specifying the mapping between a maestro and LD property.
schrodinger.application.livedesign.ld_export.create_live_report(ld_client, ld_models, title, project_name)