/** * Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal * @author Alexander Rose * @author Neli Fonseca */ import { SaccharideCompIdMapType } from 'molstar/lib/mol-model/structure/structure/carbohydrates/constants'; import { PresetTrajectoryHierarchy } from 'molstar/lib/mol-plugin-state/builder/structure/hierarchy-preset'; import { StructureRepresentationPresetProvider } from 'molstar/lib/mol-plugin-state/builder/structure/representation-preset'; import { BuiltInCoordinatesFormat } from 'molstar/lib/mol-plugin-state/formats/coordinates'; import { DataFormatProvider } from 'molstar/lib/mol-plugin-state/formats/provider'; import { BuiltInTopologyFormat } from 'molstar/lib/mol-plugin-state/formats/topology'; import { BuiltInTrajectoryFormat } from 'molstar/lib/mol-plugin-state/formats/trajectory'; import { PluginUIContext } from 'molstar/lib/mol-plugin-ui/context'; import { PluginLayoutControlsDisplay } from 'molstar/lib/mol-plugin/layout'; import { PluginSpec } from 'molstar/lib/mol-plugin/spec'; import { Color } from 'molstar/lib/mol-util/color'; import 'molstar/lib/mol-util/polyfill'; export { PLUGIN_VERSION as version } from 'molstar/lib/mol-plugin/version'; export { consoleStats, setDebugMode, setProductionMode, setTimingMode } from 'molstar/lib/mol-util/debug'; export declare const ExtensionMap: { volseg: PluginSpec.Behavior; cvsx: PluginSpec.Behavior; }; declare const DefaultViewerOptions: { customFormats: [string, DataFormatProvider][]; extensions: ("cvsx" | "volseg")[]; disabledExtensions: string[]; layoutIsExpanded: boolean; layoutShowControls: boolean; layoutShowRemoteState: boolean; layoutControlsDisplay: PluginLayoutControlsDisplay; layoutShowSequence: boolean; layoutShowLog: boolean; layoutShowLeftPanel: boolean; collapseLeftPanel: boolean; collapseRightPanel: boolean; disableAntialiasing: boolean | undefined; pixelScale: number | undefined; pickScale: number | undefined; transparency: "blended" | "wboit" | "dpoit" | undefined; preferWebgl1: boolean | undefined; allowMajorPerformanceCaveat: boolean | undefined; powerPreference: WebGLPowerPreference | undefined; viewportShowExpand: boolean | undefined; viewportShowControls: boolean | undefined; viewportShowSettings: boolean | undefined; viewportShowSelectionMode: boolean | undefined; viewportShowAnimation: boolean | undefined; viewportShowTrajectoryControls: boolean | undefined; pluginStateServer: string | undefined; volumeStreamingServer: string | undefined; volumeStreamingDisabled: boolean; pdbProvider: "rcsb" | "pdbe" | "pdbj" | undefined; emdbProvider: import("molstar/lib/mol-plugin-state/actions/volume").EmdbDownloadProvider | undefined; saccharideCompIdMapType: SaccharideCompIdMapType; volumesAndSegmentationsDefaultServer: string | undefined; VolumesAndSegmentationsDefaultServer: string | undefined; }; type ViewerOptions = typeof DefaultViewerOptions; export declare class Viewer { plugin: PluginUIContext; constructor(plugin: PluginUIContext); static create(elementOrId: string | HTMLElement, options?: Partial): 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 }); */ /** * @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' * }); */ loadCvsxFromUrl(urlString: string, format: 'cvsx'): Promise; handleResize(): void; dispose(): void; } 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; } export declare const ViewerAutoPreset: StructureRepresentationPresetProvider<{ ignoreHydrogens: boolean | undefined; ignoreHydrogensVariant: "all" | "non-polar" | undefined; ignoreLight: boolean | undefined; quality: "lower" | "auto" | "high" | "low" | "medium" | "custom" | "highest" | "higher" | "lowest" | undefined; theme: import("molstar/lib/mol-util/param-definition").ParamDefinition.Normalize<{ globalName: "uniform" | "occupancy" | "element-index" | "element-symbol" | "atom-id" | "carbohydrate-symbol" | "chain-id" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "secondary-structure" | "operator-name" | "unit-index" | "residue-name" | "cartoon" | "hydrophobicity" | "illustrative" | "operator-hkl" | "partial-charge" | "polymer-id" | "polymer-index" | "sequence-id" | "shape-group" | "trajectory-index" | "uncertainty" | "volume-segment" | "volume-value" | "external-volume" | undefined; globalColorParams: any; carbonColor: "element-symbol" | "chain-id" | "operator-name" | undefined; symmetryColor: "uniform" | "occupancy" | "element-index" | "element-symbol" | "atom-id" | "carbohydrate-symbol" | "chain-id" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "secondary-structure" | "operator-name" | "unit-index" | "residue-name" | "cartoon" | "hydrophobicity" | "illustrative" | "operator-hkl" | "partial-charge" | "polymer-id" | "polymer-index" | "sequence-id" | "shape-group" | "trajectory-index" | "uncertainty" | "volume-segment" | "volume-value" | "external-volume" | undefined; symmetryColorParams: any; focus: import("molstar/lib/mol-util/param-definition").ParamDefinition.Normalize<{ name: any; params: any; }> | undefined; }> | undefined; }, { components?: undefined; representations?: undefined; } | { components: { polymer: import("molstar/lib/mol-state").StateObjectSelector>, import("molstar/lib/mol-state").StateObject>, any>> | undefined; }; representations: { polymer: import("molstar/lib/mol-state").StateObjectSelector>, import("molstar/lib/mol-state").StateObject>, any>>; }; } | { components: { all: import("molstar/lib/mol-state").StateObjectSelector>, import("molstar/lib/mol-state").StateObject>, any>> | undefined; branched: undefined; }; representations: { /** * @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' * }); */ all: import("molstar/lib/mol-state").StateObjectSelector>, import("molstar/lib/mol-state").StateObject>, any>>; }; }>;