molstar
Version:
A comprehensive macromolecular library.
17 lines (16 loc) • 596 B
JavaScript
/**
* Copyright (c) 2019-2025 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { Task } from '../../../mol-task/index.js';
import { ReaderResult } from '../result.js';
import { Tokenizer } from '../common/text/tokenizer.js';
export function parsePDB(data, id, isPdbqt = false) {
return Task.create('Parse PDB', async (ctx) => ReaderResult.success({
lines: await Tokenizer.readAllLinesAsync(data, ctx),
id,
isPdbqt,
}));
}