NGL@1.0.0-beta.7 Home Manual Reference Source Gallery

Typedef

Static Public Summary
public
public

Ball And Stick representation parameter object.

public

Buffer parameter object.

public

Colormaker parameter object.

public

Component parameter object.

public
public
public

Distance representation parameter object.

public

Dot representation parameter object.

public

Image parameter object.

public

Label representation parameter object.

public

Loader parameter object.

public

Measurement representation parameter object.

public

Molecular surface parameter object.

public
public

Orientation matrix, a 4x4 transformation matrix with rotation part used for scene rotation, scale part for scene camera distance and position part for scene translation

public

Picking data object.

public
public

Representation parameter object.

public

Slice representation parameter object.

public

Stage parameter object.

public
public
public

Structure extra data.

public

Structure header object.

public

Structure representation parameter object.

public

Surface representation parameter object.

public

Text buffer parameter object.

public

Trajectory component parameter object.

public
public

Trajectory parameter object.

public

Trajectory player parameter object.

public

Trajectory representation parameter object.

public
public

Strings to describe mouse events (including optional keyboard modifiers).

Static Public

public AngleRepresentationParameters: Object source

Properties:

NameTypeAttributeDescription
atomTriple String

list of triplets of selection strings or atom indices

vectorVisible Boolean

Indicate the 3 points for each angle by drawing lines 1-2-3

arcVisible Boolean

Show the arc outline for each angle

lineOpacity Number

opacity for the line part of the representation

linewidth Number

width for line part of representation

sectorVisible Boolean

Show the filled arc for each angle

public BallAndStickRepresentationParameters: Object source

Ball And Stick representation parameter object. Extends RepresentationParameters and StructureRepresentationParameters.

Properties:

NameTypeAttributeDescription
sphereDetail Integer

sphere quality (icosahedron subdivisions)

radialSegments Integer

cylinder quality (number of segments)

openEnded Boolean

capped or not

disableImpostor Boolean

disable use of raycasted impostors for rendering

aspectRatio Float

size difference between atom and bond radii

lineOnly Boolean

render only bonds, and only as lines

linewidth Integer

width of lines

cylinderOnly Boolean

render only bonds (no atoms)

multipleBond String

one off "off", "symmetric", "offset"

bondSpacing Float

spacing for multiple bond rendering

bondScale Float

scale/radius for multiple bond rendering

public BufferParameters: Object source

Buffer parameter object.

Properties:

NameTypeAttributeDescription
opaqueBack Boolean

render back-side opaque

dullInterior Boolean

render back-side with dull lighting

side String

which triangle sides to render, "front" front-side, "back" back-side, "double" front- and back-side

opacity Float

translucency: 1 is fully opaque, 0 is fully transparent

depthWrite Boolean

depth write

clipNear Integer

position of camera near/front clipping plane in percent of scene bounding box

flatShaded Boolean

render flat shaded

wireframe Boolean

render as wireframe

roughness Float

how rough the material is, between 0 and 1

metalness Float

how metallic the material is, between 0 and 1

diffuse Color

diffuse color for lighting

forceTransparent Boolean

force the material to allow transparency

matrix Matrix4

additional transformation matrix

disablePicking Boolean

disable picking

public ColormakerParameters: Object source

Colormaker parameter object.

Properties:

NameTypeAttributeDescription
scale String | Array
  • optional

color scale, either a string for a predefined scale or an array of colors to be used as the scale

mode String
  • optional

color mode, one of rgb, hsv, hsl, hsi, lab, hcl

colorDomain Integer[]
  • optional

scale value range

colorDomain.0 Integer

min value

colorDomain.1 Integer

max value

value Color | String | Integer
  • optional

color value

structure Structure
  • optional

structure object

volume Volume
  • optional

volume object

surface Surface
  • optional

surface object

public ComponentParameters: Object source

Component parameter object.

Properties:

NameTypeAttributeDescription
name String

component name

visible Boolean

component visibility

public ComponentSignals: Object source

Properties:

NameTypeAttributeDescription
representationAdded Signal<RepresentationComponent>

when a representation is added

representationRemoved Signal<RepresentationComponent>

when a representation is removed

matrixChanged Signal<Matrix4>

on matrix change

visibilityChanged Signal<Boolean>

on visibility change

