diff --git a/src/mol-io/reader/common/column.ts b/src/mol-base/collections/column.ts similarity index 100% rename from src/mol-io/reader/common/column.ts rename to src/mol-base/collections/column.ts diff --git a/src/mol-data/conformation.ts b/src/mol-data/conformation.ts new file mode 100644 index 0000000000000000000000000000000000000000..bffdc60c45f3f06b63d96806e990b79642ee0a0e --- /dev/null +++ b/src/mol-data/conformation.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) 2017 molio contributors, licensed under MIT, See LICENSE file for more info. + * + * @author David Sehnal <david.sehnal@gmail.com> + */ + +interface Conformation { +} + +export default Conformation diff --git a/src/mol-data/model.ts b/src/mol-data/model.ts index b941373a3038cc3e935514d1dd69c42daeb354d0..af1d9e34b6204c01c3654aec62adf5c07f4676b9 100644 --- a/src/mol-data/model.ts +++ b/src/mol-data/model.ts @@ -7,12 +7,6 @@ // TODO: define property accessor intefaces, graphs, spatial lookups and what have you. interface Model { - - // Incremented when data changes - dataVersion: number, - - // Incremented when the underlying conformation changes - conformationVersion: number, } export default Model diff --git a/src/mol-data/model/common.ts b/src/mol-data/model/formats.ts similarity index 100% rename from src/mol-data/model/common.ts rename to src/mol-data/model/formats.ts diff --git a/src/mol-data/model/formats/mmcif.ts b/src/mol-data/model/formats/mmcif.ts new file mode 100644 index 0000000000000000000000000000000000000000..96788f75bb70e6a0c69b36c3b51e8bfec12b6b18 --- /dev/null +++ b/src/mol-data/model/formats/mmcif.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2017 molio contributors, licensed under MIT, See LICENSE file for more info. + * + * @author David Sehnal <david.sehnal@gmail.com> + */ + +// TODO: implement interfaces for mmCIF source data format \ No newline at end of file diff --git a/src/mol-data/model/interfaces/common.ts b/src/mol-data/model/interfaces/common.ts new file mode 100644 index 0000000000000000000000000000000000000000..36e049ca00d5d9157e0be4565448809728cbaae3 --- /dev/null +++ b/src/mol-data/model/interfaces/common.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2017 molio contributors, licensed under MIT, See LICENSE file for more info. + * + * @author David Sehnal <david.sehnal@gmail.com> + */ + +// TODO: define basic hierarchy, sec. structure. etc. \ No newline at end of file diff --git a/src/mol-data/model/interfaces/mmcif.ts b/src/mol-data/model/interfaces/mmcif.ts new file mode 100644 index 0000000000000000000000000000000000000000..3eae6edc117b3e794c128cb1d4c847524f1735bc --- /dev/null +++ b/src/mol-data/model/interfaces/mmcif.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2017 molio contributors, licensed under MIT, See LICENSE file for more info. + * + * @author David Sehnal <david.sehnal@gmail.com> + */ + +// TODO: map parts of mmCIF schema to create interfaces \ No newline at end of file diff --git a/src/mol-data/model/mmcif.ts b/src/mol-data/selection.ts similarity index 100% rename from src/mol-data/model/mmcif.ts rename to src/mol-data/selection.ts diff --git a/src/mol-data/structure.ts b/src/mol-data/structure.ts index 37727d2497c437e5c38584d8dc5b0bb4b21981fe..e7ae5aa15d03b66e264c6268c8cde3a713a39af1 100644 --- a/src/mol-data/structure.ts +++ b/src/mol-data/structure.ts @@ -7,6 +7,7 @@ import { Vec3, Mat4 } from '../mol-base/math/linear-algebra' import AtomSet from './atom-set' import Model from './model' +import Conformation from './conformation' export interface Operator extends Readonly<{ name: string, @@ -29,6 +30,8 @@ export interface Unit extends Readonly<{ // Provides access to the underlying data. model: Model, + conformation: Conformation, + // Determines the operation applied to this unit. // The transform and and inverse are baked into the "getPosition" function operator: Operator diff --git a/src/mol-io/reader/_spec/column.spec.ts b/src/mol-io/reader/_spec/column.spec.ts index 1bd08dfdb5f7e537ef173b34c5d982310b2e3265..de51bde201a6d04aa24e1ea169213372a4845aeb 100644 --- a/src/mol-io/reader/_spec/column.spec.ts +++ b/src/mol-io/reader/_spec/column.spec.ts @@ -7,7 +7,7 @@ import FixedColumn from '../common/text/column/fixed' import TokenColumn from '../common/text/column/token' -import { ColumnType, typedArrayWindow } from '../common/column' +import { ColumnType, typedArrayWindow } from '../../../mol-base/collections/column' const lines = [ '1.123 abc', diff --git a/src/mol-io/reader/cif/binary/field.ts b/src/mol-io/reader/cif/binary/field.ts index 2c8821e685a49c205f23fbe7cd4f7be86b3040e1..d1d1c035a7e3a52d14919815beb1e9cf8047e1cb 100644 --- a/src/mol-io/reader/cif/binary/field.ts +++ b/src/mol-io/reader/cif/binary/field.ts @@ -4,7 +4,7 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -import * as Column from '../../common/column' +import * as Column from '../../../../mol-base/collections/column' import * as Data from '../data-model' import { EncodedColumn } from './encoding' import decode from './decoder' diff --git a/src/mol-io/reader/cif/data-model.ts b/src/mol-io/reader/cif/data-model.ts index aa8a4d89caa11ff39cf73f926485f2c0cc94b05a..e396f71b7e3bfe8f9bd83d5920321508d7c3db80 100644 --- a/src/mol-io/reader/cif/data-model.ts +++ b/src/mol-io/reader/cif/data-model.ts @@ -4,7 +4,7 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -import * as Column from '../common/column' +import * as Column from '../../../mol-base/collections/column' export interface File { readonly name?: string, diff --git a/src/mol-io/reader/cif/schema.ts b/src/mol-io/reader/cif/schema.ts index 67f173f0bc399deacc7f593a92896ea230838653..b391d05b994ac565ee93517c55a8c3f540c2d320 100644 --- a/src/mol-io/reader/cif/schema.ts +++ b/src/mol-io/reader/cif/schema.ts @@ -5,7 +5,7 @@ */ import * as Data from './data-model' -import * as Column from '../common/column' +import * as Column from '../../../mol-base/collections/column' import StringPool from '../../utils/short-string-pool' /** diff --git a/src/mol-io/reader/cif/text/field.ts b/src/mol-io/reader/cif/text/field.ts index 2e09cd1b0cf369ac0d4cef3346d7d2fb88aad4e9..338bc327ddbffa062d7c7183410e916e14df435b 100644 --- a/src/mol-io/reader/cif/text/field.ts +++ b/src/mol-io/reader/cif/text/field.ts @@ -4,7 +4,7 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -import * as Column from '../../common/column' +import * as Column from '../../../../mol-base/collections/column' import * as TokenColumn from '../../common/text/column/token' import { Tokens } from '../../common/text/tokenizer' import * as Data from '../data-model' diff --git a/src/mol-io/reader/common/text/column/fixed.ts b/src/mol-io/reader/common/text/column/fixed.ts index f4b36de8d1d046a66edc4f3e3fe9ef780539b1f8..0a384f8a46508f89ec4c27d3fe53e9b3e1186b00 100644 --- a/src/mol-io/reader/common/text/column/fixed.ts +++ b/src/mol-io/reader/common/text/column/fixed.ts @@ -4,7 +4,7 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -import { Column, ColumnType, createAndFillArray } from '../../column' +import { Column, ColumnType, createAndFillArray } from '../../../../../mol-base/collections/column' import { trimStr, Tokens } from '../tokenizer' import { parseIntSkipLeadingWhitespace, parseFloatSkipLeadingWhitespace } from '../number-parser' import StringPool from '../../../../utils/short-string-pool' diff --git a/src/mol-io/reader/common/text/column/token.ts b/src/mol-io/reader/common/text/column/token.ts index ae203b1fa02e125d7cb4c06096cd9bcde4de7495..0b8d732b99f6081c99f99007fe7ccdee3cd44815 100644 --- a/src/mol-io/reader/common/text/column/token.ts +++ b/src/mol-io/reader/common/text/column/token.ts @@ -4,7 +4,7 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -import { Column, ColumnType, createAndFillArray } from '../../column' +import { Column, ColumnType, createAndFillArray } from '../../../../../mol-base/collections/column' import { Tokens } from '../tokenizer' import { parseInt as fastParseInt, parseFloat as fastParseFloat } from '../number-parser' import StringPool from '../../../../utils/short-string-pool' diff --git a/src/mol-io/reader/gro/parser.ts b/src/mol-io/reader/gro/parser.ts index 3c71b3adbd1a3553849b26aa29b6a2f706672ac5..f4d28e4b0045270a4287d6942cefd83848f5a5ee 100644 --- a/src/mol-io/reader/gro/parser.ts +++ b/src/mol-io/reader/gro/parser.ts @@ -7,7 +7,7 @@ import Tokenizer from '../common/text/tokenizer' import FixedColumn from '../common/text/column/fixed' -import { ColumnType, UndefinedColumn } from '../common/column' +import { ColumnType, UndefinedColumn } from '../../../mol-base/collections/column' import * as Schema from './schema' import Result from '../result' import Computation from '../../../mol-base/computation' diff --git a/src/mol-io/reader/gro/schema.d.ts b/src/mol-io/reader/gro/schema.d.ts index 2ee9bc0edf12b9cddb0c883c53d15e4046a2d546..981d2906aa620cd40898719bdb9181a47d672fbf 100644 --- a/src/mol-io/reader/gro/schema.d.ts +++ b/src/mol-io/reader/gro/schema.d.ts @@ -5,7 +5,7 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -import { Column } from '../common/column' +import { Column } from '../../../mol-base/collections/column' export interface Header { title: string, diff --git a/src/mol-io/reader/mol2/schema.d.ts b/src/mol-io/reader/mol2/schema.d.ts index 7f1e73fb2077b0b647b5d13d62662e104bad6b0b..8284c6f05d565a51b73a580713df5b52046050cd 100644 --- a/src/mol-io/reader/mol2/schema.d.ts +++ b/src/mol-io/reader/mol2/schema.d.ts @@ -4,7 +4,7 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { Column } from '../common/column' +import { Column } from '../../../mol-base/collections/column' // Full format http://chemyang.ccnu.edu.cn/ccb/server/AIMMS/mol2.pdf // there are many records but for now ignore (pass over) all but the following