Skip to content

Commit 9929d74

Browse files
committed
SOF-7010: getElementSymbol method is now moved to made material
1 parent c6f200c commit 9929d74

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/context/providers/HubbardUContextProvider.js

+3-9
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,12 @@ export class HubbardUContextProvider extends mix(JSONSchemaFormDataProvider).wit
9090
return sortArrayByOrder(valenceOrbitals, this.orbitalListByStability);
9191
};
9292

93-
getElementSymbol = (elementWithLabel) => {
94-
// exclude single digit label in the end of symbol if present
95-
// 1 is added to the label below to take care of possible label 0
96-
return parseInt(elementWithLabel.slice(-1), 10) + 1
97-
? elementWithLabel.slice(0, -1)
98-
: elementWithLabel;
99-
};
100-
10193
orbitalDependencyArray = (elementList, atomicSpecies, atomicOrbital) => {
10294
return {
10395
oneOf: elementList.map((elementWithLabel) => {
104-
const orbitals = this.getValenceOrbitals(this.getElementSymbol(elementWithLabel));
96+
const orbitals = this.getValenceOrbitals(
97+
this.material.Basis.stripLabelToGetElementSymbol(elementWithLabel),
98+
);
10599
return {
106100
properties: {
107101
[atomicSpecies]: {

0 commit comments

Comments
 (0)