import {MolfileHandler} from '@datagrok-libraries/chem-meta/src/parsing-utils/molfile-handler'; import {MolfileHandlerBase} from '@datagrok-libraries/chem-meta/src/parsing-utils/molfile-handler-base'; /** Extracts positions of vertices from pseudo-molfile (with * monomers being the vertices) generated by HELM Web Editor */ export class GlobalMonomerPositionHandler { constructor(helmCoordinatesPseudoMolfile: string) { this.molfileHandler = MolfileHandler.getInstance(helmCoordinatesPseudoMolfile); } private molfileHandler: MolfileHandlerBase; get monomerSymbols(): string[] { return this.molfileHandler.atomTypes; } getMonomerShifts(monomerIdx: number): {x: number, y: number} { const x = this.molfileHandler.x[monomerIdx]; const y = this.molfileHandler.y[monomerIdx]; return {x, y}; } }