diff --git a/src/mol-plugin-state/transforms/model.ts b/src/mol-plugin-state/transforms/model.ts index b4b24ff137cb7cab29262f9fba96234daaa7339a..b9773c5a6a198672cfda9c7dbaa0ea1158435941 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 cca737d1b3e536c1646925c48439488bfedb1e83..d37fa9cf41e6370b71a9999f99e98c447367b896 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 572df940043dc1162d5a529e6906b3dba4eccb73..b6cc60afefc9af626f882f634ea836bbc11209fb 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 67a08a0c24057f4fe53ecbc1b56cd3030a95ae19..ff2c56ab8b826f7f32e9921a4e1bfa5fc4067d95 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 062817a629c51a7e757b6413fe3d987303a8d056..02b8cdfc70cd7f4b1d82551490bf8d6826dea881 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;