diff --git a/dist/js/made.d.ts b/dist/js/made.d.ts index ba6662874..9d77155d2 100644 --- a/dist/js/made.d.ts +++ b/dist/js/made.d.ts @@ -56,6 +56,7 @@ export declare const Made: { toPoscar: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema, omitConstraints?: boolean) => string; fromPoscar: (fileContent: string) => object; atomicConstraintsCharFromBool: (bool: boolean) => string; + atomsCount: typeof import("./parsers/poscar").atomsCount; }; cif: { parseMeta: (txt: string) => import("./parsers/cif").Meta; diff --git a/dist/js/parsers/parsers.d.ts b/dist/js/parsers/parsers.d.ts index 7bc5c09dc..d4c300a5d 100644 --- a/dist/js/parsers/parsers.d.ts +++ b/dist/js/parsers/parsers.d.ts @@ -11,6 +11,7 @@ declare const _default: { toPoscar: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema, omitConstraints?: boolean) => string; fromPoscar: (fileContent: string) => object; atomicConstraintsCharFromBool: (bool: boolean) => string; + atomsCount: typeof import("./poscar").atomsCount; }; cif: { parseMeta: (txt: string) => import("./cif").Meta; diff --git a/dist/js/parsers/poscar.d.ts b/dist/js/parsers/poscar.d.ts index c15b2e32b..9b8a4f09d 100644 --- a/dist/js/parsers/poscar.d.ts +++ b/dist/js/parsers/poscar.d.ts @@ -26,5 +26,6 @@ declare const _default: { toPoscar: typeof toPoscar; fromPoscar: typeof fromPoscar; atomicConstraintsCharFromBool: (bool: boolean) => string; + atomsCount: typeof atomsCount; }; export default _default; diff --git a/dist/js/parsers/poscar.js b/dist/js/parsers/poscar.js index 5001a9cb1..70ae2ffeb 100644 --- a/dist/js/parsers/poscar.js +++ b/dist/js/parsers/poscar.js @@ -181,4 +181,5 @@ exports.default = { toPoscar, fromPoscar, atomicConstraintsCharFromBool, + atomsCount, }; diff --git a/pyproject.toml b/pyproject.toml index 5ae725447..0857719a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,8 +47,9 @@ tests = [ # B/c of https://github.com/binary-husky/gpt_academic/issues/1237 "gradio", "pydantic", + "spglib==2.6.0", "mat3ra-made[tools]", - "mat3ra-standata" + "mat3ra-standata", ] all = [ "mat3ra-made[tests]", diff --git a/src/js/parsers/poscar.ts b/src/js/parsers/poscar.ts index b3cc7ef8e..2032cac59 100644 --- a/src/js/parsers/poscar.ts +++ b/src/js/parsers/poscar.ts @@ -208,4 +208,5 @@ export default { toPoscar, fromPoscar, atomicConstraintsCharFromBool, + atomsCount, }; diff --git a/tests/py/unit/fixtures/interface/zsl.py b/tests/py/unit/fixtures/interface/zsl.py index eb13977af..c85108174 100644 --- a/tests/py/unit/fixtures/interface/zsl.py +++ b/tests/py/unit/fixtures/interface/zsl.py @@ -573,34 +573,34 @@ {"id": 27, "value": "C"}, ], "coordinates": [ - {"id": 0, "value": [0, 0, 0.208703663]}, - {"id": 1, "value": [0.5, 0, 0.352579044]}, - {"id": 2, "value": [0, 0.5, 0.352579044]}, - {"id": 3, "value": [0.5, 0.5, 0.208703663]}, - {"id": 4, "value": [0.75, 0.75, 0.280641354]}, - {"id": 5, "value": [0.25, 0.75, 0.424516735]}, - {"id": 6, "value": [0.75, 0.25, 0.424516735]}, - {"id": 7, "value": [0.25, 0.25, 0.280641354]}, - {"id": 8, "value": [0.1, 0.7, 0.133640341]}, - {"id": 9, "value": [0.2, 0.9, 0.08909362]}, - {"id": 10, "value": [0, 0, 0.044546899]}, - {"id": 11, "value": [0.1, 0.2, 1.78e-7]}, - {"id": 12, "value": [0.4, 0.8, 0.044546899]}, - {"id": 13, "value": [0.9, 0.8, 1.78e-7]}, - {"id": 14, "value": [0.3, 0.1, 0.133640341]}, - {"id": 15, "value": [0.8, 0.1, 0.08909362]}, - {"id": 16, "value": [0.9, 0.3, 0.133640341]}, - {"id": 17, "value": [0, 0.5, 0.08909362]}, - {"id": 18, "value": [0.8, 0.6, 0.044546899]}, - {"id": 19, "value": [0.2, 0.4, 0.044546899]}, - {"id": 20, "value": [0.7, 0.4, 1.78e-7]}, - {"id": 21, "value": [0.6, 0.7, 0.08909362]}, - {"id": 22, "value": [0.7, 0.9, 0.133640341]}, - {"id": 23, "value": [0.6, 0.2, 0.044546899]}, - {"id": 24, "value": [0.5, 0, 1.78e-7]}, - {"id": 25, "value": [0.4, 0.3, 0.08909362]}, - {"id": 26, "value": [0.5, 0.5, 0.133640341]}, - {"id": 27, "value": [0.3, 0.6, 1.78e-7]}, + {"id": 0, "value": [0.0, 0.0, 0.208703666]}, + {"id": 1, "value": [0.5, 0.0, 0.352579046]}, + {"id": 2, "value": [0.0, 0.5, 0.352579046]}, + {"id": 3, "value": [0.5, 0.5, 0.208703666]}, + {"id": 4, "value": [0.75, 0.75, 0.280641356]}, + {"id": 5, "value": [0.25, 0.75, 0.424516737]}, + {"id": 6, "value": [0.75, 0.25, 0.424516737]}, + {"id": 7, "value": [0.25, 0.25, 0.280641356]}, + {"id": 8, "value": [0.1, 0.2, 1.78e-07]}, + {"id": 9, "value": [0.3, 0.1, 0.133640343]}, + {"id": 10, "value": [0.2, 0.9, 0.089093622]}, + {"id": 11, "value": [0.4, 0.8, 0.0445469]}, + {"id": 12, "value": [0.8, 0.1, 0.089093622]}, + {"id": 13, "value": [0.0, 0.0, 0.0445469]}, + {"id": 14, "value": [0.9, 0.8, 1.78e-07]}, + {"id": 15, "value": [0.1, 0.7, 0.133640343]}, + {"id": 16, "value": [0.0, 0.5, 0.089093622]}, + {"id": 17, "value": [0.2, 0.4, 0.0445469]}, + {"id": 18, "value": [0.6, 0.7, 0.089093622]}, + {"id": 19, "value": [0.8, 0.6, 0.0445469]}, + {"id": 20, "value": [0.7, 0.4, 1.78e-07]}, + {"id": 21, "value": [0.9, 0.3, 0.133640343]}, + {"id": 22, "value": [0.4, 0.3, 0.089093622]}, + {"id": 23, "value": [0.6, 0.2, 0.0445469]}, + {"id": 24, "value": [0.5, 0.0, 1.78e-07]}, + {"id": 25, "value": [0.7, 0.9, 0.133640343]}, + {"id": 26, "value": [0.3, 0.6, 1.78e-07]}, + {"id": 27, "value": [0.5, 0.5, 0.133640343]}, ], "units": "crystal", "labels": [ @@ -636,12 +636,12 @@ "constraints": [], }, "lattice": { - "a": 5.630032184, - "b": 5.630032184, - "c": 19.983204895, - "alpha": 90, - "beta": 90, - "gamma": 90, + "a": 5.630032327, + "b": 5.630032327, + "c": 19.983204963, + "alpha": 90.0, + "beta": 90.0, + "gamma": 90.0, "units": {"length": "angstrom", "angle": "degree"}, "type": "TRI", }, @@ -681,34 +681,34 @@ {"id": 27, "value": "C"}, ], "coordinates": [ - {"id": 0, "value": [0.0, 0.0, 0.208703663]}, - {"id": 1, "value": [0.5, 0.0, 0.352579044]}, - {"id": 2, "value": [0.0, 0.5, 0.352579044]}, - {"id": 3, "value": [0.5, 0.5, 0.208703663]}, - {"id": 4, "value": [0.75, 0.25, 0.280641354]}, - {"id": 5, "value": [0.25, 0.25, 0.424516735]}, - {"id": 6, "value": [0.75, 0.75, 0.424516735]}, - {"id": 7, "value": [0.25, 0.75, 0.280641354]}, - {"id": 8, "value": [0.7, 0.9, 0.133640341]}, - {"id": 9, "value": [0.8, 0.1, 0.08909362]}, - {"id": 10, "value": [0.6, 0.2, 0.044546899]}, - {"id": 11, "value": [0.7, 0.4, 1.78e-07]}, - {"id": 12, "value": [0.0, 0.0, 0.044546899]}, - {"id": 13, "value": [0.5, 0.0, 1.78e-07]}, - {"id": 14, "value": [0.9, 0.3, 0.133640341]}, - {"id": 15, "value": [0.4, 0.3, 0.08909362]}, - {"id": 16, "value": [0.1, 0.7, 0.133640341]}, - {"id": 17, "value": [0.2, 0.9, 0.08909362]}, - {"id": 18, "value": [0.1, 0.2, 1.78e-07]}, - {"id": 19, "value": [0.4, 0.8, 0.044546899]}, + {"id": 0, "value": [0.0, 0.0, 0.208703666]}, + {"id": 1, "value": [0.5, 0.0, 0.352579046]}, + {"id": 2, "value": [0.0, 0.5, 0.352579046]}, + {"id": 3, "value": [0.5, 0.5, 0.208703666]}, + {"id": 4, "value": [0.75, 0.25, 0.280641356]}, + {"id": 5, "value": [0.25, 0.25, 0.424516737]}, + {"id": 6, "value": [0.75, 0.75, 0.424516737]}, + {"id": 7, "value": [0.25, 0.75, 0.280641356]}, + {"id": 8, "value": [0.7, 0.4, 1.78e-07]}, + {"id": 9, "value": [0.9, 0.3, 0.133640343]}, + {"id": 10, "value": [0.8, 0.1, 0.089093622]}, + {"id": 11, "value": [0.0, 0.0, 0.0445469]}, + {"id": 12, "value": [0.4, 0.3, 0.089093622]}, + {"id": 13, "value": [0.6, 0.2, 0.0445469]}, + {"id": 14, "value": [0.5, 0.0, 1.78e-07]}, + {"id": 15, "value": [0.7, 0.9, 0.133640343]}, + {"id": 16, "value": [0.1, 0.2, 1.78e-07]}, + {"id": 17, "value": [0.3, 0.1, 0.133640343]}, + {"id": 18, "value": [0.2, 0.9, 0.089093622]}, + {"id": 19, "value": [0.4, 0.8, 0.0445469]}, {"id": 20, "value": [0.9, 0.8, 1.78e-07]}, - {"id": 21, "value": [0.3, 0.1, 0.133640341]}, - {"id": 22, "value": [0.0, 0.5, 0.08909362]}, - {"id": 23, "value": [0.8, 0.6, 0.044546899]}, - {"id": 24, "value": [0.2, 0.4, 0.044546899]}, - {"id": 25, "value": [0.6, 0.7, 0.08909362]}, - {"id": 26, "value": [0.5, 0.5, 0.133640341]}, - {"id": 27, "value": [0.3, 0.6, 1.78e-07]}, + {"id": 21, "value": [0.1, 0.7, 0.133640343]}, + {"id": 22, "value": [0.0, 0.5, 0.089093622]}, + {"id": 23, "value": [0.2, 0.4, 0.0445469]}, + {"id": 24, "value": [0.6, 0.7, 0.089093622]}, + {"id": 25, "value": [0.8, 0.6, 0.0445469]}, + {"id": 26, "value": [0.3, 0.6, 1.78e-07]}, + {"id": 27, "value": [0.5, 0.5, 0.133640343]}, ], "units": "crystal", "labels": [ @@ -744,9 +744,9 @@ "constraints": [], }, "lattice": { - "a": 5.630032184, - "b": 5.630032184, - "c": 19.983204895, + "a": 5.630032327, + "b": 5.630032327, + "c": 19.983204963, "alpha": 90.0, "beta": 90.0, "gamma": 90.0,