Skip to content
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

SOF-6927: update libs for spin magnetic calculation #64

Merged
merged 19 commits into from
Mar 21, 2024
Merged

Conversation

pranabdas
Copy link
Contributor

No description provided.

@pranabdas pranabdas marked this pull request as ready for review March 12, 2024 16:14
static atomSymbolsWithLabels(material) {
const symbols = material.Basis.elementsArray;
const labels = material.Basis.atomicLabelsArray;
const elmWithLabel = [];
Copy link
Member

Choose a reason for hiding this comment

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

elements
labels
elementsWithLabels

Copy link
Member

Choose a reason for hiding this comment

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

we can put elementsWithLabels in Basis

@@ -127,6 +158,12 @@ export class QEPWXContextProvider extends mix(ExecutableContextProvider).with(
const filename = pseudo?.filename || path.basename(pseudo?.path || "");
return el ? s.sprintf("%s %f %s", symbol, el.atomic_mass, filename) : undefined;
}

static symbolToAtomicSpecieWithLabels(symbol, pseudo, label = "") {
const el = PERIODIC_TABLE[symbol];
Copy link
Member

Choose a reason for hiding this comment

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

elementAndPseudoToAtomicSpecieWithLabels

static symbolToAtomicSpecieWithLabels(symbol, pseudo, label = "") {
const el = PERIODIC_TABLE[symbol];
const filename = pseudo?.filename || path.basename(pseudo?.path || "");
return el ? s.sprintf("%s%s %f %s", symbol, label, el.atomic_mass, filename) : undefined;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe

return s.sprintf("%s%s %f %s", symbol, label, el?.atomic_mass, filename || '');

@pranabdas pranabdas merged commit d2846b6 into main Mar 21, 2024
4 checks passed
@pranabdas pranabdas deleted the feat/SOF-6927 branch March 21, 2024 11:30
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