From 835185bb69aef99b503789e5072098566078b92c Mon Sep 17 00:00:00 2001 From: David Sehnal <david.sehnal@gmail.com> Date: Thu, 19 Apr 2018 20:33:25 +0200 Subject: [PATCH] Tweaks --- src/mol-math/geometry.ts | 2 +- src/mol-math/geometry/_spec/lookup3d.spec.ts | 10 ++--- src/mol-math/geometry/common.ts | 10 ++--- src/mol-math/geometry/lookup3d/common.ts | 2 +- src/mol-math/geometry/lookup3d/grid.ts | 2 +- src/mol-math/geometry/primitives/box3d.ts | 2 +- src/mol-math/geometry/primitives/sphere3d.ts | 2 +- src/mol-model/annotation/annotation.ts | 40 -------------------- src/mol-model/annotations.ts | 17 --------- src/mol-model/structure/model/model.ts | 3 -- 10 files changed, 15 insertions(+), 75 deletions(-) delete mode 100644 src/mol-model/annotation/annotation.ts delete mode 100644 src/mol-model/annotations.ts diff --git a/src/mol-math/geometry.ts b/src/mol-math/geometry.ts index f8134ddd0..5754f04a3 100644 --- a/src/mol-math/geometry.ts +++ b/src/mol-math/geometry.ts @@ -1,4 +1,4 @@ -/* +/** * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> diff --git a/src/mol-math/geometry/_spec/lookup3d.spec.ts b/src/mol-math/geometry/_spec/lookup3d.spec.ts index af2c30a46..92760e92d 100644 --- a/src/mol-math/geometry/_spec/lookup3d.spec.ts +++ b/src/mol-math/geometry/_spec/lookup3d.spec.ts @@ -1,8 +1,8 @@ -/* -* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. -* -* @author David Sehnal <david.sehnal@gmail.com> -*/ +/** + * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. + * + * @author David Sehnal <david.sehnal@gmail.com> + */ import { GridLookup3D } from '../../geometry'; import { sortArray } from 'mol-data/util'; diff --git a/src/mol-math/geometry/common.ts b/src/mol-math/geometry/common.ts index 195224635..e203afdf2 100644 --- a/src/mol-math/geometry/common.ts +++ b/src/mol-math/geometry/common.ts @@ -1,8 +1,8 @@ -/* -* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. -* -* @author David Sehnal <david.sehnal@gmail.com> -*/ +/** + * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. + * + * @author David Sehnal <david.sehnal@gmail.com> + */ import { OrderedSet } from 'mol-data/int' diff --git a/src/mol-math/geometry/lookup3d/common.ts b/src/mol-math/geometry/lookup3d/common.ts index 0aa58601d..874735b9c 100644 --- a/src/mol-math/geometry/lookup3d/common.ts +++ b/src/mol-math/geometry/lookup3d/common.ts @@ -1,4 +1,4 @@ -/* +/** * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> diff --git a/src/mol-math/geometry/lookup3d/grid.ts b/src/mol-math/geometry/lookup3d/grid.ts index 6d168df2c..7abb47781 100644 --- a/src/mol-math/geometry/lookup3d/grid.ts +++ b/src/mol-math/geometry/lookup3d/grid.ts @@ -1,4 +1,4 @@ -/* +/** * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> diff --git a/src/mol-math/geometry/primitives/box3d.ts b/src/mol-math/geometry/primitives/box3d.ts index 21a579516..90b6b241c 100644 --- a/src/mol-math/geometry/primitives/box3d.ts +++ b/src/mol-math/geometry/primitives/box3d.ts @@ -1,4 +1,4 @@ -/* +/** * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> diff --git a/src/mol-math/geometry/primitives/sphere3d.ts b/src/mol-math/geometry/primitives/sphere3d.ts index bd74a09a2..3e280da05 100644 --- a/src/mol-math/geometry/primitives/sphere3d.ts +++ b/src/mol-math/geometry/primitives/sphere3d.ts @@ -1,4 +1,4 @@ -/* +/** * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> diff --git a/src/mol-model/annotation/annotation.ts b/src/mol-model/annotation/annotation.ts deleted file mode 100644 index 338c2de1c..000000000 --- a/src/mol-model/annotation/annotation.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. - * - * @author David Sehnal <david.sehnal@gmail.com> - */ - -import { Structure, ElementSet, Element } from '../structure' - -interface Annotation<E = any> { - definition: Annotation.Definition<E>, - getValue(l: Element.Location): E | undefined, - getAll(l: ElementSet): { annotations: E[], /* TODO: map annotations to elements */ } -} - -namespace Annotation { - export const enum Kind { - Atom, - Residue, - Sequence, - Chain, - Entity, - Coarse, - Spatial - } - - export const enum Type { - Num, - Str, - Obj - } - - export interface Definition<E = any> { - name: string, - kind: Kind, - type: Type, - prepare<Data>(s: Structure, data: Data): Annotation<E>, - } -} - -export { Annotation } \ No newline at end of file diff --git a/src/mol-model/annotations.ts b/src/mol-model/annotations.ts deleted file mode 100644 index 828e23293..000000000 --- a/src/mol-model/annotations.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. - * - * @author David Sehnal <david.sehnal@gmail.com> - */ - -import { Annotation } from './annotation/annotation' -import { UUID } from 'mol-util' - -interface Annotations { - id: UUID, - all: Annotation[], - byKind: { [kind: number]: Annotation } - //getAll() -} - -export { Annotations } \ No newline at end of file diff --git a/src/mol-model/structure/model/model.ts b/src/mol-model/structure/model/model.ts index 948988c30..e7f0fe0a8 100644 --- a/src/mol-model/structure/model/model.ts +++ b/src/mol-model/structure/model/model.ts @@ -14,8 +14,6 @@ import CoarseGrained from './properties/coarse-grained' import from_gro from './formats/gro' import from_mmCIF from './formats/mmcif' -import { Annotations } from '../../annotations' - /** * Interface to the "source data" of the molecule. * @@ -32,7 +30,6 @@ interface Model extends Readonly<{ conformation: Conformation, symmetry: Symmetry, coarseGrained: CoarseGrained, - annotations: Annotations, atomCount: number, }> { -- GitLab