NGL@0.10.4 Home Manual Reference Source GalleryRepository
import AxesRepresentation from 'ngl/src/representation/axes-representation.js'
public class | source

AxesRepresentation

Extends:

RepresentationStructureRepresentation → AxesRepresentation

Axes representation. Show principal axes and/or a box aligned with them that fits the structure or selection.

Name: axes

Example:

stage.loadFile( "rcsb://3pqr", {
    assembly: "BU1"
} ).then( function( o ){
    o.addRepresentation( "cartoon" );
    o.addRepresentation( "axes", {
        sele: "RET", showAxes: false, showBox: true, radius: 0.2
    } );
    o.addRepresentation( "ball+stick", { sele: "RET" } );
    o.addRepresentation( "axes", {
        sele: ":B and backbone", showAxes: false, showBox: true, radius: 0.2
    } );
    stage.autoView();
    var pa = o.structure.getPrincipalAxes();
    stage.animationControls.rotate( pa.getRotationQuaternion(), 1500 );
} );

Constructor Summary

Public Constructor
public

Inherited Summary

From class Representation
public

tasks: *

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

public

viewer: *

public

Set the visibility of the representation

public

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

Set the visibility of the representation

From class StructureRepresentation
public
public
public

Set representation parameters

public

Set representation parameters

Public Constructors

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

Create Structure representation object

Override:

StructureRepresentation#constructor

Params:

NameTypeAttributeDescription
structure Structure

the structure object

viewer Viewer

the viewer object

params StructureRepresentationParameters

parameters object