schrodinger.application.livedesign.ld_export module

class schrodinger.application.livedesign.ld_export.ExportModel(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

ld_client: object

A parameter of the class.

ld_models: object

A parameter of the class.

entry_data: schrodinger.application.livedesign.entry_types.BaseEntryData

A parameter of the class.

export_text: str

A parameter of the class.

entry_type: object

A parameter of the class.

entry_type_description: str

A parameter of the class.

entry_type_name: str

A parameter of the class.

input_summary: str

A parameter of the class.

ld_destination: schrodinger.application.livedesign.export_models.LDDestination

A parameter of the class.

task_rl_map: object

A parameter of the class.

export_task: schrodinger.application.livedesign.export_tasks.MasterExportTask

A parameter of the class.

summary_model: schrodinger.application.livedesign.export_models.SummaryModel

A parameter of the class.

lr_widget_model: schrodinger.application.livedesign.live_report_widget.LiveReportModel

A parameter of the class.

mapping_model: schrodinger.application.livedesign.mapping_widgets.MaestroLDMappingModel

A parameter of the class.

ge_file_format: schrodinger.application.livedesign.export_tasks.FileFormat

A parameter of the class.

__init__(export_table_model_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableModel'>, *args, **kwargs)
initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

initConcrete()

Override to customize initialization of concrete params.

classmethod configureParam()

Synchronize parameters that should always have the same value.

entry_dataChanged

A pyqtSignal emitted by instances of the class.

entry_dataReplaced

A pyqtSignal emitted by instances of the class.

entry_typeChanged

A pyqtSignal emitted by instances of the class.

entry_typeReplaced

A pyqtSignal emitted by instances of the class.

entry_type_descriptionChanged

A pyqtSignal emitted by instances of the class.

entry_type_descriptionReplaced

A pyqtSignal emitted by instances of the class.

entry_type_nameChanged

A pyqtSignal emitted by instances of the class.

entry_type_nameReplaced

A pyqtSignal emitted by instances of the class.

export_taskChanged

A pyqtSignal emitted by instances of the class.

export_taskReplaced

A pyqtSignal emitted by instances of the class.

export_textChanged

A pyqtSignal emitted by instances of the class.

export_textReplaced

A pyqtSignal emitted by instances of the class.

ge_file_formatChanged

A pyqtSignal emitted by instances of the class.

ge_file_formatReplaced

A pyqtSignal emitted by instances of the class.

input_summaryChanged

A pyqtSignal emitted by instances of the class.

input_summaryReplaced

A pyqtSignal emitted by instances of the class.

ld_clientChanged

A pyqtSignal emitted by instances of the class.

ld_clientReplaced

A pyqtSignal emitted by instances of the class.

ld_destinationChanged

A pyqtSignal emitted by instances of the class.

ld_destinationReplaced

A pyqtSignal emitted by instances of the class.

ld_modelsChanged

A pyqtSignal emitted by instances of the class.

ld_modelsReplaced

A pyqtSignal emitted by instances of the class.

lr_widget_modelChanged

A pyqtSignal emitted by instances of the class.

lr_widget_modelReplaced

A pyqtSignal emitted by instances of the class.

mapping_modelChanged

A pyqtSignal emitted by instances of the class.

mapping_modelReplaced

A pyqtSignal emitted by instances of the class.

summary_modelChanged

A pyqtSignal emitted by instances of the class.

summary_modelReplaced

A pyqtSignal emitted by instances of the class.

task_rl_mapChanged

A pyqtSignal emitted by instances of the class.

task_rl_mapReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.livedesign.ld_export.LDExportPanelMixin

Bases: object

Mixin for LD Export GUI panels. Provides a standardized window title that includes a custom string and the host name.

Subclasses must:
  1. Inherit from mappers.MapperMixin

  2. Have a model that includes a export_models.LDDestination parameter

    called ld_destination

Variables

TITLE_BASE – the standard string to include at the beginning of the window’s title

TITLE_BASE = NotImplemented
defineMappings()
class schrodinger.application.livedesign.ld_export.AbstractExportPanel(*args, **kwargs)

Bases: schrodinger.application.livedesign.ld_export.LDExportPanelMixin, schrodinger.ui.qt.widgetmixins.panelmixins.TaskPanelMixin, schrodinger.ui.qt.appframework2.wizards.BaseWizardPanel

Variables

allow_add_live_reports (bool) – whether users should be presented with the option to create a new live report from this panel

model_class

alias of schrodinger.application.livedesign.ld_export.ExportModel

PANEL_TASKS = [<Descriptor:ExportModel.export_task>]
ui_module = <module 'schrodinger.application.livedesign.export_ui' from '/scr/buildbot/builds/core-suite-ci/core-suite-ci/build/internal/lib/python3.11/site-packages/schrodinger/application/livedesign/export_ui.py'>
EXPORT_TEXT = 'Map Maestro Properties to LiveDesign Properties'
TABLE_MODEL_CLASS

alias of schrodinger.application.livedesign.panel_components.ExportTableModel

TABLE_VIEW_CLASS

alias of schrodinger.application.livedesign.panel_components.ExportTableView

MAESTRO_LD_MAPPING_WIDGET_CLASS

alias of schrodinger.application.livedesign.mapping_widgets.MaestroLDMappingWidget

MAP_ERROR_MSG = 'Error: The selected mapping could not be successfully applied. One or more data rows in the export table may be incorrect.'
allow_add_live_reports = True
initSetOptions()

Suggested subclass use: set instance variables, excluding layouts and subwidgets. Also use here to (optionally) apply the legacy stylesheet spacing settings (PANEL-19101).

initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

initLayOut()

@overrides: widgetmixins.InitMixin

initSetDefaults()

Override mappers.MapperMixin to avoid resetting the entire model.

processPrevPanel(state)

Override this method to receive the settings from the previous panel and processes them appropriately.

Parameters

state (settings.PanelState) – the state from the previous panel

makeInitialModel()
setModel(model)

Sets the model object for the mapper. Disconnects the old model, if one is set, and connects the new model. Pass in None to have no model set.

Parameters

model – the model instance or None

defineMappings()

Override this in the subclass to define mappings. Should return a list of tuples [(<target>, <param>)]. Targets can be:

  1. a basic widget, like QLineEdit or QComboBox

  2. a custom object that inherits MapperMixin or TargetMixin

  3. a TargetSpec instance

  4. a slot

For common widgets, standard signals and getter/setter methods will be used, as defined in mappers._get_default_access_names().

For more fine-grained custom control, instantiate a TargetSpec object, which allows custom setters, getters, and signals to be specified.

Supplying a slot as the first element of the tuple is equivalent to providing TargetSpec(slot=my_slot).

Note that all target slots are triggered on setModel() as well as in response to the specified signal.

The param is an abstract param reference, e.g. MyModel.my_param.

Example:

def defineMappings(self):
    combo = self.style_combo
    return [(self.name_le, MyModel.name),
            (TargetSpec(combo,
                    getter=combo.currentText,
                    setter=combo.setCurrentText), MyModel.style),
            (self.coord_widget, MyModel.coord),
            (self._onASLTextChanged, MyModel.asl_text)]
getSignalsAndSlots(model)

Override this method to specify signal and slot pairs that need to be connected/disconnected whenever the model instance is switched using setModel. The model instance is provided as an argument so that instance-specific signals can be used, but any pairs of signals and slots may be returned from this method.

Returns

a list of 2-tuples where each tuple is a signal, slot pair

defineTaskPreprocessors(model)

Return a list of tuples containing a task and an associated preprocesor.

To include preprocessors, override this method in a subclass. Example:

def defineTaskPreprocessors(self, model):
    return [
        (model.search_task, self._validateSearchTerms),
        (model.email_task, self._compileAddresses)
    ]
Parameters

model (parameters.CompoundParam) – a model instance

Returns

a list of (task, method) tuples

Return type

list[tuple[tasks.AbstractTask, Callable]]

setDefaultCheckedItems(item_strs: List[str])

Specify which LD data items will be checked by default.

Parameters

item_strs – string representations of the desired checked data item. In most cases, this is the structure property name.

updateMaestroProperties()

Update the selection and state of the items that can be exported from this panel to LiveDesign.

updateEnabledExportableData()

Enable or disable exportable data items.

Should be overridden in subclasses.

setDownstreamWidgetsEnabled(enable)

Sets the state of the downstream widgets in the Export workflow

Parameters

enable (bool) – whether to enable the widgets

openSelectedExportMap(map_name)

Slot connected to selecting a mapping. Open the selected map and use the mappings to populate the export table. This method resets the property selection tree along with the export table.

openExportMap(map_file)

Open the map_file and use the mappings to populate the export table. This method resets the property selection tree along with the export table. This function is used in KNIME to restore the Properties table contents from a map.json file

Parameters

map_file (str) – Path to a json map file

setCheckedMaestroProperties(ld_data_list)

Assign a check state to the boxes in the data selection tree.

May be overridden in subclasses that require more complex behavior when changing the LD data tree state.

Parameters

ld_data_list (list[data_classes.LDData]) – check boxes associated with these LDData objects, and uncheck all other boxes

run(prev_panel_state=None)

Runs the panel. If the panel is being invoked by clicking “Next” on the previous panel, pass in the previous panel’s state so it can be processed.

Parameters

prev_panel_state (settings.PanelState or None) – the previous panel’s state

restorePanelSettings(prev_panel_state: schrodinger.ui.qt.appframework2.settings.PanelState | None = None)

Subclasses can reimplement this method to restore panel settings. Default implementation does nothing

Parameters

prev_panel_state – the previous panel’s state

savePanelSettings()

Subclasses can reimplement this method to save panel settings. Default implementation does nothing

setStatus(message, timeout=0, color=None)

Set the status bar text with optional timeout and text color.

Parameters
  • message (str) – the message to display

  • timeout (int) – time to show message in ms. If set to 0 (default) the message is not cleared.

  • color (QtGui.QColor) – text color for message. Default is black.