molstar
Version:
A comprehensive macromolecular library.
135 lines (134 loc) • 7.11 kB
TypeScript
/**
* Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
* @author David Sehnal <david.sehnal@gmail.com>
* @author Gianluca Tomasello <giagitom@gmail.com>
*/
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;
ignoreHydrogensVariant: PD.Select<"all" | "non-polar">;
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;
ignoreHydrogensVariant: PD.Select<"all" | "non-polar">;
aromaticBonds: PD.BooleanParam;
multipleBonds: PD.Select<"offset" | "off" | "symmetric">;
}>;
export 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;
ignoreHydrogensVariant: PD.Select<"all" | "non-polar">;
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;
colorMode: PD.Select<"default" | "interpolate">;
};
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;
ignoreHydrogensVariant: PD.Select<"all" | "non-polar">;
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;
colorMode: PD.Select<"default" | "interpolate">;
}>;
export 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;
ignoreHydrogensVariant: PD.Select<"all" | "non-polar">;
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;
ignoreHydrogensVariant: PD.Select<"all" | "non-polar">;
aromaticBonds: PD.BooleanParam;
multipleBonds: PD.Select<"offset" | "off" | "symmetric">;
linkScale: PD.Numeric;
linkSpacing: PD.Numeric;
aromaticDashCount: PD.Numeric;
dashCount: PD.Numeric;
}>;
export 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 function hasUnitVisibleBonds(unit: Unit.Atomic, props: {
ignoreHydrogens: boolean;
ignoreHydrogensVariant: 'all' | 'non-polar' | 'polar';
}): boolean;
export declare function hasStructureVisibleBonds(structure: Structure, props: {
ignoreHydrogens: boolean;
ignoreHydrogensVariant: 'all' | 'non-polar' | 'polar';
}): boolean;
export declare namespace BondIterator {
function fromGroup(structureGroup: StructureGroup, props?: {
includeLocation2?: boolean;
}): LocationIterator;
function fromStructure(structure: Structure, props?: {
includeLocation2?: boolean;
}): LocationIterator;
function fromStructureGroups(structure: Structure, props?: {
includeLocation2?: boolean;
}): 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;
export declare function getStructureGroupsBondLoci(pickingId: PickingId, structure: Structure, id: number): Bond.Loci | {
kind: "empty-loci";
};
export declare function eachStructureGroupsBond(loci: Loci, structure: Structure, apply: (interval: Interval) => boolean, isMarking: boolean): boolean;