-
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
@@ -71,3 +71,15 @@ export function findUnit({ subworkflowData, index, type }) { | |||
if (unit.type !== type) throw new Error("findUnit() error: unit type does not match!"); | |||
return unit; | |||
} | |||
|
|||
// 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
}, | ||
hubbardUValue: { | ||
type: "number", | ||
title: "Hubbard U (eV)", | ||
default: defaultHubbardConfig.hubbardUValue, | ||
}, | ||
}, | ||
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.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
@@ -66,6 +81,19 @@ export class HubbardUContextProvider extends mix(JSONSchemaFormDataProvider).wit | |||
}; | |||
} | |||
|
|||
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
@@ -66,6 +78,44 @@ export class HubbardUContextProvider extends mix(JSONSchemaFormDataProvider).wit | |||
}; | |||
} | |||
|
|||
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.