Skip to content

Commit 1a1eafc

Browse files
committed
update: cleanups
1 parent b005fd4 commit 1a1eafc

File tree

11 files changed

+20
-18
lines changed

11 files changed

+20
-18
lines changed

assets/applications/input_files_templates/python/plot_wavefunction.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# And saves static #
44
# ---------------------------------------------------------------- #
55

6-
import json
7-
86
import matplotlib
97
import numpy as np
108

@@ -22,7 +20,7 @@ psi_amplitude = np.abs(psi_r)
2220
# Create static PNG plot
2321
fig, ax = plt.subplots(figsize=(10, 6))
2422
ax.plot(z, psi_amplitude, 'b-', linewidth=2)
25-
ax.set_xlabel('Position z (Å)', fontsize=12)
23+
ax.set_xlabel('Position z (alat)', fontsize=12)
2624
ax.set_ylabel('Wavefunction amplitude |ψ| (a.u.)', fontsize=12)
2725
ax.set_title('Wavefunction along z-axis', fontsize=14)
2826
ax.grid(True, alpha=0.3)

assets/workflows/subworkflows/espresso/plot_wavefunction.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ units:
1515
name: plot WFN
1616
results:
1717
- name: file_content
18-
basename: wf_r.png
19-
filetype: image
18+
basename: "wf_r.png"
19+
filetype: "image"
2020
type: executionBuilder
2121

assets/workflows/workflows/espresso/wavefunction_amplitude.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Wavefunction Amplitude
33
# To plot a different band, edit the workflow in the UI:
44
# 1. Open "Wavefunction Amplitude" subworkflow unit
55
# 2. Find the "Select Band" assignment (last assignment unit before pp_wfn)
6-
# 3. Change the value:
7-
# - 'KBAND_VALUE_BELOW_EF' → valence band (VBM, highest occupied)
8-
# - 'KBAND_VALUE_ABOVE_EF' → conduction band (CBM, lowest unoccupied)
6+
# 3. Change the value for "KBAND_VALUE" to one of:
7+
# - 'KBAND_VALUE_BELOW_EF' (to plot the highest occupied band)
8+
# - 'KBAND_VALUE_BELOW_EF+1' (to plot the lowest unoccupied band)
99

1010
properties:
1111
- atomic_forces

