Yana Rose 4 年之前
父節點
當前提交
1dd7dd6c10
共有 1 個文件被更改,包括 3 次插入12 次删除
  1. 3 12
      src/viewer/helpers/preset.ts

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

@@ -156,7 +156,7 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
         let structure: StructureObject | undefined = undefined;
         let structure: StructureObject | undefined = undefined;
         let structureProperties: StructureObject | undefined = undefined;
         let structureProperties: StructureObject | undefined = undefined;
 
 
-        // if flexible transformation is allowed, we may need to create a single structure component
+        // If flexible transformation is allowed, we may need to create a single structure component
         // from transformed substructures
         // from transformed substructures
         const allowsFlexTransform = p.kind === 'prop-set';
         const allowsFlexTransform = p.kind === 'prop-set';
         if (!allowsFlexTransform) {
         if (!allowsFlexTransform) {
@@ -170,7 +170,7 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
 
 
         if (p.kind === 'prop-set') {
         if (p.kind === 'prop-set') {
 
 
-            // this creates a single structure from selections/transformations as specified
+            // This creates a single structure from selections/transformations as specified
             const _structure = plugin.state.data.build().to(modelProperties)
             const _structure = plugin.state.data.build().to(modelProperties)
                 .apply(FlexibleStructureFromModel, { selection: p.selection });
                 .apply(FlexibleStructureFromModel, { selection: p.selection });
             structure = await _structure.commit();
             structure = await _structure.commit();
@@ -179,6 +179,7 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
                 .apply(CustomStructureProperties);
                 .apply(CustomStructureProperties);
             structureProperties = await _structureProperties.commit();
             structureProperties = await _structureProperties.commit();
 
 
+            // At this we have a structure that contains only the transformed substructres
             const entryId = model.data?.entryId;
             const entryId = model.data?.entryId;
             const selections: StructureObject[] = [];
             const selections: StructureObject[] = [];
             if (p.selection) {
             if (p.selection) {
@@ -193,11 +194,6 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
                 selections.push(await sele.commit());
                 selections.push(await sele.commit());
             }
             }
 
 
-            console.log(selections);
-
-            // At this we have a structure that contains only the transformed substructres
-            // The color theme data should be added to `structureProperties.data?.inheritedPropertyData`
-
             const representations = new Array();
             const representations = new Array();
             for (const r of p.representation) {
             for (const r of p.representation) {
                 for (const sele of selections) {
                 for (const sele of selections) {
@@ -220,11 +216,6 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
                 }
                 }
             }
             }
 
 
-            // // this adds a single component
-            // representation = await plugin.builders.structure.representation.applyPreset(structureProperties, 'polymer-cartoon', {
-            //     theme: { globalName: 'superpose', focus: { name: 'superpose' } }
-            // });
-
         } else if (p.kind === 'validation') {
         } else if (p.kind === 'validation') {
             representation = await plugin.builders.structure.representation.applyPreset(structureProperties!, ValidationReportGeometryQualityPreset);
             representation = await plugin.builders.structure.representation.applyPreset(structureProperties!, ValidationReportGeometryQualityPreset);