Browse Source

Issue #805: reverted rcsb preset (from v2.8.0)

cycle20 1 năm trước cách đây
mục cha
commit
99f77358f2
3 tập tin đã thay đổi với 1 bổ sung18 xóa
  1. 0 3
      src/viewer/helpers/model.ts
  2. 1 12
      src/viewer/helpers/preset.ts
  3. 0 3
      src/viewer/index.ts

+ 0 - 3
src/viewer/helpers/model.ts

@@ -42,11 +42,8 @@ export class ModelLoader {
     ): Promise<S | ReturnType<typeof RcsbPreset.apply> | undefined> {
         const trajectory = await this.plugin.builders.structure.parseTrajectory(data, format);
         if (reprProvider) {
-            console.log('REPR. PROVIDER:', trajectory);
-            console.log('REPR. PROVIDER:', reprProvider);
             return this.plugin.builders.structure.hierarchy.applyPreset(trajectory, reprProvider, params);
         } else {
-            console.log('ELSE REPR. PROVIDER:', reprProvider);
             const selector = await this.plugin.builders.structure.hierarchy.applyPreset(trajectory, RcsbPreset, {
                 preset: props || { kind: 'standard', assemblyId: '' }
             });

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

@@ -47,7 +47,6 @@ import {
 } from 'molstar/lib/extensions/rcsb/assembly-symmetry/prop';
 import { Task } from 'molstar/lib/mol-task';
 import { PLDDTConfidenceColorThemeProvider } from 'molstar/lib/extensions/model-archive/quality-assessment/color/plddt';
-import { TMDET_STRUCTURE_PRESET_ID } from '../../tmdet-extension/behavior';
 
 type BaseProps = {
     assemblyId?: string
@@ -135,7 +134,6 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
     isApplicable: () => true,
     params: RcsbParams,
     async apply(trajectory, params, plugin) {
-        console.log('RCSB PRESET: apply start');
         const builder = plugin.builders.structure;
         const p = params.preset;
 
@@ -176,8 +174,6 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
             Object.assign(presetParams, { theme: { globalName: 'plddt-confidence', focus: { name: 'plddt-confidence' } } });
         }
         let representation: StructureRepresentationPresetProvider.Result | undefined = undefined;
-        console.log('PRESET params:', params);
-        console.log('PRESET p:', p);
 
         if (p.kind === 'alignment') {
             // This creates a single structure from selections/transformations as specified
@@ -279,16 +275,9 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
         } else if (p.kind === 'nakb') {
             representation = await plugin.builders.structure.representation.applyPreset<any>(structureProperties!, 'auto', { ...presetParams, theme: { globalName: 'nakb', focus: { name: 'nakb' } } });
         } else {
-            console.log('HERE WE GO:', { structure: structure, structureProps: structureProperties, presetParams: presetParams });
-            //representation = await plugin.builders.structure.representation.applyPreset(structureProperties!, 'auto', presetParams);
-            representation = await plugin.builders.structure.representation.applyPreset(
-                structureProperties!, 'auto', { theme: { globalName: 'tmdet-custom-color-theme' } });
-            await plugin.builders.structure.hierarchy.applyPreset(
-                trajectory, 'default', { representationPreset: TMDET_STRUCTURE_PRESET_ID as any });
+            representation = await plugin.builders.structure.representation.applyPreset(structureProperties!, 'auto', presetParams);
         }
 
-        console.log('STRUCTURE REPRESENTATION:', representation);
-
         // TODO align with 'motif'?
         if ((p.kind === 'feature' || p.kind === 'feature-density') && structure?.obj) {
             let loci = targetToLoci(p.target, structure!.obj.data);

+ 0 - 3
src/viewer/index.ts

@@ -53,7 +53,6 @@ import { AssemblySymmetry } from 'molstar/lib/extensions/rcsb/assembly-symmetry/
 import { wwPDBChemicalComponentDictionary } from 'molstar/lib/extensions/wwpdb/ccd/behavior';
 import { ChemicalCompontentTrajectoryHierarchyPreset } from 'molstar/lib/extensions/wwpdb/ccd/representation';
 import { StateTransforms } from 'molstar/lib/mol-plugin-state/transforms';
-import { TMDETMembraneOrientation } from '../tmdet-extension/behavior';
 
 /** package version, filled in at bundle build time */
 declare const __RCSB_MOLSTAR_VERSION__: string;
@@ -73,7 +72,6 @@ const Extensions = {
     'model-export': PluginSpec.Behavior(ModelExport),
     'mp4-export': PluginSpec.Behavior(Mp4Export),
     'geo-export': PluginSpec.Behavior(GeometryExport),
-    'tmdet-membrane-orientation': PluginSpec.Behavior(TMDETMembraneOrientation)
 };
 
 const DefaultViewerProps = {
@@ -165,7 +163,6 @@ export class Viewer {
     private prevExpanded: boolean;
 
     constructor(elementOrId: string | HTMLElement, props: Partial<ViewerProps> = {}) {
-        console.log("RCSB constructor");
         const element = typeof elementOrId === 'string' ? document.getElementById(elementOrId)! : elementOrId;
         if (!element) throw new Error(`Could not get element with id '${elementOrId}'`);