From 5cabe6fb427b6203ca0705e45ab8e06faf658a2a Mon Sep 17 00:00:00 2001 From: Alexander Rose <alexander.rose@weirdbyte.de> Date: Sun, 20 Nov 2022 10:37:30 -0800 Subject: [PATCH] fix auto structure-quality for coarse models --- CHANGELOG.md | 1 + src/mol-repr/util.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79ca31513..d80869d17 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/src/mol-repr/util.ts b/src/mol-repr/util.ts index 632962922..b37e4954e 100644 --- a/src/mol-repr/util.ts +++ b/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) { -- GitLab