diff --git a/src/mol-theme/color/carbohydrate-symbol.ts b/src/mol-theme/color/carbohydrate-symbol.ts index 2a56f21d3a6415f3b07e709b547db1837d37824e..9577e1f89f90bda491f53cd5f253934fbfba62af 100644 --- a/src/mol-theme/color/carbohydrate-symbol.ts +++ b/src/mol-theme/color/carbohydrate-symbol.ts @@ -69,5 +69,5 @@ export const CarbohydrateSymbolColorThemeProvider: ColorTheme.Provider<Carbohydr factory: CarbohydrateSymbolColorTheme, getParams: getCarbohydrateSymbolColorThemeParams, defaultValues: PD.getDefaultValues(CarbohydrateSymbolColorThemeParams), - isApplicable: (ctx: ThemeDataContext) => !!ctx.structure + isApplicable: (ctx: ThemeDataContext) => !!ctx.structure && ctx.structure.carbohydrates.elements.length > 0 } \ No newline at end of file diff --git a/src/mol-theme/color/cross-link.ts b/src/mol-theme/color/cross-link.ts index 62d3d9a28171ebc0b80c3087c3211e7254253bf8..fe0128663812e13dfc0af3c7825ba47382df91de 100644 --- a/src/mol-theme/color/cross-link.ts +++ b/src/mol-theme/color/cross-link.ts @@ -72,5 +72,5 @@ export const CrossLinkColorThemeProvider: ColorTheme.Provider<CrossLinkColorThem factory: CrossLinkColorTheme, getParams: getCrossLinkColorThemeParams, defaultValues: PD.getDefaultValues(CrossLinkColorThemeParams), - isApplicable: (ctx: ThemeDataContext) => !!ctx.structure + isApplicable: (ctx: ThemeDataContext) => !!ctx.structure && ctx.structure.crossLinkRestraints.count > 0 } \ No newline at end of file diff --git a/src/mol-theme/color/model-index.ts b/src/mol-theme/color/model-index.ts index 39d398c8824e5531321e4f5fd578a10b792e0ea6..4c94ef32092ebb9c01692a27ac6805f985ad46d1 100644 --- a/src/mol-theme/color/model-index.ts +++ b/src/mol-theme/color/model-index.ts @@ -64,5 +64,5 @@ export const ModelIndexColorThemeProvider: ColorTheme.Provider<ModelIndexColorTh factory: ModelIndexColorTheme, getParams: getModelIndexColorThemeParams, defaultValues: PD.getDefaultValues(ModelIndexColorThemeParams), - isApplicable: (ctx: ThemeDataContext) => !!ctx.structure + isApplicable: (ctx: ThemeDataContext) => !!ctx.structure && ctx.structure.models.length > 1 } \ No newline at end of file diff --git a/src/mol-theme/color/occupancy.ts b/src/mol-theme/color/occupancy.ts index 3f315c5c2c6fa436641a7f66822b731289050ed0..24a9afb2c8db6971faa12404d79e2c2172dbe923 100644 --- a/src/mol-theme/color/occupancy.ts +++ b/src/mol-theme/color/occupancy.ts @@ -63,5 +63,5 @@ export const OccupancyColorThemeProvider: ColorTheme.Provider<OccupancyColorThem factory: OccupancyColorTheme, getParams: getOccupancyColorThemeParams, defaultValues: PD.getDefaultValues(OccupancyColorThemeParams), - isApplicable: (ctx: ThemeDataContext) => !!ctx.structure + isApplicable: (ctx: ThemeDataContext) => !!ctx.structure && ctx.structure.models.some(m => m.atomicConformation.occupancy.isDefined) } \ No newline at end of file diff --git a/src/mol-theme/color/uncertainty.ts b/src/mol-theme/color/uncertainty.ts index d7b78dabf43080ff617baa1dd025511856742730..d9218316e14a7a127f5228a7169c3c34aef3eddd 100644 --- a/src/mol-theme/color/uncertainty.ts +++ b/src/mol-theme/color/uncertainty.ts @@ -67,5 +67,5 @@ export const UncertaintyColorThemeProvider: ColorTheme.Provider<UncertaintyColor factory: UncertaintyColorTheme, getParams: getUncertaintyColorThemeParams, defaultValues: PD.getDefaultValues(UncertaintyColorThemeParams), - isApplicable: (ctx: ThemeDataContext) => !!ctx.structure + isApplicable: (ctx: ThemeDataContext) => !!ctx.structure && ctx.structure.models.some(m => m.atomicConformation.B_iso_or_equiv.isDefined || m.sourceData.data.ihm_sphere_obj_site.rmsf.isDefined) } \ No newline at end of file diff --git a/src/mol-theme/size/physical.ts b/src/mol-theme/size/physical.ts index d023e2f8a48750ca515f2a2ed9a1db399be6e521..01d71ca05a3e58f759fc3b24f7104f633907bf14 100644 --- a/src/mol-theme/size/physical.ts +++ b/src/mol-theme/size/physical.ts @@ -12,7 +12,7 @@ import { ParamDefinition as PD } from '../../mol-util/param-definition' import { ThemeDataContext } from '../../mol-theme/theme'; const DefaultSize = 1 -const Description = 'Assigns a physical size.' +const Description = 'Assigns a physical size, i.e. vdW radius for atoms or given radius for coarse spheres.' export const PhysicalSizeThemeParams = {} export type PhysicalSizeThemeParams = typeof PhysicalSizeThemeParams diff --git a/src/mol-theme/size/uncertainty.ts b/src/mol-theme/size/uncertainty.ts index f87579c8721928a2470264cda1bc471aea6e46d5..39e2abf1f615386383d791ab2c9792ab73b69941 100644 --- a/src/mol-theme/size/uncertainty.ts +++ b/src/mol-theme/size/uncertainty.ts @@ -57,5 +57,5 @@ export const UncertaintySizeThemeProvider: SizeTheme.Provider<UncertaintySizeThe factory: UncertaintySizeTheme, getParams: getUncertaintySizeThemeParams, defaultValues: PD.getDefaultValues(UncertaintySizeThemeParams), - isApplicable: (ctx: ThemeDataContext) => !!ctx.structure // TODO check if the structure has Uncertainty (B-factor, RMSF, ...) values + isApplicable: (ctx: ThemeDataContext) => !!ctx.structure && ctx.structure.models.some(m => m.atomicConformation.B_iso_or_equiv.isDefined || m.sourceData.data.ihm_sphere_obj_site.rmsf.isDefined) } \ No newline at end of file