Parcourir la source

add NAKB preset

Sebastian Bittrich il y a 3 ans
Parent
commit
687b0e3a92
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  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');
         }