From da051fd1f80b1b2a22567758e15de354d3aabb47 Mon Sep 17 00:00:00 2001
From: David Sehnal <david.sehnal@gmail.com>
Date: Sun, 9 Sep 2018 14:34:46 +0200
Subject: [PATCH] Fix build & tests

---
 package-lock.json                             | Bin 416921 -> 417313 bytes
 .../linear-algebra/matrix/principal-axes.ts   |   6 +-
 .../structure/query/queries/modifiers.ts      | 138 +++++++++---------
 3 files changed, 72 insertions(+), 72 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 63ac0178bd15b50ad3c918ff905ffecf351dbaf9..7abd6eeb33cb576c79906f6d1926c2bb5aa6f5bc 100644
GIT binary patch
delta 287
zcmbQaQ*z-R$%ZYA53Wpq@Pg5Bnj$Of^j}vPv!{Rf!DzO<{wkw8BUobk?Q4v&5SH(C
z#w;*v`<d&Ej@)48bfw3P|G;{tzn{!vIeFGbrRfu@S%ju9xW=dkQSt8yV<tpJYdN#x
z^qUVDrKazB$`}oi)p^F40hXOMn~`NYKO>Xj^s2v%%2Q7=aZlfB%qlT`fgKCWbcL79
zT+@56Gire}$xOd+gHdDZ3MPT+Tc0y_f^|<XxXs8ieco3_j_Ev&%)DS*ws*f^T*(g7
xVL1H^GmF6V$PbK9!K$}Md}N%<4Q96U|7C3F|I5_Q|ChO)|1ZmS{=ckU@c_k`fja;I

delta 292
zcmZ3uM{?#)$%ZYA53WoLVicV|;VCQYbg`?9*^>;Uwr{`6=*|ch*1yge3uf%S&X@&e
zy!y$)zdij1qY?LXfo@i@>8Bqv{srmz_k>ZGagu@5^u%Y3)227@u!&FCdd`?O$v|q_
zY(|#p@7fuKrvG(i;hJ7BhlO?f>*tKwjMFdpGs#S^|IWy{efmqri|k<YUvn@COuw*^
znPal;FM;U|YnfT5PjF%8ntuKx<9?9w+TqMf(;c=la!<c?nwfX{f#b{^)8E>%icDAd
z#~3i(;1#3j_WI9^kGQ5^_{kzOou7wk!u0#USyZPdbThF`@BhNWKRw_9qvLdihm6|O
l{nQz`rz>!=vbNv-&)9zVKU4eN|IF=o|Fdkr`=8Y%4ggt>b#edz

diff --git a/src/mol-math/linear-algebra/matrix/principal-axes.ts b/src/mol-math/linear-algebra/matrix/principal-axes.ts
index 575668f62..07ab84acc 100644
--- a/src/mol-math/linear-algebra/matrix/principal-axes.ts
+++ b/src/mol-math/linear-algebra/matrix/principal-axes.ts
@@ -4,10 +4,10 @@
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
  */
 
-import Matrix from './matrix.js';
-import { Vec3 } from '../3d.js';
+import Matrix from './matrix';
+import { Vec3 } from '../3d';
 // import { Vec3, Mat4 } from '../3d.js';
-import { svd } from './svd.js';
+import { svd } from './svd';
 
 // const negateVector = Vec3.create(-1, -1, -1)
 // const tmpMatrix = Mat4.identity()
diff --git a/src/mol-model/structure/query/queries/modifiers.ts b/src/mol-model/structure/query/queries/modifiers.ts
index 5812101ae..0b0904515 100644
--- a/src/mol-model/structure/query/queries/modifiers.ts
+++ b/src/mol-model/structure/query/queries/modifiers.ts
@@ -4,7 +4,7 @@
  * @author David Sehnal <david.sehnal@gmail.com>
  */
 
-import { Segmentation, SortedArray } from 'mol-data/int';
+import { Segmentation } from 'mol-data/int';
 import { Structure, Unit } from '../../structure';
 import { StructureQuery } from '../query';
 import { StructureSelection } from '../selection';
@@ -310,73 +310,73 @@ export function includeConnected({ query, layerCount, wholeResidues, bondTest }:
     }
 }
 
-function defaultBondTest(ctx: QueryContext) {
-    return true;
-}
-
-interface IncludeConnectedCtx {
-    queryCtx: QueryContext,
-    input: Structure,
-    bondTest: QueryFn<boolean>,
-    wholeResidues: boolean
-}
-
-type FrontierSet = UniqueArray<StructureElement.UnitIndex, StructureElement.UnitIndex>
-type Frontier = { unitIds: UniqueArray<number>, elements: Map<number /* unit id */, FrontierSet> }
-
-namespace Frontier {
-    export function has({ elements }: Frontier, unitId: number, element: StructureElement.UnitIndex) {
-        if (!elements.has(unitId)) return false;
-        const xs = elements.get(unitId)!;
-        return xs.keys.has(element);
-    }
-
-    export function create(pivot: Structure, input: Structure) {
-        const unitIds = UniqueArray.create<number>();
-        const elements: Frontier['elements'] = new Map();
-        for (const unit of pivot.units) {
-            if (!Unit.isAtomic(unit)) continue;
-
-            UniqueArray.add(unitIds, unit.id, unit.id);
-            const xs: FrontierSet = UniqueArray.create();
-            elements.set(unit.id, xs);
-
-            const pivotElements = unit.elements;
-            const inputElements = input.unitMap.get(unit.id).elements;
-            for (let i = 0, _i = pivotElements.length; i < _i; i++) {
-                const idx = SortedArray.indexOf(inputElements, pivotElements[i]) as StructureElement.UnitIndex;
-                UniqueArray.add(xs, idx, idx);
-            }
-        }
-
-        return { unitIds, elements };
-    }
-
-    export function addFrontier(target: Frontier, from: Frontier) {
-        for (const unitId of from.unitIds.array) {
-            let xs: FrontierSet;
-            if (target.elements.has(unitId)) {
-                xs = target.elements.get(unitId)!;
-            } else {
-                xs = UniqueArray.create();
-                target.elements.set(unitId, xs);
-                UniqueArray.add(target.unitIds, unitId, unitId);
-            }
-
-            for (const e of from.elements.get(unitId)!.array) {
-                UniqueArray.add(xs, e, e);
-            }
-        }
-        return target;
-    }
-
-    export function includeWholeResidues(structure: Structure, frontier: Frontier) {
-        // ...
-    }
-}
-
-function expandFrontier(ctx: IncludeConnectedCtx, currentFrontier: Frontier, result: Frontier): Frontier {
-    return 0 as any;
-}
+// function defaultBondTest(ctx: QueryContext) {
+//     return true;
+// }
+
+// interface IncludeConnectedCtx {
+//     queryCtx: QueryContext,
+//     input: Structure,
+//     bondTest: QueryFn<boolean>,
+//     wholeResidues: boolean
+// }
+
+// type FrontierSet = UniqueArray<StructureElement.UnitIndex, StructureElement.UnitIndex>
+// type Frontier = { unitIds: UniqueArray<number>, elements: Map<number /* unit id */, FrontierSet> }
+
+// namespace Frontier {
+//     export function has({ elements }: Frontier, unitId: number, element: StructureElement.UnitIndex) {
+//         if (!elements.has(unitId)) return false;
+//         const xs = elements.get(unitId)!;
+//         return xs.keys.has(element);
+//     }
+
+//     export function create(pivot: Structure, input: Structure) {
+//         const unitIds = UniqueArray.create<number>();
+//         const elements: Frontier['elements'] = new Map();
+//         for (const unit of pivot.units) {
+//             if (!Unit.isAtomic(unit)) continue;
+
+//             UniqueArray.add(unitIds, unit.id, unit.id);
+//             const xs: FrontierSet = UniqueArray.create();
+//             elements.set(unit.id, xs);
+
+//             const pivotElements = unit.elements;
+//             const inputElements = input.unitMap.get(unit.id).elements;
+//             for (let i = 0, _i = pivotElements.length; i < _i; i++) {
+//                 const idx = SortedArray.indexOf(inputElements, pivotElements[i]) as StructureElement.UnitIndex;
+//                 UniqueArray.add(xs, idx, idx);
+//             }
+//         }
+
+//         return { unitIds, elements };
+//     }
+
+//     export function addFrontier(target: Frontier, from: Frontier) {
+//         for (const unitId of from.unitIds.array) {
+//             let xs: FrontierSet;
+//             if (target.elements.has(unitId)) {
+//                 xs = target.elements.get(unitId)!;
+//             } else {
+//                 xs = UniqueArray.create();
+//                 target.elements.set(unitId, xs);
+//                 UniqueArray.add(target.unitIds, unitId, unitId);
+//             }
+
+//             for (const e of from.elements.get(unitId)!.array) {
+//                 UniqueArray.add(xs, e, e);
+//             }
+//         }
+//         return target;
+//     }
+
+//     export function includeWholeResidues(structure: Structure, frontier: Frontier) {
+//         // ...
+//     }
+// }
+
+// function expandFrontier(ctx: IncludeConnectedCtx, currentFrontier: Frontier, result: Frontier): Frontier {
+//     return 0 as any;
+// }
 
 // TODO: unionBy (skip this one?), cluster
\ No newline at end of file
-- 
GitLab