/** * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal */ import { ResidueIndex, ChainIndex, ElementIndex, EntityIndex } from '../../indexing.js'; import { Unit, Structure, StructureElement } from '../../../structure.js'; import { UUID } from '../../../../../mol-util/index.js'; import { CifWriter } from '../../../../../mol-io/writer/cif.js'; export interface IndexedCustomProperty { readonly id: UUID; readonly kind: Unit.Kind; readonly level: IndexedCustomProperty.Level; has(idx: Idx): boolean; get(idx: Idx): T | undefined; getElements(structure: Structure): IndexedCustomProperty.Elements; } export declare namespace IndexedCustomProperty { type Index = ElementIndex | ResidueIndex | ChainIndex | EntityIndex; type Level = 'atom' | 'residue' | 'chain' | 'entity'; interface Elements { elements: StructureElement.Location[]; property(index: number): T; } function getCifDataSource(structure: Structure, prop: IndexedCustomProperty | undefined, cache: any): CifWriter.Category.Instance['source'][0]; type Atom = IndexedCustomProperty; function fromAtomMap(map: Map): Atom; function fromAtomArray(array: ArrayLike): Atom; type Residue = IndexedCustomProperty; function fromResidueMap(map: Map): Residue; function fromResidueArray(array: ArrayLike): Residue; type Chain = IndexedCustomProperty; function fromChainMap(map: Map): Chain; function fromChainArray(array: ArrayLike): Chain; type Entity = IndexedCustomProperty; function fromEntityMap(map: Map): Entity; }