UNPKG

molstar

Version:

A comprehensive macromolecular library.

32 lines (31 loc) 1.57 kB
/** * Copyright (c) 2017-2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> * @author Alexander Rose <alexander.rose@weirdbyte.de> */ import { parseCifText } from './cif/text/parser'; import { parseCifBinary } from './cif/binary/parser'; import { toDatabaseCollection, toDatabase } from './cif/schema'; import { mmCIF_Schema } from './cif/schema/mmcif'; import { CCD_Schema } from './cif/schema/ccd'; import { BIRD_Schema } from './cif/schema/bird'; import { dic_Schema } from './cif/schema/dic'; import { DensityServer_Data_Schema } from './cif/schema/density-server'; import { CifCore_Schema, CifCore_Aliases } from './cif/schema/cif-core'; export var CIF = { parse: function (data) { return typeof data === 'string' ? parseCifText(data) : parseCifBinary(data); }, parseText: parseCifText, parseBinary: parseCifBinary, toDatabaseCollection: toDatabaseCollection, toDatabase: toDatabase, schema: { mmCIF: function (frame) { return toDatabase(mmCIF_Schema, frame); }, CCD: function (frame) { return toDatabase(CCD_Schema, frame); }, BIRD: function (frame) { return toDatabase(BIRD_Schema, frame); }, dic: function (frame) { return toDatabase(dic_Schema, frame); }, cifCore: function (frame) { return toDatabase(CifCore_Schema, frame, CifCore_Aliases); }, densityServer: function (frame) { return toDatabase(DensityServer_Data_Schema, frame); }, } }; export * from './cif/data-model';