David Sehnal 7 years ago
parent
commit
10b221b018
2 changed files with 8 additions and 4 deletions
  1. 5 1
      src/apps/cif2bcif/index.ts
  2. 3 3
      src/mol-io/reader/cif/data-model.ts

+ 5 - 1
src/apps/cif2bcif.ts → src/apps/cif2bcif/index.ts

@@ -5,9 +5,13 @@
  */
 
 import * as fs from 'fs'
-import convert from './cif2bcif/converter'
+import convert from './converter'
 
 (async function () {
+    if (process.argv.length !== 4) {
+        console.log('Usage:\nnode cif2bcif input.cif output.bcif');
+        return;
+    }
     const src = process.argv[2];
     const out = process.argv[3];
 

+ 3 - 3
src/mol-io/reader/cif/data-model.ts

@@ -17,6 +17,7 @@ export function File(blocks: ArrayLike<Block>, name?: string): File {
 
 export interface Frame {
     readonly header: string,
+    // Category names stored separately so that the ordering can be preserved.
     readonly categoryNames: ReadonlyArray<string>,
     readonly categories: Categories
 }
@@ -54,9 +55,8 @@ export namespace Category {
 
 /**
  * Implementation note:
- * Always implement this as a "plain" object so that the functions are "closures"
- * by default. This is to ensure that the schema access works without definiting
- * additional closures.
+ * Always implement without using "this." in any of the interface functions.
+ * This is to ensure that the functions can invoked without having to "bind" them.
  */
 export interface Field {
     readonly '@array': ArrayLike<any> | undefined