Browse Source

added disulfide-bridges StructureSelectionQuery

Alexander Rose 5 years ago
parent
commit
7868b22918

+ 1 - 0
src/mol-plugin/util/structure-representation-helper.ts

@@ -205,6 +205,7 @@ async function polymerAndLigand(r: StructureRepresentationHelper) {
         MS.struct.combinator.merge([
             Q.ligandPlusConnected.expression,
             Q.branchedConnectedOnly.expression,
+            Q.disulfideBridges.expression,
             Q.nonStandardPolymer.expression,
             Q.water.expression
         ])

+ 14 - 0
src/mol-plugin/util/structure-selection-helper.ts

@@ -190,6 +190,19 @@ const connectedOnly = StructureSelectionQuery('Connected to Ligand | Carbohydrat
     ]),
 ]))
 
+const disulfideBridges = StructureSelectionQuery('Disulfide Bridges', MS.struct.modifier.union([
+    MS.struct.modifier.wholeResidues([
+        MS.struct.modifier.union([
+            MS.struct.generator.linkedAtomicPairs({
+                0: MS.core.flags.hasAny([
+                    MS.struct.linkProperty.flags(),
+                    MS.core.type.bitflags([LinkType.Flag.Sulfide])
+                ])
+            })
+        ])
+    ])
+]))
+
 const modified = StructureSelectionQuery('Modified Residues', MS.struct.modifier.union([
     MS.struct.generator.atomGroups({
         'chain-test': MS.core.rel.eq([MS.ammp('objectPrimitive'), 'atomistic']),
@@ -246,6 +259,7 @@ export const StructureSelectionQueries = {
     ligandPlusConnected,
     ligandConnectedOnly,
     connectedOnly,
+    disulfideBridges,
     modified,
     nonStandardPolymer,
     coarse,