schrodinger.application.bioluminate.patch_utils.settings module¶
Classes for storing panel settings.
-
class
schrodinger.application.bioluminate.patch_utils.settings.
PatchSettings
¶ Bases:
object
Settings for all patch types (i.e. hydrophobic, positive, and negative).
Variables: EP (float) – A very small value (i.e. epsilon) used for floating point comparisons in sameSizeAndThreshold
.-
DEFAULT_TRANSPARENCY
= 15¶
-
EP
= 1e-07¶
-
color
(patch_type)¶ Get the color for the specified patch type
Parameters: patch_type ( PatchType
) – The patch type to get the color forReturns: The requested color as a tuple of integer (r, g, b) values Return type: tuple
-
fontColor
(patch_type)¶ Get the font color for the specified patch type. The font color will be either black or white, whichever is more readable against the current color setting for the specified patch type.
Parameters: patch_type ( PatchType
) – The patch type to get the font color forReturns: The font color as a tuple of integer (r, g, b) values Return type: tuple Note: The font color is calculated by determining the luma value of the patch color. If the luma is greater than 50% (i.e. closer to white than black), then a black font color is used. If the luma is less than 50% (i.e. closer to black than white), then a white font color is used. See http://24ways.org/2010/calculating-color-contrast/ and http://www.w3.org/TR/AERT#color-contrast for additional information.
-
sameSizeAndThreshold
(other)¶ Check to see if this object and
other
have the same patch size and patch threshold settings. Differences in color are ignored.Parameters: other ( PatchSettings
) – The object to compareReturns: True if these objects have the same size and threshold settings. False otherwise. Return type: bool
-
wsLabelColor
(patch_type)¶ Get the workspace label color for the specified patch type. The label color will be a darker version of the patch color. That way, the labels are readable against the protein surface.
Parameters: patch_type ( PatchType
) – The patch type to get the workspace label color forReturns: The color as a tuple of integer (r, g, b) values Return type: tuple
-
-
class
schrodinger.application.bioluminate.patch_utils.settings.
PatchType
(long_name, short_name, unit)¶ Bases:
enum.Enum
-
hydrophobic
= ('Hydrophobic', 'hyd', 'sLogP')¶
-
negative
= ('Negative', 'neg', 'eV')¶
-
positive
= ('Positive', 'pos', 'eV')¶
-
-
class
schrodinger.application.bioluminate.patch_utils.settings.
PatchTypeSettings
(size=10, threshold=None, color=None)¶ Bases:
object
Settings for a single patch type (i.e. hydrophobic, positive, or negative).