Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StructureComponent

Component wrapping a Structure object

example

// get a structure component by loading a structure file into the stage stage.loadFile( "rcsb://4opj" ).then( function( structureComponent ){ structureComponent.addRepresentation( "cartoon" ); structureComponent.autoView(); } );

Hierarchy

Index

Constructors

constructor

Properties

angleRepresentation

angleRepresentation: RepresentationElement

annotationList

annotationList: Annotation[] = []

controls

dihedralRepresentation

dihedralRepresentation: RepresentationElement

distanceRepresentation

distanceRepresentation: RepresentationElement

Optional lastPick

lastPick: undefined | number

matrix

matrix: Matrix4 = new Matrix4()

measureRepresentations

measureRepresentations: RepresentationCollection

object

object: any

parameters

pickBuffer

pickBuffer: RingBuffer<number>

pickDict

pickDict: SimpleDict<number[], number[]>

position

position: Vector3 = new Vector3()

quaternion

quaternion: Quaternion = new Quaternion()

reprList

reprList: RepresentationElement[] = []

scale

scale: Vector3 = new Vector3(1, 1, 1)

selection

selection: Selection

signals

spacefillRepresentation

spacefillRepresentation: RepresentationElement

stage

stage: Stage

stage object the component belongs to

structure

structure: Structure

structureView

structureView: StructureView

trajList

trajList: TrajectoryElement[] = []

transform

transform: Matrix4 = new Matrix4()

uuid

uuid: string

viewer

viewer: Viewer

Accessors

defaultParameters

  • get defaultParameters(): { defaultAssembly: string; sele: string } & { name: string; status: string; visible: boolean }

name

  • get name(): string

status

  • get status(): string

type

  • get type(): string

visible

  • get visible(): boolean

Methods

Protected _addRepresentation

addAnnotation

addBufferRepresentation

  • addBufferRepresentation(buffer: any, params: any): any

addMeasurement

  • addMeasurement(atomList: number[]): void

addRepresentation

  • addRepresentation<K>(type: K, params?: Partial<StructureRepresentationParametersMap[K]> | { defaultAssembly: string }, hidden?: boolean): RepresentationElement

addTrajectory

autoView

  • autoView(duration?: undefined | number): any

dispose

  • dispose(): void

eachAnnotation

  • eachAnnotation(callback: (a: Annotation) => void): void

eachRepresentation

getBox

  • getBox(...args: any[]): Box3

getBoxUntransformed

  • getBoxUntransformed(sele: string): Box3

getCenter

  • getCenter(...args: any[]): Vector3

getCenterUntransformed

  • getCenterUntransformed(sele: string): Vector3

getMaxRepresentationRadius

  • getMaxRepresentationRadius(atomIndex: number): number

getZoom

  • getZoom(...args: any[]): number

hasRepresentation

Private initSelection

  • initSelection(sele: string): void

measureBuild

  • measureBuild(): void

measureClear

  • measureClear(): void

measureData

  • measureData(): { angle: number[][]; dihedral: number[][]; distance: number[][] }

measurePick

measureUpdate

  • measureUpdate(): void

rebuildRepresentations

  • rebuildRepresentations(): void

rebuildTrajectories

  • rebuildTrajectories(): void

removeAllAnnotations

  • removeAllAnnotations(): void

removeAllMeasurements

removeAllRepresentations

  • removeAllRepresentations(): void

removeAnnotation

removeMeasurement

  • removeMeasurement(atomList: number[]): void

removeRepresentation

removeTrajectory

setDefaultAssembly

  • setDefaultAssembly(value: string): this

setName

  • setName(value: string): this

setPosition

  • setPosition(p: [number, number, number] | Vector3): this
  • Set position transform

    example

    // translate by 25 angstrom along x axis component.setPosition([ 25, 0, 0 ]);

    Parameters

    • p: [number, number, number] | Vector3

      the coordinates

    Returns this

    this object

setRotation

  • setRotation(r: [number, number, number] | Euler | Quaternion): this
  • Set local rotation transform (for global rotation use setTransform)

    example

    // rotate by 2 degree radians on x axis component.setRotation( [ 2, 0, 0 ] );

    Parameters

    • r: [number, number, number] | Euler | Quaternion

      the rotation

    Returns this

    this object

setScale

  • setScale(s: number): this

setSelection

  • setSelection(string: string): this

setStatus

  • setStatus(value: string): this

setTransform

  • setTransform(m: Matrix4): this
  • Set general transform. Is applied before and in addition to the position, rotation and scale transformations

    example

    component.setTransform( matrix );

    Parameters

    • m: Matrix4

      the matrix

    Returns this

    this object

setVisibility

  • setVisibility(value: boolean): this

superpose

  • superpose(component: StructureComponent, align: boolean, sele1: string, sele2: string): this

updateMatrix

  • updateMatrix(): void

updateRepresentationMatrices

  • updateRepresentationMatrices(): void

updateRepresentations

  • updateRepresentations(what: any): void

Generated using TypeDoc