Skip to content

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

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

pranabdas
Copy link
Member

No description provided.

@pranabdas pranabdas marked this pull request as ready for review March 5, 2025 01:18
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) {
Copy link
Member

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) => {
Copy link
Member

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",
Copy link
Member

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 || [];
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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

@@ -66,6 +78,44 @@ export class HubbardUContextProvider extends mix(JSONSchemaFormDataProvider).wit
};
}

getValenceOrbitalsByElement = (element) => {
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants