فهرست منبع

rscc coloring & QA option

Sebastian Bittrich 2 سال پیش
والد
کامیت
a06208a756

+ 4 - 0
CHANGELOG.md

@@ -2,6 +2,10 @@
 
 [Semantic Versioning](https://semver.org/)
 
+## Unreleased
+### Added
+- RSCC coloring & validation option
+
 ## [2.4.2] - 2022-06-01
 ### Bug fixes
 - Strucmotif UI: call `blur()` to update CSS style properly

+ 104 - 0
src/viewer/helpers/rscc/behavior.ts

@@ -0,0 +1,104 @@
+/**
+ * Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
+ *
+ * @author Sebastian Bittrich <sebastian.bittrich@rcsb.org>
+ */
+
+import {
+    PresetStructureRepresentations,
+    StructureRepresentationPresetProvider
+} from 'molstar/lib/mol-plugin-state/builder/structure/representation-preset';
+import { ValidationReport, ValidationReportProvider } from 'molstar/lib/extensions/rcsb/validation-report/prop';
+import { Model } from 'molstar/lib/mol-model/structure/model';
+import { StateObjectRef } from 'molstar/lib/mol-state';
+import { Task } from 'molstar/lib/mol-task';
+import { RSCCColorThemeProvider } from './color';
+import { PluginBehavior } from 'molstar/lib/mol-plugin/behavior/behavior';
+import { RSCC, RSCCProvider } from './prop';
+import { Loci } from 'molstar/lib/mol-model/loci';
+import { StructureElement } from 'molstar/lib/mol-model/structure/structure';
+import { OrderedSet } from 'molstar/lib/mol-data/int';
+import { ParamDefinition as PD } from 'molstar/lib/mol-util/param-definition';
+
+export const ValidationReportRSCCPreset = StructureRepresentationPresetProvider({
+    id: 'preset-structure-representation-rcsb-validation-report-rscc',
+    display: {
+        name: 'Validation Report (RSCC)', group: 'Annotation',
+        description: 'Color structure based on real-space correlation coefficients. Data from wwPDB Validation Report, obtained via RCSB PDB.'
+    },
+    isApplicable(a) {
+        return a.data.models.length === 1 && ValidationReport.isApplicable(a.data.models[0]) && Model.isFromXray(a.data.models[0]) && Model.probablyHasDensityMap(a.data.models[0]);
+    },
+    params: () => StructureRepresentationPresetProvider.CommonParams,
+    async apply(ref, params, plugin) {
+        const structureCell = StateObjectRef.resolveAndCheck(plugin.state.data, ref);
+        const structure = structureCell?.obj?.data;
+        if (!structureCell || !structure) return {};
+
+        await plugin.runTask(Task.create('Validation Report', async runtime => {
+            await ValidationReportProvider.attach({ runtime, assetManager: plugin.managers.asset }, structure.models[0]);
+        }));
+
+        if (!ValidationReportProvider.get(structure.models[0]).value?.rscc || ValidationReportProvider.get(structure.models[0]).value?.rscc.size === 0) throw Error('No RSCC available');
+
+        const colorTheme = RSCCColorThemeProvider.name as any;
+        return PresetStructureRepresentations.auto.apply(ref, { ...params, theme: { globalName: colorTheme, focus: { name: colorTheme } } }, plugin);
+    }
+});
+
+export const RSCCScore = PluginBehavior.create<{ autoAttach: boolean, showTooltip: boolean }>({
+    name: 'rscc-prop',
+    category: 'custom-props',
+    display: {
+        name: 'Real-Space Correlation Coefficient',
+        description: 'Real-Space Correlation Coefficient.'
+    },
+    ctor: class extends PluginBehavior.Handler<{ autoAttach: boolean, showTooltip: boolean }> {
+        private provider = RSCCProvider;
+
+        private labelProvider = {
+            label: (loci: Loci): string | undefined => {
+                if (!this.params.showTooltip) return;
+
+                switch (loci.kind) {
+                    case 'element-loci':
+                        if (loci.elements.length === 0) return;
+                        const e = loci.elements[0];
+                        const u = e.unit;
+                        if (!u.model.customProperties.hasReference(RSCCProvider.descriptor)) return;
+
+                        const se = StructureElement.Location.create(loci.structure, u, u.elements[OrderedSet.getAt(e.indices, 0)]);
+                        const confidenceScore = RSCC.getScore(se);
+                        return confidenceScore && confidenceScore[0] !== -1 ? `RSCC value: ${confidenceScore[0]} <small>( ${confidenceScore[1]} )</small>` : `No RSCC value`;
+
+                    default: return;
+                }
+            }
+        };
+
+        register(): void {
+            this.ctx.customModelProperties.register(this.provider, this.params.autoAttach);
+            this.ctx.managers.lociLabels.addProvider(this.labelProvider);
+
+            this.ctx.representation.structure.themes.colorThemeRegistry.add(RSCCColorThemeProvider);
+        }
+
+        update(p: { autoAttach: boolean, showTooltip: boolean }) {
+            const updated = this.params.autoAttach !== p.autoAttach;
+            this.params.autoAttach = p.autoAttach;
+            this.params.showTooltip = p.showTooltip;
+            this.ctx.customModelProperties.setDefaultAutoAttach(this.provider.descriptor.name, this.params.autoAttach);
+            return updated;
+        }
+
+        unregister() {
+            this.ctx.customModelProperties.unregister(RSCCProvider.descriptor.name);
+            this.ctx.managers.lociLabels.removeProvider(this.labelProvider);
+            this.ctx.representation.structure.themes.colorThemeRegistry.remove(RSCCColorThemeProvider);
+        }
+    },
+    params: () => ({
+        autoAttach: PD.Boolean(false),
+        showTooltip: PD.Boolean(true)
+    })
+});

+ 103 - 0
src/viewer/helpers/rscc/color.ts

@@ -0,0 +1,103 @@
+/**
+ * Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
+ *
+ * @author Sebastian Bittrich <sebastian.bittrich@rcsb.org>
+ */
+
+import { ThemeDataContext } from 'molstar/lib/mol-theme/theme';
+import { ColorTheme, LocationColor } from 'molstar/lib/mol-theme/color';
+import { ParamDefinition as PD } from 'molstar/lib/mol-util/param-definition';
+import { Color } from 'molstar/lib/mol-util/color';
+import { StructureElement, Model, Bond } from 'molstar/lib/mol-model/structure';
+import { Location } from 'molstar/lib/mol-model/location';
+import { CustomProperty } from 'molstar/lib/mol-model-props/common/custom-property';
+import { ValidationReport } from 'molstar/lib/extensions/rcsb/validation-report/prop';
+import { TableLegend } from 'molstar/lib/mol-util/legend';
+import { RSCC, RSCCProvider } from './prop';
+
+const DefaultColor = Color(0xaaaaaa);
+const Colors = [DefaultColor, Color(0xff7d45), Color(0xffdb13), Color(0x65cbf3), Color(0x0053d6)];
+const ConfidenceColors: { [k: string]: Color } = {
+    'No Score': Colors[0],
+    'Very low confidence': Colors[1],
+    'Low confidence': Colors[2],
+    'Well resolved': Colors[3],
+    'Very well resolved': Colors[4]
+};
+
+const ConfidenceColorLegend = TableLegend(Object.entries(ConfidenceColors));
+
+export function getRSCCColorThemeParams(ctx: ThemeDataContext) {
+    const categories = RSCC.getCategories(ctx.structure);
+    if (categories.length === 0) {
+        return {
+            type: PD.MappedStatic('score', {
+                'score': PD.Group({})
+            })
+        };
+    }
+
+    return {
+        type: PD.MappedStatic('score', {
+            'score': PD.Group({}),
+            'category': PD.Group({
+                kind: PD.Select(categories[0], PD.arrayToOptions(categories))
+            }, { isFlat: true })
+        })
+    };
+}
+export type RSCCColorThemeParams = ReturnType<typeof getRSCCColorThemeParams>
+
+export function RSCCColorTheme(ctx: ThemeDataContext, props: PD.Values<RSCCColorThemeParams>): ColorTheme<RSCCColorThemeParams> {
+    let color: LocationColor = () => DefaultColor;
+
+    if (ctx.structure && ctx.structure.models.length > 0 && ctx.structure.models[0].customProperties.has(RSCCProvider.descriptor)) {
+        const l = StructureElement.Location.create(ctx.structure.root);
+
+        const getColor = (location: StructureElement.Location): Color => {
+            const score: string = RSCC.getScore(location)[1];
+
+            if (props.type.name !== 'score') {
+                const categoryProp = props.type.params.kind;
+                if (score === categoryProp) return ConfidenceColors[score];
+            }
+
+            return ConfidenceColors[score];
+        };
+
+        color = (location: Location) => {
+            if (StructureElement.Location.is(location)) {
+                return getColor(location);
+            } else if (Bond.isLocation(location)) {
+                l.unit = location.aUnit;
+                l.element = location.aUnit.elements[location.aIndex];
+                return getColor(l);
+            }
+            return DefaultColor;
+        };
+    }
+
+    return {
+        factory: RSCCColorTheme,
+        granularity: 'group',
+        preferSmoothing: true,
+        color,
+        props,
+        description: 'Assigns residue colors according to the real-space correlation coefficient (RSCC) for polymer residues. Colors range from orange (very low confidence) and yellow (low confidence) to cyan (well resolved) and blue (very well resolved). Categories were obtained by archive-wide statistical analysis. Data from wwPDB Validation Report, obtained via RCSB PDB.',
+        legend: ConfidenceColorLegend
+    };
+}
+
+export const RSCCColorThemeProvider: ColorTheme.Provider<RSCCColorThemeParams, 'rscc'> = {
+    name: 'rscc',
+    label: 'Real-space correlation coefficient',
+    category: ColorTheme.Category.Validation,
+    factory: RSCCColorTheme,
+    getParams: getRSCCColorThemeParams,
+    defaultValues: PD.getDefaultValues(getRSCCColorThemeParams({})),
+    isApplicable: (ctx: ThemeDataContext) => !!ctx.structure && ValidationReport.isApplicable(ctx.structure.models[0]) && Model.isFromXray(ctx.structure.models[0]) && Model.probablyHasDensityMap(ctx.structure.models[0]),
+    ensureCustomProperties: {
+        attach: (ctx: CustomProperty.Context, data: ThemeDataContext) => data.structure ? RSCCProvider.attach(ctx, data.structure.models[0], void 0, true) : Promise.resolve(),
+        detach: (data) => data.structure && RSCCProvider.ref(data.structure.models[0], false)
+    }
+};

+ 124 - 0
src/viewer/helpers/rscc/prop.ts

@@ -0,0 +1,124 @@
+import { ThemeDataContext } from 'molstar/lib/mol-theme/theme';
+import { GraphQLClient } from 'molstar/lib/mol-util/graphql-client';
+import { SyncRuntimeContext } from 'molstar/lib/mol-task/execution/synchronous';
+import { resolution_gql } from './resolution.gql';
+import { ParamDefinition as PD } from 'molstar/lib/mol-util/param-definition';
+import lookup from './rscc-thresholds.json';
+import { CustomModelProperty } from 'molstar/lib/mol-model-props/common/custom-model-property';
+import { CustomPropertyDescriptor } from 'molstar/lib/mol-model/custom-property';
+import { Model, ResidueIndex } from 'molstar/lib/mol-model/structure/model';
+import { CustomProperty } from 'molstar/lib/mol-model-props/common/custom-property';
+import { PropertyWrapper } from 'molstar/lib/mol-model-props/common/wrapper';
+import { IndexedCustomProperty } from 'molstar/lib/commonjs/mol-model/structure/model/properties/custom/indexed';
+import { Structure, StructureElement } from 'molstar/lib/mol-model/structure/structure';
+import { Unit } from 'molstar/lib/mol-model/structure/structure';
+import { ValidationReport, ValidationReportProvider } from 'molstar/lib/extensions/rcsb/validation-report/prop';
+import { arraySetAdd } from 'molstar/lib/mol-util/array';
+
+export type RSCC = PropertyWrapper<{
+    score: IndexedCustomProperty.Residue<[number, string]>,
+    category: string[]
+}>
+
+export namespace RSCC {
+    import createInfo = PropertyWrapper.createInfo;
+
+    export function getScore(e: StructureElement.Location): [number, string] {
+        if (!Unit.isAtomic(e.unit)) return [-1, 'No Score'];
+        const prop = RSCCProvider.get(e.unit.model).value;
+        if (!prop || !prop.data) return [-1, 'No Score'];
+        const rI = e.unit.residueIndex[e.element];
+        return prop.data.score.has(rI) ? prop.data.score.get(rI)! : [-1, 'No Score'];
+    }
+
+    const _emptyArray: string[] = [];
+    export function getCategories(structure?: Structure) {
+        if (!structure || structure.isEmpty) return _emptyArray;
+        const prop = RSCCProvider.get(structure.models[0]).value;
+        if (!prop || !prop.data) return _emptyArray;
+        return prop.data.category;
+    }
+
+    export function isApplicable(ctx: ThemeDataContext) {
+        return !!ctx.structure && ValidationReport.isApplicable(ctx.structure.models[0]) && Model.isFromXray(ctx.structure.models[0]) && Model.probablyHasDensityMap(ctx.structure.models[0]);
+    }
+
+    export async function obtain(ctx: CustomProperty.Context, model: Model, props: RSCCProps): Promise<CustomProperty.Data<any>> {
+        return { value: { info: createInfo(), data: await _obtain(ctx, model, props) } };
+    }
+
+    async function _obtain(ctx: CustomProperty.Context, model: Model, _props: RSCCProps): Promise<RSCC['data'] | undefined> {
+        const rscc = ValidationReportProvider.get(model)?.value?.rscc;
+        if (!rscc) return;
+
+        const resolution = await fetchResolution(ctx, model, DefaultBaseUrl);
+        if (!resolution) return;
+
+        return createSourceMap(model, rscc, resolution);
+    }
+
+    function createSourceMap(model: Model, rscc: Map<ResidueIndex, number>, resolution: number): RSCC['data'] {
+        const ret = new Map<ResidueIndex, [number, string]>();
+        const categories: string[] = [];
+        const resolutionBin = Math.floor(resolution * 10);
+
+        const toCategory = (value: number, thresholds: [number, number, number]): 'Very low confidence' | 'Low confidence' | 'Well resolved' | 'Very well resolved' => {
+            if (value > thresholds[0]) return 'Very well resolved';
+            if (value > thresholds[1]) return 'Well resolved';
+            if (value > thresholds[2]) return 'Low confidence';
+            return 'Very low confidence';
+        };
+
+        const offsets = model.atomicHierarchy.residueAtomSegments.offsets;
+        rscc.forEach((v, k) => {
+            const label_comp_id = model.atomicHierarchy.atoms.label_comp_id.value(offsets[k]);
+            const residue: any = lookup[label_comp_id as keyof typeof lookup];
+            if (!residue) return;
+
+            const bin = residue[resolutionBin];
+            let category = 'No score';
+            if (!bin) {
+                // handle 'out-of-range' case
+                const keys = Object.keys(residue);
+                const [min, max] = [+keys[0], +keys[keys.length - 1]];
+                if (resolutionBin < min) category = toCategory(v, residue[keys[0]]);
+                if (resolutionBin > max) category = toCategory(v, residue[keys[keys.length - 1]]);
+            } else {
+                category = toCategory(v, bin);
+            }
+            ret.set(k, [v, category]);
+            arraySetAdd(categories, category);
+        });
+
+        return {
+            score: IndexedCustomProperty.fromResidueMap(ret),
+            category: categories
+        };
+    }
+}
+
+export const RSCCParams = {};
+export type RSCCParams = typeof RSCCParams
+export type RSCCProps = PD.Values<RSCCParams>
+
+export const RSCCProvider: CustomModelProperty.Provider<RSCCParams, RSCC> = CustomModelProperty.createProvider({
+    label: 'RSCC Score',
+    descriptor: CustomPropertyDescriptor({
+        name: 'rscc_score'
+    }),
+    type: 'static',
+    defaultParams: RSCCParams,
+    getParams: () => RSCCParams,
+    isApplicable: (data: Model) => RSCC.isApplicable(data),
+    obtain: async (ctx: CustomProperty.Context, data: Model, props: Partial<RSCCProps>) => {
+        const p = { ...PD.getDefaultValues(RSCCParams), ...props };
+        return await RSCC.obtain(ctx, data, p);
+    }
+});
+
+const DefaultBaseUrl = 'https://data.rcsb.org/graphql';
+async function fetchResolution(ctx: ThemeDataContext, model: Model, serverUrl: string): Promise<number> {
+    const client = new GraphQLClient(serverUrl, ctx.assetManager);
+    const result = await client.request(SyncRuntimeContext, resolution_gql, { entry_id: model.entryId });
+    return result.data.entry.refine[0].ls_d_res_high;
+}

+ 9 - 0
src/viewer/helpers/rscc/resolution.gql.ts

@@ -0,0 +1,9 @@
+export const resolution_gql = /* GraphQL */ `
+query Resolution($entry_id: String!) {
+    entry(entry_id: $entry_id) {
+        refine {
+          ls_d_res_high
+        }
+    }
+}
+`;

+ 2669 - 0
src/viewer/helpers/rscc/rscc-thresholds.json

@@ -0,0 +1,2669 @@
+{
+  "GLY": {
+    "10": [
+      0.97,
+      0.891,
+      0.75042
+    ],
+    "11": [
+      0.969,
+      0.897,
+      0.756
+    ],
+    "12": [
+      0.964,
+      0.89,
+      0.7258
+    ],
+    "13": [
+      0.957,
+      0.873,
+      0.7
+    ],
+    "14": [
+      0.953,
+      0.864,
+      0.697
+    ],
+    "15": [
+      0.948,
+      0.855,
+      0.679
+    ],
+    "16": [
+      0.944,
+      0.85,
+      0.681
+    ],
+    "17": [
+      0.945,
+      0.856,
+      0.683
+    ],
+    "18": [
+      0.945,
+      0.853,
+      0.681
+    ],
+    "19": [
+      0.944,
+      0.848,
+      0.67
+    ],
+    "20": [
+      0.942,
+      0.847,
+      0.672
+    ],
+    "21": [
+      0.941,
+      0.842,
+      0.664
+    ],
+    "22": [
+      0.939,
+      0.838,
+      0.665
+    ],
+    "23": [
+      0.936,
+      0.831,
+      0.65
+    ],
+    "24": [
+      0.937,
+      0.833,
+      0.657
+    ],
+    "25": [
+      0.935,
+      0.833,
+      0.658
+    ],
+    "26": [
+      0.933,
+      0.825,
+      0.647
+    ],
+    "27": [
+      0.93,
+      0.817,
+      0.629
+    ],
+    "28": [
+      0.926,
+      0.808,
+      0.611
+    ],
+    "29": [
+      0.918,
+      0.783,
+      0.568
+    ],
+    "30": [
+      0.918,
+      0.78,
+      0.55
+    ],
+    "31": [
+      0.906,
+      0.749,
+      0.514
+    ],
+    "32": [
+      0.903,
+      0.75,
+      0.519
+    ],
+    "33": [
+      0.898,
+      0.741,
+      0.523
+    ],
+    "34": [
+      0.884,
+      0.706,
+      0.455
+    ]
+  },
+  "ALA": {
+    "10": [
+      0.97,
+      0.923,
+      0.824
+    ],
+    "11": [
+      0.967,
+      0.92,
+      0.818
+    ],
+    "12": [
+      0.964,
+      0.912,
+      0.812
+    ],
+    "13": [
+      0.956,
+      0.896,
+      0.776
+    ],
+    "14": [
+      0.951,
+      0.888,
+      0.764
+    ],
+    "15": [
+      0.947,
+      0.881,
+      0.748
+    ],
+    "16": [
+      0.944,
+      0.876,
+      0.743
+    ],
+    "17": [
+      0.947,
+      0.884,
+      0.754
+    ],
+    "18": [
+      0.947,
+      0.883,
+      0.755
+    ],
+    "19": [
+      0.948,
+      0.883,
+      0.757
+    ],
+    "20": [
+      0.946,
+      0.882,
+      0.753
+    ],
+    "21": [
+      0.945,
+      0.877,
+      0.741
+    ],
+    "22": [
+      0.944,
+      0.874,
+      0.74
+    ],
+    "23": [
+      0.944,
+      0.871,
+      0.735
+    ],
+    "24": [
+      0.947,
+      0.877,
+      0.738
+    ],
+    "25": [
+      0.946,
+      0.876,
+      0.746
+    ],
+    "26": [
+      0.946,
+      0.875,
+      0.734
+    ],
+    "27": [
+      0.946,
+      0.869,
+      0.715
+    ],
+    "28": [
+      0.945,
+      0.867,
+      0.711
+    ],
+    "29": [
+      0.943,
+      0.854,
+      0.685
+    ],
+    "30": [
+      0.942,
+      0.846,
+      0.658
+    ],
+    "31": [
+      0.936,
+      0.824,
+      0.61685
+    ],
+    "32": [
+      0.934,
+      0.826,
+      0.623
+    ],
+    "33": [
+      0.933,
+      0.825,
+      0.634
+    ],
+    "34": [
+      0.924,
+      0.795,
+      0.58
+    ]
+  },
+  "SER": {
+    "10": [
+      0.96,
+      0.884,
+      0.773
+    ],
+    "11": [
+      0.963,
+      0.892,
+      0.765
+    ],
+    "12": [
+      0.959,
+      0.892,
+      0.764
+    ],
+    "13": [
+      0.95,
+      0.867,
+      0.718
+    ],
+    "14": [
+      0.945,
+      0.86,
+      0.714
+    ],
+    "15": [
+      0.938,
+      0.846,
+      0.694
+    ],
+    "16": [
+      0.932,
+      0.837,
+      0.683
+    ],
+    "17": [
+      0.934,
+      0.847,
+      0.695
+    ],
+    "18": [
+      0.933,
+      0.843,
+      0.687
+    ],
+    "19": [
+      0.933,
+      0.843,
+      0.68
+    ],
+    "20": [
+      0.931,
+      0.839,
+      0.677
+    ],
+    "21": [
+      0.929,
+      0.836,
+      0.667
+    ],
+    "22": [
+      0.928,
+      0.833,
+      0.664
+    ],
+    "23": [
+      0.927,
+      0.829,
+      0.659
+    ],
+    "24": [
+      0.93,
+      0.833,
+      0.668
+    ],
+    "25": [
+      0.927,
+      0.831,
+      0.669
+    ],
+    "26": [
+      0.927,
+      0.83,
+      0.666
+    ],
+    "27": [
+      0.926,
+      0.826,
+      0.658
+    ],
+    "28": [
+      0.924,
+      0.824,
+      0.656
+    ],
+    "29": [
+      0.919,
+      0.806,
+      0.62
+    ],
+    "30": [
+      0.918,
+      0.802,
+      0.603
+    ],
+    "31": [
+      0.911,
+      0.782,
+      0.57
+    ],
+    "32": [
+      0.908,
+      0.779,
+      0.567
+    ],
+    "33": [
+      0.903,
+      0.771,
+      0.574
+    ],
+    "34": [
+      0.896,
+      0.75,
+      0.531
+    ]
+  },
+  "CYS": {
+    "10": [
+      0.987,
+      0.957,
+      0.894
+    ],
+    "11": [
+      0.983,
+      0.949,
+      0.86016
+    ],
+    "12": [
+      0.978,
+      0.93,
+      0.81673
+    ],
+    "13": [
+      0.973,
+      0.914,
+      0.79188
+    ],
+    "14": [
+      0.968,
+      0.902,
+      0.76449
+    ],
+    "15": [
+      0.964,
+      0.892,
+      0.754
+    ],
+    "16": [
+      0.958,
+      0.881,
+      0.736
+    ],
+    "17": [
+      0.955,
+      0.878,
+      0.737
+    ],
+    "18": [
+      0.952,
+      0.869,
+      0.733
+    ],
+    "19": [
+      0.948,
+      0.864,
+      0.724
+    ],
+    "20": [
+      0.944,
+      0.855,
+      0.71
+    ],
+    "21": [
+      0.94,
+      0.846,
+      0.699
+    ],
+    "22": [
+      0.935,
+      0.837,
+      0.692
+    ],
+    "23": [
+      0.931,
+      0.833,
+      0.68011
+    ],
+    "24": [
+      0.929,
+      0.834,
+      0.698
+    ],
+    "25": [
+      0.928,
+      0.83,
+      0.684
+    ],
+    "26": [
+      0.926,
+      0.828,
+      0.684
+    ],
+    "27": [
+      0.926,
+      0.83,
+      0.684
+    ],
+    "28": [
+      0.921,
+      0.818,
+      0.66
+    ],
+    "29": [
+      0.913,
+      0.797,
+      0.607
+    ],
+    "30": [
+      0.916,
+      0.799,
+      0.61948
+    ],
+    "31": [
+      0.906,
+      0.77,
+      0.56786
+    ],
+    "32": [
+      0.902,
+      0.765,
+      0.573
+    ],
+    "33": [
+      0.899,
+      0.763,
+      0.573
+    ],
+    "34": [
+      0.889,
+      0.741,
+      0.55014
+    ]
+  },
+  "PRO": {
+    "10": [
+      0.966,
+      0.916,
+      0.802
+    ],
+    "11": [
+      0.96025,
+      0.903,
+      0.78513
+    ],
+    "12": [
+      0.955,
+      0.888,
+      0.76147
+    ],
+    "13": [
+      0.946,
+      0.873,
+      0.747
+    ],
+    "14": [
+      0.941,
+      0.867,
+      0.72959
+    ],
+    "15": [
+      0.936,
+      0.860700000000001,
+      0.728
+    ],
+    "16": [
+      0.933,
+      0.855,
+      0.72103
+    ],
+    "17": [
+      0.937,
+      0.863,
+      0.724
+    ],
+    "18": [
+      0.938,
+      0.863,
+      0.725
+    ],
+    "19": [
+      0.939,
+      0.863,
+      0.723
+    ],
+    "20": [
+      0.938,
+      0.862,
+      0.724
+    ],
+    "21": [
+      0.938,
+      0.86,
+      0.721
+    ],
+    "22": [
+      0.938,
+      0.86,
+      0.721
+    ],
+    "23": [
+      0.939,
+      0.858,
+      0.723
+    ],
+    "24": [
+      0.942,
+      0.867,
+      0.729
+    ],
+    "25": [
+      0.941,
+      0.864,
+      0.735
+    ],
+    "26": [
+      0.941,
+      0.863,
+      0.731
+    ],
+    "27": [
+      0.941,
+      0.86,
+      0.72313
+    ],
+    "28": [
+      0.94,
+      0.859,
+      0.721
+    ],
+    "29": [
+      0.938,
+      0.849,
+      0.703
+    ],
+    "30": [
+      0.936,
+      0.84,
+      0.668
+    ],
+    "31": [
+      0.93,
+      0.825,
+      0.645
+    ],
+    "32": [
+      0.928,
+      0.823,
+      0.648
+    ],
+    "33": [
+      0.924,
+      0.819,
+      0.662
+    ],
+    "34": [
+      0.914,
+      0.785,
+      0.596
+    ]
+  },
+  "VAL": {
+    "10": [
+      0.969,
+      0.92625,
+      0.823
+    ],
+    "11": [
+      0.966,
+      0.929,
+      0.855
+    ],
+    "12": [
+      0.962,
+      0.9183,
+      0.833
+    ],
+    "13": [
+      0.955,
+      0.908,
+      0.82
+    ],
+    "14": [
+      0.95,
+      0.899,
+      0.811
+    ],
+    "15": [
+      0.946,
+      0.894,
+      0.805
+    ],
+    "16": [
+      0.942,
+      0.888,
+      0.793
+    ],
+    "17": [
+      0.946,
+      0.895,
+      0.80321
+    ],
+    "18": [
+      0.945,
+      0.891,
+      0.794
+    ],
+    "19": [
+      0.945,
+      0.891,
+      0.788
+    ],
+    "20": [
+      0.944,
+      0.888,
+      0.791
+    ],
+    "21": [
+      0.943,
+      0.885,
+      0.783
+    ],
+    "22": [
+      0.942,
+      0.883,
+      0.777
+    ],
+    "23": [
+      0.943,
+      0.881,
+      0.769
+    ],
+    "24": [
+      0.947,
+      0.892,
+      0.792
+    ],
+    "25": [
+      0.945,
+      0.887,
+      0.789
+    ],
+    "26": [
+      0.946,
+      0.888,
+      0.788
+    ],
+    "27": [
+      0.947,
+      0.886,
+      0.773
+    ],
+    "28": [
+      0.947,
+      0.886,
+      0.773
+    ],
+    "29": [
+      0.945,
+      0.875,
+      0.742
+    ],
+    "30": [
+      0.944,
+      0.871,
+      0.728
+    ],
+    "31": [
+      0.94,
+      0.854,
+      0.696
+    ],
+    "32": [
+      0.939,
+      0.855,
+      0.701
+    ],
+    "33": [
+      0.937,
+      0.852,
+      0.705
+    ],
+    "34": [
+      0.93,
+      0.824,
+      0.64082
+    ]
+  },
+  "THR": {
+    "10": [
+      0.968,
+      0.92,
+      0.826
+    ],
+    "11": [
+      0.966,
+      0.913,
+      0.798
+    ],
+    "12": [
+      0.962,
+      0.901,
+      0.776
+    ],
+    "13": [
+      0.953,
+      0.885,
+      0.754
+    ],
+    "14": [
+      0.949,
+      0.877,
+      0.741
+    ],
+    "15": [
+      0.943,
+      0.87,
+      0.737
+    ],
+    "16": [
+      0.939,
+      0.865,
+      0.732
+    ],
+    "17": [
+      0.941,
+      0.869,
+      0.736
+    ],
+    "18": [
+      0.94,
+      0.866,
+      0.733
+    ],
+    "19": [
+      0.94,
+      0.863,
+      0.717
+    ],
+    "20": [
+      0.938,
+      0.862,
+      0.727
+    ],
+    "21": [
+      0.936,
+      0.858,
+      0.72
+    ],
+    "22": [
+      0.936,
+      0.857,
+      0.717
+    ],
+    "23": [
+      0.934,
+      0.852,
+      0.713
+    ],
+    "24": [
+      0.937,
+      0.859,
+      0.724
+    ],
+    "25": [
+      0.935,
+      0.855,
+      0.718
+    ],
+    "26": [
+      0.934,
+      0.854,
+      0.716
+    ],
+    "27": [
+      0.934,
+      0.85,
+      0.706
+    ],
+    "28": [
+      0.932,
+      0.848,
+      0.707
+    ],
+    "29": [
+      0.929,
+      0.835,
+      0.682
+    ],
+    "30": [
+      0.927,
+      0.831,
+      0.661
+    ],
+    "31": [
+      0.921,
+      0.815,
+      0.64
+    ],
+    "32": [
+      0.92,
+      0.815,
+      0.633
+    ],
+    "33": [
+      0.916,
+      0.806,
+      0.632
+    ],
+    "34": [
+      0.908,
+      0.786,
+      0.587
+    ]
+  },
+  "LEU": {
+    "10": [
+      0.968,
+      0.927,
+      0.84325
+    ],
+    "11": [
+      0.963,
+      0.921,
+      0.834
+    ],
+    "12": [
+      0.958,
+      0.911,
+      0.818
+    ],
+    "13": [
+      0.951,
+      0.899,
+      0.805
+    ],
+    "14": [
+      0.946,
+      0.894,
+      0.805
+    ],
+    "15": [
+      0.942,
+      0.886,
+      0.786
+    ],
+    "16": [
+      0.939,
+      0.88,
+      0.78
+    ],
+    "17": [
+      0.942,
+      0.888,
+      0.792
+    ],
+    "18": [
+      0.941,
+      0.884,
+      0.786
+    ],
+    "19": [
+      0.943,
+      0.887,
+      0.789
+    ],
+    "20": [
+      0.941,
+      0.884,
+      0.787
+    ],
+    "21": [
+      0.94,
+      0.88,
+      0.78
+    ],
+    "22": [
+      0.938,
+      0.87725,
+      0.771
+    ],
+    "23": [
+      0.939,
+      0.875,
+      0.762
+    ],
+    "24": [
+      0.944,
+      0.887,
+      0.78
+    ],
+    "25": [
+      0.942,
+      0.883,
+      0.786
+    ],
+    "26": [
+      0.943,
+      0.884,
+      0.783
+    ],
+    "27": [
+      0.944,
+      0.884,
+      0.778
+    ],
+    "28": [
+      0.945,
+      0.885,
+      0.781
+    ],
+    "29": [
+      0.945,
+      0.88,
+      0.759
+    ],
+    "30": [
+      0.942,
+      0.874,
+      0.743
+    ],
+    "31": [
+      0.939,
+      0.861,
+      0.715
+    ],
+    "32": [
+      0.938,
+      0.861,
+      0.721
+    ],
+    "33": [
+      0.937,
+      0.858,
+      0.725
+    ],
+    "34": [
+      0.93,
+      0.834,
+      0.67264
+    ]
+  },
+  "ILE": {
+    "10": [
+      0.968,
+      0.918,
+      0.81622
+    ],
+    "11": [
+      0.965,
+      0.927,
+      0.858
+    ],
+    "12": [
+      0.96,
+      0.91715,
+      0.84
+    ],
+    "13": [
+      0.953,
+      0.905,
+      0.822
+    ],
+    "14": [
+      0.948,
+      0.899,
+      0.81375
+    ],
+    "15": [
+      0.944,
+      0.89,
+      0.797
+    ],
+    "16": [
+      0.941,
+      0.886,
+      0.794
+    ],
+    "17": [
+      0.944,
+      0.892,
+      0.802
+    ],
+    "18": [
+      0.943,
+      0.89,
+      0.799
+    ],
+    "19": [
+      0.944,
+      0.891,
+      0.798
+    ],
+    "20": [
+      0.942,
+      0.889,
+      0.801
+    ],
+    "21": [
+      0.941,
+      0.886,
+      0.792
+    ],
+    "22": [
+      0.94,
+      0.882,
+      0.785
+    ],
+    "23": [
+      0.941,
+      0.881,
+      0.776
+    ],
+    "24": [
+      0.945,
+      0.892,
+      0.791
+    ],
+    "25": [
+      0.943,
+      0.886,
+      0.791
+    ],
+    "26": [
+      0.945,
+      0.889,
+      0.795
+    ],
+    "27": [
+      0.945,
+      0.887,
+      0.784
+    ],
+    "28": [
+      0.945,
+      0.886,
+      0.78
+    ],
+    "29": [
+      0.945,
+      0.881,
+      0.758
+    ],
+    "30": [
+      0.944,
+      0.879,
+      0.75168
+    ],
+    "31": [
+      0.941,
+      0.864,
+      0.728
+    ],
+    "32": [
+      0.94,
+      0.864,
+      0.717
+    ],
+    "33": [
+      0.939,
+      0.866,
+      0.738
+    ],
+    "34": [
+      0.934,
+      0.843,
+      0.688
+    ]
+  },
+  "ASN": {
+    "10": [
+      0.957,
+      0.884,
+      0.787
+    ],
+    "11": [
+      0.956,
+      0.88,
+      0.756
+    ],
+    "12": [
+      0.95,
+      0.87,
+      0.73822
+    ],
+    "13": [
+      0.941,
+      0.849,
+      0.706
+    ],
+    "14": [
+      0.937,
+      0.844,
+      0.703
+    ],
+    "15": [
+      0.93,
+      0.829,
+      0.683
+    ],
+    "16": [
+      0.924,
+      0.819,
+      0.675
+    ],
+    "17": [
+      0.927,
+      0.83,
+      0.689
+    ],
+    "18": [
+      0.924,
+      0.82,
+      0.676
+    ],
+    "19": [
+      0.924,
+      0.821,
+      0.669
+    ],
+    "20": [
+      0.921,
+      0.816,
+      0.667
+    ],
+    "21": [
+      0.918,
+      0.813,
+      0.666
+    ],
+    "22": [
+      0.916,
+      0.811,
+      0.663
+    ],
+    "23": [
+      0.914,
+      0.81,
+      0.663
+    ],
+    "24": [
+      0.917,
+      0.813,
+      0.658
+    ],
+    "25": [
+      0.913,
+      0.809,
+      0.66331
+    ],
+    "26": [
+      0.911,
+      0.808,
+      0.663
+    ],
+    "27": [
+      0.907,
+      0.801,
+      0.649
+    ],
+    "28": [
+      0.905,
+      0.801,
+      0.65439
+    ],
+    "29": [
+      0.903,
+      0.789,
+      0.623
+    ],
+    "30": [
+      0.9,
+      0.78,
+      0.597
+    ],
+    "31": [
+      0.893,
+      0.763,
+      0.584
+    ],
+    "32": [
+      0.891,
+      0.762,
+      0.56574
+    ],
+    "33": [
+      0.888,
+      0.763,
+      0.581
+    ],
+    "34": [
+      0.88,
+      0.741,
+      0.54
+    ]
+  },
+  "ASP": {
+    "10": [
+      0.95,
+      0.868,
+      0.74334
+    ],
+    "11": [
+      0.948,
+      0.865,
+      0.73649
+    ],
+    "12": [
+      0.942,
+      0.856,
+      0.725
+    ],
+    "13": [
+      0.932,
+      0.829,
+      0.68
+    ],
+    "14": [
+      0.928,
+      0.829,
+      0.69
+    ],
+    "15": [
+      0.92,
+      0.812,
+      0.665
+    ],
+    "16": [
+      0.913,
+      0.799,
+      0.65
+    ],
+    "17": [
+      0.916,
+      0.811,
+      0.669
+    ],
+    "18": [
+      0.912,
+      0.801,
+      0.654
+    ],
+    "19": [
+      0.913,
+      0.805,
+      0.659
+    ],
+    "20": [
+      0.908,
+      0.796,
+      0.642
+    ],
+    "21": [
+      0.906,
+      0.793,
+      0.641
+    ],
+    "22": [
+      0.904,
+      0.792,
+      0.64
+    ],
+    "23": [
+      0.901,
+      0.79,
+      0.638
+    ],
+    "24": [
+      0.904,
+      0.799,
+      0.64811
+    ],
+    "25": [
+      0.9,
+      0.792,
+      0.647
+    ],
+    "26": [
+      0.898,
+      0.789,
+      0.642
+    ],
+    "27": [
+      0.893,
+      0.782,
+      0.63
+    ],
+    "28": [
+      0.89,
+      0.781,
+      0.63
+    ],
+    "29": [
+      0.889,
+      0.773,
+      0.602
+    ],
+    "30": [
+      0.886,
+      0.763,
+      0.584
+    ],
+    "31": [
+      0.878,
+      0.747,
+      0.561
+    ],
+    "32": [
+      0.876,
+      0.742,
+      0.549
+    ],
+    "33": [
+      0.873,
+      0.741,
+      0.559
+    ],
+    "34": [
+      0.864,
+      0.72,
+      0.53187
+    ]
+  },
+  "MET": {
+    "10": [
+      0.975,
+      0.894,
+      0.64
+    ],
+    "11": [
+      0.968,
+      0.895,
+      0.763
+    ],
+    "12": [
+      0.968,
+      0.895,
+      0.75874
+    ],
+    "13": [
+      0.959,
+      0.875,
+      0.73102
+    ],
+    "14": [
+      0.953,
+      0.866,
+      0.71509
+    ],
+    "15": [
+      0.949,
+      0.856,
+      0.679
+    ],
+    "16": [
+      0.947,
+      0.852,
+      0.685
+    ],
+    "17": [
+      0.946,
+      0.857,
+      0.681
+    ],
+    "18": [
+      0.945,
+      0.855,
+      0.698
+    ],
+    "19": [
+      0.944,
+      0.854,
+      0.701
+    ],
+    "20": [
+      0.941,
+      0.85,
+      0.698
+    ],
+    "21": [
+      0.939,
+      0.848,
+      0.697
+    ],
+    "22": [
+      0.938,
+      0.848,
+      0.706
+    ],
+    "23": [
+      0.936,
+      0.847,
+      0.704
+    ],
+    "24": [
+      0.936,
+      0.849,
+      0.712
+    ],
+    "25": [
+      0.935,
+      0.846,
+      0.706
+    ],
+    "26": [
+      0.933,
+      0.845,
+      0.697
+    ],
+    "27": [
+      0.932,
+      0.838,
+      0.691
+    ],
+    "28": [
+      0.928,
+      0.833,
+      0.684
+    ],
+    "29": [
+      0.925,
+      0.829,
+      0.681
+    ],
+    "30": [
+      0.922,
+      0.819,
+      0.653
+    ],
+    "31": [
+      0.914,
+      0.799,
+      0.635
+    ],
+    "32": [
+      0.913,
+      0.805,
+      0.646
+    ],
+    "33": [
+      0.912,
+      0.805,
+      0.657
+    ],
+    "34": [
+      0.901,
+      0.771,
+      0.58634
+    ]
+  },
+  "GLN": {
+    "10": [
+      0.951,
+      0.865,
+      0.775
+    ],
+    "11": [
+      0.947,
+      0.871,
+      0.764
+    ],
+    "12": [
+      0.938,
+      0.852,
+      0.722
+    ],
+    "13": [
+      0.929,
+      0.838,
+      0.7
+    ],
+    "14": [
+      0.923,
+      0.831,
+      0.695
+    ],
+    "15": [
+      0.916,
+      0.817,
+      0.678
+    ],
+    "16": [
+      0.909,
+      0.804,
+      0.67
+    ],
+    "17": [
+      0.913,
+      0.813,
+      0.682
+    ],
+    "18": [
+      0.907,
+      0.802,
+      0.67
+    ],
+    "19": [
+      0.908,
+      0.808,
+      0.665
+    ],
+    "20": [
+      0.904,
+      0.799,
+      0.662
+    ],
+    "21": [
+      0.902,
+      0.797,
+      0.655
+    ],
+    "22": [
+      0.901,
+      0.796,
+      0.658
+    ],
+    "23": [
+      0.901,
+      0.796,
+      0.657
+    ],
+    "24": [
+      0.905,
+      0.806,
+      0.67174
+    ],
+    "25": [
+      0.9,
+      0.797,
+      0.662
+    ],
+    "26": [
+      0.898,
+      0.796,
+      0.659
+    ],
+    "27": [
+      0.896,
+      0.789,
+      0.649
+    ],
+    "28": [
+      0.895,
+      0.791,
+      0.651
+    ],
+    "29": [
+      0.893,
+      0.782,
+      0.621
+    ],
+    "30": [
+      0.89,
+      0.773,
+      0.603
+    ],
+    "31": [
+      0.883,
+      0.756,
+      0.567
+    ],
+    "32": [
+      0.881,
+      0.758,
+      0.578
+    ],
+    "33": [
+      0.878,
+      0.757,
+      0.585
+    ],
+    "34": [
+      0.868,
+      0.729,
+      0.54397
+    ]
+  },
+  "GLU": {
+    "10": [
+      0.94,
+      0.863,
+      0.73731
+    ],
+    "11": [
+      0.934,
+      0.85,
+      0.719
+    ],
+    "12": [
+      0.926,
+      0.837,
+      0.711
+    ],
+    "13": [
+      0.913,
+      0.805,
+      0.662
+    ],
+    "14": [
+      0.909,
+      0.806,
+      0.665
+    ],
+    "15": [
+      0.899,
+      0.784,
+      0.636
+    ],
+    "16": [
+      0.887,
+      0.763,
+      0.62
+    ],
+    "17": [
+      0.893,
+      0.781,
+      0.639
+    ],
+    "18": [
+      0.885,
+      0.766,
+      0.629
+    ],
+    "19": [
+      0.887,
+      0.777,
+      0.642
+    ],
+    "20": [
+      0.88,
+      0.765,
+      0.628
+    ],
+    "21": [
+      0.879,
+      0.763,
+      0.626
+    ],
+    "22": [
+      0.878,
+      0.765,
+      0.632
+    ],
+    "23": [
+      0.877,
+      0.767,
+      0.627
+    ],
+    "24": [
+      0.884,
+      0.78,
+      0.641
+    ],
+    "25": [
+      0.877,
+      0.768,
+      0.632
+    ],
+    "26": [
+      0.876,
+      0.769,
+      0.635
+    ],
+    "27": [
+      0.871,
+      0.761,
+      0.621
+    ],
+    "28": [
+      0.87,
+      0.761,
+      0.619
+    ],
+    "29": [
+      0.871,
+      0.754,
+      0.588
+    ],
+    "30": [
+      0.867,
+      0.747,
+      0.57072
+    ],
+    "31": [
+      0.859,
+      0.726,
+      0.538
+    ],
+    "32": [
+      0.859,
+      0.725,
+      0.533
+    ],
+    "33": [
+      0.857,
+      0.728,
+      0.55
+    ],
+    "34": [
+      0.846,
+      0.695,
+      0.499
+    ]
+  },
+  "LYS": {
+    "10": [
+      0.943,
+      0.874,
+      0.781
+    ],
+    "11": [
+      0.946,
+      0.88,
+      0.78
+    ],
+    "12": [
+      0.942,
+      0.877,
+      0.76713
+    ],
+    "13": [
+      0.933,
+      0.859,
+      0.747
+    ],
+    "14": [
+      0.929,
+      0.855,
+      0.744
+    ],
+    "15": [
+      0.921,
+      0.839,
+      0.722
+    ],
+    "16": [
+      0.914,
+      0.829,
+      0.71
+    ],
+    "17": [
+      0.918,
+      0.838,
+      0.718
+    ],
+    "18": [
+      0.911,
+      0.826,
+      0.703
+    ],
+    "19": [
+      0.912,
+      0.828,
+      0.694
+    ],
+    "20": [
+      0.907,
+      0.82,
+      0.69
+    ],
+    "21": [
+      0.906,
+      0.817,
+      0.677
+    ],
+    "22": [
+      0.904,
+      0.813,
+      0.679
+    ],
+    "23": [
+      0.903,
+      0.811,
+      0.673
+    ],
+    "24": [
+      0.907,
+      0.818,
+      0.682
+    ],
+    "25": [
+      0.901,
+      0.809,
+      0.677
+    ],
+    "26": [
+      0.9,
+      0.808,
+      0.677
+    ],
+    "27": [
+      0.895,
+      0.799,
+      0.66
+    ],
+    "28": [
+      0.892,
+      0.795,
+      0.654
+    ],
+    "29": [
+      0.893,
+      0.786,
+      0.622
+    ],
+    "30": [
+      0.889,
+      0.779,
+      0.606
+    ],
+    "31": [
+      0.881,
+      0.756,
+      0.568
+    ],
+    "32": [
+      0.877,
+      0.752,
+      0.555
+    ],
+    "33": [
+      0.874,
+      0.752,
+      0.574
+    ],
+    "34": [
+      0.86,
+      0.714,
+      0.498
+    ]
+  },
+  "HIS": {
+    "10": [
+      0.962,
+      0.9,
+      0.78
+    ],
+    "11": [
+      0.956,
+      0.884,
+      0.74938
+    ],
+    "12": [
+      0.95,
+      0.87,
+      0.72034
+    ],
+    "13": [
+      0.943,
+      0.849,
+      0.695
+    ],
+    "14": [
+      0.938,
+      0.847,
+      0.696
+    ],
+    "15": [
+      0.934,
+      0.835,
+      0.674
+    ],
+    "16": [
+      0.93,
+      0.827,
+      0.669
+    ],
+    "17": [
+      0.934,
+      0.84,
+      0.683
+    ],
+    "18": [
+      0.932,
+      0.83,
+      0.671
+    ],
+    "19": [
+      0.932,
+      0.832,
+      0.679
+    ],
+    "20": [
+      0.929,
+      0.825,
+      0.67
+    ],
+    "21": [
+      0.927,
+      0.821,
+      0.67
+    ],
+    "22": [
+      0.926,
+      0.819,
+      0.665
+    ],
+    "23": [
+      0.924,
+      0.82,
+      0.673
+    ],
+    "24": [
+      0.926,
+      0.824,
+      0.674
+    ],
+    "25": [
+      0.924,
+      0.823,
+      0.68
+    ],
+    "26": [
+      0.922,
+      0.819,
+      0.684
+    ],
+    "27": [
+      0.919,
+      0.812,
+      0.671
+    ],
+    "28": [
+      0.915,
+      0.809,
+      0.665
+    ],
+    "29": [
+      0.91,
+      0.791,
+      0.6399
+    ],
+    "30": [
+      0.908,
+      0.793,
+      0.631
+    ],
+    "31": [
+      0.9,
+      0.768,
+      0.587
+    ],
+    "32": [
+      0.894,
+      0.769,
+      0.6
+    ],
+    "33": [
+      0.889,
+      0.761,
+      0.589
+    ],
+    "34": [
+      0.875,
+      0.727,
+      0.565
+    ]
+  },
+  "PHE": {
+    "10": [
+      0.967,
+      0.918,
+      0.81773
+    ],
+    "11": [
+      0.968,
+      0.927,
+      0.847
+    ],
+    "12": [
+      0.962,
+      0.916,
+      0.829
+    ],
+    "13": [
+      0.955,
+      0.905,
+      0.808
+    ],
+    "14": [
+      0.952,
+      0.901,
+      0.801
+    ],
+    "15": [
+      0.946,
+      0.89,
+      0.788
+    ],
+    "16": [
+      0.942,
+      0.883,
+      0.779
+    ],
+    "17": [
+      0.943,
+      0.884450000000001,
+      0.781
+    ],
+    "18": [
+      0.942,
+      0.882,
+      0.778
+    ],
+    "19": [
+      0.942,
+      0.88,
+      0.772
+    ],
+    "20": [
+      0.939,
+      0.877,
+      0.77
+    ],
+    "21": [
+      0.938,
+      0.872,
+      0.76
+    ],
+    "22": [
+      0.937,
+      0.87,
+      0.759
+    ],
+    "23": [
+      0.937,
+      0.867,
+      0.751
+    ],
+    "24": [
+      0.941,
+      0.877,
+      0.77
+    ],
+    "25": [
+      0.938,
+      0.871,
+      0.763
+    ],
+    "26": [
+      0.939,
+      0.872,
+      0.7607
+    ],
+    "27": [
+      0.938,
+      0.867,
+      0.743
+    ],
+    "28": [
+      0.936,
+      0.864,
+      0.742
+    ],
+    "29": [
+      0.934,
+      0.851,
+      0.711
+    ],
+    "30": [
+      0.931,
+      0.846,
+      0.698
+    ],
+    "31": [
+      0.925,
+      0.828,
+      0.67148
+    ],
+    "32": [
+      0.922,
+      0.826,
+      0.667
+    ],
+    "33": [
+      0.918,
+      0.82,
+      0.678
+    ],
+    "34": [
+      0.91,
+      0.788,
+      0.615
+    ]
+  },
+  "ARG": {
+    "10": [
+      0.949,
+      0.89,
+      0.799
+    ],
+    "11": [
+      0.941,
+      0.875,
+      0.782
+    ],
+    "12": [
+      0.934,
+      0.867,
+      0.757
+    ],
+    "13": [
+      0.926,
+      0.847,
+      0.73
+    ],
+    "14": [
+      0.921,
+      0.841,
+      0.722
+    ],
+    "15": [
+      0.914,
+      0.826,
+      0.70249
+    ],
+    "16": [
+      0.907,
+      0.811,
+      0.685
+    ],
+    "17": [
+      0.912,
+      0.823,
+      0.702
+    ],
+    "18": [
+      0.905,
+      0.808,
+      0.682
+    ],
+    "19": [
+      0.905,
+      0.812,
+      0.692
+    ],
+    "20": [
+      0.9,
+      0.801,
+      0.674
+    ],
+    "21": [
+      0.899,
+      0.798,
+      0.668
+    ],
+    "22": [
+      0.897,
+      0.796,
+      0.667
+    ],
+    "23": [
+      0.895,
+      0.794,
+      0.665
+    ],
+    "24": [
+      0.899,
+      0.804,
+      0.672
+    ],
+    "25": [
+      0.894,
+      0.795,
+      0.669
+    ],
+    "26": [
+      0.894,
+      0.793,
+      0.668
+    ],
+    "27": [
+      0.889,
+      0.784,
+      0.646
+    ],
+    "28": [
+      0.887,
+      0.781,
+      0.63
+    ],
+    "29": [
+      0.882,
+      0.768,
+      0.615
+    ],
+    "30": [
+      0.88,
+      0.762,
+      0.59
+    ],
+    "31": [
+      0.87,
+      0.742,
+      0.565
+    ],
+    "32": [
+      0.866,
+      0.74,
+      0.571
+    ],
+    "33": [
+      0.862,
+      0.735,
+      0.568
+    ],
+    "34": [
+      0.848,
+      0.709,
+      0.52244
+    ]
+  },
+  "TYR": {
+    "10": [
+      0.965,
+      0.925,
+      0.85092
+    ],
+    "11": [
+      0.966,
+      0.924,
+      0.851
+    ],
+    "12": [
+      0.96,
+      0.913,
+      0.836
+    ],
+    "13": [
+      0.953,
+      0.902,
+      0.813
+    ],
+    "14": [
+      0.949,
+      0.894,
+      0.793
+    ],
+    "15": [
+      0.943,
+      0.882,
+      0.776
+    ],
+    "16": [
+      0.939,
+      0.873,
+      0.762
+    ],
+    "17": [
+      0.941,
+      0.879,
+      0.769
+    ],
+    "18": [
+      0.939,
+      0.873,
+      0.763
+    ],
+    "19": [
+      0.938,
+      0.87,
+      0.752
+    ],
+    "20": [
+      0.936,
+      0.867,
+      0.753
+    ],
+    "21": [
+      0.934,
+      0.863,
+      0.751
+    ],
+    "22": [
+      0.932,
+      0.858,
+      0.74
+    ],
+    "23": [
+      0.931,
+      0.853,
+      0.727
+    ],
+    "24": [
+      0.934,
+      0.86,
+      0.742
+    ],
+    "25": [
+      0.931,
+      0.856,
+      0.74
+    ],
+    "26": [
+      0.93,
+      0.853,
+      0.728
+    ],
+    "27": [
+      0.928,
+      0.849,
+      0.724
+    ],
+    "28": [
+      0.925,
+      0.842,
+      0.717
+    ],
+    "29": [
+      0.922,
+      0.826,
+      0.67126
+    ],
+    "30": [
+      0.918,
+      0.822,
+      0.672
+    ],
+    "31": [
+      0.91,
+      0.8,
+      0.634
+    ],
+    "32": [
+      0.905,
+      0.793,
+      0.62974
+    ],
+    "33": [
+      0.901,
+      0.789,
+      0.63506
+    ],
+    "34": [
+      0.888,
+      0.76,
+      0.586
+    ]
+  },
+  "TRP": {
+    "10": [
+      0.974,
+      0.943,
+      0.889
+    ],
+    "11": [
+      0.968,
+      0.935,
+      0.861
+    ],
+    "12": [
+      0.962,
+      0.919,
+      0.8167
+    ],
+    "13": [
+      0.955,
+      0.906,
+      0.81055
+    ],
+    "14": [
+      0.95,
+      0.898,
+      0.806
+    ],
+    "15": [
+      0.946,
+      0.892,
+      0.797
+    ],
+    "16": [
+      0.942,
+      0.885,
+      0.789
+    ],
+    "17": [
+      0.944,
+      0.889,
+      0.79579
+    ],
+    "18": [
+      0.944,
+      0.885,
+      0.783
+    ],
+    "19": [
+      0.943,
+      0.883,
+      0.768
+    ],
+    "20": [
+      0.941,
+      0.88,
+      0.779
+    ],
+    "21": [
+      0.939,
+      0.874,
+      0.765
+    ],
+    "22": [
+      0.938,
+      0.87,
+      0.75578
+    ],
+    "23": [
+      0.938,
+      0.869,
+      0.758
+    ],
+    "24": [
+      0.941,
+      0.873,
+      0.759
+    ],
+    "25": [
+      0.939,
+      0.869,
+      0.758
+    ],
+    "26": [
+      0.937,
+      0.863,
+      0.736
+    ],
+    "27": [
+      0.937,
+      0.862,
+      0.74
+    ],
+    "28": [
+      0.934,
+      0.857,
+      0.729
+    ],
+    "29": [
+      0.932,
+      0.849,
+      0.72143
+    ],
+    "30": [
+      0.927,
+      0.834,
+      0.691
+    ],
+    "31": [
+      0.92,
+      0.821,
+      0.668
+    ],
+    "32": [
+      0.915,
+      0.811,
+      0.6672
+    ],
+    "33": [
+      0.907,
+      0.78515,
+      0.63
+    ],
+    "34": [
+      0.897,
+      0.7564,
+      0.606
+    ]
+  },
+  "MSE": {
+    "10": [
+      0.963,
+      0.871,
+      0.7782
+    ],
+    "11": [
+      0.96,
+      0.871,
+      0.745
+    ],
+    "12": [
+      0.9735,
+      0.9,
+      0.79026
+    ],
+    "13": [
+      0.96,
+      0.8773,
+      0.71946
+    ],
+    "14": [
+      0.959,
+      0.868,
+      0.69612
+    ],
+    "15": [
+      0.945,
+      0.81,
+      0.62072
+    ],
+    "16": [
+      0.95,
+      0.834,
+      0.65
+    ],
+    "17": [
+      0.95,
+      0.848,
+      0.713
+    ],
+    "18": [
+      0.948,
+      0.829,
+      0.64207
+    ],
+    "19": [
+      0.941,
+      0.82475,
+      0.6445
+    ],
+    "20": [
+      0.942,
+      0.831,
+      0.65921
+    ],
+    "21": [
+      0.938,
+      0.823,
+      0.65854
+    ],
+    "22": [
+      0.933,
+      0.813,
+      0.64607
+    ],
+    "23": [
+      0.928,
+      0.809,
+      0.646
+    ],
+    "24": [
+      0.937,
+      0.836,
+      0.70496
+    ],
+    "25": [
+      0.921,
+      0.792,
+      0.62104
+    ],
+    "26": [
+      0.916,
+      0.794,
+      0.62121
+    ],
+    "27": [
+      0.91,
+      0.779,
+      0.60204
+    ],
+    "28": [
+      0.905,
+      0.77015,
+      0.60466
+    ],
+    "29": [
+      0.9085,
+      0.7936,
+      0.62998
+    ],
+    "30": [
+      0.884,
+      0.7381,
+      0.53022
+    ],
+    "31": [
+      0.879,
+      0.7344,
+      0.5684
+    ],
+    "32": [
+      0.874,
+      0.718,
+      0.5428
+    ],
+    "33": [
+      0.8475,
+      0.6843,
+      0.54598
+    ],
+    "34": [
+      0.8345,
+      0.694,
+      0.50426
+    ]
+  }
+}

+ 9 - 0
src/viewer/index.html

@@ -644,6 +644,15 @@
                             kind: 'nakb'
                         }
                     }
