NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import AtomProxy from 'ngl/src/proxy/atom-proxy.js'
public class | source

AtomProxy

Atom proxy

Constructor Summary

Public Constructor
public

constructor(structure: Structure, index: Integer)

Member Summary

Public Members
public set
public get

Alternate location identifier

public
public
public get
public get

Atom name

public set
public get

B-factor value

public get
public get
public
public get

Chain id

public get

Chain name

public get

Covalent radius

public get

Element

public get

Molecular enity

public get
public set
public get

Formal charge

public get

Hetero flag

public

The index of the atom, pointing to the data in the corresponding AtomStore

public get

Insertion code

public get
public get

Occupancy value

public set
public set
public get

Partial charge

public get
public get
public get
public set
public
public
public get
public get

Residue name

public get

Residue number/label

public get

Serial number

public set
public get

Secondary structure code

public

The structure the atom belongs to.

public get

Van-der-Waals radius

public get

x: Float

X coordinate

public set

x

public get

y: Float

Y coordinate

public set

y

public get

z: Float

Z coordinate

public set

z

Method Summary

Public Methods
public

Clone object

public

If connected to another atom

public

Distance to another atom

public

eachBond(callback: function(bond: BondProxy), bp: BondProxy): undefined

Iterate over each bond

public

Iterate over each bonded atom

public

Get intra group/residue bonds

public

Check if this atom is bonded to the given atom, assumes both atoms are from the same structure

public

If atom is part of a backbone

public
public

If atom is part of a coarse-grain group

public

If atom is part of a dna

public

If atom is part of a helix

public

If atom is part of a hetero group

public

If atom is part of an ion

public

If atom is part of a nucleic molecule

public

If atom is part of a polymer

public

If atom is part of a protein molecule

public

If atom is part of a ring

public

If atom is part of a rna

public

If atom is part of a saccharide

public

If atom is part of a sheet

public

If atom is part of a sidechin

public

If atom is part of a turn

public

If atom is part of a water molecule

public

Add vector to atom position

public

Set atom position from array

public

Set atom position from vector

public

Subtract vector from atom position

public

Write atom position to array

public

Write atom position to vector

public
public

Public Constructors

public constructor(structure: Structure, index: Integer) source

Params:

NameTypeAttributeDescription
structure Structure

the structure

index Integer

the index

Public Members

public set altloc source

public get altloc: String source

Alternate location identifier

public atomMap: AtomMap source

public atomStore: AtomStore source

public get atomType: AtomType source

public get atomname: String source

Atom name

public set bfactor source

public get bfactor: Float source

B-factor value

public get bondHash: BondHash source

public get chainIndex source

public chainStore: ChainStore source

public get chainid: String source

Chain id

public get chainname: String source

Chain name

public get covalent: Float source

Covalent radius

public get element: String source

Element

public get entity: Entity source

Molecular enity

public get entityIndex source

public set formalCharge source

public get formalCharge: Integer | null source

Formal charge

public get hetero: Boolean source

Hetero flag

public index: Integer source

The index of the atom, pointing to the data in the corresponding AtomStore

public get inscode: String source

Insertion code

public get modelIndex source

public get occupancy: Float source

Occupancy value

public set occupancy source

public set partialCharge source

public get partialCharge: Float | null source

Partial charge

public get residue: ResidueProxy source

public get residueAtomOffset source

public get residueIndex source

public set residueIndex source

public residueMap: ResidueMap source

public residueStore: ResidueStore source

public get residueType: ResidueType source

public get resname: String source

Residue name

public get resno: Integer source

Residue number/label

public get serial: Integer source

Serial number

public set serial source

public get sstruc: String source

Secondary structure code

public structure: Structure source

The structure the atom belongs to.

public get vdw: Float source

Van-der-Waals radius

public get x: Float source

X coordinate

public set x source

public get y: Float source

Y coordinate

public set y source

public get z: Float source

Z coordinate

public set z source

Public Methods

public clone(): AtomProxy source

Clone object

Return:

AtomProxy

cloned atom

public connectedTo(atom: AtomProxy): Boolean source

If connected to another atom

Params:

NameTypeAttributeDescription
atom AtomProxy

