@mat3ra/made 2026.11.3-0 → 2026.11.4-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.
@@ -165,7 +165,7 @@ class Basis extends entity_1.InMemoryEntity {
165
165
  }
166
166
  toStandardRepresentation() {
167
167
  this.toCrystal();
168
- this._coordinates.mapArrayInPlace((point) => point.map((x) => utils_1.Utils.math.mod(x)));
168
+ this._coordinates.mapArrayInPlace((point) => point.map((x) => utils_1.Utils.math.mod(x, 0)));
169
169
  }
170
170
  /** A representation where all coordinates are within 0 and 1 in crystal units */
171
171
  get standardRepresentation() {
@@ -286,12 +286,12 @@ class Basis extends entity_1.InMemoryEntity {
286
286
  * This guarantees the independence from the order in the elements array.
287
287
  */
288
288
  getAsSortedString() {
289
- const clsInstance = this.clone();
290
- const standardRep = clsInstance.elementsAndCoordinatesAndLabelsArray.map((entry) => {
289
+ const storedBasis = new Basis(this.clone().standardRepresentation);
290
+ const standardRep = storedBasis.elementsAndCoordinatesAndLabelsArray.map((entry) => {
291
291
  const element = entry[0];
292
292
  const coordinate = entry[1];
293
293
  const atomicLabel = entry[2];
294
- const toleratedCoordinate = coordinate.map((x) => utils_1.Utils.math.mod(utils_1.Utils.math.roundCustom(utils_1.Utils.math.mod(x, 0), constants_1.HASH_TOLERANCE), 0));
294
+ const toleratedCoordinate = coordinate.map((x) => utils_1.Utils.math.mod(utils_1.Utils.math.roundCustom(x, constants_1.HASH_TOLERANCE), 0));
295
295
  return `${element}${atomicLabel} ${toleratedCoordinate.join()}`;
296
296
  });
297
297
  return `${standardRep.sort().join(";")};`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mat3ra/made",
3
- "version": "2026.11.3-0",
3
+ "version": "2026.11.4-0",
4
4
  "description": "MAterials DEsign library",
5
5
  "scripts": {
6
6
  "lint": "eslint --cache src/js tests/js && prettier --write src/js tests/js",