molstar
Version:
A comprehensive macromolecular library.
32 lines (31 loc) • 1.2 kB
TypeScript
/**
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
*/
import { Column } from '../../../mol-data/db';
import { Task } from '../../../mol-task';
import { Tokenizer } from '../common/text/tokenizer';
import { ReaderResult as Result } from '../result';
/** Subset of the MolFile V2000 format */
export interface MolFile {
readonly title: string;
readonly program: string;
readonly comment: string;
readonly atoms: {
readonly count: number;
readonly x: Column<number>;
readonly y: Column<number>;
readonly z: Column<number>;
readonly type_symbol: Column<string>;
};
readonly bonds: {
readonly count: number;
readonly atomIdxA: Column<number>;
readonly atomIdxB: Column<number>;
readonly order: Column<number>;
};
}
export declare function handleAtoms(tokenizer: Tokenizer, count: number): MolFile['atoms'];
export declare function handleBonds(tokenizer: Tokenizer, count: number): MolFile['bonds'];
export declare function parseMol(data: string): Task<Result<MolFile>>;