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