bravais 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +11 -17
- package/THIRD_PARTY_NOTICES.md +11 -3
- package/dist/bravais.js +663 -976
- package/dist/bravais.js.map +1 -1
- package/dist/moyo-wasm.js +367 -0
- package/dist/moyo-wasm.js.map +1 -0
- package/dist/types/cif/symmetry-operators.d.ts +2 -2
- package/dist/types/index.d.ts +8 -7
- package/dist/types/render/gizmo.d.ts +4 -1
- package/dist/types/render/materials.d.ts +1 -2
- package/dist/types/render/model.d.ts +7 -2
- package/dist/types/render/palette.d.ts +5 -6
- package/dist/types/render/thumbnails.d.ts +4 -3
- package/dist/types/render/view-state.d.ts +3 -3
- package/dist/types/render/viewer.d.ts +10 -12
- package/dist/types/scene/build.d.ts +9 -6
- package/dist/types/structure/bonds.d.ts +2 -1
- package/dist/types/structure/expand.d.ts +3 -2
- package/dist/types/structure/fractional.d.ts +16 -0
- package/dist/types/structure/lattice.d.ts +3 -3
- package/dist/types/symmetry/dataset.d.ts +2 -4
- package/dist/types/symmetry/moyo-loader.d.ts +8 -0
- package/dist/types/symmetry/moyo-wasm.d.ts +3 -0
- package/dist/types/symmetry/moyo.d.ts +7 -8
- package/dist/types/symmetry/symbol.d.ts +5 -7
- package/package.json +5 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moyo-wasm.js","names":["ret","initMoyo","moyoWasmBase64","analyze_cell","ptr0","passStringToWasm0","cell_json","wasm","len0","WASM_VECTOR_LEN","ptr1","setting","len1","ret","symprec","takeFromExternrefTable0","hall_symbol_entries_from_number","number","v1","getArrayJsValueFromWasm0","hall_symbol_entry","hall_number","operations_from_number","primitive","space_group_type","__wbg_get_imports","getStringFromWasm0","arg0","arg1","getDataViewMemory0","v","isLikeNone","debugString","val","obj","handleError","result","getArrayU8FromWasm0","arg2","table","offset","addToExternrefTable0","idx","type","description","name","length","debug","i","builtInMatches","className","mem","ptr","len","getUint8ArrayMemory0","cachedDataViewMemory0","decodeText","cachedUint8ArrayMemory0","f","args","x","realloc","buf","cachedTextEncoder","arg","malloc","code","view","value","cachedTextDecoder","MAX_SAFARI_DECODE_BYTES","numBytesDecoded","__wbg_finalize_init","instance","__wbg_load","module","imports","e","expectedResponseType","bytes","__wbg_init","module_or_path","_virtual_moyo_wasm_default","decodeBase64","binary","base64","index","instantiate"],"sources":["../node_modules/@spglib/moyo-wasm/moyo_wasm.js","../src/symmetry/moyo-wasm.ts"],"sourcesContent":["/* @ts-self-types=\"./moyo_wasm.d.ts\" */\n\n/**\n * Analyze the symmetry of a crystal structure and return the full dataset.\n *\n * `cell_json` is a JSON-encoded [`MoyoCell`] (concatenated Cartesian basis vectors,\n * fractional `positions`, atomic `numbers`). `symprec` is the distance\n * tolerance (in the same length unit as the lattice). `setting` selects the\n * standardization convention: `\"Spglib\"` for spglib-compatible settings,\n * anything else (e.g. `\"Standard\"`) for the ITA standard setting.\n * Both returned standardized bases are right-handed. Passive rebasing preserves\n * the physical space-group type, while a Cartesian mirror exchanges enantiomorphs.\n * Lattice and positions are refined, then a proper Cartesian rotation is applied.\n * @param {string} cell_json\n * @param {number} symprec\n * @param {string} setting\n * @returns {MoyoDataset}\n */\nexport function analyze_cell(cell_json, symprec, setting) {\n const ptr0 = passStringToWasm0(cell_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(setting, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.analyze_cell(ptr0, len0, symprec, ptr1, len1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\n/**\n * Return the arithmetic-crystal-class entry for the given `arithmetic_number` (1 - 73).\n * @param {number} arithmetic_number\n * @returns {MoyoArithmeticCrystalClass}\n */\nexport function arithmetic_crystal_class(arithmetic_number) {\n const ret = wasm.arithmetic_crystal_class(arithmetic_number);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\n/**\n * Return all Hall-symbol entries for the given ITA space-group `number` (1 - 230),\n * ordered by Hall number. Each entry corresponds to one setting of the space group.\n * @param {number} number\n * @returns {MoyoHallSymbolEntry[]}\n */\nexport function hall_symbol_entries_from_number(number) {\n const ret = wasm.hall_symbol_entries_from_number(number);\n var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);\n return v1;\n}\n\n/**\n * Return the Hall-symbol entry for the given `hall_number` (1 - 530).\n * @param {number} hall_number\n * @returns {MoyoHallSymbolEntry}\n */\nexport function hall_symbol_entry(hall_number) {\n const ret = wasm.hall_symbol_entry(hall_number);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\n/**\n * Return the layer arithmetic-crystal-class entry for the given `arithmetic_number` (1 - 43).\n * @param {number} arithmetic_number\n * @returns {MoyoLayerArithmeticCrystalClass}\n */\nexport function layer_arithmetic_crystal_class(arithmetic_number) {\n const ret = wasm.layer_arithmetic_crystal_class(arithmetic_number);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\n/**\n * Return the layer-group-type description for the given `number` (1 - 80).\n * @param {number} number\n * @returns {MoyoLayerGroupType}\n */\nexport function layer_group_type(number) {\n const ret = wasm.layer_group_type(number);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\n/**\n * Return all layer Hall-symbol entries for the given layer-group `number` (1 - 80),\n * ordered by Hall number. Each entry corresponds to one setting of the layer group.\n * @param {number} number\n * @returns {MoyoLayerHallSymbolEntry[]}\n */\nexport function layer_hall_symbol_entries_from_number(number) {\n const ret = wasm.layer_hall_symbol_entries_from_number(number);\n var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);\n return v1;\n}\n\n/**\n * Return the layer Hall-symbol entry for the given `hall_number` (1 - 116).\n * @param {number} hall_number\n * @returns {MoyoLayerHallSymbolEntry}\n */\nexport function layer_hall_symbol_entry(hall_number) {\n const ret = wasm.layer_hall_symbol_entry(hall_number);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\n/**\n * Return all Wyckoff positions for the given layer Hall number (1 - 116), ordered\n * general-position-first then descending multiplicity. Returns an empty array for\n * unknown Hall numbers.\n * @param {number} hall_number\n * @returns {MoyoLayerWyckoffPosition[]}\n */\nexport function layer_wyckoff_positions(hall_number) {\n const ret = wasm.layer_wyckoff_positions(hall_number);\n var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);\n return v1;\n}\n\n/**\n * Return the magnetic Hall-symbol entry for the given `uni_number` (1 - 1651).\n * @param {number} uni_number\n * @returns {MoyoMagneticHallSymbolEntry}\n */\nexport function magnetic_hall_symbol_entry(uni_number) {\n const ret = wasm.magnetic_hall_symbol_entry(uni_number);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\n/**\n * Return magnetic symmetry operations for the given `uni_number` (1 - 1651).\n * @param {number} uni_number\n * @param {boolean} primitive\n * @returns {MoyoMagneticOperation[]}\n */\nexport function magnetic_operations_from_uni_number(uni_number, primitive) {\n const ret = wasm.magnetic_operations_from_uni_number(uni_number, primitive);\n if (ret[3]) {\n throw takeFromExternrefTable0(ret[2]);\n }\n var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);\n return v1;\n}\n\n/**\n * Return the magnetic-space-group-type description for the given `uni_number` (1 - 1651).\n * @param {number} uni_number\n * @returns {MoyoMagneticSpaceGroupType}\n */\nexport function magnetic_space_group_type(uni_number) {\n const ret = wasm.magnetic_space_group_type(uni_number);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\n/**\n * Return symmetry operations for the given layer-group `number` (1 - 80).\n * @param {number} number\n * @param {MoyoLayerSetting} setting\n * @param {boolean} primitive\n * @returns {MoyoOperation[]}\n */\nexport function operations_from_layer_number(number, setting, primitive) {\n const ret = wasm.operations_from_layer_number(number, setting, primitive);\n if (ret[3]) {\n throw takeFromExternrefTable0(ret[2]);\n }\n var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);\n return v1;\n}\n\n/**\n * Return symmetry operations for the given space-group ITA `number`.\n * @param {number} number\n * @param {MoyoSetting} setting\n * @param {boolean} primitive\n * @returns {MoyoOperation[]}\n */\nexport function operations_from_number(number, setting, primitive) {\n const ret = wasm.operations_from_number(number, setting, primitive);\n if (ret[3]) {\n throw takeFromExternrefTable0(ret[2]);\n }\n var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);\n return v1;\n}\n\n/**\n * Return the space-group-type description for the given ITA `number` (1 - 230).\n * @param {number} number\n * @returns {MoyoSpaceGroupType}\n */\nexport function space_group_type(number) {\n const ret = wasm.space_group_type(number);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\n/**\n * Return all Wyckoff positions for the given `hall_number` (1 - 530), ordered\n * general-position-first then descending multiplicity. Returns an empty array for\n * unknown Hall numbers.\n * @param {number} hall_number\n * @returns {MoyoWyckoffPosition[]}\n */\nexport function wyckoff_positions(hall_number) {\n const ret = wasm.wyckoff_positions(hall_number);\n var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);\n return v1;\n}\nfunction __wbg_get_imports() {\n const import0 = {\n __proto__: null,\n __wbg_Error_bce6d499ff0a4aff: function(arg0, arg1) {\n const ret = Error(getStringFromWasm0(arg0, arg1));\n return ret;\n },\n __wbg_Number_b7972a139bfbfdf0: function(arg0) {\n const ret = Number(arg0);\n return ret;\n },\n __wbg_String_8564e559799eccda: function(arg0, arg1) {\n const ret = String(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n },\n __wbg___wbindgen_bigint_get_as_i64_410e28c7b761ad83: function(arg0, arg1) {\n const v = arg1;\n const ret = typeof(v) === 'bigint' ? v : undefined;\n getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n },\n __wbg___wbindgen_boolean_get_2304fb8c853028c8: function(arg0) {\n const v = arg0;\n const ret = typeof(v) === 'boolean' ? v : undefined;\n return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;\n },\n __wbg___wbindgen_debug_string_edece8177ad01481: function(arg0, arg1) {\n const ret = debugString(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n },\n __wbg___wbindgen_in_07056af4f902c445: function(arg0, arg1) {\n const ret = arg0 in arg1;\n return ret;\n },\n __wbg___wbindgen_is_bigint_aeae3893f30ed54e: function(arg0) {\n const ret = typeof(arg0) === 'bigint';\n return ret;\n },\n __wbg___wbindgen_is_function_5cd60d5cf78b4eef: function(arg0) {\n const ret = typeof(arg0) === 'function';\n return ret;\n },\n __wbg___wbindgen_is_object_b4593df85baada48: function(arg0) {\n const val = arg0;\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n },\n __wbg___wbindgen_is_string_dde0fd9020db4434: function(arg0) {\n const ret = typeof(arg0) === 'string';\n return ret;\n },\n __wbg___wbindgen_is_undefined_35bb9f4c7fd651d5: function(arg0) {\n const ret = arg0 === undefined;\n return ret;\n },\n __wbg___wbindgen_jsval_eq_c0ed08b3e0f393b9: function(arg0, arg1) {\n const ret = arg0 === arg1;\n return ret;\n },\n __wbg___wbindgen_jsval_loose_eq_0ad77b7717db155c: function(arg0, arg1) {\n const ret = arg0 == arg1;\n return ret;\n },\n __wbg___wbindgen_number_get_f73a1244370fcc2c: function(arg0, arg1) {\n const obj = arg1;\n const ret = typeof(obj) === 'number' ? obj : undefined;\n getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n },\n __wbg___wbindgen_string_get_d109740c0d18f4d7: function(arg0, arg1) {\n const obj = arg1;\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n },\n __wbg___wbindgen_throw_9c31b086c2b26051: function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n },\n __wbg_call_13665d9f14390edc: function() { return handleError(function (arg0, arg1) {\n const ret = arg0.call(arg1);\n return ret;\n }, arguments); },\n __wbg_done_54b8da57023b7ed2: function(arg0) {\n const ret = arg0.done;\n return ret;\n },\n __wbg_entries_564a7e8b1e54ede5: function(arg0) {\n const ret = Object.entries(arg0);\n return ret;\n },\n __wbg_get_3e9a707ab7d352eb: function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(arg0, arg1);\n return ret;\n }, arguments); },\n __wbg_get_98fdf51d029a75eb: function(arg0, arg1) {\n const ret = arg0[arg1 >>> 0];\n return ret;\n },\n __wbg_get_unchecked_1dfe6d05ad91d9b7: function(arg0, arg1) {\n const ret = arg0[arg1 >>> 0];\n return ret;\n },\n __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {\n const ret = arg0[arg1];\n return ret;\n },\n __wbg_instanceof_ArrayBuffer_53db37b06f6b9afe: function(arg0) {\n let result;\n try {\n result = arg0 instanceof ArrayBuffer;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n },\n __wbg_instanceof_Map_16f217b9a2a08d8c: function(arg0) {\n let result;\n try {\n result = arg0 instanceof Map;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n },\n __wbg_instanceof_Uint8Array_abd07d4bd221d50b: function(arg0) {\n let result;\n try {\n result = arg0 instanceof Uint8Array;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n },\n __wbg_isArray_94898ed3aad6947b: function(arg0) {\n const ret = Array.isArray(arg0);\n return ret;\n },\n __wbg_isSafeInteger_01e964d144ad3a55: function(arg0) {\n const ret = Number.isSafeInteger(arg0);\n return ret;\n },\n __wbg_iterator_1441b47f341dc34f: function() {\n const ret = Symbol.iterator;\n return ret;\n },\n __wbg_length_2591a0f4f659a55c: function(arg0) {\n const ret = arg0.length;\n return ret;\n },\n __wbg_length_56fcd3e2b7e0299d: function(arg0) {\n const ret = arg0.length;\n return ret;\n },\n __wbg_new_02d162bc6cf02f60: function() {\n const ret = new Object();\n return ret;\n },\n __wbg_new_310879b66b6e95e1: function() {\n const ret = new Array();\n return ret;\n },\n __wbg_new_7ddec6de44ff8f5d: function(arg0) {\n const ret = new Uint8Array(arg0);\n return ret;\n },\n __wbg_next_2a4e19f4f5083b0f: function(arg0) {\n const ret = arg0.next;\n return ret;\n },\n __wbg_next_6429a146bf756f93: function() { return handleError(function (arg0) {\n const ret = arg0.next();\n return ret;\n }, arguments); },\n __wbg_prototypesetcall_5f9bdc8d75e07276: function(arg0, arg1, arg2) {\n Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);\n },\n __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {\n arg0[arg1] = arg2;\n },\n __wbg_set_78ea6a19f4818587: function(arg0, arg1, arg2) {\n arg0[arg1 >>> 0] = arg2;\n },\n __wbg_value_9cc0518af87a489c: function(arg0) {\n const ret = arg0.value;\n return ret;\n },\n __wbindgen_cast_0000000000000001: function(arg0) {\n // Cast intrinsic for `F64 -> Externref`.\n const ret = arg0;\n return ret;\n },\n __wbindgen_cast_0000000000000002: function(arg0) {\n // Cast intrinsic for `I64 -> Externref`.\n const ret = arg0;\n return ret;\n },\n __wbindgen_cast_0000000000000003: function(arg0, arg1) {\n // Cast intrinsic for `Ref(String) -> Externref`.\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n },\n __wbindgen_cast_0000000000000004: function(arg0) {\n // Cast intrinsic for `U64 -> Externref`.\n const ret = BigInt.asUintN(64, arg0);\n return ret;\n },\n __wbindgen_init_externref_table: function() {\n const table = wasm.__wbindgen_externrefs;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n },\n };\n return {\n __proto__: null,\n \"./moyo_wasm_bg.js\": import0,\n };\n}\n\nfunction addToExternrefTable0(obj) {\n const idx = wasm.__externref_table_alloc();\n wasm.__wbindgen_externrefs.set(idx, obj);\n return idx;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches && builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nfunction getArrayJsValueFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n const mem = getDataViewMemory0();\n const result = [];\n for (let i = ptr; i < ptr + 4 * len; i += 4) {\n result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));\n }\n wasm.__externref_drop_slice(ptr, len);\n return result;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nlet cachedDataViewMemory0 = null;\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n return decodeText(ptr >>> 0, len);\n}\n\nlet cachedUint8ArrayMemory0 = null;\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n const idx = addToExternrefTable0(e);\n wasm.__wbindgen_exn_store(idx);\n }\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = cachedTextEncoder.encodeInto(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction takeFromExternrefTable0(idx) {\n const value = wasm.__wbindgen_externrefs.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\ncachedTextDecoder.decode();\nconst MAX_SAFARI_DECODE_BYTES = 2146435072;\nlet numBytesDecoded = 0;\nfunction decodeText(ptr, len) {\n numBytesDecoded += len;\n if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {\n cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n cachedTextDecoder.decode();\n numBytesDecoded = len;\n }\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nconst cachedTextEncoder = new TextEncoder();\n\nif (!('encodeInto' in cachedTextEncoder)) {\n cachedTextEncoder.encodeInto = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n };\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nlet wasmModule, wasmInstance, wasm;\nfunction __wbg_finalize_init(instance, module) {\n wasmInstance = instance;\n wasm = instance.exports;\n wasmModule = module;\n cachedDataViewMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n wasm.__wbindgen_start();\n return wasm;\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n } catch (e) {\n const validResponse = module.ok && expectedResponseType(module.type);\n\n if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else { throw e; }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n } else {\n return instance;\n }\n }\n\n function expectedResponseType(type) {\n switch (type) {\n case 'basic': case 'cors': case 'default': return true;\n }\n return false;\n }\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (module !== undefined) {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n const instance = new WebAssembly.Instance(module, imports);\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (module_or_path !== undefined) {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (module_or_path === undefined) {\n module_or_path = new URL('moyo_wasm_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync, __wbg_init as default };\n","// The moyo bindings and their binary: most of the package's size, so they\n// are a chunk of their own, imported only by `loadMoyo`.\nimport initMoyo from \"@spglib/moyo-wasm\";\nimport moyoWasmBase64 from \"virtual:moyo-wasm\";\n\nexport {\n analyze_cell,\n hall_symbol_entries_from_number,\n hall_symbol_entry,\n operations_from_number,\n space_group_type,\n} from \"@spglib/moyo-wasm\";\n\nfunction decodeBase64(base64: string): Uint8Array {\n const binary = atob(base64);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return bytes;\n}\n\n/** Instantiate the module from the binary this chunk carries. */\nexport async function instantiate(): Promise<void> {\n await initMoyo({ module_or_path: decodeBase64(moyoWasmBase64) });\n}\n"],"ignoreList":[0],"mappings":";AAkBA,SAAgBG,EAAa,GAAW,GAAS,GAAS;CACtD,IAAMC,IAAOC,EAAkBC,GAAWC,EAAK,mBAAmBA,EAAK,kBAAkB,GACnFC,IAAOC,GACPC,IAAOL,EAAkBM,GAASJ,EAAK,mBAAmBA,EAAK,kBAAkB,GACjFK,IAAOH,GACP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CAAC;AACjE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SymmetryOperation } from "../structure/types.js";
|
|
2
2
|
/**
|
|
3
|
-
* Parse
|
|
4
|
-
*
|
|
3
|
+
* Parse a symmetry operation as CIF files write it, such as
|
|
4
|
+
* `-x+1/2, y, -z+1/2`, into a rotation matrix and translation.
|
|
5
5
|
*/
|
|
6
6
|
export declare function parseSymmetryOperator(text: string): SymmetryOperation;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { SpaceGroupLookupError, ensureMoyo, operationsForSpaceGroup, } from "./s
|
|
|
7
7
|
export { SymmetryAnalysisError, symmetryDataset, type SymmetryDataset, type SymmetryOptions, } from "./symmetry/dataset.js";
|
|
8
8
|
export { typesetSymbol } from "./symmetry/symbol.js";
|
|
9
9
|
export { expandStructure } from "./structure/expand.js";
|
|
10
|
+
export { latticeFromParameters, latticeFromVectors, } from "./structure/lattice.js";
|
|
10
11
|
export { buildScene, structureElements } from "./scene/build.js";
|
|
11
12
|
export { createViewer, type Viewer, type ViewerOptions, } from "./render/viewer.js";
|
|
12
13
|
export { createThumbnailRenderer, type ThumbnailRenderer, } from "./render/thumbnails.js";
|
|
@@ -17,12 +18,12 @@ export type { BuildSceneOptions, SceneAtom, StructureScene, } from "./scene/buil
|
|
|
17
18
|
export type { Bond } from "./structure/bonds.js";
|
|
18
19
|
export type { Lattice, LatticeParameters, Mat3, Site, SpaceGroupInfo, Species, Structure, SymmetryOperation, Vec3, } from "./structure/types.js";
|
|
19
20
|
/**
|
|
20
|
-
* Read the first structure in a CIF.
|
|
21
|
-
*
|
|
22
|
-
* symbol or number
|
|
23
|
-
*
|
|
24
|
-
* `CifSyntaxError` for text that is not CIF,
|
|
25
|
-
*
|
|
26
|
-
*
|
|
21
|
+
* Read the first structure in a CIF file. Its symmetry comes from the
|
|
22
|
+
* file's list of symmetry operations or, without one, from its space-group
|
|
23
|
+
* symbol or number; a file with neither is read as listing every atom.
|
|
24
|
+
*
|
|
25
|
+
* Throws `CifSyntaxError` for text that is not valid CIF,
|
|
26
|
+
* `CifStructureError` for a file without a usable structure, and
|
|
27
|
+
* `SpaceGroupLookupError` for an unknown space group.
|
|
27
28
|
*/
|
|
28
29
|
export declare function readCif(text: string): Promise<Structure>;
|
|
@@ -2,14 +2,17 @@ import { OrthographicCamera, Quaternion, Scene, type WebGLRenderer } from "three
|
|
|
2
2
|
import type { Mat3 } from "../structure/types.js";
|
|
3
3
|
/** The a, b, c axes of the cell drawn in a corner, following the camera. */
|
|
4
4
|
export declare class AxesGizmo {
|
|
5
|
-
private readonly fontFamily;
|
|
6
5
|
readonly scene: Scene<import("three").Object3DEventMap>;
|
|
7
6
|
readonly camera: OrthographicCamera;
|
|
8
7
|
private readonly axes;
|
|
8
|
+
/** The a, b and c arrows, built once and turned to each new cell. */
|
|
9
|
+
private readonly arrows;
|
|
9
10
|
private readonly headlight;
|
|
10
11
|
private readonly inverse;
|
|
12
|
+
private readonly direction;
|
|
11
13
|
/** `fontFamily` is the interface font the axis letters are drawn in. */
|
|
12
14
|
constructor(fontFamily: string);
|
|
15
|
+
/** Point the arrows along the cell's a, b and c axes. */
|
|
13
16
|
setCell(cell: Mat3): void;
|
|
14
17
|
/** Draw into the bottom-left `size` pixels of a renderer whose main pass is done. */
|
|
15
18
|
render(renderer: WebGLRenderer, cameraQuaternion: Quaternion, size: number): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataTexture, LineBasicMaterial, MeshStandardMaterial
|
|
1
|
+
import { DataTexture, LineBasicMaterial, MeshStandardMaterial } from "three";
|
|
2
2
|
export declare const METALNESS = 0.1;
|
|
3
3
|
export declare const ROUGHNESS = 0.6;
|
|
4
4
|
export declare const AMBIENT_LIGHT_INTENSITY = 0.8;
|
|
@@ -40,4 +40,3 @@ export declare const GIZMO_AXIS_STENCIL = 1;
|
|
|
40
40
|
* axis letters can tell what they are drawn over.
|
|
41
41
|
*/
|
|
42
42
|
export declare function createGizmoMaterial(color: string, stencilRef: number): MeshStandardMaterial;
|
|
43
|
-
export declare function disposeMaterial(material: Material | Material[]): void;
|
|
@@ -7,13 +7,18 @@ export interface SceneModel {
|
|
|
7
7
|
cell: Mat3;
|
|
8
8
|
/** Centre of that cell, which `group` moves to the origin. */
|
|
9
9
|
center: Vec3;
|
|
10
|
-
/** Bounds of every atom and cell corner, in the centred frame. */
|
|
10
|
+
/** Bounds of every atom and cell corner of every layer, in the centred frame. */
|
|
11
11
|
bounds: Box3;
|
|
12
12
|
/** Largest cell edge length of any layer. */
|
|
13
13
|
span: number;
|
|
14
|
+
/** Elements of the drawn layers. */
|
|
14
15
|
elements: string[];
|
|
15
16
|
dispose(): void;
|
|
16
17
|
}
|
|
17
18
|
export declare function cellCenter(cell: Mat3): Vec3;
|
|
18
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Build the three.js objects for the layers, centred on the first cell. A
|
|
21
|
+
* layer at opacity 0 is not drawn but still counts toward the centre, the
|
|
22
|
+
* bounds and the span.
|
|
23
|
+
*/
|
|
19
24
|
export declare function createSceneModel(layers: SceneLayer[]): SceneModel;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Give these elements their colours now, the more common ones first, so colours do not depend on drawing order. */
|
|
2
2
|
export declare function ensureElementColors(elements: readonly string[]): void;
|
|
3
|
-
/** The
|
|
3
|
+
/** The colour of an element as a hex string such as `#e15949`, given on first use. */
|
|
4
4
|
export declare function elementColor(element: string): string;
|
|
5
|
-
/**
|
|
5
|
+
/** Every element given a colour so far, with its colour, in the order given. */
|
|
6
6
|
export declare function elementColorAssignments(): [string, string][];
|
|
7
7
|
/**
|
|
8
|
-
* Forget
|
|
9
|
-
*
|
|
10
|
-
* which pick up new colours at their next draw.
|
|
8
|
+
* Forget every colour given so far, for example when all structures are
|
|
9
|
+
* closed. Viewers and thumbnails pick up new colours at their next draw.
|
|
11
10
|
*/
|
|
12
11
|
export declare function resetElementColors(): void;
|
|
@@ -6,12 +6,13 @@ export interface ThumbnailRenderer {
|
|
|
6
6
|
* Models are cached by `key` and rebuilt when the layers array changes.
|
|
7
7
|
*/
|
|
8
8
|
render(key: string, layers: SceneLayer[], view: ViewState | null, canvas: HTMLCanvasElement): void;
|
|
9
|
-
/**
|
|
9
|
+
/** Forget the cached model of `key`. */
|
|
10
10
|
release(key: string): void;
|
|
11
|
+
/** Free the shared WebGL context and every cached model. */
|
|
11
12
|
dispose(): void;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* Draw small previews into ordinary canvases from one shared WebGL context,
|
|
16
|
+
* so a list of structures does not need a context for each.
|
|
16
17
|
*/
|
|
17
18
|
export declare function createThumbnailRenderer(): ThumbnailRenderer;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { Vec3 } from "../structure/types.js";
|
|
2
2
|
/**
|
|
3
|
-
* A
|
|
4
|
-
* thumbnail
|
|
3
|
+
* A view an app can save and restore, or pass between a viewer and a
|
|
4
|
+
* thumbnail. It looks the same at any canvas size.
|
|
5
5
|
*/
|
|
6
6
|
export interface ViewState {
|
|
7
7
|
/** Orientation of the camera as [x, y, z, w], three.js order. */
|
|
8
8
|
quaternion: [number, number, number, number];
|
|
9
9
|
/** The point looked at, in the centred frame: the first layer's cell centre is the origin. */
|
|
10
10
|
target: Vec3;
|
|
11
|
-
/** Zoom relative to the zoom that fits
|
|
11
|
+
/** Zoom relative to the zoom that fits every layer in the viewport. */
|
|
12
12
|
scale: number;
|
|
13
13
|
}
|
|
@@ -8,32 +8,30 @@ export interface ViewerOptions {
|
|
|
8
8
|
}
|
|
9
9
|
export interface Viewer {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* is given.
|
|
11
|
+
* Draw these scenes from `buildScene`, replacing what was shown. The view
|
|
12
|
+
* resets to the standard orientation unless `view` is given.
|
|
14
13
|
*/
|
|
15
14
|
setLayers(layers: SceneLayer[], view?: ViewState | null): void;
|
|
16
15
|
/** Remove everything drawn. */
|
|
17
16
|
clear(): void;
|
|
18
|
-
/** The current
|
|
17
|
+
/** The current view, or null while nothing is shown. */
|
|
19
18
|
getView(): ViewState | null;
|
|
20
|
-
/** Restore a
|
|
19
|
+
/** Restore a view from `getView`, of this or another viewer. */
|
|
21
20
|
setView(view: ViewState): void;
|
|
22
21
|
/** Back to the standard orientation, fitted to the viewport. */
|
|
23
22
|
resetView(): void;
|
|
24
|
-
/**
|
|
23
|
+
/** Fit the canvas to the container again; the viewer does this itself when the container resizes. */
|
|
25
24
|
resize(): void;
|
|
26
25
|
/** Draw a frame now. */
|
|
27
26
|
render(): void;
|
|
28
|
-
/**
|
|
27
|
+
/** Call `listener` when the user rotates or zooms. Returns a function that removes it. */
|
|
29
28
|
onInteraction(listener: () => void): () => void;
|
|
30
|
-
/**
|
|
29
|
+
/** Remove the viewer from its container and free its WebGL resources. */
|
|
31
30
|
dispose(): void;
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* document, a `<style id="bravais-styles">` for the overlays.
|
|
33
|
+
* Create a viewer inside `container`. It fills the container and follows
|
|
34
|
+
* its size, so give the container a height. Adds the class `bravais-viewer`
|
|
35
|
+
* to the container and one small stylesheet to the page.
|
|
38
36
|
*/
|
|
39
37
|
export declare function createViewer(container: HTMLElement, options?: ViewerOptions): Viewer;
|
|
@@ -23,21 +23,24 @@ export interface StructureScene {
|
|
|
23
23
|
/** Elements present, in order of first appearance, deuterium as hydrogen. */
|
|
24
24
|
elements: string[];
|
|
25
25
|
}
|
|
26
|
-
/** One structure
|
|
26
|
+
/** One structure to draw. A viewer can overlay several, each with its own opacity. */
|
|
27
27
|
export interface SceneLayer {
|
|
28
28
|
scene: StructureScene;
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* From 0 to 1; default 1. Below 1 the layer is drawn see-through over the
|
|
31
|
+
* others. At 0 it is not drawn but still counts when fitting the view, so
|
|
32
|
+
* switching between two versions of a structure keeps the same framing.
|
|
33
|
+
*/
|
|
30
34
|
opacity?: number;
|
|
31
35
|
}
|
|
32
36
|
export interface BuildSceneOptions {
|
|
33
|
-
/**
|
|
37
|
+
/** Repeat atoms on the cell's faces, edges and corners on the opposite side too. Default true. */
|
|
34
38
|
imageAtoms?: boolean;
|
|
35
39
|
}
|
|
36
40
|
/** Every chemical element on any site, in order of first appearance. */
|
|
37
41
|
export declare function structureElements(structure: Structure): string[];
|
|
38
42
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* `expandStructure(structure)` to draw the full cell.
|
|
43
|
+
* Prepare a structure for drawing: its atoms, bonds and cell. Sites are
|
|
44
|
+
* drawn as listed; pass `expandStructure(structure)` to draw the whole cell.
|
|
42
45
|
*/
|
|
43
46
|
export declare function buildScene(structure: Structure, options?: BuildSceneOptions): StructureScene;
|
|
@@ -16,6 +16,7 @@ export interface Bond {
|
|
|
16
16
|
export declare function bondCutoff(elementA: string, elementB: string): number | null;
|
|
17
17
|
/**
|
|
18
18
|
* Bonds between the given atoms by VESTA's cutoff table. Only pairs VESTA
|
|
19
|
-
* lists get bonds, so no metal-metal or anion-anion sticks appear.
|
|
19
|
+
* lists get bonds, so no metal-metal or anion-anion sticks appear. The bonds
|
|
20
|
+
* are ordered by `start`, then `end`, and `start` is the lower index.
|
|
20
21
|
*/
|
|
21
22
|
export declare function findBonds(atoms: readonly BondedAtom[]): Bond[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Structure } from "./types.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Fill the unit cell: apply every symmetry operation to every site and keep
|
|
4
|
+
* each distinct position once. The result lists every atom, with the
|
|
5
|
+
* identity as its only operation.
|
|
5
6
|
*/
|
|
6
7
|
export declare function expandStructure(structure: Structure): Structure;
|
|
@@ -7,5 +7,21 @@ export declare function wrap(value: number, nearOne?: number): number;
|
|
|
7
7
|
export declare function wrapVector(fractional: Vec3): Vec3;
|
|
8
8
|
/** Periodic distance of two fractional positions, per axis, below `tolerance`. */
|
|
9
9
|
export declare function samePosition(p: Vec3, q: Vec3, tolerance: number): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Fractional positions bucketed by where they fall in the cell, so finding
|
|
12
|
+
* those within a tolerance of a position, across the periodic boundaries,
|
|
13
|
+
* takes a few comparisons instead of one per position. The tolerance is per
|
|
14
|
+
* axis, as in `samePosition`, and must stay below 1 / BUCKETS.
|
|
15
|
+
*/
|
|
16
|
+
export declare class PositionIndex {
|
|
17
|
+
private readonly tolerance;
|
|
18
|
+
private readonly buckets;
|
|
19
|
+
private readonly positions;
|
|
20
|
+
constructor(tolerance: number);
|
|
21
|
+
/** Add a position; its index counts up from 0 in the order added. */
|
|
22
|
+
add(position: Vec3): number;
|
|
23
|
+
/** Indices of the positions within tolerance of `position`, ascending. */
|
|
24
|
+
near(position: Vec3): number[];
|
|
25
|
+
}
|
|
10
26
|
/** Apply an operation to fractional coordinates (no wrapping). */
|
|
11
27
|
export declare function applyOperation(operation: SymmetryOperation, fractional: Vec3): Vec3;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Lattice, LatticeParameters, Mat3, Vec3 } from "./types.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* A lattice from cell lengths in ångström and angles in degrees. The c axis
|
|
4
|
+
* points along z and a lies in the xz plane, as in pymatgen.
|
|
5
5
|
*/
|
|
6
6
|
export declare function latticeFromParameters(parameters: LatticeParameters): Lattice;
|
|
7
|
-
/**
|
|
7
|
+
/** A lattice from its three cell vectors, in ångström. */
|
|
8
8
|
export declare function latticeFromVectors(vectors: Mat3): Lattice;
|
|
9
9
|
export declare function fractionalToCartesian(lattice: Lattice, fractional: Vec3): Vec3;
|
|
10
10
|
export declare function distance(p: Vec3, q: Vec3): number;
|
|
@@ -35,9 +35,7 @@ export interface SymmetryDataset {
|
|
|
35
35
|
standard: Structure;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* space group from the atoms alone, so the result does not depend on how,
|
|
41
|
-
* or whether, the file named it.
|
|
38
|
+
* Find the space group of a structure from its atoms alone, whatever the
|
|
39
|
+
* file says. See `SymmetryDataset` for what the result holds.
|
|
42
40
|
*/
|
|
43
41
|
export declare function symmetryDataset(structure: Structure, options?: SymmetryOptions): Promise<SymmetryDataset>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as MoyoBindings from "./moyo-wasm.js";
|
|
2
|
+
/**
|
|
3
|
+
* Import the moyo chunk and instantiate its module, once. A failed attempt
|
|
4
|
+
* is not kept: the next call tries again.
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadMoyo(): Promise<void>;
|
|
7
|
+
/** The moyo bindings, once `loadMoyo` has resolved. */
|
|
8
|
+
export declare function moyo(): typeof MoyoBindings;
|
|
@@ -4,10 +4,9 @@ export declare class SpaceGroupLookupError extends Error {
|
|
|
4
4
|
constructor(message: string);
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* the next call tries again.
|
|
7
|
+
* Load moyo, the symmetry library, ahead of first use. This is optional:
|
|
8
|
+
* everything that needs moyo loads it. If loading fails, the next call tries
|
|
9
|
+
* again.
|
|
11
10
|
*/
|
|
12
11
|
export declare function ensureMoyo(): Promise<void>;
|
|
13
12
|
/**
|
|
@@ -46,9 +45,9 @@ export interface OperationSetting {
|
|
|
46
45
|
*/
|
|
47
46
|
export declare function operationSettings(info: SpaceGroupInfo): Promise<OperationSetting[]>;
|
|
48
47
|
/**
|
|
49
|
-
* The operations of a space group
|
|
50
|
-
* symbol or number
|
|
51
|
-
*
|
|
52
|
-
*
|
|
48
|
+
* The symmetry operations of a space group given by Hall symbol,
|
|
49
|
+
* Hermann-Mauguin symbol or number, in the setting a suffix such as `:H`
|
|
50
|
+
* names, or else the standard setting. Throws `SpaceGroupLookupError` for
|
|
51
|
+
* an unknown group.
|
|
53
52
|
*/
|
|
54
53
|
export declare function operationsForSpaceGroup(info: SpaceGroupInfo): Promise<SymmetryOperation[]>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* written without spaces is only given bars and underscore subscripts,
|
|
8
|
-
* since `F432` cannot be told from a screw axis without them.
|
|
2
|
+
* Write a space-group symbol the way textbooks print it: `F m -3 m` becomes
|
|
3
|
+
* Fm3̅m and `P 2_1/c` becomes P2₁/c. A setting suffix such as `:H` is kept.
|
|
4
|
+
* A screw axis written as two digits, as CIF files do (`P 1 21/c 1`), is
|
|
5
|
+
* recognised only when the symbol has spaces, since in `F432` the digits
|
|
6
|
+
* are separate axes.
|
|
9
7
|
*/
|
|
10
8
|
export declare function typesetSymbol(symbol: string): string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bravais",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "A minimal crystal structure viewer for the web: reads CIF files and draws them with three.js.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jiacheng Wang",
|
|
7
7
|
"repository": {
|
|
@@ -24,14 +24,15 @@
|
|
|
24
24
|
"materials-science"
|
|
25
25
|
],
|
|
26
26
|
"type": "module",
|
|
27
|
+
"sideEffects": false,
|
|
27
28
|
"main": "./dist/bravais.js",
|
|
28
29
|
"types": "./dist/types/index.d.ts",
|
|
29
30
|
"exports": {
|
|
30
31
|
".": {
|
|
31
32
|
"types": "./dist/types/index.d.ts",
|
|
32
|
-
"import": "./dist/bravais.js",
|
|
33
33
|
"default": "./dist/bravais.js"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"./package.json": "./package.json"
|
|
35
36
|
},
|
|
36
37
|
"files": [
|
|
37
38
|
"dist",
|