schrodinger.application.livedesign.mapping_widgets module

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

Bases: schrodinger.models.parameters.CompoundParam

Maestro to LiveDesign mapping model.

Note

If a subclass of panel_components.ExportTableModel is used for maestro_properties then subclass the module and update the type hint to ensure the correct type is used when deserialize the model from json.

entry_data: schrodinger.application.livedesign.entry_types.BaseEntryData

A parameter of the class.

ld_destination: schrodinger.application.livedesign.export_models.LDDestination

A parameter of the class.

maestro_properties: List[schrodinger.application.livedesign.data_classes.LDData]

A parameter of the class.

selected_maestro_properties: List[schrodinger.application.livedesign.data_classes.LDData]

A parameter of the class.

export_table_model: schrodinger.application.livedesign.panel_components.ExportTableModel

A parameter of the class.

more_columns_visible: bool

A parameter of the class.

match_compounds_by: schrodinger.application.livedesign.export_models.MatchCompoundsBy

A parameter of the class.

match_prop_user_name: str

A parameter of the class.

match_prop_data_name: str

A parameter of the class.

publish_data: bool

A parameter of the class.

use_pose_name: bool

A parameter of the class.

pose_name_text: str

A parameter of the class.

pose_name_model: schrodinger.application.livedesign.export_models.PoseNameEditModel

A parameter of the class.

entity_registration_status: schrodinger.application.livedesign.export_models.EntityRegistrationStatus

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

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

isNewGenericEntity() bool

Check if the current entity data is a generic entity and needs to be registered in LiveDesign.

Returns

true if the entity is a new generic entity, false otherwise.

isGenericEntity() bool

Check if the current entity data is a generic entity.

Returns

true if the entity is a generic entity, false otherwise.

entity_registration_statusChanged

A pyqtSignal emitted by instances of the class.

entity_registration_statusReplaced

A pyqtSignal emitted by instances of the class.

entry_dataChanged

A pyqtSignal emitted by instances of the class.

entry_dataReplaced

A pyqtSignal emitted by instances of the class.

export_table_modelChanged

A pyqtSignal emitted by instances of the class.

export_table_modelReplaced

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.

maestro_propertiesChanged

A pyqtSignal emitted by instances of the class.

maestro_propertiesReplaced

A pyqtSignal emitted by instances of the class.

match_compounds_byChanged

A pyqtSignal emitted by instances of the class.

match_compounds_byReplaced

A pyqtSignal emitted by instances of the class.

match_prop_data_nameChanged

A pyqtSignal emitted by instances of the class.

match_prop_data_nameReplaced

A pyqtSignal emitted by instances of the class.

match_prop_user_nameChanged

A pyqtSignal emitted by instances of the class.

match_prop_user_nameReplaced

A pyqtSignal emitted by instances of the class.

more_columns_visibleChanged

A pyqtSignal emitted by instances of the class.

more_columns_visibleReplaced

A pyqtSignal emitted by instances of the class.

pose_name_modelChanged

A pyqtSignal emitted by instances of the class.

pose_name_modelReplaced

A pyqtSignal emitted by instances of the class.

pose_name_textChanged

A pyqtSignal emitted by instances of the class.

pose_name_textReplaced

A pyqtSignal emitted by instances of the class.

publish_dataChanged

A pyqtSignal emitted by instances of the class.

publish_dataReplaced

A pyqtSignal emitted by instances of the class.

selected_maestro_propertiesChanged

A pyqtSignal emitted by instances of the class.

selected_maestro_propertiesReplaced

A pyqtSignal emitted by instances of the class.

use_pose_nameChanged

A pyqtSignal emitted by instances of the class.

use_pose_nameReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.livedesign.mapping_widgets.MaestroLDMappingWidget(export_table_view_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableView'>, export_table_model_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableModel'>, *args, **kwargs)

Bases: schrodinger.models.mappers.MapperMixin, schrodinger.ui.qt.basewidgets.BaseWidget

Maestro to LiveDesign export widget which allows the user to select data to export and map the data to LiveDesign properties. Widget has a pop up to select exportable data, table to map exportable data to livedesign properties, matching compounds criteria, publishing setting and pose name specification.

Note

Widget reloads the LD assay endpoints only when the livereport id or name is changed to avoid the high cost network request. Calling code can force a reload via call to loadLDFolderTree.

ui_module = <module 'schrodinger.application.livedesign.maestro_ld_mapping_ui' from '/scr/buildbot/builds/core-suite-ci/core-suite-ci/build/internal/lib/python3.11/site-packages/schrodinger/application/livedesign/maestro_ld_mapping_ui.py'>
model_class

alias of schrodinger.application.livedesign.mapping_widgets.MaestroLDMappingModel

SHOW_POSE_PAGE = 0
HIDE_POSE_PAGE = 1
DISABLED_TEXTS = {'', '(not defined)'}
__init__(export_table_view_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableView'>, export_table_model_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableModel'>, *args, **kwargs)
initSetUp()

Creates widget from ui and stores it ui_widget.

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

initLayOut()

@overrides: widgetmixins.InitMixin

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

ensureValidity()

Ensure the panel is in a valid state.

getMaestroPropertiesPopUp()
loadLDFolderTree()

Gets assay names from LD and adds to the assay column tree model.

Note

It’s an expensive network call and so should be called only when absolutely necessary.

class schrodinger.application.livedesign.mapping_widgets.MappingMode

Bases: enum.Enum

Indicate whether the user is creating or editing mappings.

CREATE = 1
EDIT = 2
class schrodinger.application.livedesign.mapping_widgets.CreateOrEditMappingsModel(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

name: str

A parameter of the class.

mode: schrodinger.application.livedesign.mapping_widgets.MappingMode

A parameter of the class.

mapping_model: schrodinger.application.livedesign.mapping_widgets.MaestroLDMappingModel

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.

mapping_modelChanged

A pyqtSignal emitted by instances of the class.

mapping_modelReplaced

A pyqtSignal emitted by instances of the class.

modeChanged

A pyqtSignal emitted by instances of the class.

modeReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.livedesign.mapping_widgets.CreateOrEditMappingsDialog(*args, export_table_view_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableView'>, export_table_model_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableModel'>, **kwargs)

Bases: schrodinger.ui.qt.basewidgets.BaseOptionsDialog

Dialog to specify the mapping of the exportable Maestro data to LiveDesign data. User has the option to specify the mode as MappingMode.CREATE or MappingMode.EDIT which will be used to set the appropriate window title.

model_class

alias of schrodinger.application.livedesign.mapping_widgets.CreateOrEditMappingsModel

__init__(*args, export_table_view_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableView'>, export_table_model_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableModel'>, **kwargs)
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

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