From 10b221b0185907ecf15db2a5d44f0c0098dc4827 Mon Sep 17 00:00:00 2001
From: David Sehnal <david.sehnal@gmail.com>
Date: Sat, 4 Nov 2017 13:55:28 +0100
Subject: [PATCH] tweaks

---
 src/apps/{cif2bcif.ts => cif2bcif/index.ts} | 6 +++++-
 src/mol-io/reader/cif/data-model.ts         | 6 +++---
 2 files changed, 8 insertions(+), 4 deletions(-)
 rename src/apps/{cif2bcif.ts => cif2bcif/index.ts} (67%)

diff --git a/src/apps/cif2bcif.ts b/src/apps/cif2bcif/index.ts
similarity index 67%
rename from src/apps/cif2bcif.ts
rename to src/apps/cif2bcif/index.ts
index 26d583aae..986b9ab7c 100644
--- a/src/apps/cif2bcif.ts
+++ b/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];
 
diff --git a/src/mol-io/reader/cif/data-model.ts b/src/mol-io/reader/cif/data-model.ts
index 55cc01095..6f1422206 100644
--- a/src/mol-io/reader/cif/data-model.ts
+++ b/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
-- 
GitLab