+                },
+                {
+                    id: '1DTJ',
+                    info: 'RSCC: CRYSTAL STRUCTURE OF NOVA-2 KH3 K-HOMOLOGY RNA-BINDING DOMAIN',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
                 }
             ];
 

+ 2 - 0
src/viewer/index.ts

@@ -48,6 +48,7 @@ import { exportHierarchy } from 'molstar/lib/extensions/model-export/export';
 import { GeometryExport } from 'molstar/lib/extensions/geo-export';
 import { Mp4Export } from 'molstar/lib/extensions/mp4-export';
 import { PartialCanvas3DProps } from 'molstar/lib/mol-canvas3d/canvas3d';
+import { RSCCScore } from './helpers/rscc/behavior';
 
 /** package version, filled in at bundle build time */
 declare const __RCSB_MOLSTAR_VERSION__: string;
@@ -61,6 +62,7 @@ export const BUILD_DATE = new Date(BUILD_TIMESTAMP);
 const Extensions = {
     'rcsb-assembly-symmetry': PluginSpec.Behavior(RCSBAssemblySymmetry),
     'rcsb-validation-report': PluginSpec.Behavior(RCSBValidationReport),
+    'rscc': PluginSpec.Behavior(RSCCScore),
     'anvil-membrane-orientation': PluginSpec.Behavior(ANVILMembraneOrientation),
     'ma-quality-assessment': PluginSpec.Behavior(MAQualityAssessment),
     'model-export': PluginSpec.Behavior(ModelExport),

+ 31 - 1
src/viewer/ui/validation.tsx

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
+ * Copyright (c) 2021-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
  *
  * @author Sebastian Bittrich <sebastian.bittrich@rcsb.org>
  */
@@ -8,18 +8,21 @@ import { CollapsableControls, CollapsableState } from 'molstar/lib/mol-plugin-ui
 import { StructureHierarchyManager } from 'molstar/lib/mol-plugin-state/manager/structure/hierarchy';
 import { ValidationReport } from 'molstar/lib/extensions/rcsb/validation-report/prop';
 import { ValidationReportGeometryQualityPreset } from 'molstar/lib/extensions/rcsb/validation-report/behavior';
+import { ValidationReportRSCCPreset } from '../helpers/rscc/behavior';
 import { ActionMenu } from 'molstar/lib/mol-plugin-ui/controls/action-menu';
 import { Model } from 'molstar/lib/mol-model/structure/model';
 import { MmcifFormat } from 'molstar/lib/mol-model-formats/structure/mmcif';
 import { QualityAssessment } from 'molstar/lib/extensions/model-archive/quality-assessment/prop';
 import { PLDDTConfidenceColorThemeProvider } from 'molstar/lib/extensions/model-archive/quality-assessment/color/plddt';
 import { QmeanScoreColorThemeProvider } from 'molstar/lib/extensions/model-archive/quality-assessment/color/qmean';
+import { RSCC } from '../helpers/rscc/prop';
 
 interface ValidationReportState extends CollapsableState {
     errorStates: Set<string>
 }
 
 const ValidationReportTag = 'validation-report';
+const RSCCReportTag = 'rscc';
 
 const _QualityIcon = <svg width='50px' height='50px' viewBox='0 0 38 47'>
     <g strokeWidth='4' fill='none'>
@@ -77,6 +80,11 @@ export class ValidationReportControls extends CollapsableControls<{}, Validation
         return !model || !this.isFromPdbArchive(model);
     }
 
