Color

This library contains classes related to color management.

SAMSON API: The SBDColor Library

class samson.DataModel.Color.Color(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

This class describes a color.

SAMSON API: SBDColor

Overloaded function.

  1. __init__(self: samson.DataModel.Color.Color) -> None

Constructs a color (1.0, 1.0, 1.0, 1.0)

  1. __init__(self: samson.DataModel.Color.Color, red: float, green: float, blue: float, alpha: float=1.0) -> None

Constructs a color (red, green, blue, alpha). Arguments should be in the range [0.0, 1.0].

Args:

red (float): red component of RGB-color

green (float): green component of RGB-color

blue (float): blue component of RGB-color

alpha (float): alpha component (transparency)

  1. __init__(self: samson.DataModel.Color.Color, red: int, green: int, blue: int, alpha: int=255) -> None

Constructs a color (red, green, blue, alpha). Arguments should be in the range [0, 255].

Args:

red (int): red component of RGB-color

green (int): green component of RGB-color

blue (int): blue component of RGB-color

alpha (int): alpha component (transparency)

  1. __init__(self: samson.DataModel.Color.Color, c: samson.DataModel.Color.Color) -> None

Constructs a color based on another color c.

fromHSV(hue: float, saturation: float, value: float) → samson.DataModel.Color.Color

Converts HSV into Color

getColor(self: samson.DataModel.Color.Color) → List[float]

Stores the four components as a float array

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

alpha

alpha component

black = [0.000000, 0.000000, 0.000000, 1.000000]
blue = [0.000000, 0.000000, 1.000000, 1.000000]
cyan = [0.000000, 1.000000, 1.000000, 1.000000]
green = [0.000000, 1.000000, 0.000000, 1.000000]
isSerializable

Returns true when the class is serializable

magenta = [1.000000, 0.000000, 1.000000, 1.000000]
red = [1.000000, 0.000000, 0.000000, 1.000000]
white = [1.000000, 1.000000, 1.000000, 1.000000]
yellow = [1.000000, 1.000000, 0.000000, 1.000000]
class samson.DataModel.Color.ColorSchemeCPK(self: samson.DataModel.Color.ColorSchemeCPK) → None

Bases: samson.DataModel.DataGraph.ColorScheme

This class describes a CPK color scheme.

SAMSON API: SBDColorSchemeCPK

Constructs a CPK color scheme

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemeConstant(*args, **kwargs)

Bases: samson.DataModel.DataGraph.ColorScheme

This class describes a constant color scheme.

SAMSON API: SBDColorSchemeConstant

Overloaded function.

  1. __init__(self: samson.DataModel.Color.ColorSchemeConstant) -> None

Constructs a color (1.0, 1.0, 1.0, 1.0)

  1. __init__(self: samson.DataModel.Color.ColorSchemeConstant, red: float, green: float, blue: float, alpha: float=1.0) -> None

Constructs a color (red, green, blue, alpha). Arguments should be in the range [0.0, 1.0].

Args:

red (float): red component of RGB-color

green (float): green component of RGB-color

blue (float): blue component of RGB-color

alpha (float): alpha component (transparency)

  1. __init__(self: samson.DataModel.Color.ColorSchemeConstant, red: int, green: int, blue: int, alpha: int=255) -> None

Constructs a color (red, green, blue, alpha). Arguments should be in the range [0, 255].

Args:

red (int): red component of RGB-color

green (int): green component of RGB-color

blue (int): blue component of RGB-color

alpha (int): alpha component (transparency)

  1. __init__(self: samson.DataModel.Color.ColorSchemeConstant, c: samson.DataModel.Color.Color) -> None

Constructs a color based on another color c.

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerAttribute_ResidueType(self: samson.DataModel.Color.ColorSchemePerAttribute_ResidueType) → None

Bases: samson.DataModel.DataGraph.ColorScheme

This class describes a color scheme based on node attributes. Only for internal use.

SAMSON API: SBDColorSchemePerAttribute

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerAttribute_SecondaryStructureType(self: samson.DataModel.Color.ColorSchemePerAttribute_SecondaryStructureType) → None

Bases: samson.DataModel.DataGraph.ColorScheme

This class describes a color scheme based on node attributes. Only for internal use.

SAMSON API: SBDColorSchemePerAttribute

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerAttribute_dimensionless(self: samson.DataModel.Color.ColorSchemePerAttribute_dimensionless) → None

Bases: samson.DataModel.DataGraph.ColorScheme

This class describes a color scheme based on node attributes. Only for internal use.

SAMSON API: SBDColorSchemePerAttribute

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerAttribute_double(self: samson.DataModel.Color.ColorSchemePerAttribute_double) → None

Bases: samson.DataModel.DataGraph.ColorScheme

This class describes a color scheme based on node attributes. Only for internal use.

SAMSON API: SBDColorSchemePerAttribute

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerAttribute_float(self: samson.DataModel.Color.ColorSchemePerAttribute_float) → None

Bases: samson.DataModel.DataGraph.ColorScheme

This class describes a color scheme based on node attributes. Only for internal use.

SAMSON API: SBDColorSchemePerAttribute

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerAttribute_int(self: samson.DataModel.Color.ColorSchemePerAttribute_int) → None

Bases: samson.DataModel.DataGraph.ColorScheme

This class describes a color scheme based on node attributes. Only for internal use.

SAMSON API: SBDColorSchemePerAttribute

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerChainID(*args, **kwargs)

Bases: samson.DataModel.Color.ColorSchemePerAttribute_int

This class describes a color scheme based on chain id.

SAMSON API: SBDColorSchemePerChainID

Overloaded function.

  1. __init__(self: samson.DataModel.Color.ColorSchemePerChainID) -> None
  2. __init__(self: samson.DataModel.Color.ColorSchemePerChainID, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer) -> None

Constructs color scheme for nodeIndexer.

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerFormalCharge(*args, **kwargs)

Bases: samson.DataModel.Color.ColorSchemePerAttribute_int

This class describes a color scheme based on formal charge.

SAMSON API: SBDColorSchemePerFormalCharge

Overloaded function.

  1. __init__(self: samson.DataModel.Color.ColorSchemePerFormalCharge) -> None
  2. __init__(self: samson.DataModel.Color.ColorSchemePerFormalCharge, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer) -> None

Constructs color scheme for nodeIndexer.

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerOccupancy(*args, **kwargs)

Bases: samson.DataModel.Color.ColorSchemePerAttribute_dimensionless

This class describes a color scheme based on occupancy.

SAMSON API: SBDColorSchemePerOccupancy

Overloaded function.

  1. __init__(self: samson.DataModel.Color.ColorSchemePerOccupancy) -> None
  2. __init__(self: samson.DataModel.Color.ColorSchemePerOccupancy, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer) -> None

Constructs color scheme for nodeIndexer.

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerPartialCharge(*args, **kwargs)

Bases: samson.DataModel.Color.ColorSchemePerAttribute_float

This class describes a color scheme based on partial charge.

SAMSON API: SBDColorSchemePerPartialCharge

Overloaded function.

  1. __init__(self: samson.DataModel.Color.ColorSchemePerPartialCharge) -> None
  2. __init__(self: samson.DataModel.Color.ColorSchemePerPartialCharge, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer) -> None

Constructs color scheme for nodeIndexer.

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerResidueSequenceNumber(*args, **kwargs)

Bases: samson.DataModel.Color.ColorSchemePerAttribute_int

This class describes a color scheme based on residue sequence number.

SAMSON API: SBDColorSchemePerResidueSequenceNumber

Overloaded function.

  1. __init__(self: samson.DataModel.Color.ColorSchemePerResidueSequenceNumber) -> None
  2. __init__(self: samson.DataModel.Color.ColorSchemePerResidueSequenceNumber, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer) -> None

Constructs color scheme for nodeIndexer.

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerResidueType(*args, **kwargs)

Bases: samson.DataModel.Color.ColorSchemePerAttribute_ResidueType

This class describes a color scheme based on residue type.

SAMSON API: SBDColorSchemePerResidueType

Overloaded function.

  1. __init__(self: samson.DataModel.Color.ColorSchemePerResidueType) -> None
  2. __init__(self: samson.DataModel.Color.ColorSchemePerResidueType, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer) -> None

Constructs color scheme for nodeIndexer.

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerSecondaryStructureType(*args, **kwargs)

Bases: samson.DataModel.Color.ColorSchemePerAttribute_SecondaryStructureType

This class describes a color scheme based on secondary structure.

SAMSON API: SBDColorSchemePerSecondaryStructureType

Overloaded function.

  1. __init__(self: samson.DataModel.Color.ColorSchemePerSecondaryStructureType) -> None
  2. __init__(self: samson.DataModel.Color.ColorSchemePerSecondaryStructureType, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer) -> None

Constructs color scheme for nodeIndexer.

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable

class samson.DataModel.Color.ColorSchemePerTemperatureFactor(*args, **kwargs)

Bases: samson.DataModel.Color.ColorSchemePerAttribute_double

This class describes a color scheme based on temperature factor.

SAMSON API: SBDColorSchemePerTemperatureFactor

Overloaded function.

  1. __init__(self: samson.DataModel.Color.ColorSchemePerTemperatureFactor) -> None
  2. __init__(self: samson.DataModel.Color.ColorSchemePerTemperatureFactor, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer) -> None

Constructs color scheme for nodeIndexer.

getColor(self: samson.DataModel.DataGraph.ColorScheme, node: samson.DataModel.DataGraph.Node=None) → List[float]

Returns a color given a node

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

isSerializable

Returns true when the class is serializable