/** * Copyright (c) 2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Adam Midlik */ import { VolumeStreaming } from '../../../mol-plugin/behavior/dynamic/volume-streaming/behavior.js'; import { CreateVolumeStreamingInfo } from '../../../mol-plugin/behavior/dynamic/volume-streaming/transformers.js'; import { MolstarLoadingExtension } from '../load.js'; import { ColorT } from '../tree/mvs/param-types.js'; /** Type of `molstar_volume_streaming` custom property, used by `VolumeStreamingExtension` MVS loading extension. */ export type MolstarVolumeStreamingCustomProp = { /** URL of the volume streaming server, e.g. 'https://www.ebi.ac.uk/pdbe/densities'. */ server_url?: string; /** Volume streaming view type ('off' | 'box' | 'selection-box' | 'camera-target' | 'cell' | 'auto'). Default value depends on structure type (X-ray/EM). */ view?: VolumeStreaming.ViewTypes; /** Customization of channel parameters. */ channel_params?: { [name in VolumeStreaming.ChannelType]?: Partial; }; /** List of volume streaming entries (if not specified, will be retrieved automatically based on PDB ID) */ entries?: ReturnType['entries']; } | boolean | undefined; /** This MVS loading extension allows turning on volume streaming for a structure by providing custom property `molstar_volume_streaming`. * * Examples: * * ``` * builder * .download({ url: 'https://www.ebi.ac.uk/pdbe/entry-files/download/1cbs_updated.cif' }) * .parse({ format: 'mmcif' }) * .modelStructure({ * custom: { * molstar_volume_streaming: true, * }, * }) * .component() * .representation(); * * builder * .download({ url: 'https://www.ebi.ac.uk/pdbe/entry-files/download/1tqn_updated.cif' }) * .parse({ format: 'mmcif' }) * .modelStructure({ * custom: { * molstar_volume_streaming: { * channel_params: { * '2fo-fc': { color: 'skyblue', opacity: 0.3 }, * 'fo-fc(+ve)': { color: 'greenyellow', wireframe: true, isoValue: { kind: 'relative', relativeValue: +2.5 } }, * 'fo-fc(-ve)': { color: 'orange', wireframe: true, isoValue: { kind: 'relative', relativeValue: -2.5 } }, * }, * } satisfies MolstarVolumeStreamingCustomProp, * }, * }) * .component() * .representation(); * * builder * .download({ url: 'https://www.ebi.ac.uk/pdbe/entry-files/download/8hra_updated.cif' }) * .parse({ format: 'mmcif' }) * .modelStructure({ * custom: { * molstar_volume_streaming: { * server_url: 'https://www.ebi.ac.uk/pdbe/densities', // = default * entries: [{ dataId: 'EMD-34965', source: { name: 'em', params: { isoValue: { kind: 'absolute', absoluteValue: 0.015 } } } }], * view: 'auto', // default is 'auto' for EM, 'selection-box' for X-ray structures * channel_params: { * em: { color: '#ff0000', opacity: 0.4, isoValue: { kind: 'absolute', absoluteValue: 0.025 } }, * }, * } satisfies MolstarVolumeStreamingCustomProp, * }, * }) * .component() * .representation(); * ``` */ export declare const VolumeStreamingExtension: MolstarLoadingExtension<{}>; interface ChannelParams_ extends Omit { color: ColorT | number; } export {};