Skip to content

Commit

Permalink
SOF-6927: fix atomSymbolsWithLabels
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed Mar 12, 2024
1 parent 949c7c5 commit 6bbcf57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/context/providers/espresso/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ export class QEPWXContextProvider extends mix(ExecutableContextProvider).with(
}

static atomSymbolsWithLabels(material) {
const elm = material.Basis.elementsArray;
const symbols = material.Basis.elementsArray;
const labels = material.Basis.atomicLabelsArray;
const elmWithLabel = elm.map((label, idx) => label + labels[idx]);
const elmWithLabel = [];
symbols.forEach((symbol, idx) => elmWithLabel.push(symbol + labels[idx]));

// return unique items
return [...new Set(elmWithLabel)];
Expand Down

0 comments on commit 6bbcf57

Please sign in to comment.