bio-forge-wasm 0.4.0 → 0.4.1

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/README.md CHANGED
@@ -50,7 +50,7 @@ BioForge is also available as a library crate. Add it to your `Cargo.toml` depen
50
50
 
51
51
  ```toml
52
52
  [dependencies]
53
- bio-forge = "0.4.0"
53
+ bio-forge = "0.4.1"
54
54
  ```
55
55
 
56
56
  #### Example: Preparing a PDB Structure
@@ -121,7 +121,7 @@ export class Structure {
121
121
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
122
122
  const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export);
123
123
  const len0 = WASM_VECTOR_LEN;
124
- wasm.structure_fromMmcif(retptr, ptr0, len0);
124
+ wasm.structure_fromMmcifBytes(retptr, ptr0, len0);
125
125
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
126
126
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
127
127
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -461,7 +461,7 @@ export class Template {
461
461
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
462
462
  const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export);
463
463
  const len0 = WASM_VECTOR_LEN;
464
- wasm.template_fromMol2(retptr, ptr0, len0);
464
+ wasm.template_fromMol2Bytes(retptr, ptr0, len0);
465
465
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
466
466
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
467
467
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -671,75 +671,75 @@ if (Symbol.dispose) Topology.prototype[Symbol.dispose] = Topology.prototype.free
671
671
  export function init() {
672
672
  wasm.init();
673
673
  }
674
- export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
674
+ export function __wbg_Error_55538483de6e3abe(arg0, arg1) {
675
675
  const ret = Error(getStringFromWasm0(arg0, arg1));
676
676
  return addHeapObject(ret);
677
677
  }
