Package schrodinger :: Package application :: Package combiglide :: Module connection_storage
[hide private]
[frames] | no frames]

Module connection_storage

Classes [hide private]
  ConnectionStorage
This class is used to store the data of the current connection table.
Functions [hide private]
list
get_connection_color(i)
Return the appropriate color for the i-th connection
list
get_color_list(i)
Return a list of colors from 0 to i
list
get_flat_color_list(i)
Return a flat list of colors from 0 to i
 
extend_connection_colors(idx)
Make sure that connection_colors is at least as long as the requested length
list
gen_random_color()
Generate a new random color
 
reset_colors()
Reset the connection_colors list back to its original state.
Variables [hide private]
  ORIG_CONNECTION_COLORS = [[238, 162, 173], [191, 62, 255], [78...
  connection_colors = [[238, 162, 173], [191, 62, 255], [78, 238...
  __package__ = 'schrodinger.application.combiglide'
Function Details [hide private]

get_connection_color(i)

 

Return the appropriate color for the i-th connection

Parameters:
  • i (int) - The connection number to get colors for
Returns: list
The appropriate color, formatted as a list of three integers between 0 and 255

get_color_list(i)

 

Return a list of colors from 0 to i

Parameters:
  • i (int) - The connection number to get colors up to
Returns: list
A list of appropriate colors, where each color is formatted as a list of three integers between 0 and 255

get_flat_color_list(i)

 

Return a flat list of colors from 0 to i

Parameters:
  • i (int) - The connection number to get colors up to
Returns: list
A flat list of appropriate colors of length 3*i

extend_connection_colors(idx)

 

Make sure that connection_colors is at least as long as the requested length

Parameters:
  • i (int) - The desired length of connection_colors

gen_random_color()

 

Generate a new random color

Returns: list
A random color, formatted as a list of three integers between 0 and 255

reset_colors()

 

Reset the connection_colors list back to its original state. Intended for use in unit testing


Variables Details [hide private]

ORIG_CONNECTION_COLORS

Value:
[[238, 162, 173],
 [191, 62, 255],
 [78, 238, 148],
 [192, 192, 192],
 [72, 209, 204],
 [255, 193, 37],
 [197, 193, 170],
 [202, 225, 255],
...

connection_colors

Value:
[[238, 162, 173],
 [191, 62, 255],
 [78, 238, 148],
 [192, 192, 192],
 [72, 209, 204],
 [255, 193, 37],
 [197, 193, 170],
 [202, 225, 255],
...