Package schrodinger :: Package maestro :: Module markers :: Class _BaseMarker
[hide private]
[frames] | no frames]

Class _BaseMarker

object --+
         |
        _BaseMarker

Base class for the marker classes. This class cannot be instantiated directly.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
list
_getEntryAtomNumbers(self, atoms)
Retrieve entry ids and atom numbers by entry for a list of atoms
 
_createMarker(self)
Create a marker using the criteria currently set in instance variables
list
_getWorkspaceAtomNumbers(self)
Get the workspace atom numbers for the atoms described in self._atoms
 
hide(self)
Hide this marker.
 
show(self)
Show this marker.
 
setVisible(self, show)
If "show" is True, show the marker, otherwise hide it.
tuple
_colorToRgb(self, incolor)
Given a color of any accepted format, return an RGB tuple (range 0-1).
tuple or None
_altColorToRgb(self, alt_color)
Given a color of any accepted format, return an RGB tuple (range 0-1).
list
_getAltColor(self)
Get the alternate color.
 
setColor(self, marker_color)
Change the marker and icon color
 
setIcon(self, icon)
Change the marker icon
 
setText(self, text)
Change the marker text
 
setAltColor(self, alt_color)
Change the text color
 
setHighlight(self, highlight)
Change whether the marker is highlighted.
 
update(self)
Update the marker in response to the workspace contents changing.
dict
getSettings(self)
Get the current marker settings.
 
applySettings(self, settings)
Apply the specified marker settings

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
dict
defaultSettings(cls)
Get the default marker settings
Class Variables [hide private]
  SETTINGS_VARS = {"color", "icon", "text", "alt_color", "highli...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

_getEntryAtomNumbers(self, atoms)

 

Retrieve entry ids and atom numbers by entry for a list of atoms

Parameters:
Returns: list
A list of tuples, where each tuple contains the entry id and number-by-entry of a single atom.

_getWorkspaceAtomNumbers(self)

 

Get the workspace atom numbers for the atoms described in self._atoms

Returns: list
A list of atom numbers relative to the workspace structure
Raises:

_colorToRgb(self, incolor)

 

Given a color of any accepted format, return an RGB tuple (range 0-1). If None is specified, color white is returned.

Returns: tuple
Tuple of RGB values (range 0-1)

_altColorToRgb(self, alt_color)

 

Given a color of any accepted format, return an RGB tuple (range 0-1). If None is specified, None is returned.

Returns: tuple or None
Tuple of RGB values (range 0-1) or None if alt_color is None

_getAltColor(self)

 

Get the alternate color.

Returns: list
List of RGB values (range 0-1)

setColor(self, marker_color)

 

Change the marker and icon color

Parameters:
  • marker_color (tuple, str, int, or schrodinger.structutils.color) - The color of the marker. May be an RGB tuple, color name, color index, or schrodinger.structutils.color instance. If not given, white will be used.

setIcon(self, icon)

 

Change the marker icon

Parameters:
  • icon (int) - The icon to draw next to the marker. Should be one the Icons.* constants. If not given, no icon will be drawn.

setText(self, text)

 

Change the marker text

Parameters:
  • text (str) - The text to display next to the marker. If not given, no text will be displayed.

setAltColor(self, alt_color)

 

Change the text color

Parameters:
  • alt_color (tuple, str, int, or schrodinger.structutils.color) - The color of the text. May be an RGB tuple, color name, color index, or schrodinger.structutils.color instance. If not given, the marker color will be used.

setHighlight(self, highlight)

 

Change whether the marker is highlighted. A highlighted marker is indicated with thicker lines and is colored using alt_color instead of color.

Parameters:
  • highlight (bool) - Whether the marker should be highlighted.

update(self)

 

Update the marker in response to the workspace contents changing. If any marked atom is not in the workspace, the marker will be deleted.

getSettings(self)

 

Get the current marker settings.

Returns: dict
A dictionary of the marker settings. The keys of this dictionary will be SETTING_VARS.

applySettings(self, settings)

 

Apply the specified marker settings

Parameters:
  • settings (dict) - A dictionary of marker settings. The keys of this dictionary must appear in SETTINGS_VARS. Note that not all keys need to be specified.

defaultSettings(cls)
Class Method

 

Get the default marker settings

Returns: dict
A dictionary of marker settings. The keys of this dictionary will be SETTING_VARS.

Class Variable Details [hide private]

SETTINGS_VARS

Value:
{"color", "icon", "text", "alt_color", "highlight"}