statusChanged Signal<String>

on status change

nameChanged Signal<String>

on name change

disposed Signal

on dispose

Example:

component.signals.representationAdded.add(function (representationComponent) { ... });

public DihedralRepresentationParameters: Object source

Properties:

NameTypeAttributeDescription
atomQuad String

list of quadruplets of selection strings or atom indices

lineOpacity Number

Opacity for the line part of the representation

lineVisible Boolean

Display the line part of the representation

linewidth Number

width for line part of representation

planeVisible Boolean

Display the two planes corresponding to dihedral

sectorVisible Boolean

Display the filled arc for each angle

public DistanceRepresentationParameters: Object source

Distance representation parameter object.

Properties:

NameTypeAttributeDescription
labelUnit String

distance unit (e.g. "angstrom" or "nm"). If set, a distance symbol is appended to the label (i.e. 'nm' or '\u00C5'). In case of 'nm', the distance value is computed in nanometers instead of Angstroms.

atomPair Array[]

list of pairs of selection strings (see Selection) or pairs of atom indices. Using atom indices is much more when the representation is updated often, e.g. by changing the selection or the atom positions, as their are no selection strings to be evaluated.

radialSegments Integer

cylinder quality (number of segments)

disableImpostor Boolean

disable use of raycasted impostors for rendering

public DotRepresentationParameters: Object source

Dot representation parameter object. Extends RepresentationParameters

Properties:

NameTypeAttributeDescription
thresholdType String

Meaning of the threshold values. Either value for the literal value or sigma as a factor of the sigma of the data. For volume data only.

thresholdMin Number

Minimum value to be displayed. For volume data only.

thresholdMax Number

Maximum value to be displayed. For volume data only.

thresholdOut Number

Show only values falling outside of the treshold minumum and maximum. For volume data only.

public ImageParameters: Object source

Image parameter object.

Properties:

NameTypeAttributeDescription
trim Boolean

trim the image

factor Integer

scaling factor to apply to the viewer canvas

antialias Boolean

antialias the image

transparent Boolean

transparent image background

public LabelRepresentationParameters: Object source

Label representation parameter object. Extends RepresentationParameters and StructureRepresentationParameters.

Properties:

NameTypeAttributeDescription
clipNear Integer

position of camera near/front clipping plane in percent of scene bounding box

opacity Float

translucency: 1 is fully opaque, 0 is fully transparent

labelType String

type of the label, one of: "atomname", "atomindex", "occupancy", "bfactor", "serial", "element", "atom", "resname", "resno", "res", "text", "qualified". When set to "text", the labelText list is used.

labelText String[]

list of label strings, must set labelType to "text" to take effect

fontFamily String

font family, one of: "sans-serif", "monospace", "serif"

fontStyle String

font style, "normal" or "italic"

fontWeight String

font weight, "normal" or "bold"

sdf Boolean

use "signed distance field"-based rendering for sharper edges

xOffset Float

offset in x-direction

yOffset Float

offset in y-direction

zOffset Float

offset in z-direction (i.e. in camera direction)

attachment String

attachment of the label, one of: "bottom-left", "bottom-center", "bottom-right", "middle-left", "middle-center", "middle-right", "top-left", "top-center", "top-right"

showBorder Boolean

show border/outline

borderColor Color

color of the border/outline

borderWidth Float

width of the border/outline

showBackground Boolean

show background rectangle

backgroundColor Color

color of the background

backgroundMargin Float

width of the background

backgroundOpacity Float

opacity of the background

public LoaderParameters: Object source

Loader parameter object.

Properties:

NameTypeAttributeDescription
ext String

file extension, determines file type

compressed Boolean

flag data as compressed

binary Boolean

flag data as binary

name String

set data name

public MeasurementRepresentationParameters: Object source

Measurement representation parameter object.

Properties:

NameTypeAttributeDescription
labelSize Float

size of the distance label

labelColor Color

color of the distance label

labelVisible Boolean

visibility of the distance label

labelZOffset Float

offset in z-direction (i.e. in camera direction)

public MolecularSurfaceParameters: Object source

Molecular surface parameter object.

Properties:

NameTypeAttributeDescription
type String

"av" or "edt"

probeRadius Number

probe radius

scaleFactor Number

higher for better quality

smooth Integer

