matsci-parse 0.9.0 → 0.12.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 +30 -37
- package/dist/index.js +9054 -1083
- package/dist/index.js.map +1 -1
- package/dist/stats.html +1 -1
- package/package.json +9 -4
- package/dist/__vite-browser-external-DYxpcVy9.js +0 -5
- package/dist/__vite-browser-external-DYxpcVy9.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,49 +1,42 @@
|
|
|
1
1
|
# matsci-parse
|
|
2
2
|
|
|
3
|
-
A TypeScript
|
|
3
|
+
A TypeScript library and web toolset for parsing, transforming, and analyzing atomistic materials science data.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Crystal structures, periodic systems, volumetric fields (electron density, electrostatic potentials), symmetry operations, lattice geometry — all handled in a fully **functional**, **tree-shakeable** style.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
#### `io/`
|
|
12
|
-
|
|
13
|
-
Parsers and data models for multiple file formats:
|
|
14
|
-
|
|
15
|
-
- CIF
|
|
16
|
-
- VASP (POSCAR, CHGCAR)
|
|
17
|
-
- Quantum ESPRESSO (pw)
|
|
18
|
-
- Gaussian cube files
|
|
19
|
-
- XYZ
|
|
20
|
-
- XSF
|
|
21
|
-
- AiiDA structure objects
|
|
22
|
-
- Generic crystal and molecular structures
|
|
23
|
-
|
|
24
|
-
#### `math/`
|
|
7
|
+
```
|
|
8
|
+
pnpm add matsci-parse
|
|
9
|
+
```
|
|
25
10
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- Matrix operations
|
|
29
|
-
- Coordinate transformations
|
|
30
|
-
- Lattice calculations
|
|
31
|
-
|
|
32
|
-
#### `symmetry/`
|
|
11
|
+
---
|
|
33
12
|
|
|
34
|
-
|
|
13
|
+
### What's inside
|
|
14
|
+
|
|
15
|
+
| Module | What it does |
|
|
16
|
+
|---|---|
|
|
17
|
+
| **`io/`** | Parse/write CIF, VASP (POSCAR, CHGCAR), Quantum ESPRESSO (pw), XYZ, XSF, PDB, GRO, Gaussian cube, AiiDA, Optimade |
|
|
18
|
+
| **`structure/`** | Create, query, and manipulate crystal structures — sites, species, supercells, canonicalization, hashing |
|
|
19
|
+
| **`lattice/`** | Lattice creation (cubic, hexagonal, monoclinic, etc.), parameters, metric tensor, reciprocal space, volumes |
|
|
20
|
+
| **`symmetry/`** | Space group data, Brillouin zone paths (seekpath), symmetry operations via moyo-wasm |
|
|
21
|
+
| **`site/`** | Site-level operations: cartesian/fractional conversion, distances, periodic wrapping |
|
|
22
|
+
| **`species/`** | Element/species types with optional arbitrary properties |
|
|
23
|
+
| **`volumetric/`** | N-dimensional volumetric data arrays — creation, elementwise ops, channel ops, spatial transforms (crop, pad, resize, upsample, downsample, sample) |
|
|
24
|
+
| **`matrix/`** | Linear algebra primitives (3×3, 4×4): inverse, determinant, LLL reduction, vector ops |
|
|
25
|
+
| **`units/`** | Length, angle, and energy conversions |
|
|
26
|
+
| **`data/`** | Periodic table reference (symbols, atomic numbers, masses) |
|
|
35
27
|
|
|
36
|
-
|
|
28
|
+
---
|
|
37
29
|
|
|
38
|
-
|
|
30
|
+
### Quick example
|
|
39
31
|
|
|
40
|
-
|
|
32
|
+
```ts
|
|
33
|
+
import { fromCIF } from "matsci-parse";
|
|
34
|
+
import { volume } from "matsci-parse/core/lattice/volume";
|
|
41
35
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- General conversion utilities
|
|
36
|
+
const structure = fromCIF(cifText);
|
|
37
|
+
const V = volume(structure.lattice); // cell volume in ų
|
|
38
|
+
```
|
|
46
39
|
|
|
47
|
-
|
|
40
|
+
### Docs
|
|
48
41
|
|
|
49
|
-
|
|
42
|
+
Full API reference: `pnpm run docs` → `docs/index.html`
|