678
- export function __wbg_Number_04624de7d0e8332d(arg0) {
678
+ export function __wbg_Number_f257194b7002d6f9(arg0) {
679
679
  const ret = Number(getObject(arg0));
680
680
  return ret;
681
681
  }
682
- export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
682
+ export function __wbg_String_8564e559799eccda(arg0, arg1) {
683
683
  const ret = String(getObject(arg1));
684
684
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
685
685
  const len1 = WASM_VECTOR_LEN;
686
686
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
687
687
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
688
688
  }
689
- export function __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2(arg0, arg1) {
689
+ export function __wbg___wbindgen_bigint_get_as_i64_a738e80c0fe6f6a7(arg0, arg1) {
690
690
  const v = getObject(arg1);
691
691
  const ret = typeof(v) === 'bigint' ? v : undefined;
692
692
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
693
693
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
694
694
  }
695
- export function __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25(arg0) {
695
+ export function __wbg___wbindgen_boolean_get_fe2a24fdfdb4064f(arg0) {
696
696
  const v = getObject(arg0);
697
697
  const ret = typeof(v) === 'boolean' ? v : undefined;
698
698
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
699
699
  }
700
- export function __wbg___wbindgen_debug_string_0bc8482c6e3508ae(arg0, arg1) {
700
+ export function __wbg___wbindgen_debug_string_d89627202d0155b7(arg0, arg1) {
701
701
  const ret = debugString(getObject(arg1));
702
702
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
703
703
  const len1 = WASM_VECTOR_LEN;
704
704
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
705
705
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
706
706
  }
707
- export function __wbg___wbindgen_in_47fa6863be6f2f25(arg0, arg1) {
707
+ export function __wbg___wbindgen_in_fe3eb6a509f75744(arg0, arg1) {
708
708
  const ret = getObject(arg0) in getObject(arg1);
709
709
  return ret;
710
710
  }
711
- export function __wbg___wbindgen_is_bigint_31b12575b56f32fc(arg0) {
711
+ export function __wbg___wbindgen_is_bigint_ca270ac12ef71091(arg0) {
712
712
  const ret = typeof(getObject(arg0)) === 'bigint';
713
713
  return ret;
714
714
  }
715
- export function __wbg___wbindgen_is_function_0095a73b8b156f76(arg0) {
715
+ export function __wbg___wbindgen_is_function_2a95406423ea8626(arg0) {
716
716
  const ret = typeof(getObject(arg0)) === 'function';
717
717
  return ret;
718
718
  }
719
- export function __wbg___wbindgen_is_object_5ae8e5880f2c1fbd(arg0) {
719
+ export function __wbg___wbindgen_is_object_59a002e76b059312(arg0) {
720
720
  const val = getObject(arg0);
721
721
  const ret = typeof(val) === 'object' && val !== null;
722
722
  return ret;
723
723
  }
724
- export function __wbg___wbindgen_is_undefined_9e4d92534c42d778(arg0) {
724
+ export function __wbg___wbindgen_is_undefined_87a3a837f331fef5(arg0) {
725
725
  const ret = getObject(arg0) === undefined;
726
726
  return ret;
727
727
  }
728
- export function __wbg___wbindgen_jsval_eq_11888390b0186270(arg0, arg1) {
728
+ export function __wbg___wbindgen_jsval_eq_eedd705f9f2a4f35(arg0, arg1) {
729
729
  const ret = getObject(arg0) === getObject(arg1);
730
730
  return ret;
731
731
  }
732
- export function __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811(arg0, arg1) {
732
+ export function __wbg___wbindgen_jsval_loose_eq_cf851f110c48f9ba(arg0, arg1) {
733
733
  const ret = getObject(arg0) == getObject(arg1);
734
734
  return ret;
735
735
  }
736
- export function __wbg___wbindgen_number_get_8ff4255516ccad3e(arg0, arg1) {
736
+ export function __wbg___wbindgen_number_get_769f3676dc20c1d7(arg0, arg1) {
737
737
  const obj = getObject(arg1);
738
738
  const ret = typeof(obj) === 'number' ? obj : undefined;
739
739
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
740
740
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
741
741
  }
742
- export function __wbg___wbindgen_string_get_72fb696202c56729(arg0, arg1) {
742
+ export function __wbg___wbindgen_string_get_f1161390414f9b59(arg0, arg1) {
743
743
  const obj = getObject(arg1);
744
744
  const ret = typeof(obj) === 'string' ? obj : undefined;
745
745
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -747,18 +747,18 @@ export function __wbg___wbindgen_string_get_72fb696202c56729(arg0, arg1) {
747
747
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
748
748
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
749
749
  }
750
- export function __wbg___wbindgen_throw_be289d5034ed271b(arg0, arg1) {
750
+ export function __wbg___wbindgen_throw_5549492daedad139(arg0, arg1) {
751
751
  throw new Error(getStringFromWasm0(arg0, arg1));
752
752
  }
753
- export function __wbg_call_389efe28435a9388() { return handleError(function (arg0, arg1) {
753
+ export function __wbg_call_6ae20895a60069a2() { return handleError(function (arg0, arg1) {
754
754
  const ret = getObject(arg0).call(getObject(arg1));
755
755
  return addHeapObject(ret);
756
756
  }, arguments); }
757
- export function __wbg_done_57b39ecd9addfe81(arg0) {
757
+ export function __wbg_done_19f92cb1f8738aba(arg0) {
758
758
  const ret = getObject(arg0).done;
759
759
  return ret;
760
760
  }
761
- export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
761
+ export function __wbg_error_a6fa202b58aa1cd3(arg0, arg1) {
762
762
  let deferred0_0;
763
763
  let deferred0_1;
764
764
  try {
@@ -769,22 +769,22 @@ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
769
769
  wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
770
770
  }
771
771
  }
772
- export function __wbg_getRandomValues_1c61fac11405ffdc() { return handleError(function (arg0, arg1) {
772
+ export function __wbg_getRandomValues_3f44b700395062e5() { return handleError(function (arg0, arg1) {
773
773
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
774
774
  }, arguments); }
775
- export function __wbg_get_9b94d73e6221f75c(arg0, arg1) {
776
- const ret = getObject(arg0)[arg1 >>> 0];
777
- return addHeapObject(ret);
778
- }
779
- export function __wbg_get_b3ed3ad4be2bc8ac() { return handleError(function (arg0, arg1) {
775
+ export function __wbg_get_a50328e7325d7f9b() { return handleError(function (arg0, arg1) {
780
776
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
781
777
  return addHeapObject(ret);
782
778
  }, arguments); }
783
- export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
779
+ export function __wbg_get_unchecked_7c6bbabf5b0b1fbf(arg0, arg1) {
780
+ const ret = getObject(arg0)[arg1 >>> 0];
781
+ return addHeapObject(ret);
782
+ }
783
+ export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
784
784
  const ret = getObject(arg0)[getObject(arg1)];
785
785
  return addHeapObject(ret);
786
786
  }
787
- export function __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04(arg0) {
787
+ export function __wbg_instanceof_ArrayBuffer_8d855993947fc3a2(arg0) {
788
788
  let result;
789
789
  try {
790
790
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -794,7 +794,7 @@ export function __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04(arg0) {
794
794
  const ret = result;
795
795
  return ret;
796
796
  }
797
- export function __wbg_instanceof_Uint8Array_9b9075935c74707c(arg0) {
797
+ export function __wbg_instanceof_Uint8Array_ce24d58a5f4bdcc3(arg0) {
798
798
  let result;
799
799
  try {
800
800
  result = getObject(arg0) instanceof Uint8Array;
@@ -804,60 +804,60 @@ export function __wbg_instanceof_Uint8Array_9b9075935c74707c(arg0) {
804
804
  const ret = result;
805
805
  return ret;
806
806
  }
807
- export function __wbg_isArray_d314bb98fcf08331(arg0) {
807
+ export function __wbg_isArray_867202cf8f195ed8(arg0) {
808
808
  const ret = Array.isArray(getObject(arg0));
809
809
  return ret;
810
810
  }
811
- export function __wbg_isSafeInteger_bfbc7332a9768d2a(arg0) {
811
+ export function __wbg_isSafeInteger_1dfae065cbfe1915(arg0) {
812
812
  const ret = Number.isSafeInteger(getObject(arg0));
813
813
  return ret;
814
814
  }
815
- export function __wbg_iterator_6ff6560ca1568e55() {
815
+ export function __wbg_iterator_54661826e186eb6a() {
816
816
  const ret = Symbol.iterator;
817
817
  return addHeapObject(ret);
818
818
  }
819
- export function __wbg_length_32ed9a279acd054c(arg0) {
819
+ export function __wbg_length_e6e1633fbea6cfa9(arg0) {
820
820
  const ret = getObject(arg0).length;
821
821
  return ret;
822
822
  }
823
- export function __wbg_length_35a7bace40f36eac(arg0) {
823
+ export function __wbg_length_fae3e439140f48a4(arg0) {
824
824
  const ret = getObject(arg0).length;
825
825
  return ret;
826
826
  }
827
- export function __wbg_new_361308b2356cecd0() {
828
- const ret = new Object();
827
+ export function __wbg_new_1d96678aaacca32e(arg0) {
828
+ const ret = new Uint8Array(getObject(arg0));
829
+ return addHeapObject(ret);
830
+ }
831
+ export function __wbg_new_227d7c05414eb861() {
832
+ const ret = new Error();
829
833
  return addHeapObject(ret);
830
834
  }
831
- export function __wbg_new_3eb36ae241fe6f44() {
835
+ export function __wbg_new_4370be21fa2b2f80() {
832
836
  const ret = new Array();
833
837
  return addHeapObject(ret);
834
838
  }
835
- export function __wbg_new_8a6f238a6ece86ea() {
836
- const ret = new Error();
839
+ export function __wbg_new_48e1d86cfd30c8e7() {
840
+ const ret = new Object();
837
841
  return addHeapObject(ret);
838
842
  }
839
- export function __wbg_new_dd2b680c8bf6ae29(arg0) {
840
- const ret = new Uint8Array(getObject(arg0));
843
+ export function __wbg_next_55d835fe0ab5b3e7(arg0) {
844
+ const ret = getObject(arg0).next;
841
845
  return addHeapObject(ret);
842
846
  }
843
- export function __wbg_next_3482f54c49e8af19() { return handleError(function (arg0) {
847
+ export function __wbg_next_e34cfb9df1518d7c() { return handleError(function (arg0) {
844
848
  const ret = getObject(arg0).next();
845
849
  return addHeapObject(ret);
846
850
  }, arguments); }
847
- export function __wbg_next_418f80d8f5303233(arg0) {
848
- const ret = getObject(arg0).next;
849
- return addHeapObject(ret);
850
- }
851
- export function __wbg_prototypesetcall_bdcdcc5842e4d77d(arg0, arg1, arg2) {
851
+ export function __wbg_prototypesetcall_3875d54d12ef2eec(arg0, arg1, arg2) {
852
852
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
853
853
  }
854
- export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
855
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
856
- }
857
- export function __wbg_set_f43e577aea94465b(arg0, arg1, arg2) {
854
+ export function __wbg_set_4702dfa37c77f492(arg0, arg1, arg2) {
858
855
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
859
856
  }
860
- export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
857
+ export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
858
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
859
+ }
860
+ export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
861
861
  const ret = getObject(arg1).stack;
862
862
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
863
863
  const len1 = WASM_VECTOR_LEN;
@@ -868,7 +868,7 @@ export function __wbg_template_unwrap(arg0) {
868
868
  const ret = Template.__unwrap(getObject(arg0));
869
869
  return ret;
870
870
  }
871
- export function __wbg_value_0546255b415e96c1(arg0) {
871
+ export function __wbg_value_d5b248ce8419bd1b(arg0) {
872
872
  const ret = getObject(arg0).value;
873
873
  return addHeapObject(ret);
874
874
  }
@@ -985,7 +985,7 @@ function debugString(val) {
985
985
  }
986
986
 
987
987
  function dropObject(idx) {
988
- if (idx < 132) return;
988
+ if (idx < 1028) return;
989
989
  heap[idx] = heap_next;
990
990
  heap_next = idx;
991
991
  }
@@ -1026,7 +1026,7 @@ function handleError(f, args) {
1026
1026
  }
1027
1027
  }
1028
1028
 
1029
- let heap = new Array(128).fill(undefined);
1029
+ let heap = new Array(1024).fill(undefined);
1030
1030
  heap.push(undefined, null, true, false);
1031
1031
 
1032
1032
  let heap_next = heap.length;
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Tony Kan <tianchengkan@gmail.com>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for BioForge, a pure Rust library for the automated repair, preparation, and topology construction of biological macromolecules.",
8
- "version": "0.4.0",
8
+ "version": "0.4.1",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",