Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CgPolymer

Class storing data of single coarse-grained polymer/chain

Hierarchy

Index

Constructors

constructor

Properties

Private _customColor

_customColor: Color | undefined = undefined

Private _globalId

_globalId: number

Protected _monomerStore

_monomerStore: CgMonomerStore

Private _name

_name: string

Private _parentStructure

_parentStructure: CgStructure | undefined = undefined

Accessors

customColor

  • get customColor(): Color | undefined
  • set customColor(val: Color | undefined): void

globalId

  • get globalId(): number
  • set globalId(val: number): void

length

  • get length(): number

monomerStore

name

  • get name(): string
  • set name(val: string): void

parentStructure

sequence

Methods

Abstract applyMatrixTransformation

  • applyMatrixTransformation(matrix: Matrix4): void

Protected commonFindIndex

  • commonFindIndex(pred: (a: CgMonomerProxy, i: number) => boolean): number

Protected commonForEach

  • commonForEach(callback: (a: CgMonomerProxy, i: number) => void): void

Protected commonForEachReverse

  • commonForEachReverse(callback: (a: CgMonomerProxy, i: number) => void): void

copyFrom

  • copyFrom(other: CgPolymer, startIdx: number, endIdxExcl: number): void
  • Copies data from the particular section of the other polymer to this one. If this polymer carried some data, they will be replaced/removed.

    Parameters

    • other: CgPolymer

      polymer to copy data from

    • startIdx: number

      index to start copy from (inclusive)

    • endIdxExcl: number

      index identifying the end of section to copy from (exclusive)

    Returns void

dispose

  • dispose(): void

forEachMonomer

  • forEachMonomer(callback: (mp: CgMonomerProxy, i: number) => void): void

getIndexForGlobalId

  • getIndexForGlobalId(globalId: number): number
  • Returns monomer store index corresponding to the monomer with the given global ID.

    Parameters

    • globalId: number

      global ID to search for

    Returns number

    store index of monomer with given global ID or -1 if no such monomer exists.

Abstract getMonomerProxyTemplate

getViews

Abstract isCyclic

  • isCyclic(): boolean

Abstract isDna

  • isDna(): boolean

Abstract isNucleic

  • isNucleic(): boolean

Abstract isProtein

  • isProtein(): boolean

Abstract isRna

  • isRna(): boolean

Abstract proxyAtIndex

Protected removeMonomer

Protected removeMonomerAtIndex

  • removeMonomerAtIndex(index: number): void
  • Removes monomer at given index. If the polymer is empty after the removal, it is also removed from the parent structure.

    Parameters

    • index: number

      index of the monomer to remove

    Returns void

Protected removeMonomers

Protected removeMonomersAtIndices

  • removeMonomersAtIndices(indices: number[]): void
  • Removes monomers stored at given indices. If the polymer is empty after the removal, it is also removed from the parent structure.

    Parameters

    • indices: number[]

      an array of indices of monomers to remove

    Returns void

renumberMonomerGlobalIds

  • renumberMonomerGlobalIds(renameMap?: Map<number, number>): void
  • Changes global IDs of all included monomers (using the GlobalIdGenerator)

    Parameters

    • Optional renameMap: Map<number, number>

      if provided, it will store the old id -> new id records for each monomer

    Returns void

Abstract setSequence

Protected truncate

  • truncate(newLength: number): void

Generated using TypeDoc