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(): object & object

name

  • get name(): string

status

  • get status(): string

type

  • get type(): string

visible

  • get visible(): boolean

Methods

Protected _addRepresentation

  • Add a new representation to the component

    Parameters

    • type: string

      the name of the representation

    • object: any

      the object on which the representation should be based

    • params: any
    • Default value hidden: boolean = false

    Returns RepresentationElement

    the created representation wrapped into a representation element object

addAnnotation

addBufferRepresentation

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

addMeasurement

  • addMeasurement(atomList: number[]): void

addRepresentation

addTrajectory

autoView

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

dispose

  • dispose(): void

eachAnnotation

  • eachAnnotation(callback: function): void

eachRepresentation

  • eachRepresentation(callback: function): void

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(): object

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 rotation transform

    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

updateRepresentations

  • updateRepresentations(what: any): void

Generated using TypeDoc