molstar
Version:
A comprehensive macromolecular library.
36 lines • 1.68 kB
JavaScript
/**
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { __assign, __awaiter, __generator } from "tslib";
import { ParamDefinition as PD } from '../../mol-util/param-definition';
import { computeInteractions, InteractionsParams as _InteractionsParams } from './interactions/interactions';
import { CustomStructureProperty } from '../common/custom-structure-property';
import { CustomPropertyDescriptor } from '../../mol-model/custom-property';
export var InteractionsParams = __assign({}, _InteractionsParams);
export var InteractionsProvider = CustomStructureProperty.createProvider({
label: 'Interactions',
descriptor: CustomPropertyDescriptor({
name: 'molstar_computed_interactions',
// TODO `cifExport` and `symbol`
}),
type: 'local',
defaultParams: InteractionsParams,
getParams: function (data) { return InteractionsParams; },
isApplicable: function (data) { return !data.isCoarseGrained; },
obtain: function (ctx, data, props) { return __awaiter(void 0, void 0, void 0, function () {
var p;
var _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
p = __assign(__assign({}, PD.getDefaultValues(InteractionsParams)), props);
_a = {};
return [4 /*yield*/, computeInteractions(ctx, data, p)];
case 1: return [2 /*return*/, (_a.value = _b.sent(), _a)];
}
});
}); }
});
//# sourceMappingURL=interactions.js.map