浏览代码

add NAKB preset

Sebastian Bittrich 3 年之前
父节点
当前提交
687b0e3a92
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/viewer/helpers/preset.ts

+ 7 - 1
src/viewer/helpers/preset.ts

@@ -112,8 +112,12 @@ export type MotifProps = {
     color?: number
 } & BaseProps
 
+export type NakbProps = {
+    kind: 'nakb'
+} & BaseProps
+
 export type PresetProps = ValidationProps | StandardProps | SymmetryProps | FeatureProps | DensityProps | PropsetProps |
-MembraneProps | FeatureDensityProps | MotifProps | EmptyProps;
+MembraneProps | FeatureDensityProps | MotifProps | NakbProps | EmptyProps;
 
 const RcsbParams = () => ({
     preset: PD.Value<PresetProps>({ kind: 'standard', assemblyId: '' }, { isHidden: true })
@@ -265,6 +269,8 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
                 // fall back to default representation to show something
                 representation = await plugin.builders.structure.representation.applyPreset(structureProperties!, 'auto');
             }
+        } if (p.kind === 'nakb') {
+            representation = await plugin.builders.structure.representation.applyPreset(structureProperties!, 'polymer-cartoon', { theme: { globalName: 'residue-name', focus: { name: 'residue-name' } } });
         } else {
             representation = await plugin.builders.structure.representation.applyPreset(structureProperties!, 'auto');
         }