Skip to content
Snippets Groups Projects
Commit 835185bb authored by David Sehnal's avatar David Sehnal
Browse files

Tweaks

parent 229043d9
No related branches found
No related tags found
No related merge requests found
/* /**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
* *
* @author David Sehnal <david.sehnal@gmail.com> * @author David Sehnal <david.sehnal@gmail.com>
......
/* /**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
* *
* @author David Sehnal <david.sehnal@gmail.com> * @author David Sehnal <david.sehnal@gmail.com>
*/ */
import { GridLookup3D } from '../../geometry'; import { GridLookup3D } from '../../geometry';
import { sortArray } from 'mol-data/util'; import { sortArray } from 'mol-data/util';
......
/* /**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
* *
* @author David Sehnal <david.sehnal@gmail.com> * @author David Sehnal <david.sehnal@gmail.com>
*/ */
import { OrderedSet } from 'mol-data/int' import { OrderedSet } from 'mol-data/int'
......
/* /**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
* *
* @author David Sehnal <david.sehnal@gmail.com> * @author David Sehnal <david.sehnal@gmail.com>
......
/* /**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
* *
* @author David Sehnal <david.sehnal@gmail.com> * @author David Sehnal <david.sehnal@gmail.com>
......
/* /**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
* *
* @author David Sehnal <david.sehnal@gmail.com> * @author David Sehnal <david.sehnal@gmail.com>
......
/* /**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
* *
* @author David Sehnal <david.sehnal@gmail.com> * @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 { 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
/**
* 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
...@@ -14,8 +14,6 @@ import CoarseGrained from './properties/coarse-grained' ...@@ -14,8 +14,6 @@ import CoarseGrained from './properties/coarse-grained'
import from_gro from './formats/gro' import from_gro from './formats/gro'
import from_mmCIF from './formats/mmcif' import from_mmCIF from './formats/mmcif'
import { Annotations } from '../../annotations'
/** /**
* Interface to the "source data" of the molecule. * Interface to the "source data" of the molecule.
* *
...@@ -32,7 +30,6 @@ interface Model extends Readonly<{ ...@@ -32,7 +30,6 @@ interface Model extends Readonly<{
conformation: Conformation, conformation: Conformation,
symmetry: Symmetry, symmetry: Symmetry,
coarseGrained: CoarseGrained, coarseGrained: CoarseGrained,
annotations: Annotations,
atomCount: number, atomCount: number,
}> { }> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment