Browse Source

don't treat peptide terminus components as polymers

they don't neccesarily have the right atoms to draw a polymer cartoon
Alexander Rose 5 years ago
parent
commit
6917ba6230

+ 8 - 0
src/mol-model/structure/model/types.ts

@@ -172,6 +172,12 @@ export const BetaProteinComponentTypeNames = new Set([
     'D-BETA-PEPTIDE, C-GAMMA LINKING', 'L-BETA-PEPTIDE, C-GAMMA LINKING'
 ])
 
+/** Chemical component type names for protein termini, overlaps with D/L-linked */
+export const ProteinTerminusComponentTypeNames = new Set([
+    'D-PEPTIDE NH3 AMINO TERMINUS', 'D-PEPTIDE COOH CARBOXY TERMINUS',
+    'L-PEPTIDE NH3 AMINO TERMINUS', 'L-PEPTIDE COOH CARBOXY TERMINUS'
+])
+
 /** Chemical component type names for pepdite-like protein */
 export const OtherProteinComponentTypeNames = new Set([
     'PEPTIDE LINKING', 'PEPTIDE-LIKE',
@@ -287,6 +293,8 @@ export function getPolymerType(compType: string, molType: MoleculeType): Polymer
             return PolymerType.GammaProtein
         } else if (BetaProteinComponentTypeNames.has(compType)) {
             return PolymerType.BetaProtein
+        } else if (ProteinTerminusComponentTypeNames.has(compType)) {
+            return PolymerType.NA
         } else {
             return PolymerType.Protein
         }

+ 8 - 6
src/mol-plugin/util/structure-selection-helper.ts

@@ -140,16 +140,18 @@ const ligand = StructureSelectionQuery('Ligand', MS.struct.modifier.union([
                 ])
             })
         ]),
-        // this is to get non-polymer components in polymer entities,
-        // e.g. PXZ in 4HIV or generally ACE
-        //
-        // one option to optimize this is to expose `_entity_poly.nstd_monomer` in molql
-        // and only check those entities residue by residue
+        // this is to get non-polymer and peptide terminus components in polymer entities,
+        // - non-polymer, e.g. PXZ in 4HIV or generally ACE
+        // - carboxy terminus, e.g. FC0 in 4BP9, or ETA in 6DDE
+        // - amino terminus, e.g. ARF in 3K4V, or 4MM in 3EGV
         MS.struct.modifier.union([
             MS.struct.generator.atomGroups({
                 'entity-test': MS.core.rel.eq([MS.ammp('entityType'), 'polymer']),
                 'chain-test': MS.core.rel.eq([MS.ammp('objectPrimitive'), 'atomistic']),
-                'residue-test': MS.core.str.match([MS.re('non-polymer', 'i'), MS.ammp('chemCompType')])
+                'residue-test': MS.core.str.match([
+                    MS.re('non-polymer|(amino|carboxy) terminus', 'i'),
+                    MS.ammp('chemCompType')
+                ])
             })
         ])
     ]),