number of smoothing cycles to apply

name String

name for created surface

public MouseSignals: Object source

Properties:

NameTypeAttributeDescription
moved Signal<Integer, Integer>

on move: deltaX, deltaY

scrolled Signal<Number>

on scroll: delta

dragged Signal<Integer, Integer>

on drag: deltaX, deltaY

dropped Signal

on drop

clicked Signal

on click

hovered Signal

on hover

Example:

mouseObserver.signals.scrolled.add( function( delta ){ ... } );

public OrientationMatrix: Matrix4 source

Orientation matrix, a 4x4 transformation matrix with rotation part used for scene rotation, scale part for scene camera distance and position part for scene translation

public PickingData: Object source

Picking data object.

Properties:

NameTypeAttributeDescription
pid Number
  • optional

picking id

instance Object
  • optional

instance data

instance.id Integer

instance id

instance.name String | Integer

instance name

instance.matrix Matrix4

transformation matrix of the instance

picker Picker
  • optional

picker object

public RepresentationComponentSignals: Object source

Extends ComponentSignals

Properties:

NameTypeAttributeDescription
parametersChanged Signal<String>

on parameters change

public RepresentationParameters: Object source

Representation parameter object.

Properties:

NameTypeAttributeDescription
lazy Boolean
  • optional

only build & update the representation when visible otherwise defer changes until set visible again

clipNear Integer
  • optional

position of camera near/front clipping plane in percent of scene bounding box

clipRadius Integer
  • optional

radius of clipping sphere

clipCenter Vector3
  • optional

position of for spherical clipping

flatShaded Boolean
  • optional

render flat shaded

opacity Float
  • optional

translucency: 1 is fully opaque, 0 is fully transparent

depthWrite Boolean
  • optional

depth write

side String
  • optional

which triangle sides to render, "front" front-side, "back" back-side, "double" front- and back-side

wireframe Boolean
  • optional

render as wireframe

colorScheme String
  • optional

color scheme

colorScale String
  • optional

color scale, either a string for a predefined scale or an array of colors to be used as the scale

colorReverse Boolean
  • optional

reverse color scale

colorValue Color
  • optional

color value

colorDomain Integer[]
  • optional

scale value range

colorDomain.0 Integer

min value

colorDomain.1 Integer

max value

colorMode String
  • optional

color mode, one of rgb, hsv, hsl, hsi, lab, hcl

roughness Float
  • optional

how rough the material is, between 0 and 1

metalness Float
  • optional

how metallic the material is, between 0 and 1

diffuse Color
  • optional

diffuse color for lighting

disablePicking Boolean
  • optional

disable picking

public SliceRepresentationParameters: Object source

Slice representation parameter object. Extends RepresentationParameters

Properties:

NameTypeAttributeDescription
filter String

filter applied to map the volume data on the slice, one of "nearest", "linear", "cubic-bspline", "cubic-catmulrom", "cubic-mitchell".

positionType String

Meaning of the position value. Either "persent" od "coordinate".

position Number

position of the slice.

dimension String

one of "x", "y" or "z"

thresholdType String

Meaning of the threshold values. Either value for the literal value or sigma as a factor of the sigma of the data. For volume data only.

thresholdMin Number

Minimum value to be displayed. For volume data only.

thresholdMax Number

Maximum value to be displayed. For volume data only.

normalize Boolean

Flag indicating wheather to normalize the data in a slice when coloring.

public StageParameters: Object source

Stage parameter object.

Properties:

NameTypeAttributeDescription
backgroundColor Color

background color

sampleLevel Integer

sampling level for antialiasing, between -1 and 5; -1: no sampling, 0: only sampling when not moving

workerDefault Boolean

default value for useWorker parameter of representations

rotateSpeed Float

camera-controls rotation speed, between 0 and 10

zoomSpeed Float

camera-controls zoom speed, between 0 and 10

panSpeed Float

camera-controls pan speed, between 0 and 10

clipNear Integer

position of camera near/front clipping plane in percent of scene bounding box

clipFar Integer

position of camera far/back clipping plane in percent of scene bounding box

clipDist Float

camera clipping distance in Angstrom

fogNear Integer

position of the start of the fog effect in percent of scene bounding box

fogFar Integer

position where the fog is in full effect in percent of scene bounding box

