فهرست منبع

replaced structure. -> structure-query. in transpiler directory

yakomaxa 2 سال پیش
والد
کامیت
bfc8660c5e

+ 1 - 1
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(''))
     })
 })({

+ 5 - 5
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) {

+ 1 - 1
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({

+ 1 - 1
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({

+ 4 - 4
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;