Browse Source

fix auto structure-quality for coarse models

Alexander Rose 2 years ago
parent
commit
5cabe6fb42
2 changed files with 2 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 1 1
      src/mol-repr/util.ts

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ Note that since we don't clearly distinguish between a public and private interf
 ## [Unreleased]
 
 - Fix edge-case in `Structure.eachUnitPair` with single-element units
+- Fix 'auto' structure-quality for coarse models
 
 ## [v3.25.0] - 2022-11-16
 

+ 1 - 1
src/mol-repr/util.ts

@@ -75,7 +75,7 @@ export type QualityThresholds = typeof DefaultQualityThresholds
 export function getStructureQuality(structure: Structure, tresholds: Partial<QualityThresholds> = {}): VisualQuality {
     const t = { ...DefaultQualityThresholds, ...tresholds };
     let score = structure.elementCount * t.elementCountFactor;
-    if (structure.isCoarseGrained) score *= t.coarseGrainedFactor;
+    if (structure.isCoarseGrained || structure.isCoarse) score *= t.coarseGrainedFactor;
     if (score > t.lowestElementCount) {
         return 'lowest';
     } else if (score > t.lowerElementCount) {