NGL@0.10.4 Home Manual Reference Source GalleryRepository
import Structure from 'ngl/src/structure/structure.js'
public class | source

Structure

Direct Subclass:

StructureView

Structure

Constructor Summary

Public Constructor
public

constructor(name: String, path: String)

Member Summary

Public Members
public

atomMap: AtomMap

public

bondHash: BondHash

public
public
public
public
public
public

residueMap: ResidueMap

public

signals: {refreshed: Signal}

public

spatialHash: SpatialHash

public
public

validation: Validation

Method Summary

Public Methods
public

Gets the center of the (selected) structure atoms

public

Calls dispose() method of property objects.

public

eachAtom(callback: function(atom: AtomProxy), selection: Selection): undefined

Atom iterator

public

eachBond(callback: function(bond: BondProxy), selection: Selection): undefined

Bond iterator

public

eachChain(callback: function(chain: ChainProxy), selection: Selection): undefined

Chain iterator

public

eachEntity(callback: function(entity: Entity), type: EntityType): undefined

Entity iterator

public

eachModel(callback: function(model: ModelProxy), selection: Selection): undefined

Model iterator

public

eachPolymer(callback: function(polymer: Polymer), selection: Selection): undefined

Polymer iterator

public

eachResidue(callback: function(residue: ResidueProxy), selection: Selection): undefined

Residue iterator

public

eachResidueN(n: Integer, callback: function(residueList: ResidueProxy[])): undefined

Multi-residue iterator

public

Get set of atom around a set of atoms from a selection

public

getBoundingBox(selection: Selection, box: Box3): Vector3

Gets the bounding box of the (selected) structure atoms

public

Get number of unique chainnames

public

Gets the principal axes of the (selected) structure atoms

Public Constructors

public constructor(name: String, path: String) source

Params:

NameTypeAttributeDescription
name String

structure name

path String

source path

Public Members

public atomMap: AtomMap source

public bondHash: BondHash source

public boundingBox: Box3 source

public center: Vector3 source

public entityList: Entity[] source

public extraData: StructureExtraData source

public header: StructureHeader source

public residueMap: ResidueMap source

public signals: {refreshed: Signal} source

public spatialHash: SpatialHash source

public unitcell: Unitcell source

public validation: Validation source

Public Methods

public atomCenter(selection: Selection): Vector3 source

Gets the center of the (selected) structure atoms

Params:

NameTypeAttributeDescription
selection Selection
  • optional

the selection

Return:

Vector3

the center

public dispose(): undefined source

Calls dispose() method of property objects. Unsets properties to help garbage collection.

Return:

undefined

public eachAtom(callback: function(atom: AtomProxy), selection: Selection): undefined source

Atom iterator

Params:

NameTypeAttributeDescription
callback function(atom: AtomProxy)

the callback

selection Selection
  • optional

the selection

Return:

undefined

public eachBond(callback: function(bond: BondProxy), selection: Selection): undefined source

Bond iterator

Params:

NameTypeAttributeDescription
callback function(bond: BondProxy)

the callback

selection Selection
  • optional

the selection

Return:

undefined

public eachChain(callback: function(chain: ChainProxy), selection: Selection): undefined source

Chain iterator

Params:

NameTypeAttributeDescription
callback function(chain: ChainProxy)

the callback

selection Selection
  • optional

the selection

Return:

undefined

public eachEntity(callback: function(entity: Entity), type: EntityType): undefined source

Entity iterator

Params:

NameTypeAttributeDescription
callback function(entity: Entity)

the callback

type EntityType

entity type

Return:

undefined

public eachModel(callback: function(model: ModelProxy), selection: Selection): undefined source

Model iterator

Params:

NameTypeAttributeDescription
callback function(model: ModelProxy)

the callback

selection Selection
  • optional

the selection

Return:

undefined

public eachPolymer(callback: function(polymer: Polymer), selection: Selection): undefined source

Polymer iterator

Params:

NameTypeAttributeDescription
callback function(polymer: Polymer)

the callback

selection Selection
  • optional

the selection

Return:

undefined

public eachResidue(callback: function(residue: ResidueProxy), selection: Selection): undefined source

Residue iterator

Params:

NameTypeAttributeDescription
callback function(residue: ResidueProxy)

the callback

selection Selection
  • optional

the selection

Return:

undefined

public eachResidueN(n: Integer, callback: function(residueList: ResidueProxy[])): undefined source

Multi-residue iterator

Params:

NameTypeAttributeDescription
n Integer

window size

callback function(residueList: ResidueProxy[])

the callback

Return:

undefined

public getAtomSetWithinSelection(selection: Selection, radius: Number): BitArray source

Get set of atom around a set of atoms from a selection

Params:

NameTypeAttributeDescription
selection Selection

the selection object

radius Number

radius to select within

Return:

BitArray

set of atoms

public getBoundingBox(selection: Selection, box: Box3): Vector3 source

Gets the bounding box of the (selected) structure atoms

Params:

NameTypeAttributeDescription
selection Selection
  • optional

the selection

box Box3
  • optional

optional target

Return:

Vector3

the box

public getChainnameCount(selection: Selection): Integer source

Get number of unique chainnames

Params:

NameTypeAttributeDescription
selection Selection

limit count to selection

Return:

Integer

count

public getPrincipalAxes(selection: Selection): PrincipalAxes source

Gets the principal axes of the (selected) structure atoms

Params:

NameTypeAttributeDescription
selection Selection
  • optional

the selection

Return:

PrincipalAxes

the principal axes