molstar
Version:
A comprehensive macromolecular library.
301 lines (300 loc) • 14.6 kB
TypeScript
/**
* Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { StructureElement } from '../../mol-model/structure';
import { Volume } from '../../mol-model/volume';
import { PluginContext } from '../../mol-plugin/context';
import { VolumeRepresentationRegistry } from '../../mol-repr/volume/registry';
import { VolumeParams } from '../../mol-repr/volume/representation';
import { StateTransformer } from '../../mol-state';
import { ColorTheme } from '../../mol-theme/color';
import { SizeTheme } from '../../mol-theme/size';
import { ParamDefinition as PD } from '../../mol-util/param-definition';
import { PluginStateObject as SO } from '../objects';
import { Color } from '../../mol-util/color';
import { Script } from '../../mol-script/script';
import { Clipping } from '../../mol-theme/clipping';
export { StructureRepresentation3D };
export { ExplodeStructureRepresentation3D };
export { SpinStructureRepresentation3D };
export { UnwindStructureAssemblyRepresentation3D };
export { OverpaintStructureRepresentation3DFromScript };
export { OverpaintStructureRepresentation3DFromBundle };
export { TransparencyStructureRepresentation3DFromScript };
export { TransparencyStructureRepresentation3DFromBundle };
export { ClippingStructureRepresentation3DFromScript };
export { ClippingStructureRepresentation3DFromBundle };
export { VolumeRepresentation3D };
declare type StructureRepresentation3D = typeof StructureRepresentation3D;
declare const StructureRepresentation3D: StateTransformer<SO.Molecule.Structure, SO.Molecule.Structure.Representation3D, PD.Normalize<{
type: PD.NamedParams<any, string>;
colorTheme: PD.NamedParams<any, string>;
sizeTheme: PD.NamedParams<any, string>;
}>>;
declare type UnwindStructureAssemblyRepresentation3D = typeof UnwindStructureAssemblyRepresentation3D;
declare const UnwindStructureAssemblyRepresentation3D: StateTransformer<SO.Molecule.Structure.Representation3D, SO.Molecule.Structure.Representation3DState, PD.Normalize<{
t: number;
}>>;
declare type ExplodeStructureRepresentation3D = typeof ExplodeStructureRepresentation3D;
declare const ExplodeStructureRepresentation3D: StateTransformer<SO.Molecule.Structure.Representation3D, SO.Molecule.Structure.Representation3DState, PD.Normalize<{
t: number;
}>>;
declare type SpinStructureRepresentation3D = typeof SpinStructureRepresentation3D;
declare const SpinStructureRepresentation3D: StateTransformer<SO.Molecule.Structure.Representation3D, SO.Molecule.Structure.Representation3DState, PD.Normalize<{
axis: PD.NamedParams<PD.Normalize<{
vector: any;
}>, "custom"> | PD.NamedParams<PD.Normalize<{
principalAxis: any;
}>, "structure">;
origin: PD.NamedParams<PD.Normalize<{
vector: any;
}>, "custom"> | PD.NamedParams<PD.Normalize<unknown>, "structure">;
t: number;
}>>;
declare type OverpaintStructureRepresentation3DFromScript = typeof OverpaintStructureRepresentation3DFromScript;
declare const OverpaintStructureRepresentation3DFromScript: StateTransformer<SO.Molecule.Structure.Representation3D, SO.Molecule.Structure.Representation3DState, PD.Normalize<{
layers: PD.Normalize<{
script: Script;
color: Color;
clear: boolean;
}>[];
}>>;
declare type OverpaintStructureRepresentation3DFromBundle = typeof OverpaintStructureRepresentation3DFromBundle;
declare const OverpaintStructureRepresentation3DFromBundle: StateTransformer<SO.Molecule.Structure.Representation3D, SO.Molecule.Structure.Representation3DState, PD.Normalize<{
layers: PD.Normalize<{
bundle: StructureElement.Bundle;
color: Color;
clear: boolean;
}>[];
}>>;
declare type TransparencyStructureRepresentation3DFromScript = typeof TransparencyStructureRepresentation3DFromScript;
declare const TransparencyStructureRepresentation3DFromScript: StateTransformer<SO.Molecule.Structure.Representation3D, SO.Molecule.Structure.Representation3DState, PD.Normalize<{
layers: PD.Normalize<{
script: Script;
value: number;
}>[];
}>>;
declare type TransparencyStructureRepresentation3DFromBundle = typeof TransparencyStructureRepresentation3DFromBundle;
declare const TransparencyStructureRepresentation3DFromBundle: StateTransformer<SO.Molecule.Structure.Representation3D, SO.Molecule.Structure.Representation3DState, PD.Normalize<{
layers: PD.Normalize<{
bundle: StructureElement.Bundle;
value: number;
}>[];
}>>;
declare type ClippingStructureRepresentation3DFromScript = typeof ClippingStructureRepresentation3DFromScript;
declare const ClippingStructureRepresentation3DFromScript: StateTransformer<SO.Molecule.Structure.Representation3D, SO.Molecule.Structure.Representation3DState, PD.Normalize<{
layers: PD.Normalize<{
script: Script;
groups: Clipping.Groups.Flag;
}>[];
}>>;
declare type ClippingStructureRepresentation3DFromBundle = typeof ClippingStructureRepresentation3DFromBundle;
declare const ClippingStructureRepresentation3DFromBundle: StateTransformer<SO.Molecule.Structure.Representation3D, SO.Molecule.Structure.Representation3DState, PD.Normalize<{
layers: PD.Normalize<{
bundle: StructureElement.Bundle;
groups: Clipping.Groups.Flag;
}>[];
}>>;
export declare namespace VolumeRepresentation3DHelpers {
function getDefaultParams(ctx: PluginContext, name: VolumeRepresentationRegistry.BuiltIn, volume: Volume, volumeParams?: Partial<PD.Values<VolumeParams>>): StateTransformer.Params<VolumeRepresentation3D>;
function getDefaultParamsStatic(ctx: PluginContext, name: VolumeRepresentationRegistry.BuiltIn, volumeParams?: Partial<PD.Values<PD.Params>>, colorName?: ColorTheme.BuiltIn, colorParams?: Partial<ColorTheme.Props>, sizeName?: SizeTheme.BuiltIn, sizeParams?: Partial<SizeTheme.Props>): StateTransformer.Params<VolumeRepresentation3D>;
function getDescription(props: any): string | undefined;
}
declare type VolumeRepresentation3D = typeof VolumeRepresentation3D;
declare const VolumeRepresentation3D: StateTransformer<SO.Volume.Data, SO.Volume.Representation3D, PD.Normalize<{
type: PD.NamedParams<any, string>;
colorTheme: PD.NamedParams<any, string>;
sizeTheme: PD.NamedParams<any, string>;
}>>;
export { ShapeRepresentation3D };
declare type ShapeRepresentation3D = typeof ShapeRepresentation3D;
declare const ShapeRepresentation3D: StateTransformer<SO.Shape.Provider, SO.Shape.Representation3D, PD.Normalize<{}>>;
export { ModelUnitcell3D };
declare type ModelUnitcell3D = typeof ModelUnitcell3D;
declare const ModelUnitcell3D: StateTransformer<SO.Molecule.Model, SO.Shape.Representation3D, PD.Normalize<{
cellColor: Color;
cellScale: number;
ref: "model" | "origin";
attachment: "center" | "corner";
doubleSided: boolean;
flipSided: boolean;
flatShaded: boolean;
ignoreLight: boolean;
xrayShaded: boolean;
alpha: number;
quality: "custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest";
}>>;
export { StructureBoundingBox3D };
declare type StructureBoundingBox3D = typeof StructureBoundingBox3D;
declare const StructureBoundingBox3D: StateTransformer<SO.Molecule.Structure, SO.Shape.Representation3D, PD.Normalize<{
doubleSided: boolean;
flipSided: boolean;
flatShaded: boolean;
ignoreLight: boolean;
xrayShaded: boolean;
alpha: number;
quality: "custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest";
radius: number;
color: Color;
}>>;
export { StructureSelectionsDistance3D };
declare type StructureSelectionsDistance3D = typeof StructureSelectionsDistance3D;
declare const StructureSelectionsDistance3D: StateTransformer<SO.Molecule.Structure.Selections, SO.Shape.Representation3D, PD.Normalize<{
visuals: ("text" | "lines")[];
unitLabel: string;
borderWidth: number;
customText: string;
textColor: Color;
textSize: number;
sizeFactor: number;
borderColor: Color;
offsetX: number;
offsetY: number;
offsetZ: number;
background: boolean;
backgroundMargin: number;
backgroundColor: Color;
backgroundOpacity: number;
tether: boolean;
tetherLength: number;
tetherBaseWidth: number;
attachment: "middle-center" | "bottom-left" | "bottom-center" | "bottom-right" | "middle-left" | "middle-right" | "top-left" | "top-center" | "top-right";
fontFamily: import("../../mol-geo/geometry/text/font-atlas").FontFamily;
fontQuality: number;
fontStyle: import("../../mol-geo/geometry/text/font-atlas").FontStyle;
fontVariant: import("../../mol-geo/geometry/text/font-atlas").FontVariant;
fontWeight: import("../../mol-geo/geometry/text/font-atlas").FontWeight;
alpha: number;
quality: "custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest";
lineSizeAttenuation: boolean;
linesColor: Color;
linesSize: number;
dashLength: number;
}>>;
export { StructureSelectionsAngle3D };
declare type StructureSelectionsAngle3D = typeof StructureSelectionsAngle3D;
declare const StructureSelectionsAngle3D: StateTransformer<SO.Molecule.Structure.Selections, SO.Shape.Representation3D, PD.Normalize<{
visuals: ("text" | "vectors" | "sector" | "arc")[];
borderWidth: number;
customText: string;
textColor: Color;
textSize: number;
sizeFactor: number;
borderColor: Color;
offsetX: number;
offsetY: number;
offsetZ: number;
background: boolean;
backgroundMargin: number;
backgroundColor: Color;
backgroundOpacity: number;
tether: boolean;
tetherLength: number;
tetherBaseWidth: number;
attachment: "middle-center" | "bottom-left" | "bottom-center" | "bottom-right" | "middle-left" | "middle-right" | "top-left" | "top-center" | "top-right";
fontFamily: import("../../mol-geo/geometry/text/font-atlas").FontFamily;
fontQuality: number;
fontStyle: import("../../mol-geo/geometry/text/font-atlas").FontStyle;
fontVariant: import("../../mol-geo/geometry/text/font-atlas").FontVariant;
fontWeight: import("../../mol-geo/geometry/text/font-atlas").FontWeight;
alpha: number;
quality: "custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest";
ignoreLight: boolean;
sectorOpacity: number;
color: Color;
arcScale: number;
doubleSided: boolean;
flipSided: boolean;
flatShaded: boolean;
xrayShaded: boolean;
lineSizeAttenuation: boolean;
linesSize: number;
dashLength: number;
}>>;
export { StructureSelectionsDihedral3D };
declare type StructureSelectionsDihedral3D = typeof StructureSelectionsDihedral3D;
declare const StructureSelectionsDihedral3D: StateTransformer<SO.Molecule.Structure.Selections, SO.Shape.Representation3D, PD.Normalize<{
visuals: ("text" | "vectors" | "sector" | "arc" | "extenders" | "arms" | "connector")[];
borderWidth: number;
customText: string;
textColor: Color;
textSize: number;
sizeFactor: number;
borderColor: Color;
offsetX: number;
offsetY: number;
offsetZ: number;
background: boolean;
backgroundMargin: number;
backgroundColor: Color;
backgroundOpacity: number;
tether: boolean;
tetherLength: number;
tetherBaseWidth: number;
attachment: "middle-center" | "bottom-left" | "bottom-center" | "bottom-right" | "middle-left" | "middle-right" | "top-left" | "top-center" | "top-right";
fontFamily: import("../../mol-geo/geometry/text/font-atlas").FontFamily;
fontQuality: number;
fontStyle: import("../../mol-geo/geometry/text/font-atlas").FontStyle;
fontVariant: import("../../mol-geo/geometry/text/font-atlas").FontVariant;
fontWeight: import("../../mol-geo/geometry/text/font-atlas").FontWeight;
alpha: number;
quality: "custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest";
ignoreLight: boolean;
sectorOpacity: number;
color: Color;
arcScale: number;
doubleSided: boolean;
flipSided: boolean;
flatShaded: boolean;
xrayShaded: boolean;
lineSizeAttenuation: boolean;
linesSize: number;
dashLength: number;
}>>;
export { StructureSelectionsLabel3D };
declare type StructureSelectionsLabel3D = typeof StructureSelectionsLabel3D;
declare const StructureSelectionsLabel3D: StateTransformer<SO.Molecule.Structure.Selections, SO.Shape.Representation3D, PD.Normalize<{
scaleByRadius: boolean;
visuals: "text"[];
offsetZ: number;
borderWidth: number;
customText: string;
textColor: Color;
textSize: number;
sizeFactor: number;
borderColor: Color;
offsetX: number;
offsetY: number;
background: boolean;
backgroundMargin: number;
backgroundColor: Color;
backgroundOpacity: number;
tether: boolean;
tetherLength: number;
tetherBaseWidth: number;
attachment: "middle-center" | "bottom-left" | "bottom-center" | "bottom-right" | "middle-left" | "middle-right" | "top-left" | "top-center" | "top-right";
fontFamily: import("../../mol-geo/geometry/text/font-atlas").FontFamily;
fontQuality: number;
fontStyle: import("../../mol-geo/geometry/text/font-atlas").FontStyle;
fontVariant: import("../../mol-geo/geometry/text/font-atlas").FontVariant;
fontWeight: import("../../mol-geo/geometry/text/font-atlas").FontWeight;
alpha: number;
quality: "custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest";
}>>;
export { StructureSelectionsOrientation3D };
declare type StructureSelectionsOrientation3D = typeof StructureSelectionsOrientation3D;
declare const StructureSelectionsOrientation3D: StateTransformer<SO.Molecule.Structure.Selections, SO.Shape.Representation3D, PD.Normalize<{
visuals: ("axes" | "ellipsoid" | "box")[];
color: Color;
scale: number;
doubleSided: boolean;
flipSided: boolean;
flatShaded: boolean;
ignoreLight: boolean;
xrayShaded: boolean;
alpha: number;
quality: "custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest";
}>>;