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 26d583aae3d312a07976d30533e8de6a11aff24d..986b9ab7c9916a248a36c7a8af8962960e7804ce 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 55cc01095e0f323df9480381a7d20177ba5fc2e9..6f1422206212a952051022a3b12620551e516a2d 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