cameraType String

type of camera, either 'persepective' or 'orthographic'

cameraFov Float

camera field of view in degree, between 15 and 120

lightColor Color

point light color

lightIntensity Float

point light intensity

ambientColor Color

ambient light color

ambientIntensity Float

ambient light intensity

hoverTimeout Integer

timeout for hovering

public StageSignals: Object source

Properties:

NameTypeAttributeDescription
parametersChanged Signal<StageParameters>

on parameters change

fullscreenChanged Signal<Boolean>

on fullscreen change

componentAdded Signal<Component>

when a component is added

componentRemoved Signal<Component>

when a component is removed

clicked Signal<PickingProxy|undefined>

on click

hovered Signal<PickingProxy|undefined>

on hover

Example:

stage.signals.componentAdded.add( function( component ){ ... } );

public StructureComponentSignals: Object source

Extends ComponentSignals

Properties:

NameTypeAttributeDescription
trajectoryAdded Signal<RepresentationComponent>

when a trajectory is added

trajectoryRemoved Signal<RepresentationComponent>

when a trajectory is removed

defaultAssemblyChanged Signal<String>

on default assembly change

Example:

component.signals.representationAdded.add( function( representationComponent ){ ... } );

public StructureExtraData: Object source

Structure extra data.

Properties:

NameTypeAttributeDescription
cif Object
  • optional

dictionary from cif parser

sdf Object[]
  • optional

associated data items from sdf parser, one per compound

public StructureHeader: Object source

Structure header object.

Properties:

NameTypeAttributeDescription
releaseDate String
  • optional

release data, YYYY-MM-DD

depositionDate String
  • optional

deposition data, YYYY-MM-DD

resolution Float
  • optional

experimental resolution

rFree Float
  • optional

r-free value

rWork Float
  • optional

r-work value

experimentalMethods String[]
  • optional

experimental methods

public StructureRepresentationParameters: Object source

Structure representation parameter object.

Properties:

NameTypeAttributeDescription
radiusType String

A list of possible sources of the radius used for rendering the representation. The radius can be based on the vdW radius, the covalent radius or the B-factor value of the corresponding atom. Additionally the radius can be based on the secondary structure. Alternatively, when set to size, the value from the radius parameter is used for all atoms.

radius Float

A number providing a fixed radius used for rendering the representation.

scale Float

A number that scales the value defined by the radius or the radiusType parameter.

assembly String

name of an assembly object. Included are the asymmetric unit (AU) corresponding to the coordinates given in the structure file, biological assemblies from PDB, mmCIF or MMTF files (BU1, BU2, ...), a filled (crystallographic) unitcell of a given space group (UNITCELL), a supercell consisting of a center unitcell and its 26 direct neighbors (SUPERCELL). Set to default to use the default asemmbly of the structure object.

public SurfaceRepresentationParameters: Object source

Surface representation parameter object. Extends RepresentationParameters

Properties:

NameTypeAttributeDescription
isolevelType String

Meaning of the isolevel value. Either value for the literal value or sigma as a factor of the sigma of the data. For volume data only.

isolevel Float

The value at which to create the isosurface. For volume data only.

smooth Integer

How many iterations of laplacian smoothing after surface triangulation. For volume data only.

background Boolean

Render the surface in the background, unlit.

opaqueBack Boolean

Render the back-faces (where normals point away from the camera) of the surface opaque, ignoring the transparency parameter.

boxSize Integer

Size of the box to triangulate volume data in. Set to zero to triangulate the whole volume. For volume data only.

useWorker Boolean

Weather or not to triangulate the volume asynchronously in a Web Worker. For volume data only.

wrap Boolean

Wrap volume data around the edges; use in conjuction with boxSize but not larger than the volume dimension. For volume data only.

public TextBufferParameters: Object source

Text buffer parameter object.

Properties:

NameTypeAttributeDescription
opacity Float

translucency: 1 is fully opaque, 0 is fully transparent

clipNear Integer

position of camera near/front clipping plane in percent of scene bounding box

labelType String

type of the label, one of: "atomname", "atomindex", "occupancy", "bfactor", "serial", "element", "atom", "resname", "resno", "res", "text", "qualified". When set to "text", the labelText list is used.

labelText String[]

list of label strings, must set labelType to "text" to take effect

