From 2b6c941ec29b394bbc44551992284f5d2af91b42 Mon Sep 17 00:00:00 2001
From: Alexander Rose <alex.rose@rcsb.org>
Date: Wed, 27 Jun 2018 15:17:17 -0700
Subject: [PATCH] fix coarse seq label (index error)

---
 src/mol-view/label.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mol-view/label.ts b/src/mol-view/label.ts
index 1623b27a9..e2c54c34f 100644
--- a/src/mol-view/label.ts
+++ b/src/mol-view/label.ts
@@ -61,7 +61,7 @@ export function elementLabel(loc: Element.Location) {
         if (seq_id_begin === seq_id_end) {
             const entityKey = Props.coarse.entityKey(loc)
             const seq = loc.unit.model.sequence.byEntityKey[entityKey]
-            const comp_id = seq.compId.value(seq_id_begin)
+            const comp_id = seq.compId.value(seq_id_begin - 1) // 1-indexed
             element = `[${comp_id}]${seq_id_begin}:${asym_id}`
         } else {
             element = `${seq_id_begin}-${seq_id_end}:${asym_id}`
-- 
GitLab