UNPKG

pdbe-molstar

Version:
37 lines (36 loc) 1.22 kB
/** Helper functions to allow showing custom atom interactions */ import { PDBeMolstarPlugin } from '../..'; import { QueryParam } from '../../helpers'; export interface Interaction { start: QueryParam; end: QueryParam; color?: string; radius?: number; dash_length?: number; tooltip?: string; } export interface StateObjectHandle { /** State transform reference */ ref: string; /** Set state object visibility on/off */ setVisibility(visible: boolean): void; /** Remove state object from state hierarchy */ delete: () => Promise<void>; } export declare function loadInteractions_example(viewer: PDBeMolstarPlugin, params?: { opacity?: number; color?: string; radius?: number; dash_length?: number; }): Promise<StateObjectHandle>; /** Show custom atom interactions */ export declare function loadInteractions(viewer: PDBeMolstarPlugin, params: { interactions: Interaction[]; structureId?: string; opacity?: number; color?: string; radius?: number; dash_length?: number; }): Promise<StateObjectHandle>; /** Remove any previously added interactions */ export declare function clearInteractions(viewer: PDBeMolstarPlugin): Promise<void>;