Browse Source

Bug #275: label with only PDB Id

cycle20 2 years ago
parent
commit
a198f432b6
2 changed files with 3 additions and 4 deletions
  1. 2 2
      src/apps/viewer/index.html
  2. 1 2
      src/apps/viewer/index.ts

+ 2 - 2
src/apps/viewer/index.html

@@ -55,7 +55,7 @@
             });
 
             // Set PDB Id here
-            var regionDescriptors = {"pdb-id":"1afo","creation-date":"2021-09-03","is-transmembrane":1,"membrane-normal":{"x":0,"y":0,"z":17.75},"chains":[{"chain_id":"A","type":"alpha","seq":"VQLAHHFSEPEITLIIFGVMAGVIGTILLISYGIRRLIKK","regions":{"1":{"auth_ids":[62,63,64,65,66,67,68,69,70,71,72,73],"color":[255,0,0]},"H":{"auth_ids":[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95],"color":[255,255,0]},"2":{"auth_ids":[96,97,98,99,100,101],"color":[0,0,255]}}},{"chain_id":"B","type":"alpha","seq":"VQLAHHFSEPEITLIIFGVMAGVIGTILLISYGIRRLIKK","regions":{"1":{"auth_ids":[62,63,64,65,66,67,68,69,70,71,72,73],"color":[255,0,0]},"H":{"auth_ids":[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],"color":[255,255,0]},"2":{"auth_ids":[100,101],"color":[0,0,255]}}}]};
+            var regionDescriptors = {"pdb-id":"1afo", "creation-date":"2021-09-03","is-transmembrane":1,"membrane-normal":{"x":0,"y":0,"z":17.75},"chains":[{"chain_id":"A","type":"alpha","seq":"VQLAHHFSEPEITLIIFGVMAGVIGTILLISYGIRRLIKK","regions":{"1":{"auth_ids":[62,63,64,65,66,67,68,69,70,71,72,73],"color":[255,0,0]},"H":{"auth_ids":[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95],"color":[255,255,0]},"2":{"auth_ids":[96,97,98,99,100,101],"color":[0,0,255]}}},{"chain_id":"B","type":"alpha","seq":"VQLAHHFSEPEITLIIFGVMAGVIGTILLISYGIRRLIKK","regions":{"1":{"auth_ids":[62,63,64,65,66,67,68,69,70,71,72,73],"color":[255,0,0]},"H":{"auth_ids":[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],"color":[255,255,0]},"2":{"auth_ids":[100,101],"color":[0,0,255]}}}]};
             var pdbtmId = regionDescriptors["pdb-id"];
             regionDescriptors.format = 'mmcif'
             viewer.loadWithUNITMPMembraneRepresentation(
@@ -64,7 +64,7 @@
                 //       origin (DOMAIN:PORT values).
                 //`https://DOMAIN[:PORT]/api/pdbtm/${pdbtmId}/trpdb`,
                 `https://cs.litemol.org/${pdbtmId}/full`,
-                regionDescriptors.chains
+                regionDescriptors
             );
         </script>
     </body>

+ 1 - 2
src/apps/viewer/index.ts

@@ -97,13 +97,12 @@ export class Viewer {
         };
         membrane.planePoint2[2] *= -1;
 
-        window.console.debug('before store:', membrane);
         localStorage.setItem(MEMBRANE_STORAGE_KEY, JSON.stringify(membrane));
 
         const isBinary = false;
 
         const data = await this.plugin.builders.data.download({
-            url, label: `UniTMP: ${regionDescriptors['pdb-id']}`, isBinary
+            url, label: regionDescriptors['pdb-id'], isBinary
         }); //, { state: { isGhost: true } });
         const trajectory = await this.plugin.builders.structure.parseTrajectory(data, regionDescriptors.format);
         // create membrane representation