Skip to content

Feature/SOF-7777 Update: VBO with Polar materials#100

Draft
VsevolodX wants to merge 19 commits intomainfrom
feature/SOF-7777
Draft

Feature/SOF-7777 Update: VBO with Polar materials#100
VsevolodX wants to merge 19 commits intomainfrom
feature/SOF-7777

Conversation

@VsevolodX
Copy link
Copy Markdown
Member

No description provided.

@@ -1 +1 @@
[{"filterRules":[{"path":"/qm/wf/none/pw/none"},{"regex":"\\/qm\\/wf\\/none\\/psp\\/.*"},{"regex":"\\/qm\\/wf\\/none\\/smearing\\/.*"},{"regex":"\\/qm\\/wf\\/none\\/tetrahedron\\/.*"},{"path":"/opt/diff/ordern/cg/none"},{"path":"/linalg/diag/none/davidson/none"}],"modelCategories":{"tier1":"pb","tier2":"qm","tier3":"abin","type":"gw"}},{"filterRules":[{"path":"/qm/wf/none/pw/none"},{"regex":"\\/qm\\/wf\\/none\\/psp\\/.*"},{"regex":"\\/qm\\/wf\\/none\\/smearing\\/.*"},{"regex":"\\/qm\\/wf\\/none\\/tetrahedron\\/.*"},{"path":"/opt/diff/ordern/cg/none"},{"path":"/linalg/diag/none/davidson/none"}],"modelCategories":{"subtype":"lda","tier1":"pb","tier2":"qm","tier3":"dft","type":"ksdft"}},{"filterRules":[{"path":"/qm/wf/none/pw/none"},{"regex":"\\/qm\\/wf\\/none\\/psp\\/.*"},{"regex":"\\/qm\\/wf\\/none\\/smearing\\/.*"},{"regex":"\\/qm\\/wf\\/none\\/tetrahedron\\/.*"},{"path":"/opt/diff/ordern/cg/none"},{"path":"/linalg/diag/none/davidson/none"}],"modelCategories":{"subtype":"gga","tier1":"pb","tier2":"qm","tier3":"dft","type":"ksdft"}},{"filterRules":[{"path":"/qm/wf/none/pw/none"},{"regex":"\\/qm\\/wf\\/none\\/psp\\/.*"},{"regex":"\\/qm\\/wf\\/none\\/smearing\\/.*"},{"regex":"\\/qm\\/wf\\/none\\/tetrahedron\\/.*"},{"path":"/opt/diff/ordern/cg/none"},{"path":"/linalg/diag/none/davidson/none"},{"regex":"\\/qm\\/wf\\/none\\/ao\\/pople.*"}],"modelCategories":{"subtype":"hybrid","tier1":"pb","tier2":"qm","tier3":"dft","type":"ksdft"}},{"filterRules":[{"path":"/none/none/none/linear/least_squares"},{"path":"/none/none/none/linear/ridge"},{"path":"/none/none/none/kernel_ridge/least_squares"}],"modelCategories":{"tier1":"st","tier2":"det","tier3":"ml","type":"re"}}]
[{ "filterRules": [{ "path": "/qm/wf/none/pw/none" }, { "regex": "\\/qm\\/wf\\/none\\/psp\\/.*" }, { "regex": "\\/qm\\/wf\\/none\\/smearing\\/.*" }, { "regex": "\\/qm\\/wf\\/none\\/tetrahedron\\/.*" }, { "path": "/opt/diff/ordern/cg/none" }, { "path": "/linalg/diag/none/davidson/none" }], "modelCategories": { "tier1": "pb", "tier2": "qm", "tier3": "abin", "type": "gw" } }, { "filterRules": [{ "path": "/qm/wf/none/pw/none" }, { "regex": "\\/qm\\/wf\\/none\\/psp\\/.*" }, { "regex": "\\/qm\\/wf\\/none\\/smearing\\/.*" }, { "regex": "\\/qm\\/wf\\/none\\/tetrahedron\\/.*" }, { "path": "/opt/diff/ordern/cg/none" }, { "path": "/linalg/diag/none/davidson/none" }], "modelCategories": { "subtype": "lda", "tier1": "pb", "tier2": "qm", "tier3": "dft", "type": "ksdft" } }, { "filterRules": [{ "path": "/qm/wf/none/pw/none" }, { "regex": "\\/qm\\/wf\\/none\\/psp\\/.*" }, { "regex": "\\/qm\\/wf\\/none\\/smearing\\/.*" }, { "regex": "\\/qm\\/wf\\/none\\/tetrahedron\\/.*" }, { "path": "/opt/diff/ordern/cg/none" }, { "path": "/linalg/diag/none/davidson/none" }], "modelCategories": { "subtype": "gga", "tier1": "pb", "tier2": "qm", "tier3": "dft", "type": "ksdft" } }, { "filterRules": [{ "path": "/qm/wf/none/pw/none" }, { "regex": "\\/qm\\/wf\\/none\\/psp\\/.*" }, { "regex": "\\/qm\\/wf\\/none\\/smearing\\/.*" }, { "regex": "\\/qm\\/wf\\/none\\/tetrahedron\\/.*" }, { "path": "/opt/diff/ordern/cg/none" }, { "path": "/linalg/diag/none/davidson/none" }, { "regex": "\\/qm\\/wf\\/none\\/ao\\/pople.*" }], "modelCategories": { "subtype": "hybrid", "tier1": "pb", "tier2": "qm", "tier3": "dft", "type": "ksdft" } }, { "filterRules": [{ "path": "/none/none/none/linear/least_squares" }, { "path": "/none/none/none/linear/ridge" }, { "path": "/none/none/none/kernel_ridge/least_squares" }], "modelCategories": { "tier1": "st", "tier2": "det", "tier3": "ml", "type": "re" } }]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why extra spaces?

units:
# ============================================================================
# PHASE 1: Run all DFT calculations and extract coordinates
# ============================================================================
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

3 DFT runs don't need to be combined

# Material index: 0=Interface, 1=Left, 2=Right
# Access from subworkflowContext (set by assignment unit in workflow)
{% if subworkflowContext.MATERIAL_INDEX is defined %}
material_index = int({{ subworkflowContext.MATERIAL_INDEX }})
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

subworkflowContext is not present in rupy context, remove.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But it works
{{ subworkflowContext.MATERIAL_INDEX }} does absolutely work and gets resolved to the correct index.
pw_scf.out, pw_scf.out-1, pw_scf.out-2 are added sequentially – each has the next material, so everything is correct

if material_index == 0:
pw_scf_output = "./pw_scf.out"
else:
pw_scf_output = f"./pw_scf.out-{material_index}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This logic is broken, rupy is renaming existing files adding -X prefix, the latest structure can be read from pw_scf in the current workflow

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Nope.
pw_scf.out, pw_scf.out-1, pw_scf.out-2 are added sequentially – each has the next material, so everything is correct
It's verified

@@ -0,0 +1,60 @@
#!/usr/bin/env python
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Move to espresso

@@ -0,0 +1,124 @@
# ------------------------------------------------------------------ #
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Move to generic

from munch import Munch
from scipy.stats import linregress

# Data from context: macroscopic average potential profile
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add explanation about where this has to be defined similar to

# The array 'array_from_context' is a 1D list (float or int) that has to be defined in

- density_of_states
- dielectric_tensor
- electric_field_left
- electric_field_right
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove

- filename: espresso/valence_band_offset_calc_polar.json
categories:
- electric_field_left
- electric_field_right
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove

@VsevolodX VsevolodX marked this pull request as draft January 20, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants