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

Assembly

Assembly of transformed parts of a Structure

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

addPart(matrixList: Matrix4[], chainList: String[]): AssemblyPart

Add transformed parts to the assembly

public

Get the number of atom for a given structure

public

Get number of instances the assembly will produce, i.e.

public

Get the number of residues for a given structure

public

Determine if the assembly is the full and untransformed structure

Public Constructors

public constructor(name: String) source

Params:

NameTypeAttributeDescription
name String

assembly name

Public Methods

public addPart(matrixList: Matrix4[], chainList: String[]): AssemblyPart source

Add transformed parts to the assembly

Params:

NameTypeAttributeDescription
matrixList Matrix4[]

array of 4x4 transformation matrices

chainList String[]

array of chain names

Return:

AssemblyPart

the added assembly part

Example:

var m1 = new NGL.Matrix4().set( ... );
var m2 = new NGL.Matrix4().set( ... );
var assembly = new NGL.Assembly( "myAssembly" );
// add part that transforms chain 'A' and 'B' using matrices `m1` and `m2`
assembly.addPart( [ m1, m2 ], [ "A", "B" ] )

public getAtomCount(structure: Structure): Integer source

Get the number of atom for a given structure

Params:

NameTypeAttributeDescription
structure Structure

the given structure

Return:

Integer

number of atoms in the assembly

public getInstanceCount(): Integer source

Get number of instances the assembly will produce, i.e. the number of transformations performed by the assembly

Return:

Integer

number of instances

public getResidueCount(structure: Structure): Integer source

Get the number of residues for a given structure

Params:

NameTypeAttributeDescription
structure Structure

the given structure

Return:

Integer

number of residues in the assembly

public isIdentity(structure: Structure): Boolean source

Determine if the assembly is the full and untransformed structure

Params:

NameTypeAttributeDescription
structure Structure

the given structure

Return:

Boolean

whether the assembly is identical to the structure