/** * Copyright (c) 2019-2025 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose * @author David Sehnal */ import { ParamDefinition as PD } from '../../../mol-util/param-definition.js'; import { Structure, Unit } from '../../../mol-model/structure.js'; import { Features } from './features.js'; import { InteractionsIntraContacts, InteractionsInterContacts } from './common.js'; import { IntMap } from '../../../mol-data/int.js'; import { CustomProperty } from '../../common/custom-property.js'; import { DataLocation } from '../../../mol-model/location.js'; import { Sphere3D } from '../../../mol-math/geometry.js'; import { DataLoci } from '../../../mol-model/loci.js'; export { Interactions }; interface Interactions { /** Features of each unit */ unitsFeatures: IntMap; /** Interactions of each unit */ unitsContacts: IntMap; /** Interactions between units */ contacts: InteractionsInterContacts; } declare namespace Interactions { type StructureInteractions = { readonly structure: Structure; readonly interactions: Interactions; }; export interface Element { unitA: Unit; /** Index into features of unitA */ indexA: Features.FeatureIndex; unitB: Unit; /** Index into features of unitB */ indexB: Features.FeatureIndex; } export interface Location extends DataLocation { } export function Location(interactions: Interactions, structure: Structure, unitA?: Unit, indexA?: Features.FeatureIndex, unitB?: Unit, indexB?: Features.FeatureIndex): Location; export function isLocation(x: any): x is Location; export function areLocationsEqual(locA: Location, locB: Location): boolean; export function locationLabel(location: Location): string; export interface Loci extends DataLoci { } export function Loci(structure: Structure, interactions: Interactions, elements: ReadonlyArray): Loci; export function isLoci(x: any): x is Loci; export function getBoundingSphere(interactions: Interactions, elements: ReadonlyArray, boundingSphere: Sphere3D): Sphere3D; export function getLabel(structure: Structure, interactions: Interactions, elements: ReadonlyArray): string; export {}; } export declare const ContactProviderParams: { ionic: PD.Mapped | PD.NamedParams<{ distanceMax: PD.Numeric; }, "on">>; 'pi-stacking': PD.Mapped | PD.NamedParams<{ distanceMax: PD.Numeric; offsetMax: PD.Numeric; angleDevMax: PD.Numeric; }, "on">>; 'cation-pi': PD.Mapped | PD.NamedParams<{ distanceMax: PD.Numeric; offsetMax: PD.Numeric; }, "on">>; 'halogen-bonds': PD.Mapped | PD.NamedParams<{ distanceMax: PD.Numeric; angleMax: PD.Numeric; }, "on">>; 'hydrogen-bonds': PD.Mapped | PD.NamedParams<{ water: PD.BooleanParam; sulfurDistanceMax: PD.Numeric; distanceMax: PD.Numeric; backbone: PD.BooleanParam; accAngleDevMax: PD.Numeric; ignoreHydrogens: PD.BooleanParam; donAngleDevMax: PD.Numeric; accOutOfPlaneAngleMax: PD.Numeric; donOutOfPlaneAngleMax: PD.Numeric; }, "on">>; 'weak-hydrogen-bonds': PD.Mapped | PD.NamedParams<{ distanceMax: PD.Numeric; backbone: PD.BooleanParam; accAngleDevMax: PD.Numeric; ignoreHydrogens: PD.BooleanParam; donAngleDevMax: PD.Numeric; accOutOfPlaneAngleMax: PD.Numeric; donOutOfPlaneAngleMax: PD.Numeric; }, "on">>; hydrophobic: PD.Mapped | PD.NamedParams<{ distanceMax: PD.Numeric; }, "on">>; 'metal-coordination': PD.Mapped | PD.NamedParams<{ distanceMax: PD.Numeric; }, "on">>; }; export declare const InteractionsParams: { providers: PD.Group | PD.NamedParams<{ distanceMax: PD.Numeric; }, "on">; 'pi-stacking': PD.NamedParams<{}, "off"> | PD.NamedParams<{ distanceMax: PD.Numeric; offsetMax: PD.Numeric; angleDevMax: PD.Numeric; }, "on">; 'cation-pi': PD.NamedParams<{}, "off"> | PD.NamedParams<{ distanceMax: PD.Numeric; offsetMax: PD.Numeric; }, "on">; 'halogen-bonds': PD.NamedParams<{}, "off"> | PD.NamedParams<{ distanceMax: PD.Numeric; angleMax: PD.Numeric; }, "on">; 'hydrogen-bonds': PD.NamedParams<{}, "off"> | PD.NamedParams<{ water: PD.BooleanParam; sulfurDistanceMax: PD.Numeric; distanceMax: PD.Numeric; backbone: PD.BooleanParam; accAngleDevMax: PD.Numeric; ignoreHydrogens: PD.BooleanParam; donAngleDevMax: PD.Numeric; accOutOfPlaneAngleMax: PD.Numeric; donOutOfPlaneAngleMax: PD.Numeric; }, "on">; 'weak-hydrogen-bonds': PD.NamedParams<{}, "off"> | PD.NamedParams<{ distanceMax: PD.Numeric; backbone: PD.BooleanParam; accAngleDevMax: PD.Numeric; ignoreHydrogens: PD.BooleanParam; donAngleDevMax: PD.Numeric; accOutOfPlaneAngleMax: PD.Numeric; donOutOfPlaneAngleMax: PD.Numeric; }, "on">; hydrophobic: PD.NamedParams<{}, "off"> | PD.NamedParams<{ distanceMax: PD.Numeric; }, "on">; 'metal-coordination': PD.NamedParams<{}, "off"> | PD.NamedParams<{ distanceMax: PD.Numeric; }, "on">; }>>; contacts: PD.Group>; }; export type InteractionsParams = typeof InteractionsParams; export type InteractionsProps = PD.Values; export interface ComputeInterctionsOptions { skipIntraContacts?: boolean; unitPairTest?: (unitA: Unit, unitB: Unit) => boolean; } export declare function computeInteractions(ctx: CustomProperty.Context, structure: Structure, props: Partial, options?: ComputeInterctionsOptions): Promise;