fontFamily String

font family, one of: "sans-serif", "monospace", "serif"

fontStyle String

font style, "normal" or "italic"

fontWeight String

font weight, "normal" or "bold"

sdf Boolean

use "signed distance field"-based rendering for sharper edges

xOffset Float

offset in x-direction

yOffset Float

offset in y-direction

zOffset Float

offset in z-direction (i.e. in camera direction)

attachment String

attachment of the label, one of: "bottom-left", "bottom-center", "bottom-right", "middle-left", "middle-center", "middle-right", "top-left", "top-center", "top-right"

showBorder Boolean

show border/outline

borderColor Color

color of the border/outline

borderWidth Float

width of the border/outline

showBackground Boolean

show background rectangle

backgroundColor Color

color of the background

backgroundMargin Float

width of the background

backgroundOpacity Float

opacity of the background

public TrajectoryComponentParameters: Object source

Trajectory component parameter object.

Properties:

NameTypeAttributeDescription
name String

component name

initialFrame Integer

initial frame the trajectory is set to

defaultStep Integer

default step size to be used by trajectory players

defaultTimeout Integer

default timeout to be used by trajectory players

defaultInterpolateType String

one of "" (empty string), "linear" or "spline"

defaultInterpolateStep Integer

window size used for interpolation

defaultMode String

either "loop" or "once"

defaultDirection String

either "forward" or "backward"

public TrajectoryComponentSignals: Object source

Extends ComponentSignals

Properties:

NameTypeAttributeDescription
frameChanged Signal<RepresentationComponent>

on frame change

playerChanged Signal<RepresentationComponent>

on player change

countChanged Signal<Integer>

when frame count is available

parametersChanged Signal<TrajectoryComponentParameters>

on parameters change

Example:

component.signals.representationAdded.add( function( representationComponent ){ ... } );

public TrajectoryParameters: Object source

Trajectory parameter object.

Properties:

NameTypeAttributeDescription
deltaTime Number

timestep between frames in picoseconds

timeOffset Number

starting time of frames in picoseconds

sele String

to restrict atoms used for superposition

centerPbc Boolean

center on initial frame

removePeriodicity Boolean

move atoms into the origin box

remo Boolean

try fixing periodic boundary discontinuities

superpose Boolean

superpose on initial frame

public TrajectoryPlayerParameters: Object source

Trajectory player parameter object.

Properties:

NameTypeAttributeDescription
step Integer

how many frames to skip when playing

timeout Integer

how many milliseconds to wait between playing frames

start Integer

first frame to play

end Integer

last frame to play

interpolateType String

one of "" (empty string), "linear" or "spline"

interpolateStep Integer

window size used for interpolation

mode String

either "loop" or "once"

direction String

either "forward", "backward" or "bounce"

public TrajectoryRepresentationParameters: Object source

Trajectory representation parameter object.

Properties:

NameTypeAttributeDescription
drawLine Boolean

draw lines

drawCylinder Boolean

draw cylinders

drawPoint Boolean

draw points

drawSphere Boolean

draw sphere

linewidth Integer

line width

pointSize Integer

point size

sizeAttenuation Boolean

size attenuation

sort Boolean

sort flag for points

public TrajectorySignals: Object source

Properties:

NameTypeAttributeDescription
countChanged Signal<Integer>

when the frame count is changed

frameChanged Signal<Integer>

when the set frame is changed

playerChanged Signal<TrajectoryPlayer>

when the player is changed

Example:

trajectory.signals.frameChanged.add( function(i){ ... } );

public TriggerString: String source

Strings to describe mouse events (including optional keyboard modifiers). Must contain an event type: "scroll", "drag", "click", "doubleClick", "hover", "clickPick" or "hoverPick". Optionally contain one or more (seperated by plus signs) keyboard modifiers: "alt", "ctrl", "meta" or "shift". Can contain the mouse button performing the event: "left", "middle" or "right". The type, key and button parts must be seperated by dashes.

Example:

// triggered on scroll event (no key or button)
"scroll"
// triggered on scroll event while shift key is pressed
"scroll-shift"
// triggered on drag event with left mouse button
"drag-left"
// triggered on drag event with right mouse button
// while ctrl and shift keys are pressed
"drag-right-ctrl+shift"