schrodinger.application.livedesign.export_map_manager module

class schrodinger.application.livedesign.export_map_manager.ExportMap(map_name, map_file_path, host=None, proj_id=None, export_rows=None)

Bases: object

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

Variables

EXPORT_ROW_CLASS (panel_components.ExportRow) – class to use for the export table row objects

EXPORT_ROW_CLASS

alias of schrodinger.application.livedesign.panel_components.ExportRow

__init__(map_name, map_file_path, host=None, proj_id=None, export_rows=None)
Parameters
  • map_name (str) – name of map

  • map_file_path (str) – file path to map

  • host (str or None) – LD server - used to confirm the same conditions exist for a successful application of the map.

  • proj_id (str or None) – project ID used to confirm the same conditions exist for a successful application of the map.

  • export_rows ([panel_components.ExportRow] or None) – rows of the export table

writeMapToFile()

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

readMapFile()

Read mappings file and set up

classmethod getMappingModel(map_name, map_file_path) schrodinger.application.livedesign.mapping_widgets.MaestroLDMappingModel

See constructor for documentation.

class schrodinger.application.livedesign.export_map_manager.ExportMapManager

Bases: object

Interface to manage Export Map files.

MAESTRO_EXPORT_MAP_DIR_PATH = '/home/buildbot/.schrodinger/maestro_export_mappings'
__init__()

Creates the custom dir to store mappings, if it doesn’t already exist.

saveNewMapping(map_name, mapping_model)

Save the given mapping to disk under given map_name.

Parameters
openMapping(map_file)

Open and read the mapping from the map_file

Parameters

map_file (str) – Path to a map file

Returns

Maestro to LD mapping model

Return type

mapping_widgets.MaestroLDMappingModel

importMapping(src_fpath: str) Optional[str]

Import the given mapping file

Parameters

src_fpath – Path to the mapping file

Returns

Returns error message if invalid file else returns None

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. :return: list of available mappings :rtype: list of str

getAvailableMappingsByRecency()

Returns the most recent map files opened/created

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

class schrodinger.application.livedesign.export_map_manager.MappingsComboBox(*args, **kwargs)

Bases: schrodinger.ui.qt.standard_widgets.combo_boxes.ItalicsPlaceholderComboBox

Combobox to display the available mappings.

mappingSelected

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

__init__(*args, **kwargs)
setExportMapManager(export_map_manager: schrodinger.application.livedesign.export_map_manager.ExportMapManager)
reload()

Clear the existing mappings and reload the mappings while preserving the selection.

clearSelection()

Set current index to placeholder text.

class schrodinger.application.livedesign.export_map_manager.MappingManagerDialog(export_map_manager, 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.BaseDialog

Mapping manager dialog for creating, editing, deleting, importing and exporting mappings.

model_class

alias of schrodinger.application.livedesign.mapping_widgets.MaestroLDMappingModel

ui_module = <module 'schrodinger.application.livedesign.mappings_manager_ui' from '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/livedesign/mappings_manager_ui.py'>
INVALID_MAP_NAME_MSG = 'Please enter a valid name for saving a new map.'
MAP_EXISTS_MSG = 'The following map name already exists: {0}\nPlease enter a new name.'
DELETE_MAPPING_PREFKEY = 'export_delete_mapping_prefkey'
__init__(export_map_manager, export_table_view_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableView'>, export_table_model_class=<class 'schrodinger.application.livedesign.panel_components.ExportTableModel'>, *args, **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.

initSetDefaults()

@overrides: widgetmixins.InitMixin

show()

Override the show method to clear and previous value of self.accepted