molstar
Version:
A comprehensive macromolecular library.
27 lines • 1 kB
JavaScript
/**
* Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.trajectoryFromSdf = exports.SdfFormat = void 0;
var mol_task_1 = require("../../mol-task");
var mol_1 = require("./mol");
var SdfFormat;
(function (SdfFormat) {
function is(x) {
return (x === null || x === void 0 ? void 0 : x.kind) === 'sdf';
}
SdfFormat.is = is;
function create(mol) {
return { kind: 'sdf', name: mol.molFile.title, data: mol };
}
SdfFormat.create = create;
})(SdfFormat || (SdfFormat = {}));
exports.SdfFormat = SdfFormat;
function trajectoryFromSdf(mol) {
return mol_task_1.Task.create('Parse SDF', function (ctx) { return (0, mol_1.getMolModels)(mol.molFile, SdfFormat.create(mol), ctx); });
}
exports.trajectoryFromSdf = trajectoryFromSdf;
//# sourceMappingURL=sdf.js.map
;