import { AmbiguousMonomerType, AttachmentPointName, MonomerItemType, MonomerOrAmbiguousType } from "../types"; import { Vec2 } from "./vec2"; import { Command } from "./Command"; import { DrawingEntity } from "./DrawingEntity"; import { PolymerBond } from "./PolymerBond"; import { BaseMonomer, Chem, KetFileMultitailArrowNode, LinkerSequenceNode, Phosphate, RNABase, RxnArrowMode, Struct, Sugar } from "./"; import { BondCIP } from "./types"; import { ChainsCollection } from "./monomer-chains/ChainsCollection"; import { Nucleoside } from './Nucleoside'; import { Nucleotide } from './Nucleotide'; import { MACROMOLECULES_BOND_TYPES } from "../../application/editor"; import { CanvasMatrix } from "./canvas-matrix/CanvasMatrix"; import { Matrix } from "./canvas-matrix/Matrix"; import { Cell } from "./canvas-matrix/Cell"; import { AmbiguousMonomer } from "./AmbiguousMonomer"; import { Atom, AtomProperties } from "./CoreAtom"; import { Bond } from "./CoreBond"; import { MonomerToAtomBond } from "./MonomerToAtomBond"; import { AtomLabel } from "../constants"; import { HydrogenBond } from "./HydrogenBond"; import { Chain } from "./monomer-chains/Chain"; import { RxnArrow } from "./CoreRxnArrow"; import { MultitailArrow } from "./CoreMultitailArrow"; import { KetFileNode } from "../serializers"; import { RxnPlus } from "./CoreRxnPlus"; import { initiallySelectedType } from "./BaseMicromoleculeEntity"; export declare const SNAKE_LAYOUT_Y_OFFSET_BETWEEN_CHAINS: number; export declare const MONOMER_START_X_POSITION: number; export declare const MONOMER_START_Y_POSITION: number; declare type RnaPresetAdditionParams = { sugar: MonomerItemType; sugarPosition: Vec2; rnaBase: MonomerItemType | undefined; rnaBasePosition: Vec2 | undefined; phosphate: MonomerItemType | undefined; phosphatePosition: Vec2 | undefined; existingNode?: Nucleotide | Nucleoside | LinkerSequenceNode; }; interface MonomerConnectedToSelection { monomerFromSelection: BaseMonomer; monomerConnectedToSelection: BaseMonomer; bond: PolymerBond; } export declare class DrawingEntitiesManager { monomers: Map; polymerBonds: Map; private readonly bondsMonomersOverlaps; atoms: Map; bonds: Map; monomerToAtomBonds: Map; rxnArrows: Map; multitailArrows: Map; rxnPluses: Map; micromoleculesHiddenEntities: Struct; canvasMatrix?: CanvasMatrix; snakeLayoutMatrix?: Matrix; antisenseMonomerToSenseChain: Map; get bottomRightMonomerPosition(): Vec2; get bottomLeftMonomerPosition(): Vec2; get selectedEntitiesArr(): DrawingEntity[]; get selectedEntities(): [number, DrawingEntity][]; get selectedMonomers(): BaseMonomer[]; get selectedMicromoleculeEntities(): DrawingEntity[]; get externalConnectionsToSelection(): MonomerConnectedToSelection[]; get allEntities(): [number, DrawingEntity][]; get allEntitiesArray(): DrawingEntity[]; get hasDrawingEntities(): boolean; get hasMonomers(): boolean; get allBondsToMonomers(): ([number, PolymerBond] | [number, MonomerToAtomBond])[]; deleteSelectedEntities(): Command; deleteAllEntities(): Command; addMonomerChangeModel(monomerItem: MonomerItemType, position: Vec2, _monomer?: BaseMonomer): BaseMonomer | AmbiguousMonomer; createMonomer(monomerItem: MonomerOrAmbiguousType, position: Vec2, generateId?: boolean): AmbiguousMonomer | Chem | Sugar | import("./").Peptide | RNABase | Phosphate; updateMonomerItem(monomer: BaseMonomer, monomerItemNew: MonomerItemType): BaseMonomer; addMonomer(monomerItem: MonomerItemType, position: Vec2, _monomer?: BaseMonomer): Command; deleteDrawingEntity(drawingEntity: DrawingEntity, needToDeleteConnectedEntities?: boolean, force?: boolean): Command; selectDrawingEntity(drawingEntity: DrawingEntity): Command; private selectDrawingEntitiesModelChange; selectDrawingEntities(drawingEntities: DrawingEntity[]): Command; createDrawingEntitySelectionCommand(drawingEntity: DrawingEntity): Command; unselectAllDrawingEntities(): Command; unselectDrawingEntity(drawingEntity: DrawingEntity): Command; selectAllDrawingEntities(): Command; addDrawingEntitiesToSelection(drawingEntities: DrawingEntity[]): Command; moveDrawingEntityModelChange(drawingEntity: DrawingEntity, offset?: Vec2): DrawingEntity; private moveChemAtomsPoint; moveSelectedDrawingEntities(partOfMovementOffset: Vec2, fullMovementOffset?: Vec2): Command; createDrawingEntityMovingCommand(drawingEntity: DrawingEntity, partOfMovementOffset: Vec2, fullMovementOffset?: Vec2): Command; createDrawingEntityRedrawCommand(drawingEntityRedrawModelChange: () => DrawingEntity, invertDrawingEntityRedrawModelChange: () => DrawingEntity): Command; private deleteMonomerChangeModel; deleteMonomer(monomer: BaseMonomer, needToDeleteConnectedBonds?: boolean, force?: boolean): Command; modifyMonomerItem(monomer: BaseMonomer, monomerItemNew: MonomerItemType): Command; selectIfLocatedInRectangle(rectangleTopLeftPoint: Vec2, rectangleBottomRightPoint: Vec2, previousSelectedEntities: [number, DrawingEntity][], shiftKey?: boolean): Command; selectIfLocatedInPolygon(polygonPoints: Vec2[], previousSelectedEntities: [number, DrawingEntity][], shiftKey?: boolean): Command; private checkBondSelectionForSequenceMode; startPolymerBondCreationChangeModel(firstMonomer: any, startPosition: any, endPosition: any, bondType?: MACROMOLECULES_BOND_TYPES, _polymerBond?: PolymerBond | HydrogenBond): PolymerBond | HydrogenBond; startPolymerBondCreation(firstMonomer: BaseMonomer, startPosition: Vec2, endPosition: Vec2, bondType: MACROMOLECULES_BOND_TYPES): { command: Command; polymerBond: any; }; deletePolymerBondChangeModel(polymerBond: PolymerBond | HydrogenBond): void; deletePolymerBond(polymerBond: PolymerBond | HydrogenBond): Command; cancelPolymerBondCreation(polymerBond: PolymerBond, secondMonomer?: BaseMonomer): Command; movePolymerBond(polymerBond: PolymerBond, position: Vec2): Command; finishPolymerBondCreationModelChange(firstMonomer: BaseMonomer, secondMonomer: BaseMonomer, firstMonomerAttachmentPoint: AttachmentPointName, secondMonomerAttachmentPoint: AttachmentPointName, bondType?: MACROMOLECULES_BOND_TYPES, _polymerBond?: PolymerBond): PolymerBond | HydrogenBond; finishPolymerBondCreation(polymerBond: PolymerBond, secondMonomer: BaseMonomer, firstMonomerAttachmentPoint: AttachmentPointName, secondMonomerAttachmentPoint: AttachmentPointName, bondType?: MACROMOLECULES_BOND_TYPES): Command; createPolymerBond(firstMonomer: BaseMonomer, secondMonomer: BaseMonomer, firstMonomerAttachmentPoint: AttachmentPointName, secondMonomerAttachmentPoint: AttachmentPointName, bondType?: MACROMOLECULES_BOND_TYPES): Command; intendToStartBondCreation(monomer: BaseMonomer): Command; intendToStartAttachmenPointBondCreation(monomer: BaseMonomer, attachmentPointName: AttachmentPointName): Command; intendToFinishBondCreation(monomer: BaseMonomer, bond: PolymerBond, shouldCalculateBonds: boolean): Command; intendToFinishAttachmenPointBondCreation(monomer: BaseMonomer, bond: PolymerBond, attachmentPointName: AttachmentPointName, shouldCalculateBonds: boolean): Command; cancelIntentionToFinishBondCreation(monomer: BaseMonomer, polymerBond?: PolymerBond): Command; intendToSelectDrawingEntity(drawingEntity: DrawingEntity): Command; intendToSelectAllConnectedDrawingEntities(startEntity: DrawingEntity): Command; cancelIntentionToSelectDrawingEntity(drawingEntity: DrawingEntity): Command; cancelIntentionToSelectAllConnectedDrawingEntities(startEntity: DrawingEntity): Command; showPolymerBondInformation(polymerBond: PolymerBond): Command; hidePolymerBondInformation(polymerBond: PolymerBond): Command; hideAllMonomersHoverAndAttachmentPoints(): Command; addRnaPresetFromNode: (node: Nucleotide | Nucleoside | LinkerSequenceNode) => Command; addRnaPreset({ sugar, sugarPosition, phosphate, phosphatePosition, rnaBase, rnaBasePosition, }: RnaPresetAdditionParams): { command: Command; monomers: BaseMonomer[]; }; rearrangeChainModelChange(monomer: BaseMonomer, newPosition: Vec2): BaseMonomer; private addRnaOperations; private recalculateCanvasMatrixModelChange; recalculateCanvasMatrix(chainsCollection?: ChainsCollection, previousSnakeLayoutMatrix?: Matrix): Command; private calculateSnakeLayoutMatrix; private rearrangeSingleMonomerSnakeLayoutNode; private rearrangeSugarWithBaseSnakeLayoutNode; applySnakeLayout(isSnakeMode: boolean, needRedrawBonds?: boolean, needRepositionMonomers?: boolean, needRecalculateOldAntisense?: boolean, needRepositionMolecules?: boolean): Command; private redrawBondsModelChange; redrawBonds(): Command; isNucleosideAndPhosphateConnectedAsNucleotide(nucleoside: Nucleoside, phosphate: Phosphate): boolean; setMicromoleculesHiddenEntities(struct: Struct): void; clearMicromoleculesHiddenEntities(): void; mergeInto(targetDrawingEntitiesManager: DrawingEntitiesManager): { command: Command; mergedDrawingEntities: DrawingEntitiesManager; }; filterSelection(): DrawingEntitiesManager; centerMacroStructure(): void; getCurrentCenterPointOfCanvas(): Vec2; getMacroStructureCenter(): Vec2; rerenderMolecules(): void; applyMonomersSequenceLayout(): ChainsCollection; clearCanvas(): void; applyFlexLayoutMode(needRedrawBonds?: boolean): Command; rerenderBondsOverlappedByMonomers(): void; getAllSelectedEntitiesForEntities(drawingEntities: DrawingEntity[]): { command: Command; drawingEntities: DrawingEntity[]; }; getAllSelectedEntitiesForSingleEntity(drawingEntity: DrawingEntity, needToSelectConnectedBonds?: boolean, selectedDrawingEntities?: DrawingEntity[]): { command: Command; drawingEntities: DrawingEntity[]; }; validateIfApplicableForFasta(): boolean; moveMonomer(monomer: BaseMonomer, position: Vec2): Command; removeHoverForAllMonomers(): Command; private reconnectPolymerBondModelChange; reconnectPolymerBond(polymerBond: PolymerBond, newFirstMonomerAttachmentPoint: AttachmentPointName, newSecondMonomerAttachmentPoint: AttachmentPointName, initialFirstMonomerAttachmentPoint: AttachmentPointName, initialSecondMonomerAttachmentPoint: AttachmentPointName): Command; private addAmbiguousMonomerChangeModel; addAmbiguousMonomer(ambiguousMonomerItem: AmbiguousMonomerType, position: Vec2): Command; private addAtomChangeModel; addAtom(position: Vec2, monomer: BaseMonomer, atomIdInMicroMode: number, label: AtomLabel, properties?: AtomProperties): Command; private deleteAtomChangeModel; private deleteAtom; private addBondChangeModel; addBond(firstAtom: Atom, secondAtom: Atom, type: number, stereo: number, bondIdInMicroMode: number, cip?: BondCIP | null): Command; private deleteBondChangeModel; private deleteBond; addMonomerToAtomBondChangeModel(monomer: BaseMonomer, atom: Atom, attachmentPoint: AttachmentPointName, _monomerToAtomBond?: MonomerToAtomBond): MonomerToAtomBond; private deleteMonomerToAtomBondChangeModel; deleteMonomerToAtomBond(monomerAtomBond: MonomerToAtomBond): Command; addMonomerToAtomBond(monomer: BaseMonomer, atom: Atom, attachmentPoint: AttachmentPointName): Command; static getStructureBbox(drawingEntities: DrawingEntity[]): { left: number; right: number; top: number; bottom: number; width: number; height: number; }; private static antisenseChainBasesMap; markMonomerAsAntisense(monomer: BaseMonomer): Command; markMonomerAsSense(monomer: BaseMonomer): Command; recalculateAntisenseChains(needRecalculateOldAntisense?: boolean): Command; get hasAntisenseChains(): boolean; static getAntisenseBaseLabel(rnaBaseMonomerOrLabel: RNABase | AmbiguousMonomer | string, isDnaAntisense: boolean): any; static createAntisenseNode(node: Nucleoside | Nucleotide, isDnaAntisense: boolean, needAddPhosphate?: boolean): { modelChanges: Command; node: Nucleotide; } | { modelChanges: Command; node: Nucleoside; } | undefined; createAntisenseChain(isDnaAntisense: boolean): Command; get monomersArray(): BaseMonomer[]; get polymerBondsArray(): (PolymerBond | HydrogenBond)[]; get molecules(): BaseMonomer[]; private checkBondForOverlapsByMonomers; detectBondsOverlappedByMonomers(polymerBonds?: Array): void; private deleteRxnArrowModelChange; private addRxnArrowModelChange; addRxnArrow(type: RxnArrowMode, position: [Vec2, Vec2], height?: number, initiallySelected?: initiallySelectedType): Command; deleteRxnArrow(rxnArrow: RxnArrow): Command; private deleteMultitailArrowModelChange; private addMultitailArrowArrowModelChange; addMultitailArrow(multitailArrowKetNode: KetFileNode): Command; deleteMultitailArrow(multitailArrow: MultitailArrow): Command; private deleteRxnPlusModelChange; private addRxnPlusModelChange; addRxnPlus(position: Vec2, initiallySelected?: initiallySelectedType): Command; deleteRxnPlus(rxnPlus: RxnPlus): Command; selectAllConnectedEntities(startEntity: DrawingEntity): Command; private visitAllConnectedEntities; getConnectedMolecule(startEntity: DrawingEntity, entitiesToReturn?: Array): (Atom | Bond)[]; } export {};