data/workflows/subworkflows/espresso/plot_wavefunction.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@
8282
"input": [
8383
{
8484
"applicationName": "python",
85-
"content": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# And saves static #\n# ---------------------------------------------------------------- #\n\nimport json\n\nimport matplotlib\nimport numpy as np\n\nmatplotlib.use('Agg') # Non-interactive backend\nimport matplotlib.pyplot as plt\n\n# Load wavefunction data from pp.x output\ndata = np.loadtxt('wf_r.dat')\nz = data[:, 0]\npsi_r = data[:, 1]\n\n# Calculate wavefunction amplitude\npsi_amplitude = np.abs(psi_r)\n\n# Create static PNG plot\nfig, ax = plt.subplots(figsize=(10, 6))\nax.plot(z, psi_amplitude, 'b-', linewidth=2)\nax.set_xlabel('Position z (Å)', fontsize=12)\nax.set_ylabel('Wavefunction amplitude |ψ| (a.u.)', fontsize=12)\nax.set_title('Wavefunction along z-axis', fontsize=14)\nax.grid(True, alpha=0.3)\nplt.tight_layout()\nplt.savefig('wf_r.png', dpi=150, bbox_inches='tight')\nplt.close()\n",
85+
"content": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# And saves static #\n# ---------------------------------------------------------------- #\n\nimport matplotlib\nimport numpy as np\n\nmatplotlib.use('Agg') # Non-interactive backend\nimport matplotlib.pyplot as plt\n\n# Load wavefunction data from pp.x output\ndata = np.loadtxt('wf_r.dat')\nz = data[:, 0]\npsi_r = data[:, 1]\n\n# Calculate wavefunction amplitude\npsi_amplitude = np.abs(psi_r)\n\n# Create static PNG plot\nfig, ax = plt.subplots(figsize=(10, 6))\nax.plot(z, psi_amplitude, 'b-', linewidth=2)\nax.set_xlabel('Position z (alat)', fontsize=12)\nax.set_ylabel('Wavefunction amplitude |ψ| (a.u.)', fontsize=12)\nax.set_title('Wavefunction along z-axis', fontsize=14)\nax.grid(True, alpha=0.3)\nplt.tight_layout()\nplt.savefig('wf_r.png', dpi=150, bbox_inches='tight')\nplt.close()\n",
8686
"contextProviders": [],
8787
"executableName": "python",
8888
"name": "script.py",
89-
"rendered": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# And saves static #\n# ---------------------------------------------------------------- #\n\nimport json\n\nimport matplotlib\nimport numpy as np\n\nmatplotlib.use('Agg') # Non-interactive backend\nimport matplotlib.pyplot as plt\n\n# Load wavefunction data from pp.x output\ndata = np.loadtxt('wf_r.dat')\nz = data[:, 0]\npsi_r = data[:, 1]\n\n# Calculate wavefunction amplitude\npsi_amplitude = np.abs(psi_r)\n\n# Create static PNG plot\nfig, ax = plt.subplots(figsize=(10, 6))\nax.plot(z, psi_amplitude, 'b-', linewidth=2)\nax.set_xlabel('Position z (Å)', fontsize=12)\nax.set_ylabel('Wavefunction amplitude |ψ| (a.u.)', fontsize=12)\nax.set_title('Wavefunction along z-axis', fontsize=14)\nax.grid(True, alpha=0.3)\nplt.tight_layout()\nplt.savefig('wf_r.png', dpi=150, bbox_inches='tight')\nplt.close()\n",
89+
"rendered": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# And saves static #\n# ---------------------------------------------------------------- #\n\nimport matplotlib\nimport numpy as np\n\nmatplotlib.use('Agg') # Non-interactive backend\nimport matplotlib.pyplot as plt\n\n# Load wavefunction data from pp.x output\ndata = np.loadtxt('wf_r.dat')\nz = data[:, 0]\npsi_r = data[:, 1]\n\n# Calculate wavefunction amplitude\npsi_amplitude = np.abs(psi_r)\n\n# Create static PNG plot\nfig, ax = plt.subplots(figsize=(10, 6))\nax.plot(z, psi_amplitude, 'b-', linewidth=2)\nax.set_xlabel('Position z (alat)', fontsize=12)\nax.set_ylabel('Wavefunction amplitude |ψ| (a.u.)', fontsize=12)\nax.set_title('Wavefunction along z-axis', fontsize=14)\nax.grid(True, alpha=0.3)\nplt.tight_layout()\nplt.savefig('wf_r.png', dpi=150, bbox_inches='tight')\nplt.close()\n",
9090
"schemaVersion": "2022.8.16"
9191
},
9292
{

data/workflows/workflows/espresso/wavefunction_amplitude.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,11 +418,11 @@
418418
"input": [
419419
{
420420
"applicationName": "python",
421-
"content": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# And saves static #\n# ---------------------------------------------------------------- #\n\nimport json\n\nimport matplotlib\nimport numpy as np\n\nmatplotlib.use('Agg') # Non-interactive backend\nimport matplotlib.pyplot as plt\n\n# Load wavefunction data from pp.x output\ndata = np.loadtxt('wf_r.dat')\nz = data[:, 0]\npsi_r = data[:, 1]\n\n# Calculate wavefunction amplitude\npsi_amplitude = np.abs(psi_r)\n\n# Create static PNG plot\nfig, ax = plt.subplots(figsize=(10, 6))\nax.plot(z, psi_amplitude, 'b-', linewidth=2)\nax.set_xlabel('Position z (Å)', fontsize=12)\nax.set_ylabel('Wavefunction amplitude |ψ| (a.u.)', fontsize=12)\nax.set_title('Wavefunction along z-axis', fontsize=14)\nax.grid(True, alpha=0.3)\nplt.tight_layout()\nplt.savefig('wf_r.png', dpi=150, bbox_inches='tight')\nplt.close()\n",
421+
"content": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# And saves static #\n# ---------------------------------------------------------------- #\n\nimport matplotlib\nimport numpy as np\n\nmatplotlib.use('Agg') # Non-interactive backend\nimport matplotlib.pyplot as plt\n\n# Load wavefunction data from pp.x output\ndata = np.loadtxt('wf_r.dat')\nz = data[:, 0]\npsi_r = data[:, 1]\n\n# Calculate wavefunction amplitude\npsi_amplitude = np.abs(psi_r)\n\n# Create static PNG plot\nfig, ax = plt.subplots(figsize=(10, 6))\nax.plot(z, psi_amplitude, 'b-', linewidth=2)\nax.set_xlabel('Position z (alat)', fontsize=12)\nax.set_ylabel('Wavefunction amplitude |ψ| (a.u.)', fontsize=12)\nax.set_title('Wavefunction along z-axis', fontsize=14)\nax.grid(True, alpha=0.3)\nplt.tight_layout()\nplt.savefig('wf_r.png', dpi=150, bbox_inches='tight')\nplt.close()\n",
422422
"contextProviders": [],
423423
"executableName": "python",
424424
"name": "script.py",
425-
"rendered": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# And saves static #\n# ---------------------------------------------------------------- #\n\nimport json\n\nimport matplotlib\nimport numpy as np\n\nmatplotlib.use('Agg') # Non-interactive backend\nimport matplotlib.pyplot as plt\n\n# Load wavefunction data from pp.x output\ndata = np.loadtxt('wf_r.dat')\nz = data[:, 0]\npsi_r = data[:, 1]\n\n# Calculate wavefunction amplitude\npsi_amplitude = np.abs(psi_r)\n\n# Create static PNG plot\nfig, ax = plt.subplots(figsize=(10, 6))\nax.plot(z, psi_amplitude, 'b-', linewidth=2)\nax.set_xlabel('Position z (Å)', fontsize=12)\nax.set_ylabel('Wavefunction amplitude |ψ| (a.u.)', fontsize=12)\nax.set_title('Wavefunction along z-axis', fontsize=14)\nax.grid(True, alpha=0.3)\nplt.tight_layout()\nplt.savefig('wf_r.png', dpi=150, bbox_inches='tight')\nplt.close()\n",
425+
"rendered": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# And saves static #\n# ---------------------------------------------------------------- #\n\nimport matplotlib\nimport numpy as np\n\nmatplotlib.use('Agg') # Non-interactive backend\nimport matplotlib.pyplot as plt\n\n# Load wavefunction data from pp.x output\ndata = np.loadtxt('wf_r.dat')\nz = data[:, 0]\npsi_r = data[:, 1]\n\n# Calculate wavefunction amplitude\npsi_amplitude = np.abs(psi_r)\n\n# Create static PNG plot\nfig, ax = plt.subplots(figsize=(10, 6))\nax.plot(z, psi_amplitude, 'b-', linewidth=2)\nax.set_xlabel('Position z (alat)', fontsize=12)\nax.set_ylabel('Wavefunction amplitude |ψ| (a.u.)', fontsize=12)\nax.set_title('Wavefunction along z-axis', fontsize=14)\nax.grid(True, alpha=0.3)\nplt.tight_layout()\nplt.savefig('wf_r.png', dpi=150, bbox_inches='tight')\nplt.close()\n",
426426
"schemaVersion": "2022.8.16"
427427
},
428428
{

dist/js/application.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,11 @@ export declare class ApplicationStandata extends Standata<ApplicationVersionsMap
969969
templateName: string;
970970
}[];
971971
monitors: string[];
972-
results: string[];
972+
results: {
973+
basename: string;
974+
filetype: string;
975+
name: string;
976+
}[];
973977
};
974978
"pyml:custom": {
975979
applicationName: string;

dist/js/runtime_data/applications/templatesList.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/js/runtime_data/subworkflows.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/js/runtime_data/workflows.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/py/mat3ra/standata/data/subworkflows.py

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)