Browse Source

move column to "mol-base"

David Sehnal 7 years ago
parent
commit
06780bf310

+ 0 - 0
src/mol-io/reader/common/column.ts → src/mol-base/collections/column.ts


+ 10 - 0
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

+ 0 - 6
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

+ 0 - 0
src/mol-data/model/common.ts → src/mol-data/model/formats.ts


+ 7 - 0
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

+ 7 - 0
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.

+ 7 - 0
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

+ 0 - 0
src/mol-data/model/mmcif.ts → src/mol-data/selection.ts


+ 3 - 0
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

+ 1 - 1
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',

+ 1 - 1
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'

+ 1 - 1
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,

+ 1 - 1
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'
 
 /**

+ 1 - 1
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'

+ 1 - 1
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'

+ 1 - 1
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'

+ 1 - 1
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'

+ 1 - 1
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,

+ 1 - 1
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