Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PartialchargeColormaker

Color by partial charge. The AtomProxy.partialCharge property is used for coloring. The default domain is [-1, 1].

Name: partialCharge

example

stage.loadFile("rcsb://1crn").then(function (o) { o.addRepresentation("ball+stick", {colorScheme: "partialCharge"}); o.autoView(); });

Hierarchy

Index

Constructors

constructor

Properties

Optional atomProxy

atomProxy: AtomProxy

parameters

partialchargeScale

partialchargeScale: ColormakerScale

Methods

atomColor

atomColorToArray

  • atomColorToArray(atom: AtomProxy, array: NumberArray, offset: number): number[] | Uint8Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Float32Array | Uint8ClampedArray | Float64Array
  • safe a atom color to an array

    Parameters

    • atom: AtomProxy

      atom to get color for

    • array: NumberArray

      destination

    • offset: number

      index into the array

    Returns number[] | Uint8Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Float32Array | Uint8ClampedArray | Float64Array

    the destination array

bondColor

  • bondColor(bond: BondProxy, fromTo: boolean): number

bondColorToArray

  • bondColorToArray(bond: BondProxy, fromTo: boolean, array: NumberArray, offset: number): number[] | Uint8Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Float32Array | Uint8ClampedArray | Float64Array
  • safe a bond color to an array

    Parameters

    • bond: BondProxy

      bond to get color for

    • fromTo: boolean

      whether to use the first or second atom of the bond

    • array: NumberArray

      destination

    • offset: number

      index into the array

    Returns number[] | Uint8Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Float32Array | Uint8ClampedArray | Float64Array

    the destination array

colorToArray

  • colorToArray(color: number, array?: NumberArray, offset?: number): number[] | Uint8Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Float32Array | Uint8ClampedArray | Float64Array
  • safe a color to an array

    Parameters

    • color: number

      hex color value

    • Default value array: NumberArray = []

      destination

    • Default value offset: number = 0

      index into the array

    Returns number[] | Uint8Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Float32Array | Uint8ClampedArray | Float64Array

    the destination array

getScale

Optional positionColor

  • positionColor(position: Vector3): number

positionColorToArray

  • positionColorToArray(coords: Vector3, array: NumberArray, offset: number): number[] | Uint8Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Float32Array | Uint8ClampedArray | Float64Array
  • safe a color for coordinates in space to an array

    Parameters

    • coords: Vector3

      xyz coordinates

    • array: NumberArray

      destination

    • offset: number

      index into the array

    Returns number[] | Uint8Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Float32Array | Uint8ClampedArray | Float64Array

    the destination array

Optional volumeColor

  • volumeColor(index: number): number

volumeColorToArray

  • volumeColorToArray(index: number, array: NumberArray, offset: number): number[] | Uint8Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Float32Array | Uint8ClampedArray | Float64Array
  • safe a volume cell color to an array

    Parameters

    • index: number

      volume cell index

    • array: NumberArray

      destination

    • offset: number

      index into the array

    Returns number[] | Uint8Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Float32Array | Uint8ClampedArray | Float64Array

    the destination array

Generated using TypeDoc