schrodinger.application.livedesign.export_map_manager module

exception schrodinger.application.livedesign.export_map_manager.ExportMapTypeError[source]

Bases: TypeError

Exception to raise when the panel attempts to load a map that has host and project values that do not match those of the panel.

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

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

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)[source]
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()[source]

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

readMapFile()[source]

Read mappings file and set up

class schrodinger.application.livedesign.export_map_manager.ExportMapManager(host, proj_id)[source]

Bases: object

Interface to manage Export Map files.

Variables

EXPORT_MAP_CLASS (ExportMap) – the class to use for mapping export rows

EXPORT_MAP_CLASS

alias of ExportMap

MAESTRO_EXPORT_MAP_DIR_PATH = '/home/buildbot/.schrodinger/maestro_export_mappings'
__init__(host, proj_id)[source]

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

Parameters
  • host (str) – LD server being used to export to.

  • proj_id (str) – LD project to export to.

saveNewMapping(map_name, export_rows)[source]

Save the given mapping to disk under given map_name.

Parameters
  • map_name (str) – name to save the new map under

  • export_rows ([panel_components.ExportRow]) – of the export table used to generate the map

openMapping(map_file)[source]

Open and read the mapping from the map_file

Parameters

map_file (str) – Path to a map file

Returns

mapping of rows of the export table

Return type

[panel_components.ExportRow]

deleteMapping(map_name)[source]

Delete the mapping under giving map_name from disk.

Parameters

map_name (str) – name of map to delete

getAvailableMappings()[source]

Return a list of mappings available for use. :return: list of available mappings :rtype: list of str

getMapFilePath(map_name)[source]

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