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

Trajectory

Base class for trajectories, tying structures and coordinates together

Constructor Summary

Public Constructor
public

constructor(trajPath: String | Frames, structure: Structure, params: TrajectoryParameters)

Member Summary

Public Members
public
public
public
public
public
public
public get

Currently set frame of the trajectory

public
public
public
public get

Number of frames in the trajectory

public
public
public
public
public
public
public
public
public

selection to restrict atoms used for superposition

public
public

Events emitted by the trajectory

public
public
public
public
public
Private Members
private
private
private

Method Summary

Public Methods
public

Dispose of the trajectory object

public

Get time for frame

public

getPath(index: Integer, callback: Function): undefined

Get path of atom abstract

public

Check if a frame is available

public

loadFrame(i: Integer | Integer[], callback: Function)

Load frame index

public

setFrame(i: Integer, callback: Function)

Set trajectory to a frame index

public

setFrameInterpolated(i: Integer, ip: Integer, ipp: Integer, ippp: Integer, t: Number, type: String, callback: Function)

Interpolated and set trajectory to frame indices

public
public

Set player for this trajectory

public
public
Private Methods
private
private
private

_init()

private
private abstract

_loadFrame(i: Integer, callback: Function)

Load frame index

private
private
private
private
private
private
private
private

Public Constructors

public constructor(trajPath: String | Frames, structure: Structure, params: TrajectoryParameters) source

Params:

NameTypeAttributeDescription
trajPath String | Frames

trajectory source

structure Structure

the structure object

params TrajectoryParameters

trajectory parameters

Public Members

public atomCount source

public backboneIndices source

public boxCache source

public centerPbc source

public coords1 source

public coords2 source

public get currentFrame: Number source

Currently set frame of the trajectory

Return:

Number

frame

public deltaTime source

public frameCache source

public frameCacheSize source

public get frameCount: Number source

Number of frames in the trajectory

Return:

Number

count

public inProgress source

public initialCoords source

public loadQueue source

public name source

public pathCache source

public player source

public removePbc source

public removePeriodicity source

public selection: Selection source

selection to restrict atoms used for superposition

public selectionIndices source

public signals: TrajectorySignals source

Events emitted by the trajectory

public structure source

public structureCoords source

public superpose source

public timeOffset source

public trajPath source

Private Members

private _currentFrame source

private _disposed source

private _frameCount source

Public Methods

public dispose(): undefined source

Dispose of the trajectory object

Return:

undefined

public getFrameTime(i: Integer): Number source

Get time for frame

Params:

NameTypeAttributeDescription
i Integer

frame index

Return:

Number

time in picoseconds

public getPath(index: Integer, callback: Function): undefined source

Get path of atom abstract

Params:

NameTypeAttributeDescription
index Integer

atom index

callback Function

fired when the path is available

Return:

undefined

public hasFrame(i: Integer | Integer[]): Boolean source

Check if a frame is available

Params:

NameTypeAttributeDescription
i Integer | Integer[]

the frame index

Return:

Boolean

frame availability

public loadFrame(i: Integer | Integer[], callback: Function) source

Load frame index

Params:

NameTypeAttributeDescription
i Integer | Integer[]

the frame index

callback Function

fired when the frame has been loaded

public setFrame(i: Integer, callback: Function) source

Set trajectory to a frame index

Params:

NameTypeAttributeDescription
i Integer

the frame index

callback Function

fired when the frame has been set

public setFrameInterpolated(i: Integer, ip: Integer, ipp: Integer, ippp: Integer, t: Number, type: String, callback: Function) source

Interpolated and set trajectory to frame indices

Params:

NameTypeAttributeDescription
i Integer

the frame index

ip Integer

one before frame index

ipp Integer

two before frame index

ippp Integer

three before frame index

t Number

interpolation step [0,1]

type String

interpolation type, '', 'spline' or 'linear'

callback Function

fired when the frame has been set

public setParameters() source

public setPlayer(player: TrajectoryPlayer) source

Set player for this trajectory

Params:

NameTypeAttributeDescription
player TrajectoryPlayer

the player

public setSelection() source

public setStructure() source

Private Methods

private _doSuperpose() source

private _getIndices() source

private _init() source

private _interpolate() source

private abstract _loadFrame(i: Integer, callback: Function) source

Load frame index

Params:

NameTypeAttributeDescription
i Integer

the frame index

callback Function

fired when the frame has been loaded

private _makeAtomIndices() source

private _makeSuperposeCoords() source

private _process() source

private _resetCache() source

private _saveInitialCoords() source

private _saveStructureCoords() source

private _setFrameCount() source

private _updateStructure() source