@molcrafts/molrs 0.5.1 → 0.6.0
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 +2 -2
- package/molrs.d.ts +15 -15
- package/molrs.js +1 -1
- package/molrs_bg.js +65 -65
- package/molrs_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
WebAssembly bindings for the [molrs](https://github.com/MolCrafts/molrs) molecular modeling toolkit.
|
|
6
6
|
|
|
7
|
-
Full documentation lives at <https://molcrafts.
|
|
8
|
-
reference is published at <https://molcrafts.
|
|
7
|
+
Full documentation lives at <https://molrs.molcrafts.org/>. The WASM
|
|
8
|
+
reference is published at <https://molrs.molcrafts.org/reference/wasm/>.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
package/molrs.d.ts
CHANGED
|
@@ -2161,19 +2161,6 @@ export class MSDResult {
|
|
|
2161
2161
|
readonly mean: number;
|
|
2162
2162
|
}
|
|
2163
2163
|
|
|
2164
|
-
/**
|
|
2165
|
-
* Reader for MolRec Zarr v3 archives.
|
|
2166
|
-
*/
|
|
2167
|
-
export class MolRecReader {
|
|
2168
|
-
free(): void;
|
|
2169
|
-
[Symbol.dispose](): void;
|
|
2170
|
-
countAtoms(): number;
|
|
2171
|
-
countFrames(): number;
|
|
2172
|
-
free(): void;
|
|
2173
|
-
constructor(files: Map<any, any>);
|
|
2174
|
-
readFrame(t: number): Frame | undefined;
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
2164
|
/**
|
|
2178
2165
|
* Result of a neighbor search: all atom pairs within a distance cutoff.
|
|
2179
2166
|
*
|
|
@@ -2522,6 +2509,19 @@ export class RadiusOfGyration {
|
|
|
2522
2509
|
constructor(masses?: Float64Array | null);
|
|
2523
2510
|
}
|
|
2524
2511
|
|
|
2512
|
+
/**
|
|
2513
|
+
* Reader for frame-sequence Zarr v3 archives.
|
|
2514
|
+
*/
|
|
2515
|
+
export class RecordReader {
|
|
2516
|
+
free(): void;
|
|
2517
|
+
[Symbol.dispose](): void;
|
|
2518
|
+
countAtoms(): number;
|
|
2519
|
+
countFrames(): number;
|
|
2520
|
+
free(): void;
|
|
2521
|
+
constructor(files: Map<any, any>);
|
|
2522
|
+
readFrame(t: number): Frame | undefined;
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
2525
|
/**
|
|
2526
2526
|
* MDL molfile / SDF (V2000 CTAB) reader.
|
|
2527
2527
|
*
|
|
@@ -3010,7 +3010,7 @@ export class WasmArray {
|
|
|
3010
3010
|
}
|
|
3011
3011
|
|
|
3012
3012
|
/**
|
|
3013
|
-
* Wrapper for [`molrs::compute::kmeans::KMeans`].
|
|
3013
|
+
* Wrapper for [`molrs::compute::ml::kmeans::KMeans`].
|
|
3014
3014
|
*
|
|
3015
3015
|
* # Example (JavaScript)
|
|
3016
3016
|
*
|
|
@@ -3336,7 +3336,7 @@ export class WasmLammpsDumpStream {
|
|
|
3336
3336
|
}
|
|
3337
3337
|
|
|
3338
3338
|
/**
|
|
3339
|
-
* Stateless wrapper for [`molrs::compute::pca::Pca2`].
|
|
3339
|
+
* Stateless wrapper for [`molrs::compute::ml::pca::Pca2`].
|
|
3340
3340
|
*
|
|
3341
3341
|
* All configuration lives on [`fitTransform`](Self::fit_transform).
|
|
3342
3342
|
*
|
package/molrs.js
CHANGED
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./molrs_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
wasm.__wbindgen_start();
|
|
7
7
|
export {
|
|
8
|
-
Block, Box, CHGCARReader, CIFReader, CenterOfMass, CenterOfMassResult, Cluster, ClusterCenters, ClusterResult, CubeReader, DCDReader, Frame, FrameIndexEntry, GROReader, GyrationTensor, InertiaTensor, LAMMPSReader, LAMMPSTrajReader, LinkedCell, MOL2Reader, MSD, MSDResult,
|
|
8
|
+
Block, Box, CHGCARReader, CIFReader, CenterOfMass, CenterOfMassResult, Cluster, ClusterCenters, ClusterResult, CubeReader, DCDReader, Frame, FrameIndexEntry, GROReader, GyrationTensor, InertiaTensor, LAMMPSReader, LAMMPSTrajReader, LinkedCell, MOL2Reader, MSD, MSDResult, NeighborList, PDBReader, POSCARReader, RDF, RDFResult, RadiusOfGyration, RecordReader, SDFReader, SmilesIR, TRRReader, Topology, TopologyRingInfo, WasmArray, WasmKMeans, WasmLammpsDataStream, WasmLammpsDumpStream, WasmPca2, WasmPcaResult, WasmPdbStream, WasmSdfStream, WasmXyzStream, XTCReader, XYZReader, covalentRadius, generate3D, parseSMILES, start, wasmMemory, writeFrame, writeFrameBytes
|
|
9
9
|
} from "./molrs_bg.js";
|
package/molrs_bg.js
CHANGED
|
@@ -3330,66 +3330,6 @@ export class MSDResult {
|
|
|
3330
3330
|
}
|
|
3331
3331
|
if (Symbol.dispose) MSDResult.prototype[Symbol.dispose] = MSDResult.prototype.free;
|
|
3332
3332
|
|
|
3333
|
-
/**
|
|
3334
|
-
* Reader for MolRec Zarr v3 archives.
|
|
3335
|
-
*/
|
|
3336
|
-
export class MolRecReader {
|
|
3337
|
-
__destroy_into_raw() {
|
|
3338
|
-
const ptr = this.__wbg_ptr;
|
|
3339
|
-
this.__wbg_ptr = 0;
|
|
3340
|
-
MolRecReaderFinalization.unregister(this);
|
|
3341
|
-
return ptr;
|
|
3342
|
-
}
|
|
3343
|
-
free() {
|
|
3344
|
-
const ptr = this.__destroy_into_raw();
|
|
3345
|
-
wasm.__wbg_molrecreader_free(ptr, 0);
|
|
3346
|
-
}
|
|
3347
|
-
/**
|
|
3348
|
-
* @returns {number}
|
|
3349
|
-
*/
|
|
3350
|
-
countAtoms() {
|
|
3351
|
-
const ret = wasm.molrecreader_countAtoms(this.__wbg_ptr);
|
|
3352
|
-
return ret >>> 0;
|
|
3353
|
-
}
|
|
3354
|
-
/**
|
|
3355
|
-
* @returns {number}
|
|
3356
|
-
*/
|
|
3357
|
-
countFrames() {
|
|
3358
|
-
const ret = wasm.molrecreader_countFrames(this.__wbg_ptr);
|
|
3359
|
-
if (ret[2]) {
|
|
3360
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
3361
|
-
}
|
|
3362
|
-
return ret[0] >>> 0;
|
|
3363
|
-
}
|
|
3364
|
-
free() {
|
|
3365
|
-
wasm.molrecreader_free(this.__wbg_ptr);
|
|
3366
|
-
}
|
|
3367
|
-
/**
|
|
3368
|
-
* @param {Map<any, any>} files
|
|
3369
|
-
*/
|
|
3370
|
-
constructor(files) {
|
|
3371
|
-
const ret = wasm.molrecreader_new(files);
|
|
3372
|
-
if (ret[2]) {
|
|
3373
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
3374
|
-
}
|
|
3375
|
-
this.__wbg_ptr = ret[0];
|
|
3376
|
-
MolRecReaderFinalization.register(this, this.__wbg_ptr, this);
|
|
3377
|
-
return this;
|
|
3378
|
-
}
|
|
3379
|
-
/**
|
|
3380
|
-
* @param {number} t
|
|
3381
|
-
* @returns {Frame | undefined}
|
|
3382
|
-
*/
|
|
3383
|
-
readFrame(t) {
|
|
3384
|
-
const ret = wasm.molrecreader_readFrame(this.__wbg_ptr, t);
|
|
3385
|
-
if (ret[2]) {
|
|
3386
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
3387
|
-
}
|
|
3388
|
-
return ret[0] === 0 ? undefined : Frame.__wrap(ret[0]);
|
|
3389
|
-
}
|
|
3390
|
-
}
|
|
3391
|
-
if (Symbol.dispose) MolRecReader.prototype[Symbol.dispose] = MolRecReader.prototype.free;
|
|
3392
|
-
|
|
3393
3333
|
/**
|
|
3394
3334
|
* Result of a neighbor search: all atom pairs within a distance cutoff.
|
|
3395
3335
|
*
|
|
@@ -3979,6 +3919,66 @@ export class RadiusOfGyration {
|
|
|
3979
3919
|
}
|
|
3980
3920
|
if (Symbol.dispose) RadiusOfGyration.prototype[Symbol.dispose] = RadiusOfGyration.prototype.free;
|
|
3981
3921
|
|
|
3922
|
+
/**
|
|
3923
|
+
* Reader for frame-sequence Zarr v3 archives.
|
|
3924
|
+
*/
|
|
3925
|
+
export class RecordReader {
|
|
3926
|
+
__destroy_into_raw() {
|
|
3927
|
+
const ptr = this.__wbg_ptr;
|
|
3928
|
+
this.__wbg_ptr = 0;
|
|
3929
|
+
RecordReaderFinalization.unregister(this);
|
|
3930
|
+
return ptr;
|
|
3931
|
+
}
|
|
3932
|
+
free() {
|
|
3933
|
+
const ptr = this.__destroy_into_raw();
|
|
3934
|
+
wasm.__wbg_recordreader_free(ptr, 0);
|
|
3935
|
+
}
|
|
3936
|
+
/**
|
|
3937
|
+
* @returns {number}
|
|
3938
|
+
*/
|
|
3939
|
+
countAtoms() {
|
|
3940
|
+
const ret = wasm.recordreader_countAtoms(this.__wbg_ptr);
|
|
3941
|
+
return ret >>> 0;
|
|
3942
|
+
}
|
|
3943
|
+
/**
|
|
3944
|
+
* @returns {number}
|
|
3945
|
+
*/
|
|
3946
|
+
countFrames() {
|
|
3947
|
+
const ret = wasm.recordreader_countFrames(this.__wbg_ptr);
|
|
3948
|
+
if (ret[2]) {
|
|
3949
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3950
|
+
}
|
|
3951
|
+
return ret[0] >>> 0;
|
|
3952
|
+
}
|
|
3953
|
+
free() {
|
|
3954
|
+
wasm.recordreader_free(this.__wbg_ptr);
|
|
3955
|
+
}
|
|
3956
|
+
/**
|
|
3957
|
+
* @param {Map<any, any>} files
|
|
3958
|
+
*/
|
|
3959
|
+
constructor(files) {
|
|
3960
|
+
const ret = wasm.recordreader_new(files);
|
|
3961
|
+
if (ret[2]) {
|
|
3962
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3963
|
+
}
|
|
3964
|
+
this.__wbg_ptr = ret[0];
|
|
3965
|
+
RecordReaderFinalization.register(this, this.__wbg_ptr, this);
|
|
3966
|
+
return this;
|
|
3967
|
+
}
|
|
3968
|
+
/**
|
|
3969
|
+
* @param {number} t
|
|
3970
|
+
* @returns {Frame | undefined}
|
|
3971
|
+
*/
|
|
3972
|
+
readFrame(t) {
|
|
3973
|
+
const ret = wasm.recordreader_readFrame(this.__wbg_ptr, t);
|
|
3974
|
+
if (ret[2]) {
|
|
3975
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3976
|
+
}
|
|
3977
|
+
return ret[0] === 0 ? undefined : Frame.__wrap(ret[0]);
|
|
3978
|
+
}
|
|
3979
|
+
}
|
|
3980
|
+
if (Symbol.dispose) RecordReader.prototype[Symbol.dispose] = RecordReader.prototype.free;
|
|
3981
|
+
|
|
3982
3982
|
/**
|
|
3983
3983
|
* MDL molfile / SDF (V2000 CTAB) reader.
|
|
3984
3984
|
*
|
|
@@ -4813,7 +4813,7 @@ export class WasmArray {
|
|
|
4813
4813
|
if (Symbol.dispose) WasmArray.prototype[Symbol.dispose] = WasmArray.prototype.free;
|
|
4814
4814
|
|
|
4815
4815
|
/**
|
|
4816
|
-
* Wrapper for [`molrs::compute::kmeans::KMeans`].
|
|
4816
|
+
* Wrapper for [`molrs::compute::ml::kmeans::KMeans`].
|
|
4817
4817
|
*
|
|
4818
4818
|
* # Example (JavaScript)
|
|
4819
4819
|
*
|
|
@@ -5493,7 +5493,7 @@ export class WasmLammpsDumpStream {
|
|
|
5493
5493
|
if (Symbol.dispose) WasmLammpsDumpStream.prototype[Symbol.dispose] = WasmLammpsDumpStream.prototype.free;
|
|
5494
5494
|
|
|
5495
5495
|
/**
|
|
5496
|
-
* Stateless wrapper for [`molrs::compute::pca::Pca2`].
|
|
5496
|
+
* Stateless wrapper for [`molrs::compute::ml::pca::Pca2`].
|
|
5497
5497
|
*
|
|
5498
5498
|
* All configuration lives on [`fitTransform`](Self::fit_transform).
|
|
5499
5499
|
*
|
|
@@ -7212,9 +7212,6 @@ const MSDFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
7212
7212
|
const MSDResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
7213
7213
|
? { register: () => {}, unregister: () => {} }
|
|
7214
7214
|
: new FinalizationRegistry(ptr => wasm.__wbg_msdresult_free(ptr, 1));
|
|
7215
|
-
const MolRecReaderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
7216
|
-
? { register: () => {}, unregister: () => {} }
|
|
7217
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_molrecreader_free(ptr, 1));
|
|
7218
7215
|
const NeighborListFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
7219
7216
|
? { register: () => {}, unregister: () => {} }
|
|
7220
7217
|
: new FinalizationRegistry(ptr => wasm.__wbg_neighborlist_free(ptr, 1));
|
|
@@ -7233,6 +7230,9 @@ const RDFResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
7233
7230
|
const RadiusOfGyrationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
7234
7231
|
? { register: () => {}, unregister: () => {} }
|
|
7235
7232
|
: new FinalizationRegistry(ptr => wasm.__wbg_radiusofgyration_free(ptr, 1));
|
|
7233
|
+
const RecordReaderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
7234
|
+
? { register: () => {}, unregister: () => {} }
|
|
7235
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_recordreader_free(ptr, 1));
|
|
7236
7236
|
const SDFReaderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
7237
7237
|
? { register: () => {}, unregister: () => {} }
|
|
7238
7238
|
: new FinalizationRegistry(ptr => wasm.__wbg_sdfreader_free(ptr, 1));
|
package/molrs_bg.wasm
CHANGED
|
Binary file
|