Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ElectrostaticColormaker

Color a surface by electrostatic charge. This is a highly approximate calculation! The partial charges are CHARMM with hydrogens added to heavy atoms and hydrogen positions generated for amides.

Name: electrostatic

example

stage.loadFile( "rcsb://3dqb" ).then( function( o ){ o.addRepresentation( "surface", { colorScheme: "electrostatic" } ); o.autoView(); } );

Hierarchy

Index

Constructors

constructor

Properties

atomProxy

atomProxy: AtomProxy

charges

charges: Float32Array

delta

delta: Vector3 = new Vector3()

hCharges

hCharges: number[] = []

hHash

hStore

hStore: object

Type declaration

  • count: number
  • x: Float32Array
  • y: Float32Array
  • z: Float32Array

hash

parameters

scale

Methods

Optional 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

positionColor

  • positionColor(v: 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