/** * Copyright (c) 2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal */ import { StringLike } from '../../mol-io/common/string-like.js'; import { Volume } from '../../mol-model/volume.js'; import { PresetTrajectoryHierarchy } from '../../mol-plugin-state/builder/structure/hierarchy-preset.js'; import { StructureRepresentationPresetProvider } from '../../mol-plugin-state/builder/structure/representation-preset.js'; import { BuiltInCoordinatesFormat } from '../../mol-plugin-state/formats/coordinates.js'; import { BuiltInTopologyFormat } from '../../mol-plugin-state/formats/topology.js'; import { BuiltInTrajectoryFormat } from '../../mol-plugin-state/formats/trajectory.js'; import { BuildInVolumeFormat } from '../../mol-plugin-state/formats/volume.js'; import { PluginStateObject } from '../../mol-plugin-state/objects.js'; import { PluginContext } from '../../mol-plugin/context.js'; import { PluginState } from '../../mol-plugin/state.js'; import { StateObjectSelector } from '../../mol-state/index.js'; import { Color } from '../../mol-util/color/index.js'; import { MolstarLoadingExtension, MVSLoadOptions } from '../mvs/load.js'; import { MVSData } from '../mvs/mvs-data.js'; export declare function setRemoteSnapshot(plugin: PluginContext, id: string): Promise; export declare function loadSnapshotFromUrl(plugin: PluginContext, url: string, type: PluginState.SnapshotType): Promise; export declare function loadStructureFromUrl(plugin: PluginContext, url: string, format?: BuiltInTrajectoryFormat, isBinary?: boolean, options?: LoadStructureOptions & { label?: string; }): Promise; export declare function loadAllModelsOrAssemblyFromUrl(plugin: PluginContext, url: string, format?: BuiltInTrajectoryFormat, isBinary?: boolean, options?: LoadStructureOptions): Promise; export declare function loadStructureFromData(plugin: PluginContext, data: string | number[], format: BuiltInTrajectoryFormat, options?: { dataLabel?: string; }): Promise; export declare function loadPdb(plugin: PluginContext, pdb: string, options?: LoadStructureOptions): Promise; export declare function loadPdbIhm(plugin: PluginContext, pdbIhm: string): Promise; export declare function loadEmdb(plugin: PluginContext, emdb: string, options?: { detail?: number; }): Promise; export declare function loadAlphaFoldDb(plugin: PluginContext, afdb: string): Promise; export declare function loadModelArchive(plugin: PluginContext, id: string): Promise; /** * @example Load X-ray density from volume server viewer.loadVolumeFromUrl({ url: 'https://www.ebi.ac.uk/pdbe/densities/x-ray/1tqn/cell?detail=3', format: 'dscif', isBinary: true }, [{ type: 'relative', value: 1.5, color: 0x3362B2 }, { type: 'relative', value: 3, color: 0x33BB33, volumeIndex: 1 }, { type: 'relative', value: -3, color: 0xBB3333, volumeIndex: 1 }], { entryId: ['2FO-FC', 'FO-FC'], isLazy: true }); * ********************* * @example Load EM density from volume server viewer.loadVolumeFromUrl({ url: 'https://maps.rcsb.org/em/emd-30210/cell?detail=6', format: 'dscif', isBinary: true }, [{ type: 'relative', value: 1, color: 0x3377aa }], { entryId: 'EMD-30210', isLazy: true }); */ export declare function loadVolumeFromUrl(plugin: PluginContext, { url, format, isBinary }: { url: string; format: BuildInVolumeFormat; isBinary: boolean; }, isovalues: VolumeIsovalueInfo[], options?: { entryId?: string | string[]; isLazy?: boolean; }): Promise; export declare function loadFullResolutionEMDBMap(plugin: PluginContext, emdbId: string, options: { isoValue: Volume.IsoValue; color?: Color; }): Promise; /** * @example * viewer.loadTrajectory({ * model: { kind: 'model-url', url: 'villin.gro', format: 'gro' }, * coordinates: { kind: 'coordinates-url', url: 'villin.xtc', format: 'xtc', isBinary: true }, * preset: 'all-models' // or 'default' * }); */ export declare function loadTrajectory(plugin: PluginContext, params: LoadTrajectoryParams): Promise<{ model: StateObjectSelector>, import("../../mol-state/index.js").StateTransformer>, import("../../mol-state/index.js").StateObject>, any>>; coords: any; preset: { model: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; modelProperties: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; unitcell: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>> | undefined; structure: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; structureProperties: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; representation: any; } | { models?: undefined; structures?: undefined; } | { models: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>[]; structures: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>[]; } | { model: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; modelProperties: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; unitcell: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>> | undefined; structure: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; structureProperties: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; representation: any; } | { model: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; modelProperties: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; unitcell: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>> | undefined; structure: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; structureProperties: StateObjectSelector>, import("../../mol-state/index.js").StateObject>, any>>; representation: any; } | undefined; }>; export declare function loadMVSFromUrl(plugin: PluginContext, url: string, format: 'mvsj' | 'mvsx', options?: { appendSnapshots?: boolean; keepCamera?: boolean; keepCameraOrientation?: boolean; extensions?: MolstarLoadingExtension[]; }): Promise; /** Load MolViewSpec from `data`. * If `format` is 'mvsj', `data` must be a string or a Uint8Array containing a UTF8-encoded string. * If `format` is 'mvsx', `data` must be a Uint8Array or a string containing base64-encoded binary data prefixed with 'base64,'. */ export declare function loadMvsData(plugin: PluginContext, data: string | Uint8Array, format: 'mvsj' | 'mvsx', options?: MVSLoadOptions): Promise | StringLike | MVSData>; export declare function loadMvsState(plugin: PluginContext, mvsData: MVSData, options?: MVSLoadOptions): Promise; export declare function loadFiles(plugin: PluginContext, files: File[]): Promise; export declare function loadUrl(plugin: PluginContext, url: string, format: string, isBinary?: boolean): Promise; export interface LoadStructureOptions { representationParams?: StructureRepresentationPresetProvider.CommonParams; } export interface VolumeIsovalueInfo { type: 'absolute' | 'relative'; value: number; color: Color; alpha?: number; volumeIndex?: number; } export interface LoadTrajectoryParams { model: { kind: 'model-url'; url: string; format?: BuiltInTrajectoryFormat; isBinary?: boolean; } | { kind: 'model-data'; data: string | number[] | ArrayBuffer | Uint8Array; format?: BuiltInTrajectoryFormat; } | { kind: 'topology-url'; url: string; format: BuiltInTopologyFormat; isBinary?: boolean; } | { kind: 'topology-data'; data: string | number[] | ArrayBuffer | Uint8Array; format: BuiltInTopologyFormat; }; modelLabel?: string; coordinates: { kind: 'coordinates-url'; url: string; format: BuiltInCoordinatesFormat; isBinary?: boolean; } | { kind: 'coordinates-data'; data: string | number[] | ArrayBuffer | Uint8Array; format: BuiltInCoordinatesFormat; }; coordinatesLabel?: string; preset?: keyof PresetTrajectoryHierarchy; }