the other atom

Return:

Boolean

flag

public distanceTo(atom: AtomProxy): Number source

Distance to another atom

Params:

NameTypeAttributeDescription
atom AtomProxy

the other atom

Return:

Number

the distance

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

Iterate over each bond

Params:

NameTypeAttributeDescription
callback function(bond: BondProxy)

iterator callback function

bp BondProxy
  • optional

optional target bond proxy for use in the callback

Return:

undefined

public eachBondedAtom(callback: function(atom: AtomProxy), ap: AtomProxy): undefined source

Iterate over each bonded atom

Params:

NameTypeAttributeDescription
callback function(atom: AtomProxy)

iterator callback function

ap AtomProxy
  • optional

optional target atom proxy for use in the callback

Return:

undefined

public getResidueBonds(firstOnly: Boolean): Integer[] | Integer | undefined source

Get intra group/residue bonds

Params:

NameTypeAttributeDescription
firstOnly Boolean

immediately return the first connected atomIndex

Return:

Integer[] | Integer | undefined

connected atomIndices

public hasBondTo(ap: AtomProxy): Boolean source

Check if this atom is bonded to the given atom, assumes both atoms are from the same structure

Params:

NameTypeAttributeDescription
ap AtomProxy

the given atom

Return:

Boolean

whether a bond exists or not

public isBackbone(): Boolean source

If atom is part of a backbone

Return:

Boolean

flag

public isBonded() source

public isCg(): Boolean source

If atom is part of a coarse-grain group

Return:

Boolean

flag

public isDna(): Boolean source

If atom is part of a dna

Return:

Boolean

flag

public isHelix(): Boolean source

If atom is part of a helix

Return:

Boolean

flag

public isHetero(): Boolean source

If atom is part of a hetero group

Return:

Boolean

flag

public isIon(): Boolean source

If atom is part of an ion

Return:

Boolean

flag

public isNucleic(): Boolean source

If atom is part of a nucleic molecule

Return:

Boolean

flag

public isPolymer(): Boolean source

If atom is part of a polymer

Return:

Boolean

flag

public isProtein(): Boolean source

If atom is part of a protein molecule

Return:

Boolean

flag

public isRing(): Boolean source

If atom is part of a ring

Return:

Boolean

flag

public isRna(): Boolean source

If atom is part of a rna

Return:

Boolean

flag

public isSaccharide(): Boolean source

If atom is part of a saccharide

Return:

Boolean

flag

public isSheet(): Boolean source

If atom is part of a sheet

Return:

Boolean

flag

public isSidechain(): Boolean source

If atom is part of a sidechin

Return:

Boolean

flag

public isTurn(): Boolean source

If atom is part of a turn

Return:

Boolean

flag

public isWater(): Boolean source

If atom is part of a water molecule

Return:

Boolean

flag

public positionAdd(v: Vector3): AtomProxy source

Add vector to atom position

Params:

NameTypeAttributeDescription
v Vector3

input vector

Return:

AtomProxy

this object

public positionFromArray(array: Array | TypedArray, offset: Integer): AtomProxy source

Set atom position from array

Params:

NameTypeAttributeDescription
array Array | TypedArray

input array

offset Integer
  • optional

the offset

Return:

AtomProxy

this object

public positionFromVector3(v: Vector3): AtomProxy source

Set atom position from vector

Params:

NameTypeAttributeDescription
v Vector3

input vector

Return:

AtomProxy

this object

public positionSub(v: Vector3): AtomProxy source

Subtract vector from atom position

Params:

NameTypeAttributeDescription
v Vector3

input vector

Return:

AtomProxy

this object

public positionToArray(array: Array | TypedArray, offset: Integer): Array | TypedArray source

Write atom position to array

Params:

NameTypeAttributeDescription
array Array | TypedArray
  • optional

target array

offset Integer
  • optional

the offset

Return:

Array | TypedArray

target array

public positionToVector3(v: Vector3): Vector3 source

Write atom position to vector

Params:

NameTypeAttributeDescription
v Vector3
  • optional

target vector

Return:

Vector3

target vector

public qualifiedName() source

public toObject() source