Browse Source

use label asym-id for coloring coarse models (pdbdev), fixes #69

Alexander Rose 4 years ago
parent
commit
0d39dc69f1
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/mol-theme/color/chain-id.ts

+ 3 - 0
src/mol-theme/color/chain-id.ts

@@ -24,6 +24,9 @@ export const ChainIdColorThemeParams = {
 export type ChainIdColorThemeParams = typeof ChainIdColorThemeParams
 export function getChainIdColorThemeParams(ctx: ThemeDataContext) {
     const params = PD.clone(ChainIdColorThemeParams);
+    if (ctx.structure?.models.some(m => m.coarseHierarchy.isDefined)) {
+        params.asymId.defaultValue = 'label';
+    }
     return params;
 }