NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import StructureRepresentation from 'ngl/src/representation/structure-representation.js'
public interface | source

StructureRepresentation

Extends:

Representation → StructureRepresentation

Structure representation

Constructor Summary

Public Constructor
public

Create Structure representation object

Member Summary

Public Members
public
public
public get
public
public
public
public
public
public
public
Private Members
private
private

Method Summary

Public Methods
public

attach()

public

clear()

public

create()

public
public
public
public
public
public
public
public
public

init()

public

Set representation parameters

public

Set representation parameters

public

update()

public

Inherited Summary

From class Representation
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public

Counter that keeps track of tasks related to the creation of the representation, including surface calculations.

public
public
public
public
private
private
public

attach()

public

build()

public

clear()

public

create()

public
public
public
public
public

init()

public

make()

public
public

Set the visibility of the representation

public

setVisibility(value: Boolean, noRenderRequest: Boolean): Representation

Set the visibility of the representation

public

update()

public

Public Constructors

public constructor(structure: Structure, viewer: Viewer, params: StructureRepresentationParameters) source

Create Structure representation object

Override:

Representation#constructor

Params:

NameTypeAttributeDescription
structure Structure

the structure to be represented

viewer Viewer

a viewer object

params StructureRepresentationParameters

structure representation parameters

Public Members

public assembly source

public defaultAssembly source

public get defaultScale source

public needsBuild source

public parameters source

Override:

Representation#parameters

public radius source

public scale source

public structure: Structure source

public structureView: StructureView source

public type source

Override:

Representation#type

Private Members

private dataList: Array source

private selection: Selection source

Public Methods

public attach() source

Override:

Representation#attach

public clear() source

Override:

Representation#clear

public create() source

Override:

Representation#create

public createData() source

public dispose() source

Override:

Representation#dispose

public getAssembly() source

public getAtomParams() source

public getBondParams() source

public getColorParams() source

Override:

Representation#getColorParams

public getParameters() source

Override:

Representation#getParameters

public getQuality() source

public init() source

Override:

Representation#init

public setParameters(params: StructureRepresentationParameters, what: Object, rebuild: Boolean): StructureRepresentation source

Set representation parameters

Override:

Representation#setParameters

Params:

NameTypeAttributeDescription
params StructureRepresentationParameters

structure parameter object

what Object
  • optional

buffer data attributes to be updated, note that this needs to be implemented in the derived classes. Generally it allows more fine-grained control over updating than forcing a rebuild.

what.position Boolean

update position data

what.color Boolean

update color data

rebuild Boolean
  • optional

whether or not to rebuild the representation

Return:

StructureRepresentation

this object

public setSelection(string: String, silent: Boolean): StructureRepresentation source

Set representation parameters

Params:

NameTypeAttributeDescription
string String

selection string, see {@tutorial selection-language}

silent Boolean
  • optional

don't trigger a change event in the selection

Return:

StructureRepresentation

this object

public update() source

Override:

Representation#update

public updateData() source