From b34c5c743b81c9db37c6495ba2f42098aa3bfed4 Mon Sep 17 00:00:00 2001
From: Alexander Rose <alex.rose@rcsb.org>
Date: Thu, 3 Oct 2019 16:40:44 -0700
Subject: [PATCH] tweaked ligandPlusConnected selection

---
 src/mol-plugin/util/structure-selection-helper.ts | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/mol-plugin/util/structure-selection-helper.ts b/src/mol-plugin/util/structure-selection-helper.ts
index 1a221e6b7..9ab63cbf1 100644
--- a/src/mol-plugin/util/structure-selection-helper.ts
+++ b/src/mol-plugin/util/structure-selection-helper.ts
@@ -127,9 +127,17 @@ const ligand = MS.struct.modifier.union([
     })
 ])
 
+// don't innclude branched entities as they have their own link representation
 const ligandPlusConnected = MS.struct.modifier.union([
-    MS.struct.modifier.includeConnected({
-        0: ligand, 'layer-count': 1, 'as-whole-residues': true
+    MS.struct.modifier.exceptBy({
+        0: MS.struct.modifier.union([
+            MS.struct.modifier.includeConnected({
+                0: ligand,
+                'layer-count': 1,
+                'as-whole-residues': true
+            })
+        ]),
+        by: branched
     })
 ])
 
-- 
GitLab