Skip to content
Snippets Groups Projects
Commit 3b7c8963 authored by David Sehnal's avatar David Sehnal
Browse files

mol-theme: include <1 occupancy in default label

parent d58f4a73
No related branches found
No related tags found
No related merge requests found
......@@ -177,11 +177,13 @@ function _atomicElementLabel(location: StructureElement.Location<Unit.Atomic>, g
const comp_id = Props.residue.label_comp_id(location)
const atom_id = Props.atom.label_atom_id(location)
const alt_id = Props.atom.label_alt_id(location)
const occupancy = Props.atom.occupancy(location);
const microHetCompIds = Props.residue.microheterogeneityCompIds(location)
const compId = granularity === 'residue' && microHetCompIds.length > 1 ?
`(${microHetCompIds.join('|')})` : comp_id
const label: string[] = []
switch (granularity) {
......@@ -205,6 +207,10 @@ function _atomicElementLabel(location: StructureElement.Location<Unit.Atomic>, g
}
}
if (label.length > 0 && occupancy !== 1) {
label[0] = `${label[0]} <small>[occupancy</small> <b>${Math.round(100 * occupancy) / 100}</b><small>]</small>`;
}
return label.reverse()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment