Browse Source

ensure subtype assignment for all entities, #100

Alexander Rose 4 years ago
parent
commit
c17bfd65e7
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/mol-model-formats/structure/basic/entities.ts

+ 5 - 0
src/mol-model-formats/structure/basic/entities.ts

@@ -90,6 +90,11 @@ export function getEntities(data: BasicData, properties: Model['properties']): E
         assignSubtype = true;
     }
 
+    if (entityIds.size < subtypes.length) {
+        // still unassigned subtypes, need to derive from component id/type
+        assignSubtype = true;
+    }
+
     if (assignSubtype) {
         const chemCompType = new Map<string, string>();
         if (data.chem_comp) {