UNPKG

molstar

Version:

A comprehensive macromolecular library.

18 lines 802 B
/** * Copyright (c) 2017-2020 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 { Table } from '../../../mol-data/db'; export function getModelGroupName(model_id, data) { var ihm_model_group = data.ihm_model_group, ihm_model_group_link = data.ihm_model_group_link; var link = Table.pickRow(ihm_model_group_link, function (i) { return ihm_model_group_link.model_id.value(i) === model_id; }); if (link) { var group = Table.pickRow(ihm_model_group, function (i) { return ihm_model_group.id.value(i) === link.group_id; }); if (group) return group.name; } return ''; } //# sourceMappingURL=util.js.map