Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions dist/js/basis/basis.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,7 @@ class Basis {
const clsInstance = new Basis(this.toJSON());
clsInstance.toStandardRepresentation();
const standardRep = clsInstance.elementsAndCoordinatesAndLabelsArray.map((entry) => {
const element = entry[0];
const coordinate = entry[1];
const atomicLabel = entry[2];
const [element, coordinate, atomicLabel] = entry;
const toleratedCoordinates = coordinate.map((x) => math_1.default.round(x, constants_1.HASH_TOLERANCE));
return `${element}${atomicLabel} ${toleratedCoordinates.join()}`;
});
Expand Down Expand Up @@ -367,10 +365,8 @@ class Basis {
* E.g., ``` ['Si 0 0 0', 'Li 0.5 0.5 0.5']```
*/
get atomicPositions() {
return this.elementsAndCoordinatesAndLabelsArray.map((entry, idx) => {
const element = entry[0];
const coordinate = entry[1];
const atomicLabel = this.atomicLabelsArray[idx];
return this.elementsAndCoordinatesAndLabelsArray.map((entry) => {
const [element, coordinate, atomicLabel] = entry;
return `${element}${atomicLabel} ${coordinate
.map((x) => underscore_string_1.default.sprintf("%14.9f", x).trim())
.join(" ")}`;
Expand Down
Loading