فهرست منبع

cleaning by lint

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

+ 11 - 11
src/mol-model/structure/query/queries/atom-set.ts

@@ -86,9 +86,9 @@ export function pick(env: Environment, selection: Selection, pred: Expression<bo
 
 
 
-//export function atomCount(env: Environment) {
- //   return AtomSet.count(env.slots.atomSet);
-//}
+// export function atomCount(env: Environment) {
+//   return AtomSet.count(env.slots.atomSet);
+// }
 
 /*
 export function atomCount(ctx: QueryContext) {
@@ -109,12 +109,12 @@ export function atomCount(ctx: QueryContext) {
 }
 
 
-//export function atomCount(ctx: QueryContext) {
+// export function atomCount(ctx: QueryContext) {
 //    return (ctx: any) => {
 //        const x: number = StructureSelection.structureCount(ctx);
 //        return x;
 //    };
-//}
+// }
 
 // export function countQuery(env: Environment, query: Expression<AtomSelection>) {
 //    const sel = query(Environment(Context.ofAtomSet(env.context, env.slots.atomSet)))
@@ -122,7 +122,7 @@ export function atomCount(ctx: QueryContext) {
 // }
 
 export function countQuery(ctx: QueryContext, query: StructureQuery) {
-    return (ctx : QueryContext) => {
+    return (ctx: QueryContext) => {
         const sel = query(ctx);
         const x: number = StructureSelection.structureCount(sel);
         return x;
@@ -131,11 +131,11 @@ export function countQuery(ctx: QueryContext, query: StructureQuery) {
 
 
 export function propertySet(ctx: QueryContext, prop: UnitTypeProperties) {
-    return (ctx : QueryContext) => {
-	const set = new Set();
-	const x = getCurrentStructureProperties(ctx, prop, set);
-//	console.log(x)
-	return x;
+    return (ctx: QueryContext) => {
+        const set = new Set();
+        const x = getCurrentStructureProperties(ctx, prop, set);
+        //	console.log(x)
+        return x;
     };
 }
 

+ 4 - 4
src/mol-model/structure/query/queries/filters.ts

@@ -86,10 +86,10 @@ function getCurrentStructurePropertiesInternal(ctx: QueryContext, props: QueryFn
         l.unit = unit;
         const elements = unit.elements;
 
-        let fn = props
-//        if (Unit.isAtomic(unit)) fn = props.atomic;
-//        else fn = props.coarse;
-//        if (!fn) continue;
+        const fn = props;
+        //        if (Unit.isAtomic(unit)) fn = props.atomic;
+        //        else fn = props.coarse;
+        //        if (!fn) continue;
 
         for (let j = 0, _j = elements.length; j < _j; j++) {
             l.element = elements[j];

+ 6 - 6
src/mol-script/runtime/query/table.ts

@@ -362,25 +362,25 @@ const symbols = [
     //    D(MolScript.structureQuery.combinator.merge, (ctx, xs) => Queries.combinators.merge(xs as any)(ctx)),
     D(MolScript.structureQuery.atomSet.atomCount,
         function structureQuery_atomset_atomCount(ctx, xs) {
-//	    console.log('From atomCount');
-//	    console.log(Queries.atomset.atomCount(ctx)(ctx));
+            //	    console.log('From atomCount');
+            //	    console.log(Queries.atomset.atomCount(ctx)(ctx));
 	    return Queries.atomset.atomCount(ctx)(ctx);
         }),
 
 
     D(MolScript.structureQuery.atomSet.countQuery,
         function structureQuery_atomset_countQuery(ctx, xs) {
-//	    console.log('From countQuery');
-//	    console.log(Queries.atomset.countQuery(ctx, xs[0] as any)(ctx));
+            //	    console.log('From countQuery');
+            //	    console.log(Queries.atomset.countQuery(ctx, xs[0] as any)(ctx));
 	    return Queries.atomset.countQuery(ctx, xs[0] as any)(ctx);
         }),
 
     //    env, v[0](env)
 
     D(MolScript.structureQuery.atomSet.propertySet,
-      function structureQuery_atomset_propertySet(ctx, xs) {
+        function structureQuery_atomset_propertySet(ctx, xs) {
 	  return Queries.atomset.propertySet(ctx, xs[0] as any)(ctx);
-      }),
+        }),
     //    D(MolScript.structureQuery.filter.withSameAtomProperties, (ctx, xs) => Queries.filters.withSameAtomProperties(xs[0] as any, xs['source'] as any, xs['property'] as any)(ctx)),
 
 

+ 7 - 7
src/mol-script/transpilers/jmol/parser.ts

@@ -33,20 +33,20 @@ const valueOperators: OperatorList = [
         type: h.binaryLeft,
         rule: P.MonadicParser.regexp(/\s*(LIKE|>=|<=|=|!=|>|<)\s*/i, 1),
         map: (op, e1, e2) => {
-            console.log(op, e1, e2)
+            console.log(op, e1, e2);
             let expr;
 	    if (e1 === 'structure') {
                 expr = B.core.flags.hasAny([B.ammp('secondaryStructureFlags'), structureMap(e2)]);
             } else if (e2 === 'structure') {
                 expr = B.core.flags.hasAny([B.ammp('secondaryStructureFlags'), structureMap(e1)]);
-            } else if (e1.head !== undefined){
-		if (e1.head.name === 'core.type.regex') {
+            } else if (e1.head !== undefined) {
+                if (e1.head.name === 'core.type.regex') {
                     expr = B.core.str.match([e1, B.core.type.str([e2])]);
-		}
-            } else if (e2.head !== undefined){
-		if (e2.head.name === 'core.type.regex') {
+                }
+            } else if (e2.head !== undefined) {
+                if (e2.head.name === 'core.type.regex') {
                     expr = B.core.str.match([e2, B.core.type.str([e1])]);
-		}
+                }
             } else if (op.toUpperCase() === 'LIKE') {
                 if (e1.head) {
                     expr = B.core.str.match([

+ 6 - 6
src/mol-script/transpilers/rasmol/parser.ts

@@ -39,14 +39,14 @@ const valueOperators: OperatorList = [
                 expr = B.core.flags.hasAny([B.ammp('secondaryStructureFlags'), structureMap(e2)]);
             } else if (e2 === 'structure') {
                 expr = B.core.flags.hasAny([B.ammp('secondaryStructureFlags'), structureMap(e1)]);
-            } else if (e1.head !== undefined){
-		if (e1.head.name === 'core.type.regex') {
+            } else if (e1.head !== undefined) {
+                if (e1.head.name === 'core.type.regex') {
                     expr = B.core.str.match([e1, B.core.type.str([e2])]);
-		}
-            } else if (e2.head !== undefined){
-		if (e2.head.name === 'core.type.regex') {
+                }
+            } else if (e2.head !== undefined) {
+                if (e2.head.name === 'core.type.regex') {
                     expr = B.core.str.match([e2, B.core.type.str([e1])]);
-		}
+                }
             } else if (op.toUpperCase() === 'LIKE') {
                 if (e1.head) {
                     expr = B.core.str.match([

+ 14 - 14
src/mol-script/transpilers/vmd/parser.ts

@@ -57,30 +57,30 @@ const valueOperators: OperatorList = [
         type: h.binaryLeft,
         rule: P.MonadicParser.alt(P.MonadicParser.regexp(/\s*(=~|==|>=|<=|=|!=|>|<)\s*/, 1), P.MonadicParser.whitespace.result('=')),
         map: (op, e1, e2) => {
-//	    console.log(e1.head !== undefined && e2.head !==undefined)
-            console.log(op, e1, e2)
+            //	    console.log(e1.head !== undefined && e2.head !==undefined)
+            console.log(op, e1, e2);
             let expr;
-	    if (e1.head !== undefined){
-		if (e1.head.name === 'structure-query.atom-property.macromolecular.secondary-structure-flags') {
+	    if (e1.head !== undefined) {
+                if (e1.head.name === 'structure-query.atom-property.macromolecular.secondary-structure-flags') {
 		    expr = B.core.flags.hasAny([e1, sstrucMap(e2)]);
-		}
-		if (e1.head.name === 'core.type.regex') {
+                }
+                if (e1.head.name === 'core.type.regex') {
 		    expr = B.core.str.match([e1, B.core.type.str([e2])]);
-		}
-	    }else if (e2.head !== undefined){
-		if (e2.head.name === 'structure-query.atom-property.macromolecular.secondary-structure-flags') {
+                }
+	    } else if (e2.head !== undefined) {
+                if (e2.head.name === 'structure-query.atom-property.macromolecular.secondary-structure-flags') {
 		    expr = B.core.flags.hasAny([e2, sstrucMap(e1)]);
-		}
-		if (e2.head.name === 'core.type.regex') {
+                }
+                if (e2.head.name === 'core.type.regex') {
 		    expr = B.core.str.match([e2, B.core.type.str([e1])]);
-		}
-	    }else if (op === '=~') {
+                }
+	    } else if (op === '=~') {
                 if (e1.head) {
 		    expr = B.core.str.match([
                         B.core.type.regex([`^${e2}$`, 'i']),
                         B.core.type.str([e1])
 		    ]);
-                }else{
+                } else {
 		    expr = B.core.str.match([
                         B.core.type.regex([`^${e1}$`, 'i']),
                         B.core.type.str([e2])