From bfc8660c5e4505ac5d643dd9d5046eb9ff6847d3 Mon Sep 17 00:00:00 2001
From: yakomaxa <47655565+yakomaxa@users.noreply.github.com>
Date: Sun, 7 Aug 2022 02:21:52 +0900
Subject: [PATCH] replaced structure. -> structure-query. in transpiler
 directory

---
 src/mol-plugin-state/transforms/model.ts    |  2 +-
 src/mol-script/transpilers/helper.ts        | 10 +++++-----
 src/mol-script/transpilers/jmol/parser.ts   |  2 +-
 src/mol-script/transpilers/rasmol/parser.ts |  2 +-
 src/mol-script/transpilers/vmd/parser.ts    |  8 ++++----
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/mol-plugin-state/transforms/model.ts b/src/mol-plugin-state/transforms/model.ts
index b4b24ff13..b9773c5a6 100644
--- a/src/mol-plugin-state/transforms/model.ts
+++ b/src/mol-plugin-state/transforms/model.ts
@@ -786,7 +786,7 @@ const StructureSelectionFromScript = PluginStateTransform.BuiltIn({
     from: SO.Molecule.Structure,
     to: SO.Molecule.Structure,
     params: () => ({
-        script: PD.Script({ language: 'pymol', expression: 'all' }),
+        script: PD.Script({ language: 'vmd', expression: 'all' }),
         label: PD.Optional(PD.Text(''))
     })
 })({
diff --git a/src/mol-script/transpilers/helper.ts b/src/mol-script/transpilers/helper.ts
index cca737d1b..d37fa9cf4 100644
--- a/src/mol-script/transpilers/helper.ts
+++ b/src/mol-script/transpilers/helper.ts
@@ -338,11 +338,11 @@ export function asAtoms(e: Expression) {
 
 export function wrapValue(property: any, value: any, sstrucDict?: any) {
     switch (property.head) {
-        case 'structure.atom-property.macromolecular.label_atom_id':
+        case 'structure-query.atom-property.macromolecular.label_atom_id':
             return B.atomName(value);
-        case 'structure.atom-property.core.element-symbol':
+        case 'structure-query.atom-property.core.element-symbol':
             return B.es(value);
-        case 'structure.atom-property.macromolecular.secondary-structure-flags':
+        case 'structure-query.atom-property.macromolecular.secondary-structure-flags':
             if (sstrucDict) {
                 value = [sstrucDict[value.toUpperCase()] || 'none'];
             }
@@ -352,7 +352,7 @@ export function wrapValue(property: any, value: any, sstrucDict?: any) {
     }
 }
 
-const propPrefix = 'structure.atom-property.macromolecular.';
+const propPrefix = 'structure-query.atom-property.macromolecular.';
 const entityProps = ['entityKey', 'label_entity_id', 'entityType'];
 const chainProps = ['chainKey', 'label_asym_id', 'label_entity_id', 'auth_asym_id', 'entityType'];
 const residueProps = ['residueKey', 'label_comp_id', 'label_seq_id', 'auth_comp_id', 'auth_seq_id', 'pdbx_formal_charge', 'secondaryStructureKey', 'secondaryStructureFlags', 'isModified', 'modifiedParentName'];
@@ -367,7 +367,7 @@ export function testLevel(property: any) {
 }
 
 const flagProps = [
-    'structure.atom-property.macromolecular.secondary-structure-flags'
+    'structure-query.atom-property.macromolecular.secondary-structure-flags'
 ];
 export function valuesTest(property: any, values: any[]) {
     if (flagProps.indexOf(property.head) !== -1) {
diff --git a/src/mol-script/transpilers/jmol/parser.ts b/src/mol-script/transpilers/jmol/parser.ts
index 572df9400..b6cc60afe 100644
--- a/src/mol-script/transpilers/jmol/parser.ts
+++ b/src/mol-script/transpilers/jmol/parser.ts
@@ -238,7 +238,7 @@ ValueQuery: function(r:any) {
     return P.MonadicParser.alt(
 	r.ValueOperator.map((x:any) => {
         if (x.head) {
-          if (x.head.startsWith('structure.generator')) return x
+          if (x.head.startsWith('structure-query.generator')) return x
         } else {
           if (typeof x === 'string' && x.length <= 4) {
             return B.struct.generator.atomGroups({
diff --git a/src/mol-script/transpilers/rasmol/parser.ts b/src/mol-script/transpilers/rasmol/parser.ts
index 67a08a0c2..ff2c56ab8 100644
--- a/src/mol-script/transpilers/rasmol/parser.ts
+++ b/src/mol-script/transpilers/rasmol/parser.ts
@@ -246,7 +246,7 @@ ValueQuery: function(r:any) {
     return P.MonadicParser.alt(
 	r.ValueOperator.map((x:any) => {
         if (x.head) {
-          if (x.head.startsWith('structure.generator')) return x
+          if (x.head.startsWith('structure-query.generator')) return x
         } else {
           if (typeof x === 'string' && x.length <= 4) {
             return B.struct.generator.atomGroups({
diff --git a/src/mol-script/transpilers/vmd/parser.ts b/src/mol-script/transpilers/vmd/parser.ts
index 062817a62..02b8cdfc7 100644
--- a/src/mol-script/transpilers/vmd/parser.ts
+++ b/src/mol-script/transpilers/vmd/parser.ts
@@ -58,9 +58,9 @@ const valueOperators: OperatorList = [
         map: (op, e1, e2) => {
             // console.log(op, e1, e2)
             let expr;
-            if (e1.head === 'structure.atom-property.macromolecular.secondary-structure-flags') {
+            if (e1.head === 'structure-query.atom-property.macromolecular.secondary-structure-flags') {
                 expr = B.core.flags.hasAny([e1, sstrucMap(e2)]);
-            } else if (e2.head === 'structure.atom-property.macromolecular.secondary-structure-flags') {
+            } else if (e2.head === 'structure-query.atom-property.macromolecular.secondary-structure-flags') {
                 expr = B.core.flags.hasAny([e2, sstrucMap(e1)]);
             } else if (e1.head === 'core.type.regex') {
                 expr = B.core.str.match([e1, B.core.type.str([e2])]);
@@ -237,8 +237,8 @@ const lang = P.MonadicParser.createLanguage({
     ValueQuery: function (r:any) {
         return P.MonadicParser.alt(
             r.ValueOperator.map((x:any) => {
-                // if (!x.head || x.head.startsWith('core.math') || x.head.startsWith('structure.atom-property')) {
-                if (!x.head || !x.head.startsWith('structure.generator')) {
+                // if (!x.head || x.head.startsWith('core.math') || x.head.startsWith('structure-query.atom-property')) {
+                if (!x.head || !x.head.startsWith('structure-query.generator')) {
                     throw new Error(`values must be part of an comparison, value '${x}'`);
                 } else {
                     return x as any;
-- 
GitLab