Browse Source

fix mononucleotides detected as polymer components

Alexander Rose 3 years ago
parent
commit
ce1bec12b4
2 changed files with 4 additions and 3 deletions
  1. 1 0
      CHANGELOG.md
  2. 3 3
      src/mol-model-formats/structure/common/component.ts

+ 1 - 0
CHANGELOG.md

@@ -12,6 +12,7 @@ Note that since we don't clearly distinguish between a public and private interf
 - Resolve marking in main renderer loop to improve overall performance
 - Use ``throttleTime`` instead of ``debounceTime`` in sequence viewer for better responsiveness
 - Change line geometry default ``scaleFactor`` to 2 (3 is too big after fixing line rendering)
+- Fix additional mononucleotides detected as polymer components
 
 ## [v3.2.0] - 2022-02-17
 

+ 3 - 3
src/mol-model-formats/structure/common/component.ts

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
  *
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
  */
@@ -30,7 +30,7 @@ const DnaAtomIdsList = [
 
 /** Used to reduce false positives for atom name-based type guessing */
 const NonPolymerNames = new Set([
-    'FMN', 'NCN', 'FNS', 'FMA' // Mononucleotides
+    'FMN', 'NCN', 'FNS', 'FMA', 'ATP', 'ADP', 'AMP', 'GTP', 'GDP', 'GMP' // Mononucleotides
 ]);
 
 const StandardComponents = (function () {
@@ -156,7 +156,7 @@ export class ComponentBuilder {
                 this.set(StandardComponents.get(compId)!);
             } else if (WaterNames.has(compId)) {
                 this.set({ id: compId, name: 'WATER', type: 'non-polymer' });
-            } else if (NonPolymerNames.has(compId)) {
+            } else if (NonPolymerNames.has(compId.toUpperCase())) {
                 this.set({ id: compId, name: this.namesMap.get(compId) || compId, type: 'non-polymer' });
             } else {
                 const atomIds = this.getAtomIds(index);