-
Notifications
You must be signed in to change notification settings - Fork 4
SOF-7010: implement class method to strip label and return atomic symbol #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors variable assignments in the Basis class to use array destructuring for improved clarity and consistency.
- Replaced individual element extraction with array destructuring in two mapping functions.
- Removed index usage in the atomicPositions getter function.
Comments suppressed due to low confidence (1)
src/js/basis/basis.ts:465
- Refactoring in the atomicPositions getter removes usage of this.atomicLabelsArray. If the atomic label is meant to be obtained from this array, reverting this change or adjusting the structure of elementsAndCoordinatesAndLabelsArray may be necessary.
const [element, coordinate, atomicLabel] = entry;
src/js/basis/basis.ts
Outdated
* (3) Fe_a, Fe_b, Fe_1, Fe_1a | ||
* As of Mar 2025, only single digit numerical labels are allowed | ||
*/ | ||
stripLabelToGetElementSymbol = (elementWithLabel: string): string => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be a static function, I guess
* (3) Fe_a, Fe_b, Fe_1, Fe_1a | ||
* As of Mar 2025, only single digit numerical labels are allowed | ||
*/ | ||
static stripLabelToGetElementSymbol = (elementWithLabel: string): string => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VsevolodX - where do you think this function should go to? ElementWithLabel helper class? Or maybe tools/basis?
No description provided.