UNPKG

molstar

Version:

A comprehensive macromolecular library.

106 lines (105 loc) 5.78 kB
/** * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ import { BondType } from '../../../../mol-model/structure/model/types'; import { Unit, Structure, Bond } from '../../../../mol-model/structure'; import { ParamDefinition as PD } from '../../../../mol-util/param-definition'; import { LocationIterator } from '../../../../mol-geo/util/location-iterator'; import { PickingId } from '../../../../mol-geo/geometry/picking'; import { Loci } from '../../../../mol-model/loci'; import { Interval } from '../../../../mol-data/int'; import { StructureGroup } from './common'; export declare const BondParams: { includeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; excludeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; ignoreHydrogens: PD.BooleanParam; aromaticBonds: PD.BooleanParam; multipleBonds: PD.Select<"offset" | "off" | "symmetric">; }; export declare const DefaultBondProps: PD.Values<{ includeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; excludeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; ignoreHydrogens: PD.BooleanParam; aromaticBonds: PD.BooleanParam; multipleBonds: PD.Select<"offset" | "off" | "symmetric">; }>; export declare type BondProps = typeof DefaultBondProps; export declare const BondCylinderParams: { adjustCylinderLength: PD.BooleanParam; includeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; excludeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; ignoreHydrogens: PD.BooleanParam; aromaticBonds: PD.BooleanParam; multipleBonds: PD.Select<"offset" | "off" | "symmetric">; linkScale: PD.Numeric; linkSpacing: PD.Numeric; linkCap: PD.BooleanParam; aromaticScale: PD.Numeric; aromaticSpacing: PD.Numeric; aromaticDashCount: PD.Numeric; dashCount: PD.Numeric; dashScale: PD.Numeric; dashCap: PD.BooleanParam; stubCap: PD.BooleanParam; radialSegments: PD.Numeric; }; export declare const DefaultBondCylinderProps: PD.Values<{ adjustCylinderLength: PD.BooleanParam; includeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; excludeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; ignoreHydrogens: PD.BooleanParam; aromaticBonds: PD.BooleanParam; multipleBonds: PD.Select<"offset" | "off" | "symmetric">; linkScale: PD.Numeric; linkSpacing: PD.Numeric; linkCap: PD.BooleanParam; aromaticScale: PD.Numeric; aromaticSpacing: PD.Numeric; aromaticDashCount: PD.Numeric; dashCount: PD.Numeric; dashScale: PD.Numeric; dashCap: PD.BooleanParam; stubCap: PD.BooleanParam; radialSegments: PD.Numeric; }>; export declare type BondCylinderProps = typeof DefaultBondCylinderProps; export declare const BondLineParams: { includeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; excludeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; ignoreHydrogens: PD.BooleanParam; aromaticBonds: PD.BooleanParam; multipleBonds: PD.Select<"offset" | "off" | "symmetric">; linkScale: PD.Numeric; linkSpacing: PD.Numeric; aromaticDashCount: PD.Numeric; dashCount: PD.Numeric; }; export declare const DefaultBondLineProps: PD.Values<{ includeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; excludeTypes: PD.MultiSelect<"covalent" | "metal-coordination" | "hydrogen-bond" | "disulfide" | "aromatic" | "computed">; ignoreHydrogens: PD.BooleanParam; aromaticBonds: PD.BooleanParam; multipleBonds: PD.Select<"offset" | "off" | "symmetric">; linkScale: PD.Numeric; linkSpacing: PD.Numeric; aromaticDashCount: PD.Numeric; dashCount: PD.Numeric; }>; export declare type BondLineProps = typeof DefaultBondLineProps; export declare function ignoreBondType(include: BondType.Flag, exclude: BondType.Flag, f: BondType.Flag): boolean; export declare function makeIntraBondIgnoreTest(structure: Structure, unit: Unit.Atomic, props: BondProps): undefined | ((edgeIndex: number) => boolean); export declare function makeInterBondIgnoreTest(structure: Structure, props: BondProps): undefined | ((edgeIndex: number) => boolean); export declare namespace BondIterator { function fromGroup(structureGroup: StructureGroup): LocationIterator; function fromStructure(structure: Structure): LocationIterator; } export declare function getIntraBondLoci(pickingId: PickingId, structureGroup: StructureGroup, id: number): Bond.Loci | { kind: "empty-loci"; }; export declare function eachIntraBond(loci: Loci, structureGroup: StructureGroup, apply: (interval: Interval) => boolean, isMarking: boolean): boolean; export declare function getInterBondLoci(pickingId: PickingId, structure: Structure, id: number): Bond.Loci | { kind: "empty-loci"; }; export declare function eachInterBond(loci: Loci, structure: Structure, apply: (interval: Interval) => boolean, isMarking: boolean): boolean;