Package schrodinger :: Package structutils :: Module color
[hide private]
[frames] | no frames]

Module color

An interface to the Maestro color palette and color schemes.

Color schemes are read from maestro-v<version>/data/res/scheme.res.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  Color
Represent a color as either an integer (colormap index), string (color name), or an RGB value (tuple/list of 3 ints, values 0-255).
  ColorScheme
Define a Maestro color scheme.
  ColorRamp
An object for calculating colors on a customizable color ramp.
Functions [hide private]
 
get_rgb_from_color_index(index)
A convenience function for getting the rgb value for a color index.
 
_load_scheme_dict()
Load the color scheme dictionary.
 
available_color_schemes()
Return a list of available color schemes (list of names).
 
get_color_scheme(name)
Return a ColorScheme object for scheme <name>.
 
apply_color_scheme(st, scheme, atom_list=None)
Applies the scheme to the specified Structure <st>.
 
_find_color_res_file()
 
_find_scheme_res_file()
Will raise RuntimeError if Maestro installation is missing
 
_parse_scheme_files(scheme_res_file)
 
_read_scheme_rules(filename, schemes_dir, color_asl_list, is_custom)
Read the scheme rules from filename and place them in the list variable color_asl_list
Variables [hide private]
  _initializer = Initializer([mm.mmcolor_initialize], [mm.mmcolo...
  _scheme_dict = None
hash(x)
  _scheme_name_dict = None
hash(x)
  MMSHARE_EXEC = '/scr/buildbot/savedbuilds/NB/2016-4/build-126/...
  __package__ = 'schrodinger.structutils'
Function Details [hide private]

get_rgb_from_color_index(index)

 

A convenience function for getting the rgb value for a color index.

Parameters:
  • index - an integer specifying the color index

_load_scheme_dict()

 

Load the color scheme dictionary. Raises RuntimeError if Maestro installation is missing. Raises IOError if scheme.res file could not be found

available_color_schemes()

 

Return a list of available color schemes (list of names). Raises RuntimeError if Maestro installation is not available. Raises IOError if scheme.res file could not be found

get_color_scheme(name)

 

Return a ColorScheme object for scheme <name>. Raises ValueError if such scheme does not exist. Raises RuntimeError if Maestro installation is not available. Raises IOError if scheme.res file could not be found

apply_color_scheme(st, scheme, atom_list=None)

 

Applies the scheme to the specified Structure <st>.
Optionally a list of atom indecies may be specified.

scheme
    One of the names returned by available_color_schemes() or a
    ColorScheme object returned by get_color_scheme().

atom_list
    A list of atom indices to apply color scheme to (default all atoms).

Raises ValueError if such scheme does not exist.
Raises RuntimeError if Maestro installation is not available.
Raises IOError if scheme.res file could not be found


Variables Details [hide private]

_initializer

Value:
Initializer([mm.mmcolor_initialize], [mm.mmcolor_terminate])

MMSHARE_EXEC

Value:
'/scr/buildbot/savedbuilds/NB/2016-4/build-126/mmshare-v3.6/bin/Linux-\
x86_64'