+    get rsccData() {
+        const structure = this.pivot.cell.obj?.data;
+        return RSCC.isApplicable({ structure });
+    }
+
     get pLDDTData() {
         const structure = this.pivot.cell.obj?.data;
         if (!structure || structure.models.length !== 1) return false;
@@ -110,6 +118,19 @@ export class ValidationReportControls extends CollapsableControls<{}, Validation
         }
     };
 
+    requestRSCCPreset = async () => {
+        try {
+            await ValidationReportRSCCPreset.apply(this.pivot.cell, Object.create(null), this.plugin);
+        } catch (err) {
+            // happens e.g. for 4HHB
+            this.setState(({ errorStates }) => {
+                const errors = new Set(errorStates);
+                errors.add(RSCCReportTag);
+                return { errorStates: errors };
+            });
+        }
+    };
+
     requestPLDDTConfidenceColoring = async () => {
         await this.plugin.managers.structure.component.updateRepresentationsTheme(this.pivot.components, { color: PLDDTConfidenceColorThemeProvider.name as any });
     };
@@ -121,6 +142,7 @@ export class ValidationReportControls extends CollapsableControls<{}, Validation
     get actions(): ActionMenu.Items {
         const noValidationReport = this.noValidationReport;
         const validationReportError = this.state.errorStates.has(ValidationReportTag);
+        const rsccReportError = this.state.errorStates.has(RSCCReportTag);
         const out: ActionMenu.Items = [
             {
                 kind: 'item',
@@ -130,6 +152,14 @@ export class ValidationReportControls extends CollapsableControls<{}, Validation
             },
         ];
 
+        if (this.rsccData) {
+            out.push({
+                kind: 'item',
+                label: rsccReportError || validationReportError ? 'Failed to Obtain RSCC Values' : (noValidationReport ? 'No RSCC Values Available' : 'Real Space Correlation Coefficient (RSCC)'),
+                value: this.requestRSCCPreset,
+                disabled: noValidationReport || validationReportError || rsccReportError
+            });
+        }
         if (this.pLDDTData) {
             out.push({
                 kind: 'item',

+ 1 - 0
tsconfig.json

@@ -19,6 +19,7 @@
         "lib": [ "es6", "dom", "esnext.asynciterable", "es2016" ],
         "outDir": "build/src",
         "rootDir": "src",
+        "resolveJsonModule": true,
     },
     "include": [ "src/**/*" ]
 }