-
Notifications
You must be signed in to change notification settings - Fork 0
SOF-7010: obtain valence configuration from pseudo data #89
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
src/utils.js
Outdated
| } | ||
|
|
||
| // Function to sort array based on the order given in a separate array | ||
| export function sortArrayByOrder(arr, order) { |
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.
This should be in @mat3ra/utils array.ts - there might be already a function for it
| }, | ||
| dependencies: { | ||
| atomicSpecies: { | ||
| oneOf: this.uniqueElementsWithLabels.map((elementWithLabel) => { |
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.
We should make the code reusable here to avoid repeating below
When handling elementWithLabel we can have a helper function to getLabel or getElementSymbol to make it easier to understand or we can have a class for it.
| this.uniqueElements = this.material?.Basis?.uniqueElements || []; | ||
| // orbitals are sorted according to stability (Madelung's rule) | ||
| this.orbitalList = [ | ||
| "1s", |
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.
this.orbitalListByStability
| } | ||
|
|
||
| getValenceOrbitals = (element) => { | ||
| const pseudos = this.methodData?.pseudo || []; |
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.
We should hide the pseudo and try to get atomicOrbitals directly from methodDataItem
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.
Maybe we need should use https://github.com/Exabyte-io/prode.js/blob/f88779045d4a2ad657415dad8fdd3a0201acea42/src/include/meta_properties/pseudopotential.js#L4 class and extract atomicOrbitals from it
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.
.pseudo should not be needed, we should have methodDataItems inside methodData directly
Error with new ade.js Template is not compiled: Template render error: (unknown path) [Line 9, Column 65] expected symbol, got pipe
| }; | ||
| } | ||
|
|
||
| getValenceOrbitalsByElement = (element) => { |
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.
This and the below can go to the pseudopotential method in Mode as well
No description provided.