schrodinger.application.livedesign.mapping_widgets module¶
- class schrodinger.application.livedesign.mapping_widgets.MaestroLDMappingModel(*args, _param_type=<object object>, **kwargs)¶
Bases:
CompoundParamMaestro to LiveDesign mapping model.
Note
If a subclass of
panel_components.ExportTableModelis used formaestro_propertiesthen subclass the module and update the type hint to ensure the correct type is used when deserialize the model from json.- entry_data: BaseEntryData¶
A parameter of the class.
- ld_destination: LDDestination¶
A parameter of the class.
- export_table_model: ExportTableModel¶
A parameter of the class.
- more_columns_visible: bool¶
A parameter of the class.
- match_compounds_by: 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: PoseNameEditModel¶
A parameter of the class.
- entity_registration_status: 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, notcls.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
pyqtSignalemitted by instances of the class.
- entity_registration_statusReplaced¶
A
pyqtSignalemitted by instances of the class.
- entry_dataChanged¶
A
pyqtSignalemitted by instances of the class.
- entry_dataReplaced¶
A
pyqtSignalemitted by instances of the class.
- export_table_modelChanged¶
A
pyqtSignalemitted by instances of the class.
- export_table_modelReplaced¶
A
pyqtSignalemitted by instances of the class.
- ld_destinationChanged¶
A
pyqtSignalemitted by instances of the class.
- ld_destinationReplaced¶
A
pyqtSignalemitted by instances of the class.
- maestro_propertiesChanged¶
A
pyqtSignalemitted by instances of the class.
- maestro_propertiesReplaced¶
A
pyqtSignalemitted by instances of the class.
- match_compounds_byChanged¶
A
pyqtSignalemitted by instances of the class.
- match_compounds_byReplaced¶
A
pyqtSignalemitted by instances of the class.
- match_prop_data_nameChanged¶
A
pyqtSignalemitted by instances of the class.
- match_prop_data_nameReplaced¶
A
pyqtSignalemitted by instances of the class.
- match_prop_user_nameChanged¶
A
pyqtSignalemitted by instances of the class.
- match_prop_user_nameReplaced¶
A
pyqtSignalemitted by instances of the class.
- more_columns_visibleChanged¶
A
pyqtSignalemitted by instances of the class.
- more_columns_visibleReplaced¶
A
pyqtSignalemitted by instances of the class.
- pose_name_modelChanged¶
A
pyqtSignalemitted by instances of the class.
- pose_name_modelReplaced¶
A
pyqtSignalemitted by instances of the class.
- pose_name_textChanged¶
A
pyqtSignalemitted by instances of the class.
- pose_name_textReplaced¶
A
pyqtSignalemitted by instances of the class.
- publish_dataChanged¶
A
pyqtSignalemitted by instances of the class.
- publish_dataReplaced¶
A
pyqtSignalemitted by instances of the class.
- selected_maestro_propertiesChanged¶
A
pyqtSignalemitted by instances of the class.
- selected_maestro_propertiesReplaced¶
A
pyqtSignalemitted by instances of the class.
- use_pose_nameChanged¶
A
pyqtSignalemitted by instances of the class.
- use_pose_nameReplaced¶
A
pyqtSignalemitted 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:
MapperMixin,BaseWidgetMaestro 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/build/internal/lib/python3.11/site-packages/schrodinger/application/livedesign/maestro_ld_mapping_ui.py'>¶
- model_class¶
alias of
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
uiand stores itui_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:
a basic widget, like
QLineEditorQComboBoxa custom object that inherits
MapperMixinorTargetMixina
TargetSpecinstancea 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
TargetSpecobject, 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:
EnumIndicate 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:
CompoundParam- name: str¶
A parameter of the class.
- mode: MappingMode¶
A parameter of the class.
- mapping_model: 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
pyqtSignalemitted by instances of the class.
- mapping_modelReplaced¶
A
pyqtSignalemitted by instances of the class.
- modeChanged¶
A
pyqtSignalemitted by instances of the class.
- modeReplaced¶
A
pyqtSignalemitted by instances of the class.
- nameChanged¶
A
pyqtSignalemitted by instances of the class.
- nameReplaced¶
A
pyqtSignalemitted 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:
BaseOptionsDialogDialog to specify the mapping of the exportable Maestro data to LiveDesign data. User has the option to specify the mode as
MappingMode.CREATEorMappingMode.EDITwhich will be used to set the appropriate window title.- model_class¶
alias of
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
uiand stores itui_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:
a basic widget, like
QLineEditorQComboBoxa custom object that inherits
MapperMixinorTargetMixina
TargetSpecinstancea 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
TargetSpecobject, 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)]