Browse Source

kind standard && saguaro update

bioinsilico 4 năm trước cách đây
mục cha
commit
0b1f932bb5

+ 14 - 14
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "@rcsb/rcsb-saguaro-3d",
-  "version": "0.0.16",
+  "version": "0.0.18",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -1346,9 +1346,9 @@
           }
         },
         "yargs-parser": {
-          "version": "20.2.5",
-          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.5.tgz",
-          "integrity": "sha512-jYRGS3zWy20NtDtK2kBgo/TlAoy5YUuhD9/LZ7z7W4j1Fdw2cqD0xEEclf8fxc8xjD6X5Qr+qQQwCEsP8iRiYg=="
+          "version": "20.2.6",
+          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.6.tgz",
+          "integrity": "sha512-AP1+fQIWSM/sMiET8fyayjx/J+JmTPt2Mr0FkrgqB4todtfa53sOsrSAcIrJRD5XS20bKUwaDIuMkWKCEiQLKA=="
         }
       }
     },
@@ -1628,19 +1628,19 @@
           }
         },
         "@babel/generator": {
-          "version": "7.12.17",
-          "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.17.tgz",
-          "integrity": "sha512-DSA7ruZrY4WI8VxuS1jWSRezFnghEoYEFrZcw9BizQRmOZiUsiHl59+qEARGPqPikwA/GPTyRCi7isuCK/oyqg==",
+          "version": "7.13.0",
+          "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.0.tgz",
+          "integrity": "sha512-zBZfgvBB/ywjx0Rgc2+BwoH/3H+lDtlgD4hBOpEv5LxRnYsm/753iRuLepqnYlynpjC3AdQxtxsoeHJoEEwOAw==",
           "requires": {
-            "@babel/types": "^7.12.17",
+            "@babel/types": "^7.13.0",
             "jsesc": "^2.5.1",
             "source-map": "^0.5.0"
           },
           "dependencies": {
             "@babel/types": {
-              "version": "7.12.17",
-              "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.17.tgz",
-              "integrity": "sha512-tNMDjcv/4DIcHxErTgwB9q2ZcYyN0sUfgGKUK/mm1FJK7Wz+KstoEekxrl/tBiNDgLK1HGi+sppj1An/1DR4fQ==",
+              "version": "7.13.0",
+              "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz",
+              "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==",
               "requires": {
                 "@babel/helper-validator-identifier": "^7.12.11",
                 "lodash": "^4.17.19",
@@ -2094,9 +2094,9 @@
       }
     },
     "@rcsb/rcsb-saguaro-app": {
-      "version": "1.0.23",
-      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro-app/-/rcsb-saguaro-app-1.0.23.tgz",
-      "integrity": "sha512-dYr4Nkn3CukXPoir/jBHphlALZHiiTNAWowGb+OqsuJvU5QvS/atwMNCh0ahDM6+tSNoSVPajtauqTzWhlg8/Q==",
+      "version": "1.0.24",
+      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro-app/-/rcsb-saguaro-app-1.0.24.tgz",
+      "integrity": "sha512-NKCAXVSOQ3wfPWFrxfEXssQKRjVnxEKV1WJAvKDWai2ads3AlM4FzOi20QzBx2UYVZo6HwY9hT8Hc8XzQlyoig==",
       "requires": {
         "@graphql-codegen/cli": "^1.16.0",
         "@rcsb/rcsb-saguaro": "^1.0.13",

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@rcsb/rcsb-saguaro-3d",
-  "version": "0.0.17",
+  "version": "0.0.18",
   "description": "RCSB Molstar/Saguaro Web App",
   "main": "build/dist/RcsbFv3DBuilder.js",
   "files": [
@@ -76,7 +76,7 @@
   "dependencies": {
     "@rcsb/rcsb-molstar": "^1.3.0-beta.saguaro.1",
     "@rcsb/rcsb-saguaro": "^1.0.13",
-    "@rcsb/rcsb-saguaro-app": "^1.0.23",
+    "@rcsb/rcsb-saguaro-app": "^1.0.24",
     "@types/react": "^17.0.0",
     "@types/react-select": "^3.0.11",
     "molstar": "^1.3.1",

+ 1 - 1
src/RcsbFv3D/RcsbFv3DAssembly.tsx

@@ -24,7 +24,7 @@ export class RcsbFv3DAssembly extends RcsbFv3DAbstract{
                     pdbId:assemblyData.config.entryId,
                     id:assemblyData.config.entryId,
                     props:{
-                        kind:'empty',
+                        kind:'standard',
                         assemblyId:'1'
                     }
                 }

+ 10 - 9
src/RcsbFvSequence/SequenceViews/AssemblyView/AssemblyView.tsx

@@ -171,7 +171,7 @@ export class AssemblyView extends AbstractView<AssemblyViewInterface & AbstractV
             const authId: string | undefined = this.currentModelMap
                 .get(this.currentModelId)?.chains
                 .filter(ch=>(ch.label===this.props.selection.getLastSelection('select')?.labelAsymId))[0]?.auth;
-            this.modelChangeCallback(this.currentModelMap, this.currentEntryId+"."+authId);
+            this.modelChangeCallback(this.currentModelMap, authId);
         }else{
             const sel: ChainSelectionInterface | undefined = this.props.selection.getSelectionWithCondition(this.currentModelId, this.currentLabelAsymId, mode);
             if (sel == null) {
@@ -185,7 +185,7 @@ export class AssemblyView extends AbstractView<AssemblyViewInterface & AbstractV
         this.innerSelectionFlag = false;
     }
 
-    protected async modelChangeCallback(modelMap:SaguaroPluginModelMapType, defaultAsymId?: string): Promise<void> {
+    protected async modelChangeCallback(modelMap:SaguaroPluginModelMapType, defaultAuthId?: string): Promise<void> {
         this.currentModelMap = modelMap;
         this.props.plugin.clearFocus();
         const onChangeCallback: Map<string, (x: InstanceSequenceOnchangeInterface)=>void> = new Map<string, (x: InstanceSequenceOnchangeInterface) => {}>();
@@ -209,7 +209,7 @@ export class AssemblyView extends AbstractView<AssemblyViewInterface & AbstractV
                 this.pfvDivId,
                 RcsbFvDOMConstants.SELECT_INSTANCE_PFV_ID,
                 entryId, {
-                    defaultValue: defaultAsymId,
+                    defaultValue: defaultAuthId,
                     onChangeCallback: onChangeCallback.get(entryId),
                     filterInstances: filterInstances.get(entryId),
                     selectButtonOptionProps:(props:OptionProps<OptionPropsInterface>)=>(components.Option && <div style={{display:'flex'}}>
@@ -220,7 +220,7 @@ export class AssemblyView extends AbstractView<AssemblyViewInterface & AbstractV
                 const length: number = getRcsbFv(this.pfvDivId).getBoardConfig().length ?? 0;
                 this.createComponentThreshold = (((Math.floor(length/100))+1)*this.createComponentThresholdBatch)-1;
             });
-        if(!defaultAsymId)
+        if(!defaultAuthId)
             await this.createComponents(modelMap);
     }
 
@@ -254,6 +254,8 @@ export class AssemblyView extends AbstractView<AssemblyViewInterface & AbstractV
     }
 
     private async createComponents(modelMap:SaguaroPluginModelMapType): Promise<void> {
+        await this.props.plugin.displayComponent("Water", false);
+        await this.props.plugin.colorComponent("Polymer", 'entity-source');
         const chains: Array<{modelId: string; auth: string; label: string;}> = new Array<{modelId: string; auth: string; label: string;}>();
         modelMap.forEach((entry, modelId)=>{
             entry.chains.forEach(ch=>{
@@ -265,12 +267,11 @@ export class AssemblyView extends AbstractView<AssemblyViewInterface & AbstractV
         this.props.plugin.removeComponent();
         this.props.plugin.clearFocus();
         for(const ch of chains) {
-            const label: string = "chain " + ch.auth;
+            const label: string = ch.auth === ch.label ? ch.label : `${ch.label} [auth ${ch.auth}]`;
             await this.props.plugin.createComponent(label, ch.modelId, ch.label, 'cartoon');
             await this.props.plugin.colorComponent(label, 'entity-source');
         }
-
-        this.props.plugin.pluginCall((plugin)=>{
+        /*this.props.plugin.pluginCall((plugin)=>{
             const createComponent = (label: string, tag: string, expression: Expression, representationType: StructureRepresentationRegistry.BuiltIn) => {
                 return plugin.managers.structure.component.add({
                     selection: StructureSelectionQuery(tag, expression),
@@ -309,8 +310,8 @@ export class AssemblyView extends AbstractView<AssemblyViewInterface & AbstractV
                 representationType: 'ball-and-stick'
             }]);
 
-        });
-
+        });*/
+        await this.props.plugin.removeComponent("Polymer");
     }
 
     /*private removeComponents(labelAsymId?:string){