NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import DistanceRepresentation from 'ngl/src/representation/distance-representation.js'
public class | source

DistanceRepresentation

Extends:

RepresentationStructureRepresentationMeasurementRepresentation → DistanceRepresentation

Distance representation

Constructor Summary

Public Constructor
public

Create Distance representation object

Member Summary

Public Members
public
public
public
public
public
public

Method Summary

Public Methods
public

create()

public
public
public

init()

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
From class StructureRepresentation
public get
public
public
public
public
public
public
public
public
public
private
private
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
From class MeasurementRepresentation
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public

n

public
public
public

init()

public
public
public

update()

public

Public Constructors

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

Create Distance representation object

Override:

MeasurementRepresentation#constructor

Params:

NameTypeAttributeDescription
structure Structure

the structure to be represented

viewer Viewer

a viewer object

params DistanceRepresentationParameters

distance representation parameters

Example:

stage.loadFile( "rcsb://1crn" ).then( function( o ){
    o.addRepresentation( "cartoon" );
    // either give selections (uses first selected atom) ...
    var atomPair = [ [ "1.CA", "4.CA" ], [ "7.CA", "13.CA" ] ];
    // or atom indices
    var atomPair = [ [ 8, 28 ], [ 173, 121 ] ];
    o.addRepresentation( "distance", { atomPair: atomPair } );
    stage.autoView();
} );

Public Members

public atomPair source

public cylinderBuffer source

public labelUnit source

public parameters source

Override:

MeasurementRepresentation#parameters

public textBuffer source

public type source

Override:

StructureRepresentation#type

Public Methods

public create() source

Override:

StructureRepresentation#create

public getBondData() source

public getDistanceData() source

public init() source

Override:

MeasurementRepresentation#init

public updateData() source

Override:

MeasurementRepresentation#updateData