diff --git a/assets/applications/executables/espresso/pp.x.yml b/assets/applications/executables/espresso/pp.x.yml index 4048c13b..4692a8d6 100644 --- a/assets/applications/executables/espresso/pp.x.yml +++ b/assets/applications/executables/espresso/pp.x.yml @@ -19,3 +19,12 @@ flavors: - standard_output applicationName: espresso executableName: pp.x + + pp_wfn: + input: + - name: pp_wfn.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: pp.x diff --git a/assets/applications/executables/python/python.yml b/assets/applications/executables/python/python.yml index 9c6f56e4..f8019541 100644 --- a/assets/applications/executables/python/python.yml +++ b/assets/applications/executables/python/python.yml @@ -4,6 +4,7 @@ monitors: results: - file_content - 'workflow:pyml_predict' + - potential_profile flavors: hello_world: isDefault: true @@ -34,6 +35,30 @@ flavors: applicationName: python executableName: python + extract_bands_fermi: + input: + - name: extract_bands_fermi.py + - name: requirements.txt + templateName: requirements_bands_fermi.txt + monitors: + - standard_output + applicationName: python + executableName: python + + plot_wavefunction: + input: + - name: script.py + templateName: plot_wavefunction.py + - name: requirements.txt + templateName: requirements_plot_wavefunction.txt + results: + - potential_profile + - file_content + monitors: + - standard_output + applicationName: python + executableName: python + 'generic:post_processing:plot:matplotlib': input: - name: plot.py diff --git a/assets/applications/input_files_templates/espresso/pp_wfn.j2.in b/assets/applications/input_files_templates/espresso/pp_wfn.j2.in new file mode 100644 index 00000000..80443a7a --- /dev/null +++ b/assets/applications/input_files_templates/espresso/pp_wfn.j2.in @@ -0,0 +1,17 @@ +&INPUTPP + outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %} + prefix = '__prefix__' + plot_num = 7, + kpoint = 1, + kband = {% raw %}{{ KBAND_VALUE }}{% endraw %}, + lsign = .true., + !spin_component = 1 +/ +&PLOT + iflag = 1, ! 1D line (not 2D plane) + fileout = 'wf_r.dat', + output_format = 0, ! gnuplot 1D + x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units) + e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units) + nx = 200 ! samples along the line +/ diff --git a/assets/applications/input_files_templates/python/espresso/extract_bands_fermi.pyi b/assets/applications/input_files_templates/python/espresso/extract_bands_fermi.pyi new file mode 100644 index 00000000..1a652232 --- /dev/null +++ b/assets/applications/input_files_templates/python/espresso/extract_bands_fermi.pyi @@ -0,0 +1,56 @@ +# ---------------------------------------------------------------- # +# Extract band indices near Fermi energy from band_structure # +# This script expects fermi_energy and band_structure results # +# ---------------------------------------------------------------- # +import json + +from munch import Munch + +# Data From Context +# ----------------- +# fermi_energy: float (in eV) - from pw_scf result +# band_structure: Munch object with band energies - from pw_bands result + +{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %} +{% raw %}band_structure_data = {{ band_structure }}{% endraw %} + +# Extract band energies at Gamma point (first k-point) +# band_structure format from QE parser: +# { +# "name": "band_structure", +# "xDataArray": [[kx, ky, kz], ...], # k-points +# "yDataSeries": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band +# } +# yDataSeries[band_index][kpoint_index] = energy + +# Get energies at first k-point (Gamma, index 0) for all bands +y_data = band_structure_data.get('yDataSeries', []) +band_energies = [band_data[0] for band_data in y_data] if y_data else [] + +# Find bands near Fermi energy (1-based indices as QE expects) +valence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value] +conduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value] + +if valence_bands: + valence_index, valence_energy = max(valence_bands, key=lambda x: x[1]) +else: + valence_index = 1 + valence_energy = band_energies[0] if band_energies else 0.0 + +if conduction_bands: + conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1]) +else: + conduction_index = len(band_energies) + conduction_energy = band_energies[-1] if band_energies else 0.0 + +result = { + "band_below_fermi": valence_index, + "band_above_fermi": conduction_index, + "fermi_energy": fermi_energy_value, + "valence_energy": valence_energy, + "conduction_energy": conduction_energy, + "total_bands": len(band_energies) +} + +# Print to STDOUT for subsequent assignment unit +print(json.dumps(result, indent=4)) diff --git a/assets/applications/input_files_templates/python/espresso/plot_wavefunction.pyi b/assets/applications/input_files_templates/python/espresso/plot_wavefunction.pyi new file mode 100644 index 00000000..3b437915 --- /dev/null +++ b/assets/applications/input_files_templates/python/espresso/plot_wavefunction.pyi @@ -0,0 +1,50 @@ +# ---------------------------------------------------------------- # +# Generate wavefunction plot from pp.x output # +# Outputs potential_profile JSON to STDOUT for platform rendering # +# Also saves static PNG as fallback # +# ---------------------------------------------------------------- # + +import json + +import matplotlib +import numpy as np + +matplotlib.use('Agg') # Non-interactive backend +import matplotlib.pyplot as plt + +# Load wavefunction data from pp.x output +data = np.loadtxt('wf_r.dat') +z = data[:, 0] +psi_r = data[:, 1] + +# Calculate wavefunction amplitude +psi_amplitude = np.abs(psi_r) + +# Create static PNG plot +fig, ax = plt.subplots(figsize=(10, 6)) +ax.plot(z, psi_amplitude, 'b-', linewidth=2) +ax.set_xlabel('Position z (Å)', fontsize=12) +ax.set_ylabel('Wavefunction amplitude |ψ| (a.u.)', fontsize=12) +ax.set_title('Wavefunction along z-axis', fontsize=14) +ax.grid(True, alpha=0.3) +plt.tight_layout() +plt.savefig('wf_r.png', dpi=150, bbox_inches='tight') +plt.close() + +# Create potential_profile JSON for platform rendering +wavefunction_data = { + "name": "potential_profile", + "xAxis": { + "label": "Position", + "units": "angstrom" + }, + "xDataArray": z.tolist(), + "yAxis": { + "label": "Wavefunction Amplitude", + "units": "a.u." + }, + "yDataSeries": [psi_amplitude.tolist()] +} + +# Print JSON to STDOUT (will be captured as potential_profile result) +print(json.dumps(wavefunction_data, indent=2)) diff --git a/assets/applications/input_files_templates/python/espresso/requirements_bands_fermi.j2.txt b/assets/applications/input_files_templates/python/espresso/requirements_bands_fermi.j2.txt new file mode 100644 index 00000000..9ebb6591 --- /dev/null +++ b/assets/applications/input_files_templates/python/espresso/requirements_bands_fermi.j2.txt @@ -0,0 +1,7 @@ +# ------------------------------------------------------------------ # +# # +# Python package requirements for extract_bands_fermi unit # +# # +# ------------------------------------------------------------------ # + +munch==2.5.0 diff --git a/assets/applications/input_files_templates/python/espresso/requirements_plot_wavefunction.j2.txt b/assets/applications/input_files_templates/python/espresso/requirements_plot_wavefunction.j2.txt new file mode 100644 index 00000000..2dd3491b --- /dev/null +++ b/assets/applications/input_files_templates/python/espresso/requirements_plot_wavefunction.j2.txt @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------ # +# # +# Python package requirements for plot_wavefunction unit # +# # +# ------------------------------------------------------------------ # + +numpy<2 +matplotlib diff --git a/assets/applications/templates/espresso/pp.x.yml b/assets/applications/templates/espresso/pp.x.yml index 74d8ec5d..35937522 100644 --- a/assets/applications/templates/espresso/pp.x.yml +++ b/assets/applications/templates/espresso/pp.x.yml @@ -9,3 +9,9 @@ contextProviders: [] applicationName: espresso executableName: pp.x + +- content: !readFile 'input_files_templates/espresso/pp_wfn.j2.in' + name: pp_wfn.in + contextProviders: [] + applicationName: espresso + executableName: pp.x diff --git a/assets/applications/templates/python/python.yml b/assets/applications/templates/python/python.yml index 0fa93db0..45eec0ee 100644 --- a/assets/applications/templates/python/python.yml +++ b/assets/applications/templates/python/python.yml @@ -16,6 +16,12 @@ applicationName: python executableName: python +- content: !readFile 'input_files_templates/python/espresso/requirements_bands_fermi.j2.txt' + name: requirements_bands_fermi.txt + contextProviders: [] + applicationName: python + executableName: python + - content: !readFile 'input_files_templates/python/generic/post_processing:plot:matplotlib.pyi' name: matplotlib_basic.py contextProviders: [] @@ -28,6 +34,24 @@ applicationName: python executableName: python +- content: !readFile 'input_files_templates/python/espresso/extract_bands_fermi.pyi' + name: extract_bands_fermi.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'input_files_templates/python/espresso/plot_wavefunction.pyi' + name: plot_wavefunction.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'input_files_templates/python/espresso/requirements_plot_wavefunction.j2.txt' + name: requirements_plot_wavefunction.txt + contextProviders: [] + applicationName: python + executableName: python + - content: !readFile 'input_files_templates/python/espresso_extract_kpoints.pyi' name: espresso_extract_kpoints.py contextProviders: [] diff --git a/assets/workflows/subworkflows/categories.yml b/assets/workflows/subworkflows/categories.yml index aa9a98bb..a0d2581a 100644 --- a/assets/workflows/subworkflows/categories.yml +++ b/assets/workflows/subworkflows/categories.yml @@ -30,6 +30,7 @@ categories: - remove-all-results - set-io-unit-filenames - variable-cell_relaxation + - wfn_plot application: - espresso - nwchem @@ -198,6 +199,10 @@ entities: categories: - espresso - python + - filename: espresso/extract_bands_fermi.json + categories: + - espresso + - python - filename: espresso/fixed_cell_relaxation.json categories: - atomic_forces @@ -292,10 +297,19 @@ entities: - espresso - phonon_dispersions - phonon_dos + - filename: espresso/plot_wavefunction.json + categories: + - espresso + - file_content + - potential_profile + - python - filename: espresso/post_processor.json categories: - espresso - shell + - filename: espresso/pp_wfn.json + categories: + - espresso - filename: espresso/pre_processor.json categories: - espresso @@ -324,6 +338,18 @@ entities: - total_energy - total_energy_contributions - total_force + - filename: espresso/total_energy_with_bands.json + categories: + - atomic_forces + - band_structure + - espresso + - fermi_energy + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + - wfn_plot - filename: espresso/total_energy.json categories: - atomic_forces @@ -367,6 +393,9 @@ entities: - nwchem - total_energy - total_energy_contributions + - filename: python/extract_bands_fermi.json + categories: + - python - filename: python/ml/classification_tail.json categories: - creates-predictions-csv-during-predict-phase @@ -393,6 +422,11 @@ entities: - pyml:workflow-type-setter - python - set-io-unit-filenames + - filename: python/plot_wavefunction.json + categories: + - file_content + - potential_profile + - python - filename: python/python_script.json categories: - python diff --git a/assets/workflows/subworkflows/espresso/extract_bands_fermi.yml b/assets/workflows/subworkflows/espresso/extract_bands_fermi.yml new file mode 100644 index 00000000..19a75a94 --- /dev/null +++ b/assets/workflows/subworkflows/espresso/extract_bands_fermi.yml @@ -0,0 +1,39 @@ +# Note: This subworkflow extracts band indices near Fermi energy +# Expects fermi_energy and band_structure to be passed via unitConfigs +# Outputs: KBAND_VALUE_BELOW_EF, KBAND_VALUE_ABOVE_EF, and KBAND_VALUE (selected) +application: + name: python + version: 3.10.13 +method: + name: UnknownMethod +model: + name: UnknownModel +name: Extract Bands Near Fermi +units: + - config: + execName: python + flavorName: extract_bands_fermi + name: extract_bands_fermi + flowchartId: extract-band-fermi + type: executionBuilder + - config: + name: Store Band Below EF + operand: KBAND_VALUE_BELOW_EF + value: "json.loads(STDOUT)['band_below_fermi']" + input: + - name: STDOUT + scope: extract-band-fermi + type: assignment + - config: + name: Store Band Above EF + operand: KBAND_VALUE_ABOVE_EF + value: "json.loads(STDOUT)['band_above_fermi']" + input: + - name: STDOUT + scope: extract-band-fermi + type: assignment + - config: + name: Select Band + operand: KBAND_VALUE + value: "KBAND_VALUE_BELOW_EF" + type: assignment diff --git a/assets/workflows/subworkflows/espresso/plot_wavefunction.yml b/assets/workflows/subworkflows/espresso/plot_wavefunction.yml new file mode 100644 index 00000000..a301900a --- /dev/null +++ b/assets/workflows/subworkflows/espresso/plot_wavefunction.yml @@ -0,0 +1,22 @@ +application: + name: python + version: 3.10.13 +method: + name: UnknownMethod +model: + name: UnknownModel +name: Plot Wavefunction +properties: + - potential_profile + - file_content +units: + - config: + execName: python + flavorName: plot_wavefunction + name: plot WFN + results: + - name: potential_profile + - name: file_content + basename: wf_r.png + filetype: image + type: executionBuilder diff --git a/assets/workflows/subworkflows/espresso/pp_wfn.yml b/assets/workflows/subworkflows/espresso/pp_wfn.yml new file mode 100644 index 00000000..3168ee28 --- /dev/null +++ b/assets/workflows/subworkflows/espresso/pp_wfn.yml @@ -0,0 +1,15 @@ +application: + name: espresso + version: "6.3" +method: + name: PseudopotentialMethod +model: + name: DFTModel +name: PP Wavefunction +units: + - config: + execName: pp.x + flavorName: pp_wfn + name: pp_wfn + flowchartId: pp-wfn + type: executionBuilder diff --git a/assets/workflows/subworkflows/espresso/total_energy_with_bands.yml b/assets/workflows/subworkflows/espresso/total_energy_with_bands.yml new file mode 100644 index 00000000..87c613da --- /dev/null +++ b/assets/workflows/subworkflows/espresso/total_energy_with_bands.yml @@ -0,0 +1,52 @@ +application: + name: espresso + version: '6.3' +method: + name: PseudopotentialMethod +model: + name: DFTModel +name: Total Energy with Bands +properties: + - atomic_forces + - fermi_energy + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + - band_structure +units: + - config: + execName: pw.x + flavorName: pw_scf + name: pw_scf + flowchartId: pw-scf-total-energy + functions: + head: true + type: executionBuilder + - config: + execName: pw.x + flavorName: pw_bands + name: pw_bands + flowchartId: pw-bands-total-energy + results: + - name: band_structure + type: executionBuilder + - config: + name: assignment BS + operand: band_structure + value: band_structure + input: + - name: band_structure + scope: pw-bands-total-energy + type: assignment + - config: + name: assignment FE + operand: fermi_energy + value: fermi_energy + input: + - name: fermi_energy + scope: pw-scf-total-energy + type: assignment +tags: + - wfn_plot diff --git a/assets/workflows/workflows/categories.yml b/assets/workflows/workflows/categories.yml index 305ed3ee..50771afd 100644 --- a/assets/workflows/workflows/categories.yml +++ b/assets/workflows/workflows/categories.yml @@ -24,6 +24,7 @@ categories: tags: - default - variable-cell_relaxation + - wfn_plot application: - espresso - nwchem @@ -310,6 +311,18 @@ entities: - total_energy - total_force - variable-cell_relaxation + - filename: espresso/wavefunction_plot.json + categories: + - atomic_forces + - band_structure + - espresso + - fermi_energy + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + - wfn_plot - filename: espresso/zero_point_energy.json categories: - atomic_forces diff --git a/assets/workflows/workflows/espresso/wavefunction_plot.yml b/assets/workflows/workflows/espresso/wavefunction_plot.yml new file mode 100644 index 00000000..ec5d28a8 --- /dev/null +++ b/assets/workflows/workflows/espresso/wavefunction_plot.yml @@ -0,0 +1,52 @@ +name: Wavefunction Plot + +# To plot a different band, edit the workflow in the UI: +# 1. Open "Extract Bands Near Fermi" unit +# 2. Find the "Select Band" assignment (last unit) +# 3. Change the value: +# - 'KBAND_VALUE_BELOW_EF' → valence band (VBM, highest occupied) +# - 'KBAND_VALUE_ABOVE_EF' → conduction band (CBM, lowest unoccupied) + +units: + - name: total_energy_with_bands + type: subworkflow + + - name: extract_bands_fermi + type: subworkflow + config: + unitConfigs: + - index: 0 + type: executionBuilder + config: + attributes: + input: + - name: band_structure + scope: total_energy_with_bands + - name: fermi_energy + scope: total_energy_with_bands + - index: 3 + type: assignment + config: + attributes: + input: + - name: KBAND_VALUE_BELOW_EF + - name: KBAND_VALUE_ABOVE_EF + + - name: pp_wfn + type: subworkflow + config: + unitConfigs: + - index: 0 + type: executionBuilder + config: + attributes: + input: + - name: KBAND_VALUE + scope: extract_bands_fermi + + - name: plot_wavefunction + type: subworkflow + config: {} + +tags: + - wfn_plot diff --git a/data/workflows/subworkflows/espresso/extract_bands_fermi.json b/data/workflows/subworkflows/espresso/extract_bands_fermi.json new file mode 100644 index 00000000..c4880094 --- /dev/null +++ b/data/workflows/subworkflows/espresso/extract_bands_fermi.json @@ -0,0 +1,168 @@ +{ + "_id": "1bb75a6a-4c8c-5336-a24c-1963e83825bc", + "name": "Extract Bands Near Fermi", + "application": { + "name": "espresso" + }, + "properties": [], + "model": { + "type": "unknown", + "subtype": "unknown", + "method": { + "type": "unknown", + "subtype": "unknown", + "data": {} + } + }, + "units": [ + { + "type": "execution", + "name": "extract_bands_fermi", + "head": true, + "results": [], + "monitors": [ + { + "name": "standard_output" + } + ], + "flowchartId": "extract-band-fermi", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + }, + "executable": { + "isDefault": true, + "monitors": [ + "standard_output" + ], + "name": "python", + "schemaVersion": "2022.8.16" + }, + "flavor": { + "applicationName": "python", + "executableName": "python", + "input": [ + { + "name": "extract_bands_fermi.py" + }, + { + "name": "requirements.txt", + "templateName": "requirements_bands_fermi.txt" + } + ], + "monitors": [ + "standard_output" + ], + "name": "extract_bands_fermi", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "python", + "content": "# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n", + "contextProviders": [], + "executableName": "python", + "name": "extract_bands_fermi.py", + "rendered": "# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n", + "schemaVersion": "2022.8.16" + }, + { + "applicationName": "python", + "content": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n", + "contextProviders": [], + "executableName": "python", + "name": "requirements.txt", + "rendered": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n", + "schemaVersion": "2022.8.16" + } + ], + "next": "8771dc7f-878e-5f13-a840-a3a416854f1e" + }, + { + "name": "Store Band Below EF", + "type": "assignment", + "operand": "KBAND_VALUE_BELOW_EF", + "value": "json.loads(STDOUT)['band_below_fermi']", + "input": [ + { + "name": "STDOUT", + "scope": "extract-band-fermi" + } + ], + "status": "idle", + "statusTrack": [], + "flowchartId": "8771dc7f-878e-5f13-a840-a3a416854f1e", + "tags": [], + "head": false, + "next": "91e1328f-39dd-5c24-83f9-d49bfe5c620e", + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + } + }, + { + "name": "Store Band Above EF", + "type": "assignment", + "operand": "KBAND_VALUE_ABOVE_EF", + "value": "json.loads(STDOUT)['band_above_fermi']", + "input": [ + { + "name": "STDOUT", + "scope": "extract-band-fermi" + } + ], + "status": "idle", + "statusTrack": [], + "flowchartId": "91e1328f-39dd-5c24-83f9-d49bfe5c620e", + "tags": [], + "head": false, + "next": "57a07d7d-3f68-5f31-97ad-ebe8c5593cd2", + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + } + }, + { + "name": "Select Band", + "type": "assignment", + "operand": "KBAND_VALUE", + "value": "KBAND_VALUE_BELOW_EF", + "input": [], + "status": "idle", + "statusTrack": [], + "flowchartId": "57a07d7d-3f68-5f31-97ad-ebe8c5593cd2", + "tags": [], + "head": false, + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + } + } + ] +} diff --git a/data/workflows/subworkflows/espresso/plot_wavefunction.json b/data/workflows/subworkflows/espresso/plot_wavefunction.json new file mode 100644 index 00000000..7f455e5a --- /dev/null +++ b/data/workflows/subworkflows/espresso/plot_wavefunction.json @@ -0,0 +1,107 @@ +{ + "_id": "e4ec581f-1cb3-5036-b698-999a96711559", + "name": "Plot Wavefunction", + "application": { + "name": "espresso" + }, + "properties": [ + "potential_profile", + "file_content" + ], + "model": { + "type": "unknown", + "subtype": "unknown", + "method": { + "type": "unknown", + "subtype": "unknown", + "data": {} + } + }, + "units": [ + { + "type": "execution", + "name": "plot WFN", + "head": true, + "results": [ + { + "name": "potential_profile" + }, + { + "name": "file_content" + } + ], + "monitors": [ + { + "name": "standard_output" + } + ], + "flowchartId": "57fca898-8e8b-5ef2-81a5-9d2b612bc18d", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + }, + "executable": { + "isDefault": true, + "monitors": [ + "standard_output" + ], + "name": "python", + "schemaVersion": "2022.8.16" + }, + "flavor": { + "applicationName": "python", + "executableName": "python", + "input": [ + { + "name": "script.py", + "templateName": "plot_wavefunction.py" + }, + { + "name": "requirements.txt", + "templateName": "requirements_plot_wavefunction.txt" + } + ], + "monitors": [ + "standard_output" + ], + "results": [ + "potential_profile", + "file_content" + ], + "name": "plot_wavefunction", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "python", + "content": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n", + "contextProviders": [], + "executableName": "python", + "name": "script.py", + "rendered": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n", + "schemaVersion": "2022.8.16" + }, + { + "applicationName": "python", + "content": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n", + "contextProviders": [], + "executableName": "python", + "name": "requirements.txt", + "rendered": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n", + "schemaVersion": "2022.8.16" + } + ] + } + ] +} diff --git a/data/workflows/subworkflows/espresso/pp_wfn.json b/data/workflows/subworkflows/espresso/pp_wfn.json new file mode 100644 index 00000000..e93e49f2 --- /dev/null +++ b/data/workflows/subworkflows/espresso/pp_wfn.json @@ -0,0 +1,86 @@ +{ + "_id": "7edc20aa-d533-57d8-b8a0-1e504ceb19fd", + "name": "PP Wavefunction", + "application": { + "name": "espresso" + }, + "properties": [], + "model": { + "type": "dft", + "subtype": "gga", + "method": { + "type": "pseudopotential", + "subtype": "us", + "data": {} + }, + "functional": { + "slug": "pbe" + }, + "refiners": [], + "modifiers": [] + }, + "units": [ + { + "type": "execution", + "name": "pp_wfn", + "head": true, + "results": [], + "monitors": [ + { + "name": "standard_output" + } + ], + "flowchartId": "pp-wfn", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + }, + "executable": { + "monitors": [ + "standard_output" + ], + "name": "pp.x", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "flavor": { + "applicationName": "espresso", + "executableName": "pp.x", + "input": [ + { + "name": "pp_wfn.in" + } + ], + "monitors": [ + "standard_output" + ], + "results": [], + "name": "pp_wfn", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "espresso", + "content": "&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {% raw %}{{ KBAND_VALUE }}{% endraw %},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n", + "contextProviders": [], + "executableName": "pp.x", + "name": "pp_wfn.in", + "rendered": "&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {{ KBAND_VALUE }},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n", + "schemaVersion": "2022.8.16" + } + ] + } + ] +} diff --git a/data/workflows/subworkflows/espresso/total_energy_with_bands.json b/data/workflows/subworkflows/espresso/total_energy_with_bands.json new file mode 100644 index 00000000..77a584f9 --- /dev/null +++ b/data/workflows/subworkflows/espresso/total_energy_with_bands.json @@ -0,0 +1,289 @@ +{ + "_id": "109ac366-8f6d-56d5-9b45-6f665f13a511", + "name": "Total Energy with Bands", + "application": { + "name": "espresso" + }, + "properties": [ + "atomic_forces", + "fermi_energy", + "pressure", + "stress_tensor", + "total_energy", + "total_energy_contributions", + "total_force", + "band_structure" + ], + "model": { + "type": "dft", + "subtype": "gga", + "method": { + "type": "pseudopotential", + "subtype": "us", + "data": {} + }, + "functional": { + "slug": "pbe" + }, + "refiners": [], + "modifiers": [] + }, + "units": [ + { + "type": "execution", + "name": "pw_scf", + "head": true, + "results": [ + { + "name": "atomic_forces" + }, + { + "name": "fermi_energy" + }, + { + "name": "pressure" + }, + { + "name": "stress_tensor" + }, + { + "name": "total_energy" + }, + { + "name": "total_energy_contributions" + }, + { + "name": "total_force" + } + ], + "monitors": [ + { + "name": "standard_output" + }, + { + "name": "convergence_electronic" + } + ], + "flowchartId": "pw-scf-total-energy", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + }, + "executable": { + "hasAdvancedComputeOptions": true, + "isDefault": true, + "monitors": [ + "standard_output", + "convergence_ionic", + "convergence_electronic" + ], + "postProcessors": [ + "remove_non_zero_weight_kpoints" + ], + "name": "pw.x", + "schemaVersion": "2022.8.16" + }, + "flavor": { + "applicationName": "espresso", + "executableName": "pw.x", + "input": [ + { + "name": "pw_scf.in" + } + ], + "isDefault": true, + "monitors": [ + "standard_output", + "convergence_electronic" + ], + "results": [ + "atomic_forces", + "fermi_energy", + "pressure", + "stress_tensor", + "total_energy", + "total_energy_contributions", + "total_force" + ], + "name": "pw_scf", + "schemaVersion": "2022.8.16" + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "espresso", + "content": "{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n", + "contextProviders": [ + { + "name": "KGridFormDataManager" + }, + { + "name": "QEPWXInputDataManager" + }, + { + "name": "PlanewaveCutoffDataManager" + } + ], + "executableName": "pw.x", + "name": "pw_scf.in", + "rendered": "&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n", + "schemaVersion": "2022.8.16" + } + ], + "next": "pw-bands-total-energy" + }, + { + "type": "execution", + "name": "pw_bands", + "head": false, + "results": [ + { + "name": "band_structure" + } + ], + "monitors": [ + { + "name": "standard_output" + } + ], + "flowchartId": "pw-bands-total-energy", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + }, + "executable": { + "hasAdvancedComputeOptions": true, + "isDefault": true, + "monitors": [ + "standard_output", + "convergence_ionic", + "convergence_electronic" + ], + "postProcessors": [ + "remove_non_zero_weight_kpoints" + ], + "name": "pw.x", + "schemaVersion": "2022.8.16" + }, + "flavor": { + "applicationName": "espresso", + "executableName": "pw.x", + "input": [ + { + "name": "pw_bands.in" + } + ], + "monitors": [ + "standard_output" + ], + "results": [ + "band_structure" + ], + "name": "pw_bands", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "espresso", + "content": "{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n", + "contextProviders": [ + { + "name": "KPathFormDataManager" + }, + { + "name": "QEPWXInputDataManager" + }, + { + "name": "PlanewaveCutoffDataManager" + } + ], + "executableName": "pw.x", + "name": "pw_bands.in", + "rendered": "&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n", + "schemaVersion": "2022.8.16" + } + ], + "next": "18a26058-7d37-57ac-a685-335862dbf4db" + }, + { + "name": "assignment BS", + "type": "assignment", + "operand": "band_structure", + "value": "band_structure", + "input": [ + { + "name": "band_structure", + "scope": "pw-bands-total-energy" + } + ], + "status": "idle", + "statusTrack": [], + "flowchartId": "18a26058-7d37-57ac-a685-335862dbf4db", + "tags": [], + "head": false, + "next": "7d103bf9-40b8-5f90-8934-bbcb6c7b9802", + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + } + }, + { + "name": "assignment FE", + "type": "assignment", + "operand": "fermi_energy", + "value": "fermi_energy", + "input": [ + { + "name": "fermi_energy", + "scope": "pw-scf-total-energy" + } + ], + "status": "idle", + "statusTrack": [], + "flowchartId": "7d103bf9-40b8-5f90-8934-bbcb6c7b9802", + "tags": [], + "head": false, + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + } + } + ], + "tags": [ + "wfn_plot" + ] +} diff --git a/data/workflows/subworkflows/python/extract_bands_fermi.json b/data/workflows/subworkflows/python/extract_bands_fermi.json new file mode 100644 index 00000000..3331d7bd --- /dev/null +++ b/data/workflows/subworkflows/python/extract_bands_fermi.json @@ -0,0 +1,168 @@ +{ + "_id": "1bb75a6a-4c8c-5336-a24c-1963e83825bc", + "name": "Extract Bands Near Fermi", + "application": { + "name": "python" + }, + "properties": [], + "model": { + "type": "unknown", + "subtype": "unknown", + "method": { + "type": "unknown", + "subtype": "unknown", + "data": {} + } + }, + "units": [ + { + "type": "execution", + "name": "extract_bands_fermi", + "head": true, + "results": [], + "monitors": [ + { + "name": "standard_output" + } + ], + "flowchartId": "extract-band-fermi", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + }, + "executable": { + "isDefault": true, + "monitors": [ + "standard_output" + ], + "name": "python", + "schemaVersion": "2022.8.16" + }, + "flavor": { + "applicationName": "python", + "executableName": "python", + "input": [ + { + "name": "extract_bands_fermi.py" + }, + { + "name": "requirements.txt", + "templateName": "requirements_bands_fermi.txt" + } + ], + "monitors": [ + "standard_output" + ], + "name": "extract_bands_fermi", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "python", + "content": "# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n", + "contextProviders": [], + "executableName": "python", + "name": "extract_bands_fermi.py", + "rendered": "# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n", + "schemaVersion": "2022.8.16" + }, + { + "applicationName": "python", + "content": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n", + "contextProviders": [], + "executableName": "python", + "name": "requirements.txt", + "rendered": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n", + "schemaVersion": "2022.8.16" + } + ], + "next": "8771dc7f-878e-5f13-a840-a3a416854f1e" + }, + { + "name": "Store Band Below EF", + "type": "assignment", + "operand": "KBAND_VALUE_BELOW_EF", + "value": "json.loads(STDOUT)['band_below_fermi']", + "input": [ + { + "name": "STDOUT", + "scope": "extract-band-fermi" + } + ], + "status": "idle", + "statusTrack": [], + "flowchartId": "8771dc7f-878e-5f13-a840-a3a416854f1e", + "tags": [], + "head": false, + "next": "91e1328f-39dd-5c24-83f9-d49bfe5c620e", + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + } + }, + { + "name": "Store Band Above EF", + "type": "assignment", + "operand": "KBAND_VALUE_ABOVE_EF", + "value": "json.loads(STDOUT)['band_above_fermi']", + "input": [ + { + "name": "STDOUT", + "scope": "extract-band-fermi" + } + ], + "status": "idle", + "statusTrack": [], + "flowchartId": "91e1328f-39dd-5c24-83f9-d49bfe5c620e", + "tags": [], + "head": false, + "next": "57a07d7d-3f68-5f31-97ad-ebe8c5593cd2", + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + } + }, + { + "name": "Select Band", + "type": "assignment", + "operand": "KBAND_VALUE", + "value": "KBAND_VALUE_BELOW_EF", + "input": [], + "status": "idle", + "statusTrack": [], + "flowchartId": "57a07d7d-3f68-5f31-97ad-ebe8c5593cd2", + "tags": [], + "head": false, + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + } + } + ] +} diff --git a/data/workflows/subworkflows/python/plot_wavefunction.json b/data/workflows/subworkflows/python/plot_wavefunction.json new file mode 100644 index 00000000..43c69880 --- /dev/null +++ b/data/workflows/subworkflows/python/plot_wavefunction.json @@ -0,0 +1,107 @@ +{ + "_id": "e4ec581f-1cb3-5036-b698-999a96711559", + "name": "Plot Wavefunction", + "application": { + "name": "python" + }, + "properties": [ + "potential_profile", + "file_content" + ], + "model": { + "type": "unknown", + "subtype": "unknown", + "method": { + "type": "unknown", + "subtype": "unknown", + "data": {} + } + }, + "units": [ + { + "type": "execution", + "name": "plot WFN", + "head": true, + "results": [ + { + "name": "potential_profile" + }, + { + "name": "file_content" + } + ], + "monitors": [ + { + "name": "standard_output" + } + ], + "flowchartId": "57fca898-8e8b-5ef2-81a5-9d2b612bc18d", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + }, + "executable": { + "isDefault": true, + "monitors": [ + "standard_output" + ], + "name": "python", + "schemaVersion": "2022.8.16" + }, + "flavor": { + "applicationName": "python", + "executableName": "python", + "input": [ + { + "name": "script.py", + "templateName": "plot_wavefunction.py" + }, + { + "name": "requirements.txt", + "templateName": "requirements_plot_wavefunction.txt" + } + ], + "monitors": [ + "standard_output" + ], + "results": [ + "potential_profile", + "file_content" + ], + "name": "plot_wavefunction", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "python", + "content": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n", + "contextProviders": [], + "executableName": "python", + "name": "script.py", + "rendered": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n", + "schemaVersion": "2022.8.16" + }, + { + "applicationName": "python", + "content": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n", + "contextProviders": [], + "executableName": "python", + "name": "requirements.txt", + "rendered": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n", + "schemaVersion": "2022.8.16" + } + ] + } + ] +} diff --git a/data/workflows/workflows/espresso/wavefunction_plot.json b/data/workflows/workflows/espresso/wavefunction_plot.json new file mode 100644 index 00000000..ea1d8ddf --- /dev/null +++ b/data/workflows/workflows/espresso/wavefunction_plot.json @@ -0,0 +1,795 @@ +{ + "name": "Wavefunction Plot", + "subworkflows": [ + { + "_id": "109ac366-8f6d-56d5-9b45-6f665f13a511", + "name": "Total Energy with Bands", + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + }, + "properties": [ + "atomic_forces", + "fermi_energy", + "pressure", + "stress_tensor", + "total_energy", + "total_energy_contributions", + "total_force", + "band_structure" + ], + "model": { + "type": "dft", + "subtype": "gga", + "method": { + "type": "pseudopotential", + "subtype": "us", + "data": {} + }, + "functional": { + "slug": "pbe" + }, + "refiners": [], + "modifiers": [] + }, + "units": [ + { + "type": "execution", + "name": "pw_scf", + "head": true, + "results": [ + { + "name": "atomic_forces" + }, + { + "name": "fermi_energy" + }, + { + "name": "pressure" + }, + { + "name": "stress_tensor" + }, + { + "name": "total_energy" + }, + { + "name": "total_energy_contributions" + }, + { + "name": "total_force" + } + ], + "monitors": [ + { + "name": "standard_output" + }, + { + "name": "convergence_electronic" + } + ], + "flowchartId": "pw-scf-total-energy", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + }, + "executable": { + "hasAdvancedComputeOptions": true, + "isDefault": true, + "monitors": [ + "standard_output", + "convergence_ionic", + "convergence_electronic" + ], + "postProcessors": [ + "remove_non_zero_weight_kpoints" + ], + "name": "pw.x", + "schemaVersion": "2022.8.16" + }, + "flavor": { + "applicationName": "espresso", + "executableName": "pw.x", + "input": [ + { + "name": "pw_scf.in" + } + ], + "isDefault": true, + "monitors": [ + "standard_output", + "convergence_electronic" + ], + "results": [ + "atomic_forces", + "fermi_energy", + "pressure", + "stress_tensor", + "total_energy", + "total_energy_contributions", + "total_force" + ], + "name": "pw_scf", + "schemaVersion": "2022.8.16" + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "espresso", + "content": "{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n", + "contextProviders": [ + { + "name": "KGridFormDataManager" + }, + { + "name": "QEPWXInputDataManager" + }, + { + "name": "PlanewaveCutoffDataManager" + } + ], + "executableName": "pw.x", + "name": "pw_scf.in", + "rendered": "&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n", + "schemaVersion": "2022.8.16" + } + ], + "next": "pw-bands-total-energy" + }, + { + "type": "execution", + "name": "pw_bands", + "head": false, + "results": [ + { + "name": "band_structure" + } + ], + "monitors": [ + { + "name": "standard_output" + } + ], + "flowchartId": "pw-bands-total-energy", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + }, + "executable": { + "hasAdvancedComputeOptions": true, + "isDefault": true, + "monitors": [ + "standard_output", + "convergence_ionic", + "convergence_electronic" + ], + "postProcessors": [ + "remove_non_zero_weight_kpoints" + ], + "name": "pw.x", + "schemaVersion": "2022.8.16" + }, + "flavor": { + "applicationName": "espresso", + "executableName": "pw.x", + "input": [ + { + "name": "pw_bands.in" + } + ], + "monitors": [ + "standard_output" + ], + "results": [ + "band_structure" + ], + "name": "pw_bands", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "espresso", + "content": "{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n", + "contextProviders": [ + { + "name": "KPathFormDataManager" + }, + { + "name": "QEPWXInputDataManager" + }, + { + "name": "PlanewaveCutoffDataManager" + } + ], + "executableName": "pw.x", + "name": "pw_bands.in", + "rendered": "&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n", + "schemaVersion": "2022.8.16" + } + ], + "next": "18a26058-7d37-57ac-a685-335862dbf4db" + }, + { + "name": "assignment BS", + "type": "assignment", + "operand": "band_structure", + "value": "band_structure", + "input": [ + { + "name": "band_structure", + "scope": "pw-bands-total-energy" + } + ], + "status": "idle", + "statusTrack": [], + "flowchartId": "18a26058-7d37-57ac-a685-335862dbf4db", + "tags": [], + "head": false, + "next": "7d103bf9-40b8-5f90-8934-bbcb6c7b9802", + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + } + }, + { + "name": "assignment FE", + "type": "assignment", + "operand": "fermi_energy", + "value": "fermi_energy", + "input": [ + { + "name": "fermi_energy", + "scope": "pw-scf-total-energy" + } + ], + "status": "idle", + "statusTrack": [], + "flowchartId": "7d103bf9-40b8-5f90-8934-bbcb6c7b9802", + "tags": [], + "head": false, + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + } + } + ] + }, + { + "unitConfigs": [ + { + "index": 0, + "type": "executionBuilder", + "config": { + "attributes": { + "input": [ + { + "name": "band_structure", + "scope": "total_energy_with_bands" + }, + { + "name": "fermi_energy", + "scope": "total_energy_with_bands" + } + ] + } + } + }, + { + "index": 3, + "type": "assignment", + "config": { + "attributes": { + "input": [ + { + "name": "KBAND_VALUE_BELOW_EF" + }, + { + "name": "KBAND_VALUE_ABOVE_EF" + } + ] + } + } + } + ], + "_id": "1bb75a6a-4c8c-5336-a24c-1963e83825bc", + "name": "Extract Bands Near Fermi", + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + }, + "properties": [], + "model": { + "type": "unknown", + "subtype": "unknown", + "method": { + "type": "unknown", + "subtype": "unknown", + "data": {} + } + }, + "units": [ + { + "type": "execution", + "name": "extract_bands_fermi", + "head": true, + "results": [], + "monitors": [ + { + "name": "standard_output" + } + ], + "flowchartId": "extract-band-fermi", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + }, + "executable": { + "isDefault": true, + "monitors": [ + "standard_output" + ], + "name": "python", + "schemaVersion": "2022.8.16" + }, + "flavor": { + "applicationName": "python", + "executableName": "python", + "input": [ + { + "name": "extract_bands_fermi.py" + }, + { + "name": "requirements.txt", + "templateName": "requirements_bands_fermi.txt" + } + ], + "monitors": [ + "standard_output" + ], + "name": "extract_bands_fermi", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "python", + "content": "# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n", + "contextProviders": [], + "executableName": "python", + "name": "extract_bands_fermi.py", + "rendered": "# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n", + "schemaVersion": "2022.8.16" + }, + { + "applicationName": "python", + "content": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n", + "contextProviders": [], + "executableName": "python", + "name": "requirements.txt", + "rendered": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n", + "schemaVersion": "2022.8.16" + } + ], + "next": "8771dc7f-878e-5f13-a840-a3a416854f1e" + }, + { + "name": "Store Band Below EF", + "type": "assignment", + "operand": "KBAND_VALUE_BELOW_EF", + "value": "json.loads(STDOUT)['band_below_fermi']", + "input": [ + { + "name": "STDOUT", + "scope": "extract-band-fermi" + } + ], + "status": "idle", + "statusTrack": [], + "flowchartId": "8771dc7f-878e-5f13-a840-a3a416854f1e", + "tags": [], + "head": false, + "next": "91e1328f-39dd-5c24-83f9-d49bfe5c620e", + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + } + }, + { + "name": "Store Band Above EF", + "type": "assignment", + "operand": "KBAND_VALUE_ABOVE_EF", + "value": "json.loads(STDOUT)['band_above_fermi']", + "input": [ + { + "name": "STDOUT", + "scope": "extract-band-fermi" + } + ], + "status": "idle", + "statusTrack": [], + "flowchartId": "91e1328f-39dd-5c24-83f9-d49bfe5c620e", + "tags": [], + "head": false, + "next": "57a07d7d-3f68-5f31-97ad-ebe8c5593cd2", + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + } + }, + { + "name": "Select Band", + "type": "assignment", + "operand": "KBAND_VALUE", + "value": "KBAND_VALUE_BELOW_EF", + "input": [], + "status": "idle", + "statusTrack": [], + "flowchartId": "57a07d7d-3f68-5f31-97ad-ebe8c5593cd2", + "tags": [], + "head": false, + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + } + } + ] + }, + { + "unitConfigs": [ + { + "index": 0, + "type": "executionBuilder", + "config": { + "attributes": { + "input": [ + { + "name": "KBAND_VALUE", + "scope": "extract_bands_fermi" + } + ] + } + } + } + ], + "_id": "7edc20aa-d533-57d8-b8a0-1e504ceb19fd", + "name": "PP Wavefunction", + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + }, + "properties": [], + "model": { + "type": "dft", + "subtype": "gga", + "method": { + "type": "pseudopotential", + "subtype": "us", + "data": {} + }, + "functional": { + "slug": "pbe" + }, + "refiners": [], + "modifiers": [] + }, + "units": [ + { + "type": "execution", + "name": "pp_wfn", + "head": true, + "results": [], + "monitors": [ + { + "name": "standard_output" + } + ], + "flowchartId": "pp-wfn", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "espresso", + "shortName": "qe", + "summary": "Quantum ESPRESSO", + "build": "GNU", + "hasAdvancedComputeOptions": true, + "isDefault": true, + "version": "6.3", + "schemaVersion": "2022.8.16" + }, + "executable": { + "monitors": [ + "standard_output" + ], + "name": "pp.x", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "flavor": { + "applicationName": "espresso", + "executableName": "pp.x", + "input": [ + { + "name": "pp_wfn.in" + } + ], + "monitors": [ + "standard_output" + ], + "results": [], + "name": "pp_wfn", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "espresso", + "content": "&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {% raw %}{{ KBAND_VALUE }}{% endraw %},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n", + "contextProviders": [], + "executableName": "pp.x", + "name": "pp_wfn.in", + "rendered": "&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {{ KBAND_VALUE }},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n", + "schemaVersion": "2022.8.16" + } + ] + } + ] + }, + { + "_id": "e4ec581f-1cb3-5036-b698-999a96711559", + "name": "Plot Wavefunction", + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + }, + "properties": [ + "potential_profile", + "file_content" + ], + "model": { + "type": "unknown", + "subtype": "unknown", + "method": { + "type": "unknown", + "subtype": "unknown", + "data": {} + } + }, + "units": [ + { + "type": "execution", + "name": "plot WFN", + "head": true, + "results": [ + { + "name": "potential_profile" + }, + { + "name": "file_content" + } + ], + "monitors": [ + { + "name": "standard_output" + } + ], + "flowchartId": "57fca898-8e8b-5ef2-81a5-9d2b612bc18d", + "preProcessors": [], + "postProcessors": [], + "application": { + "name": "python", + "shortName": "py", + "summary": "Python Script", + "build": "GNU", + "isDefault": true, + "version": "3.10.13", + "schemaVersion": "2022.8.16" + }, + "executable": { + "isDefault": true, + "monitors": [ + "standard_output" + ], + "name": "python", + "schemaVersion": "2022.8.16" + }, + "flavor": { + "applicationName": "python", + "executableName": "python", + "input": [ + { + "name": "script.py", + "templateName": "plot_wavefunction.py" + }, + { + "name": "requirements.txt", + "templateName": "requirements_plot_wavefunction.txt" + } + ], + "monitors": [ + "standard_output" + ], + "results": [ + "potential_profile", + "file_content" + ], + "name": "plot_wavefunction", + "schemaVersion": "2022.8.16", + "isDefault": false + }, + "status": "idle", + "statusTrack": [], + "tags": [], + "input": [ + { + "applicationName": "python", + "content": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n", + "contextProviders": [], + "executableName": "python", + "name": "script.py", + "rendered": "# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n", + "schemaVersion": "2022.8.16" + }, + { + "applicationName": "python", + "content": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n", + "contextProviders": [], + "executableName": "python", + "name": "requirements.txt", + "rendered": "# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n", + "schemaVersion": "2022.8.16" + } + ] + } + ] + } + ], + "units": [ + { + "name": "Total Energy with Bands", + "type": "subworkflow", + "_id": "109ac366-8f6d-56d5-9b45-6f665f13a511", + "status": "idle", + "statusTrack": [], + "flowchartId": "84f1102e-5cbf-54ce-bc09-48bced817f9f", + "tags": [], + "head": true, + "next": "8c691f3c-556e-5f4c-8db4-46d6f08d6c9b" + }, + { + "name": "Extract Bands Near Fermi", + "type": "subworkflow", + "_id": "1bb75a6a-4c8c-5336-a24c-1963e83825bc", + "status": "idle", + "statusTrack": [], + "flowchartId": "8c691f3c-556e-5f4c-8db4-46d6f08d6c9b", + "tags": [], + "head": false, + "next": "b26bb41f-0237-51db-9e59-16c157c8dd03" + }, + { + "name": "PP Wavefunction", + "type": "subworkflow", + "_id": "7edc20aa-d533-57d8-b8a0-1e504ceb19fd", + "status": "idle", + "statusTrack": [], + "flowchartId": "b26bb41f-0237-51db-9e59-16c157c8dd03", + "tags": [], + "head": false, + "next": "4ce49281-e731-550e-af66-6d2408db8237" + }, + { + "name": "Plot Wavefunction", + "type": "subworkflow", + "_id": "e4ec581f-1cb3-5036-b698-999a96711559", + "status": "idle", + "statusTrack": [], + "flowchartId": "4ce49281-e731-550e-af66-6d2408db8237", + "tags": [], + "head": false + } + ], + "properties": [ + "atomic_forces", + "band_structure", + "fermi_energy", + "pressure", + "stress_tensor", + "total_energy", + "total_energy_contributions", + "total_force" + ], + "_id": "9f523214-605f-5eed-8b58-2e2d8fbc18e3", + "workflows": [], + "schemaVersion": "2022.8.16", + "isDefault": false, + "tags": [ + "wfn_plot" + ], + "application": { + "name": "espresso" + } +} diff --git a/dist/js/application.d.ts b/dist/js/application.d.ts index 3da16ff8..1110750e 100644 --- a/dist/js/application.d.ts +++ b/dist/js/application.d.ts @@ -399,6 +399,15 @@ export declare class ApplicationStandata extends Standata avoid substituion below #}\n{% raw %}\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n{% endraw %}\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_xml_get_qpt_irr.py"},{"applicationName":"python","content":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_extract_kpoints.py"},{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"processing_requirements.txt"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"pyml_requirements.txt"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"pyml_settings.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Custom workflow unit template for the Exabyte.io platform #\n# #\n# This file imports a set of workflow-specific context variables #\n# from settings.py. It then uses a context manager to save and #\n# load Python objects. When saved, these objects can then be #\n# loaded either later in the same workflow, or by subsequent #\n# predict jobs. #\n# #\n# Any pickle-able Python object can be saved using #\n# settings.context. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport settings\n\n# The context manager exists to facilitate\n# saving and loading objects across Python units within a workflow.\n\n# To load an object, simply do to \\`context.load(\"name-of-the-saved-object\")\\`\n# To save an object, simply do \\`context.save(\"name-for-the-object\", object_here)\\`\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Do some transformations to the data here\n\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n descriptors = context.load(\"descriptors\")\n\n # Do some predictions or transformation to the data here\n","contextProviders":[],"executableName":"python","name":"pyml_custom.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn MinMax Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it is on interval #\n# [0,1]. It then saves the data for use further down #\n# the road in the workflow, for use in un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the min and max of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor MinMax Scaler\n scaler = sklearn.preprocessing.MinMaxScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_min_max_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Pandas Remove Duplicates workflow unit #\n# #\n# This workflow unit drops all duplicate rows, if it is running #\n# in the \"train\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Drop duplicates from the training set\n df = pandas.DataFrame(train_target, columns=[\"target\"])\n df = df.join(pandas.DataFrame(train_descriptors))\n df = df.drop_duplicates()\n train_target = df.pop(\"target\").to_numpy()\n train_target = train_target.reshape(-1, 1)\n train_descriptors = df.to_numpy()\n\n # Drop duplicates from the testing set\n df = pandas.DataFrame(test_target, columns=[\"target\"])\n df = df.join(pandas.DataFrame(test_descriptors))\n df = df.drop_duplicates()\n test_target = df.pop(\"target\").to_numpy()\n test_target = test_target.reshape(-1, 1)\n test_descriptors = df.to_numpy()\n\n # Store the data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[],"executableName":"python","name":"pre_processing_remove_duplicates_pandas.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Pandas Remove Missing Workflow Unit #\n# #\n# This workflow unit allows missing rows and/or columns to be #\n# dropped from the dataset by configuring the `to_drop` #\n# parameter. #\n# #\n# Valid values for `to_drop`: #\n# - \"rows\": rows with missing values will be removed #\n# - \"columns\": columns with missing values will be removed #\n# - \"both\": rows and columns with missing values will be removed #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\n\n# `to_drop` can either be \"rows\" or \"columns\"\n# If it is set to \"rows\" (by default), then all rows with missing values will be dropped.\n# If it is set to \"columns\", then all columns with missing values will be dropped.\n# If it is set to \"both\", then all rows and columns with missing values will be dropped.\nto_drop = \"rows\"\n\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Drop missing from the training set\n df = pandas.DataFrame(train_target, columns=[\"target\"])\n df = df.join(pandas.DataFrame(train_descriptors))\n\n directions = {\n \"rows\": (\"index\",),\n \"columns\": (\"columns\",),\n \"both\": (\"index\", \"columns\"),\n }[to_drop]\n for direction in directions:\n df = df.dropna(direction)\n\n train_target = df.pop(\"target\").to_numpy()\n train_target = train_target.reshape(-1, 1)\n train_descriptors = df.to_numpy()\n\n # Drop missing from the testing set\n df = pandas.DataFrame(test_target, columns=[\"target\"])\n df = df.join(pandas.DataFrame(test_descriptors))\n df = df.dropna()\n test_target = df.pop(\"target\").to_numpy()\n test_target = test_target.reshape(-1, 1)\n test_descriptors = df.to_numpy()\n\n # Store the data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[],"executableName":"python","name":"pre_processing_remove_missing_pandas.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a ridge-regression model in Scikit-Learn. #\n# Alpha is taken from Scikit-Learn's defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\nimport sklearn.tree\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Base Estimator\n base_estimator = sklearn.tree.DecisionTreeRegressor(\n criterion=\"mse\",\n splitter=\"best\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=None,\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n ccp_alpha=0.0,\n )\n\n # Initialize the Model\n model = sklearn.ensemble.AdaBoostRegressor(\n n_estimators=50,\n learning_rate=1,\n loss=\"linear\",\n base_estimator=base_estimator,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"adaboosted_trees\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"adaboosted_trees\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_adaboosted_trees_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a bagged trees regression model with #\n# Scikit-Learn. Parameters for the estimator and ensemble are #\n# derived from Scikit-Learn's Defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\nimport sklearn.tree\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Base Estimator\n base_estimator = sklearn.tree.DecisionTreeRegressor(\n criterion=\"mse\",\n splitter=\"best\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=None,\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n ccp_alpha=0.0,\n )\n\n # Initialize the Model\n model = sklearn.ensemble.BaggingRegressor(\n n_estimators=10,\n max_samples=1.0,\n max_features=1.0,\n bootstrap=True,\n bootstrap_features=False,\n oob_score=False,\n verbose=0,\n base_estimator=base_estimator,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"bagged_trees\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"bagged_trees\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_bagged_trees_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for gradient-boosted tree regression with #\n# Scikit-Learn. Parameters for the estimator and ensemble are #\n# derived from Scikit-Learn's Defaults. Note: In the gradient- #\n# boosted trees ensemble used, the weak learners used as #\n# estimators cannot be tuned with the same level of fidelity #\n# allowed in the adaptive-boosted trees ensemble. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.GradientBoostingRegressor(\n loss=\"ls\",\n learning_rate=0.1,\n n_estimators=100,\n subsample=1.0,\n criterion=\"friedman_mse\",\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_depth=3,\n min_impurity_decrease=0.0,\n max_features=None,\n alpha=0.9,\n verbose=0,\n max_leaf_nodes=None,\n validation_fraction=0.1,\n n_iter_no_change=None,\n tol=0.0001,\n ccp_alpha=0.0,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"gradboosted_trees\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"gradboosted_trees\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_gradboosted_trees_regression_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow unit for eXtreme Gradient-Boosted trees regression #\n# with XGBoost's wrapper to Scikit-Learn. Parameters for the #\n# estimator and ensemble are derived from sklearn defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). #\n# #\n# When the workflow is run in Predict mode, the model is #\n# loaded, predictions are made, they are un-transformed using #\n# the trained scaler from the training run, and they are #\n# written to a filed named \"predictions.csv\" #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport xgboost\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the model\n model = xgboost.XGBRegressor(booster='gbtree',\n verbosity=1,\n learning_rate=0.3,\n min_split_loss=0,\n max_depth=6,\n min_child_weight=1,\n max_delta_step=0,\n colsample_bytree=1,\n reg_lambda=1,\n reg_alpha=0,\n scale_pos_weight=1,\n objective='reg:squarederror',\n eval_metric='rmse')\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"extreme_gradboosted_tree_regression\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"extreme_gradboosted_tree_regression\")\n\n # Make some predictions and unscale\n predictions = model.predict(descriptors)\n predictions = predictions.reshape(-1, 1)\n target_scaler = context.load(\"target_scaler\")\n\n predictions = target_scaler.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\")\n","contextProviders":[],"executableName":"python","name":"model_extreme_gradboosted_trees_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for k-means clustering. #\n# #\n# In k-means clustering, the labels are not provided ahead of #\n# time. Instead, one supplies the number of groups the #\n# algorithm should split the dataset into. Here, we set our #\n# own default of 4 groups (fewer than sklearn's default of 8). #\n# Otherwise, the default parameters of the clustering method #\n# are the same as in sklearn. #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.cluster\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Initialize the Model\n model = sklearn.cluster.KMeans(\n n_clusters=4,\n init=\"k-means++\",\n n_init=10,\n max_iter=300,\n tol=0.0001,\n copy_x=True,\n algorithm=\"auto\",\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors)\n context.save(model, \"k_means\")\n train_labels = model.predict(train_descriptors)\n test_labels = model.predict(test_descriptors)\n\n context.save(train_labels, \"train_labels\")\n context.save(test_labels, \"test_labels\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"k_means\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_k_means_clustering_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a kernelized ridge-regression model with #\n# Scikit-Learn. Model parameters are derived from Scikit- #\n# Learn's defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.kernel_ridge\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.kernel_ridge.KernelRidge(\n alpha=1.0,\n kernel=\"linear\",\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"kernel_ridge\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"kernel_ridge\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_kernel_ridge_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a LASSO-regression model with Scikit- #\n# Learn. Model parameters derived from Scikit-Learn's #\n# Defaults. Alpha has been lowered from the default of 1.0, to #\n# 0.1. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.linear_model\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.linear_model.Lasso(\n alpha=0.1,\n fit_intercept=True,\n normalize=False,\n precompute=False,\n tol=0.0001,\n positive=True,\n selection=\"cyclic\",\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"LASSO\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"LASSO\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_lasso_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_mlp_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow unit for a gradient boosted classification model with #\n# Scikit-Learn. Parameters derived from sklearn's defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. #\n# #\n# When the workflow is run in Predict mode, the model is #\n# loaded, predictions are made, they are un-transformed using #\n# the trained scaler from the training run, and they are #\n# written to a filed named \"predictions.csv\" #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the model\n model = sklearn.ensemble.GradientBoostingClassifier(loss='deviance',\n learning_rate=0.1,\n n_estimators=100,\n subsample=1.0,\n criterion='friedman_mse',\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_depth=3,\n min_impurity_decrease=0.0,\n min_impurity_split=None,\n init=None,\n random_state=None,\n max_features=None,\n verbose=0,\n max_leaf_nodes=None,\n warm_start=False,\n validation_fraction=0.1,\n n_iter_no_change=None,\n tol=0.0001,\n ccp_alpha=0.0)\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"gradboosted_trees_classification\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target,\n test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n # Ensure predictions have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"gradboosted_trees_classification\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_gradboosted_trees_classification_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow unit for eXtreme Gradient-Boosted trees classification #\n# with XGBoost's wrapper to Scikit-Learn. Parameters for the #\n# estimator and ensemble are derived from sklearn defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. #\n# #\n# When the workflow is run in Predict mode, the model is #\n# loaded, predictions are made, they are un-transformed using #\n# the trained scaler from the training run, and they are #\n# written to a filed named \"predictions.csv\" #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport xgboost\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the model\n model = xgboost.XGBClassifier(booster='gbtree',\n verbosity=1,\n learning_rate=0.3,\n min_split_loss=0,\n max_depth=6,\n min_child_weight=1,\n max_delta_step=0,\n colsample_bytree=1,\n reg_lambda=1,\n reg_alpha=0,\n scale_pos_weight=1,\n objective='binary:logistic',\n eval_metric='logloss',\n use_label_encoder=False)\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"extreme_gradboosted_tree_classification\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target,\n test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n # Ensure predictions have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"extreme_gradboosted_tree_classification\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_extreme_gradboosted_trees_classification_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow for a random forest regression model with Scikit- #\n# Learn. Parameters are derived from Scikit-Learn's defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestRegressor(\n n_estimators=100,\n criterion=\"mse\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n max_samples=None,\n oob_score=False,\n ccp_alpha=0.0,\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a ridge regression model with Scikit- #\n# Learn. Alpha is taken from Scikit-Learn's default #\n# parameters. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.linear_model\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.linear_model.Ridge(\n alpha=1.0,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"ridge\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"ridge\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_ridge_regression_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_parity_plot_matplotlib.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Cluster Visualization #\n# #\n# This unit takes an N-dimensional feature space, and uses #\n# Principal-component Analysis (PCA) to project into a 2D space #\n# to facilitate plotting on a scatter plot. #\n# #\n# The 2D space we project into are the first two principal #\n# components identified in PCA, which are the two vectors with #\n# the highest variance. #\n# #\n# Wikipedia Article on PCA: #\n# https://en.wikipedia.org/wiki/Principal_component_analysis #\n# #\n# We then plot the labels assigned to the train an test set, #\n# and color by class. #\n# #\n# ----------------------------------------------------------------- #\n\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport settings\nimport sklearn.decomposition\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_labels = context.load(\"train_labels\")\n train_descriptors = context.load(\"train_descriptors\")\n test_labels = context.load(\"test_labels\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Unscale the descriptors\n descriptor_scaler = context.load(\"descriptor_scaler\")\n train_descriptors = descriptor_scaler.inverse_transform(train_descriptors)\n test_descriptors = descriptor_scaler.inverse_transform(test_descriptors)\n\n # We need at least 2 dimensions, exit if the dataset is 1D\n if train_descriptors.ndim < 2:\n raise ValueError(\"The train descriptors do not have enough dimensions to be plot in 2D\")\n\n # The data could be multidimensional. Let's do some PCA to get things into 2 dimensions.\n pca = sklearn.decomposition.PCA(n_components=2)\n train_descriptors = pca.fit_transform(train_descriptors)\n test_descriptors = pca.transform(test_descriptors)\n xlabel = \"Principle Component 1\"\n ylabel = \"Principle Component 2\"\n\n # Determine the labels we're going to be using, and generate their colors\n labels = set(train_labels)\n colors = {}\n for count, label in enumerate(labels):\n cm = matplotlib.cm.get_cmap('jet', len(labels))\n color = cm(count / len(labels))\n colors[label] = color\n train_colors = [colors[label] for label in train_labels]\n test_colors = [colors[label] for label in test_labels]\n\n # Train / Test Split Visualization\n plt.title(\"Train Test Split Visualization\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=\"#33548c\", marker=\"o\", label=\"Training Set\")\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=\"#F0B332\", marker=\"o\", label=\"Testing Set\")\n xmin, xmax, ymin, ymax = plt.axis()\n plt.legend()\n plt.tight_layout()\n plt.savefig(\"train_test_split.png\", dpi=600)\n plt.close()\n\n def clusters_legend(cluster_colors):\n \"\"\"\n Helper function that creates a legend, given the coloration by clusters.\n Args:\n cluster_colors: A dictionary of the form {cluster_number : color_value}\n\n Returns:\n None; just creates the legend and puts it on the plot\n \"\"\"\n legend_symbols = []\n for group, color in cluster_colors.items():\n label = f\"Cluster {group}\"\n legend_symbols.append(matplotlib.lines.Line2D([], [], color=color, marker=\"o\",\n linewidth=0, label=label))\n plt.legend(handles=legend_symbols)\n\n # Training Set Clusters\n plt.title(\"Training Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=train_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"train_clusters.png\", dpi=600)\n plt.close()\n\n # Testing Set Clusters\n plt.title(\"Testing Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=test_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"test_clusters.png\", dpi=600)\n plt.close()\n\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_pca_2d_clusters_matplotlib.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py"},{"applicationName":"shell","content":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","contextProviders":[],"executableName":"sh","name":"hello_world.sh"},{"applicationName":"shell","content":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","contextProviders":[],"executableName":"sh","name":"job_espresso_pw_scf.sh"},{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_link_outdir_save.sh"},{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_collect_dynmat.sh"},{"applicationName":"shell","content":"#!/bin/bash\n\n# ------------------------------------------------------------------ #\n# This script prepares necessary directories to run VASP NEB\n# calculation. It puts initial POSCAR into directory 00, final into 0N\n# and intermediate images in 01 to 0(N-1). It is assumed that SCF\n# calculations for initial and final structures are already done in\n# previous subworkflows and their standard outputs are written into\n# \"vasp_neb_initial.out\" and \"vasp_neb_final.out\" files respectively.\n# These outputs are here copied into initial (00) and final (0N)\n# directories to calculate the reaction energy profile.\n# ------------------------------------------------------------------ #\n\n{% raw %}\ncd {{ JOB_WORK_DIR }}\n{% endraw %}\n\n# Prepare First Directory\nmkdir -p 00\ncat > 00/POSCAR < 0{{ input.INTERMEDIATE_IMAGES.length + 1 }}/POSCAR < 0{{ loop.index }}/POSCAR < avoid substituion below #}\n{% raw %}\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n{% endraw %}\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_xml_get_qpt_irr.py"},{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"extract_bands_fermi.py"},{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","contextProviders":[],"executableName":"python","name":"plot_wavefunction.py"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","contextProviders":[],"executableName":"python","name":"requirements_plot_wavefunction.txt"},{"applicationName":"python","content":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_extract_kpoints.py"},{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"processing_requirements.txt"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"pyml_requirements.txt"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"pyml_settings.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Custom workflow unit template for the Exabyte.io platform #\n# #\n# This file imports a set of workflow-specific context variables #\n# from settings.py. It then uses a context manager to save and #\n# load Python objects. When saved, these objects can then be #\n# loaded either later in the same workflow, or by subsequent #\n# predict jobs. #\n# #\n# Any pickle-able Python object can be saved using #\n# settings.context. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport settings\n\n# The context manager exists to facilitate\n# saving and loading objects across Python units within a workflow.\n\n# To load an object, simply do to \\`context.load(\"name-of-the-saved-object\")\\`\n# To save an object, simply do \\`context.save(\"name-for-the-object\", object_here)\\`\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Do some transformations to the data here\n\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n descriptors = context.load(\"descriptors\")\n\n # Do some predictions or transformation to the data here\n","contextProviders":[],"executableName":"python","name":"pyml_custom.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn MinMax Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it is on interval #\n# [0,1]. It then saves the data for use further down #\n# the road in the workflow, for use in un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the min and max of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor MinMax Scaler\n scaler = sklearn.preprocessing.MinMaxScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_min_max_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Pandas Remove Duplicates workflow unit #\n# #\n# This workflow unit drops all duplicate rows, if it is running #\n# in the \"train\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Drop duplicates from the training set\n df = pandas.DataFrame(train_target, columns=[\"target\"])\n df = df.join(pandas.DataFrame(train_descriptors))\n df = df.drop_duplicates()\n train_target = df.pop(\"target\").to_numpy()\n train_target = train_target.reshape(-1, 1)\n train_descriptors = df.to_numpy()\n\n # Drop duplicates from the testing set\n df = pandas.DataFrame(test_target, columns=[\"target\"])\n df = df.join(pandas.DataFrame(test_descriptors))\n df = df.drop_duplicates()\n test_target = df.pop(\"target\").to_numpy()\n test_target = test_target.reshape(-1, 1)\n test_descriptors = df.to_numpy()\n\n # Store the data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[],"executableName":"python","name":"pre_processing_remove_duplicates_pandas.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Pandas Remove Missing Workflow Unit #\n# #\n# This workflow unit allows missing rows and/or columns to be #\n# dropped from the dataset by configuring the `to_drop` #\n# parameter. #\n# #\n# Valid values for `to_drop`: #\n# - \"rows\": rows with missing values will be removed #\n# - \"columns\": columns with missing values will be removed #\n# - \"both\": rows and columns with missing values will be removed #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\n\n# `to_drop` can either be \"rows\" or \"columns\"\n# If it is set to \"rows\" (by default), then all rows with missing values will be dropped.\n# If it is set to \"columns\", then all columns with missing values will be dropped.\n# If it is set to \"both\", then all rows and columns with missing values will be dropped.\nto_drop = \"rows\"\n\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Drop missing from the training set\n df = pandas.DataFrame(train_target, columns=[\"target\"])\n df = df.join(pandas.DataFrame(train_descriptors))\n\n directions = {\n \"rows\": (\"index\",),\n \"columns\": (\"columns\",),\n \"both\": (\"index\", \"columns\"),\n }[to_drop]\n for direction in directions:\n df = df.dropna(direction)\n\n train_target = df.pop(\"target\").to_numpy()\n train_target = train_target.reshape(-1, 1)\n train_descriptors = df.to_numpy()\n\n # Drop missing from the testing set\n df = pandas.DataFrame(test_target, columns=[\"target\"])\n df = df.join(pandas.DataFrame(test_descriptors))\n df = df.dropna()\n test_target = df.pop(\"target\").to_numpy()\n test_target = test_target.reshape(-1, 1)\n test_descriptors = df.to_numpy()\n\n # Store the data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[],"executableName":"python","name":"pre_processing_remove_missing_pandas.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a ridge-regression model in Scikit-Learn. #\n# Alpha is taken from Scikit-Learn's defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\nimport sklearn.tree\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Base Estimator\n base_estimator = sklearn.tree.DecisionTreeRegressor(\n criterion=\"mse\",\n splitter=\"best\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=None,\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n ccp_alpha=0.0,\n )\n\n # Initialize the Model\n model = sklearn.ensemble.AdaBoostRegressor(\n n_estimators=50,\n learning_rate=1,\n loss=\"linear\",\n base_estimator=base_estimator,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"adaboosted_trees\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"adaboosted_trees\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_adaboosted_trees_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a bagged trees regression model with #\n# Scikit-Learn. Parameters for the estimator and ensemble are #\n# derived from Scikit-Learn's Defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\nimport sklearn.tree\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Base Estimator\n base_estimator = sklearn.tree.DecisionTreeRegressor(\n criterion=\"mse\",\n splitter=\"best\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=None,\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n ccp_alpha=0.0,\n )\n\n # Initialize the Model\n model = sklearn.ensemble.BaggingRegressor(\n n_estimators=10,\n max_samples=1.0,\n max_features=1.0,\n bootstrap=True,\n bootstrap_features=False,\n oob_score=False,\n verbose=0,\n base_estimator=base_estimator,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"bagged_trees\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"bagged_trees\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_bagged_trees_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for gradient-boosted tree regression with #\n# Scikit-Learn. Parameters for the estimator and ensemble are #\n# derived from Scikit-Learn's Defaults. Note: In the gradient- #\n# boosted trees ensemble used, the weak learners used as #\n# estimators cannot be tuned with the same level of fidelity #\n# allowed in the adaptive-boosted trees ensemble. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.GradientBoostingRegressor(\n loss=\"ls\",\n learning_rate=0.1,\n n_estimators=100,\n subsample=1.0,\n criterion=\"friedman_mse\",\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_depth=3,\n min_impurity_decrease=0.0,\n max_features=None,\n alpha=0.9,\n verbose=0,\n max_leaf_nodes=None,\n validation_fraction=0.1,\n n_iter_no_change=None,\n tol=0.0001,\n ccp_alpha=0.0,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"gradboosted_trees\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"gradboosted_trees\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_gradboosted_trees_regression_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow unit for eXtreme Gradient-Boosted trees regression #\n# with XGBoost's wrapper to Scikit-Learn. Parameters for the #\n# estimator and ensemble are derived from sklearn defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). #\n# #\n# When the workflow is run in Predict mode, the model is #\n# loaded, predictions are made, they are un-transformed using #\n# the trained scaler from the training run, and they are #\n# written to a filed named \"predictions.csv\" #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport xgboost\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the model\n model = xgboost.XGBRegressor(booster='gbtree',\n verbosity=1,\n learning_rate=0.3,\n min_split_loss=0,\n max_depth=6,\n min_child_weight=1,\n max_delta_step=0,\n colsample_bytree=1,\n reg_lambda=1,\n reg_alpha=0,\n scale_pos_weight=1,\n objective='reg:squarederror',\n eval_metric='rmse')\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"extreme_gradboosted_tree_regression\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"extreme_gradboosted_tree_regression\")\n\n # Make some predictions and unscale\n predictions = model.predict(descriptors)\n predictions = predictions.reshape(-1, 1)\n target_scaler = context.load(\"target_scaler\")\n\n predictions = target_scaler.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\")\n","contextProviders":[],"executableName":"python","name":"model_extreme_gradboosted_trees_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for k-means clustering. #\n# #\n# In k-means clustering, the labels are not provided ahead of #\n# time. Instead, one supplies the number of groups the #\n# algorithm should split the dataset into. Here, we set our #\n# own default of 4 groups (fewer than sklearn's default of 8). #\n# Otherwise, the default parameters of the clustering method #\n# are the same as in sklearn. #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.cluster\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Initialize the Model\n model = sklearn.cluster.KMeans(\n n_clusters=4,\n init=\"k-means++\",\n n_init=10,\n max_iter=300,\n tol=0.0001,\n copy_x=True,\n algorithm=\"auto\",\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors)\n context.save(model, \"k_means\")\n train_labels = model.predict(train_descriptors)\n test_labels = model.predict(test_descriptors)\n\n context.save(train_labels, \"train_labels\")\n context.save(test_labels, \"test_labels\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"k_means\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_k_means_clustering_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a kernelized ridge-regression model with #\n# Scikit-Learn. Model parameters are derived from Scikit- #\n# Learn's defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.kernel_ridge\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.kernel_ridge.KernelRidge(\n alpha=1.0,\n kernel=\"linear\",\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"kernel_ridge\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"kernel_ridge\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_kernel_ridge_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a LASSO-regression model with Scikit- #\n# Learn. Model parameters derived from Scikit-Learn's #\n# Defaults. Alpha has been lowered from the default of 1.0, to #\n# 0.1. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.linear_model\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.linear_model.Lasso(\n alpha=0.1,\n fit_intercept=True,\n normalize=False,\n precompute=False,\n tol=0.0001,\n positive=True,\n selection=\"cyclic\",\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"LASSO\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"LASSO\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_lasso_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_mlp_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow unit for a gradient boosted classification model with #\n# Scikit-Learn. Parameters derived from sklearn's defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. #\n# #\n# When the workflow is run in Predict mode, the model is #\n# loaded, predictions are made, they are un-transformed using #\n# the trained scaler from the training run, and they are #\n# written to a filed named \"predictions.csv\" #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the model\n model = sklearn.ensemble.GradientBoostingClassifier(loss='deviance',\n learning_rate=0.1,\n n_estimators=100,\n subsample=1.0,\n criterion='friedman_mse',\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_depth=3,\n min_impurity_decrease=0.0,\n min_impurity_split=None,\n init=None,\n random_state=None,\n max_features=None,\n verbose=0,\n max_leaf_nodes=None,\n warm_start=False,\n validation_fraction=0.1,\n n_iter_no_change=None,\n tol=0.0001,\n ccp_alpha=0.0)\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"gradboosted_trees_classification\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target,\n test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n # Ensure predictions have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"gradboosted_trees_classification\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_gradboosted_trees_classification_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow unit for eXtreme Gradient-Boosted trees classification #\n# with XGBoost's wrapper to Scikit-Learn. Parameters for the #\n# estimator and ensemble are derived from sklearn defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. #\n# #\n# When the workflow is run in Predict mode, the model is #\n# loaded, predictions are made, they are un-transformed using #\n# the trained scaler from the training run, and they are #\n# written to a filed named \"predictions.csv\" #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport xgboost\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the model\n model = xgboost.XGBClassifier(booster='gbtree',\n verbosity=1,\n learning_rate=0.3,\n min_split_loss=0,\n max_depth=6,\n min_child_weight=1,\n max_delta_step=0,\n colsample_bytree=1,\n reg_lambda=1,\n reg_alpha=0,\n scale_pos_weight=1,\n objective='binary:logistic',\n eval_metric='logloss',\n use_label_encoder=False)\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"extreme_gradboosted_tree_classification\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target,\n test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n # Ensure predictions have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"extreme_gradboosted_tree_classification\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_extreme_gradboosted_trees_classification_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow for a random forest regression model with Scikit- #\n# Learn. Parameters are derived from Scikit-Learn's defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestRegressor(\n n_estimators=100,\n criterion=\"mse\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n max_samples=None,\n oob_score=False,\n ccp_alpha=0.0,\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_regression_sklearn.py"},{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a ridge regression model with Scikit- #\n# Learn. Alpha is taken from Scikit-Learn's default #\n# parameters. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.linear_model\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.linear_model.Ridge(\n alpha=1.0,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"ridge\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"ridge\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_ridge_regression_sklearn.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_parity_plot_matplotlib.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Cluster Visualization #\n# #\n# This unit takes an N-dimensional feature space, and uses #\n# Principal-component Analysis (PCA) to project into a 2D space #\n# to facilitate plotting on a scatter plot. #\n# #\n# The 2D space we project into are the first two principal #\n# components identified in PCA, which are the two vectors with #\n# the highest variance. #\n# #\n# Wikipedia Article on PCA: #\n# https://en.wikipedia.org/wiki/Principal_component_analysis #\n# #\n# We then plot the labels assigned to the train an test set, #\n# and color by class. #\n# #\n# ----------------------------------------------------------------- #\n\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport settings\nimport sklearn.decomposition\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_labels = context.load(\"train_labels\")\n train_descriptors = context.load(\"train_descriptors\")\n test_labels = context.load(\"test_labels\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Unscale the descriptors\n descriptor_scaler = context.load(\"descriptor_scaler\")\n train_descriptors = descriptor_scaler.inverse_transform(train_descriptors)\n test_descriptors = descriptor_scaler.inverse_transform(test_descriptors)\n\n # We need at least 2 dimensions, exit if the dataset is 1D\n if train_descriptors.ndim < 2:\n raise ValueError(\"The train descriptors do not have enough dimensions to be plot in 2D\")\n\n # The data could be multidimensional. Let's do some PCA to get things into 2 dimensions.\n pca = sklearn.decomposition.PCA(n_components=2)\n train_descriptors = pca.fit_transform(train_descriptors)\n test_descriptors = pca.transform(test_descriptors)\n xlabel = \"Principle Component 1\"\n ylabel = \"Principle Component 2\"\n\n # Determine the labels we're going to be using, and generate their colors\n labels = set(train_labels)\n colors = {}\n for count, label in enumerate(labels):\n cm = matplotlib.cm.get_cmap('jet', len(labels))\n color = cm(count / len(labels))\n colors[label] = color\n train_colors = [colors[label] for label in train_labels]\n test_colors = [colors[label] for label in test_labels]\n\n # Train / Test Split Visualization\n plt.title(\"Train Test Split Visualization\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=\"#33548c\", marker=\"o\", label=\"Training Set\")\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=\"#F0B332\", marker=\"o\", label=\"Testing Set\")\n xmin, xmax, ymin, ymax = plt.axis()\n plt.legend()\n plt.tight_layout()\n plt.savefig(\"train_test_split.png\", dpi=600)\n plt.close()\n\n def clusters_legend(cluster_colors):\n \"\"\"\n Helper function that creates a legend, given the coloration by clusters.\n Args:\n cluster_colors: A dictionary of the form {cluster_number : color_value}\n\n Returns:\n None; just creates the legend and puts it on the plot\n \"\"\"\n legend_symbols = []\n for group, color in cluster_colors.items():\n label = f\"Cluster {group}\"\n legend_symbols.append(matplotlib.lines.Line2D([], [], color=color, marker=\"o\",\n linewidth=0, label=label))\n plt.legend(handles=legend_symbols)\n\n # Training Set Clusters\n plt.title(\"Training Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=train_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"train_clusters.png\", dpi=600)\n plt.close()\n\n # Testing Set Clusters\n plt.title(\"Testing Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=test_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"test_clusters.png\", dpi=600)\n plt.close()\n\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_pca_2d_clusters_matplotlib.py"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py"},{"applicationName":"shell","content":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","contextProviders":[],"executableName":"sh","name":"hello_world.sh"},{"applicationName":"shell","content":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","contextProviders":[],"executableName":"sh","name":"job_espresso_pw_scf.sh"},{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_link_outdir_save.sh"},{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_collect_dynmat.sh"},{"applicationName":"shell","content":"#!/bin/bash\n\n# ------------------------------------------------------------------ #\n# This script prepares necessary directories to run VASP NEB\n# calculation. It puts initial POSCAR into directory 00, final into 0N\n# and intermediate images in 01 to 0(N-1). It is assumed that SCF\n# calculations for initial and final structures are already done in\n# previous subworkflows and their standard outputs are written into\n# \"vasp_neb_initial.out\" and \"vasp_neb_final.out\" files respectively.\n# These outputs are here copied into initial (00) and final (0N)\n# directories to calculate the reaction energy profile.\n# ------------------------------------------------------------------ #\n\n{% raw %}\ncd {{ JOB_WORK_DIR }}\n{% endraw %}\n\n# Prepare First Directory\nmkdir -p 00\ncat > 00/POSCAR < 0{{ input.INTERMEDIATE_IMAGES.length + 1 }}/POSCAR < 0{{ loop.index }}/POSCAR <=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Find Extrema","next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","head":false,"input":[{"name":"STDOUT","scope":"python-find-extrema"}],"name":"Set Average ESP Value","operand":"AVG_ESP","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['minima']"}]},"espresso/average_electrostatic_potential_via_band_structure.json":{"_id":"09f5f4ff-7dbd-59ae-ad27-5af1bdfc2bd0","application":{"name":"espresso"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure + average ESP","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"2d360607-c739-54ad-97a0-8a83f0971f2c","head":true,"input":[],"name":"Set Material Index","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"MATERIAL_INDEX","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"pw-bands-calculate-band-gap","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-bands-calculate-band-gap","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"a667d9fd-35d5-5897-be0e-fa0247233649","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","head":false,"input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap"}],"name":"Select indirect band gap","next":"08819369-b541-5b51-8a40-0ee135039482","operand":"BAND_GAP_INDIRECT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","head":false,"input":[],"name":"Set Valence Band Maximum","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","operand":"VBM","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"BAND_GAP_INDIRECT['eigenvalueValence']"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_electrostatic_potential","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Electrostatic Potential (ESP)","next":"average-electrostatic-potential","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"isDefault":false,"monitors":["standard_output"],"name":"average_potential","results":["average_potential_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"average-electrostatic-potential","head":false,"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"average ESP","next":"c6c11873-91d7-5422-8302-3dcc1ce971e9","postProcessors":[],"preProcessors":[],"results":[{"name":"average_potential_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","head":false,"input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential"}],"name":"Set Macroscopically Averaged ESP Data","operand":"array_from_context","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"average_potential_profile['yDataSeries'][1]"}]},"espresso/band_gap.json":{"_id":"233bb8cf-3b4a-5378-84d9-a6a95a2ab43d","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Gap","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_gap_hse_dos.json":{"_id":"f1341a29-777d-5ca3-8933-78a5e0d3f6f2","application":{"name":"espresso"},"model":{"functional":{"slug":"hse06"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"hybrid","type":"dft"},"name":"HSE Band Gap","properties":["atomic_forces","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","density_of_states"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_hse.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_hse","results":["atomic_forces","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"f494cdb2-304f-5da2-b979-ce3fbba3a6c4","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n ecutfock = 100\n occupations = 'smearing'\n degauss = 0.005\n input_dft='hse',\n nqx1 = {% if kgrid.dimensions[0]%2 == 0 %}{{kgrid.dimensions[0]/2}}{% else %}{{(kgrid.dimensions[0]+1)/2}}{% endif %}, nqx2 = {% if kgrid.dimensions[1]%2 == 0 %}{{kgrid.dimensions[1]/2}}{% else %}{{(kgrid.dimensions[1]+1)/2}}{% endif %}, nqx3 = {% if kgrid.dimensions[2]%2 == 0 %}{{kgrid.dimensions[2]/2}}{% else %}{{(kgrid.dimensions[2]+1)/2}}{% endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{% if d%2 == 0 %}{{d}} {% else %}{{d+1}} {% endif %}{% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf_hse.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n ecutfock = 100\n occupations = 'smearing'\n degauss = 0.005\n input_dft='hse',\n nqx1 = 1, nqx2 = 1, nqx3 = 1\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_hse","next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"band_gaps"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"projwfc","results":["density_of_states"],"schemaVersion":"2022.8.16"},"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","head":false,"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"projwfc","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_structure.json":{"_id":"26d32e68-c2b5-50e9-8933-15f684fcc039","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"d618df45-5af3-5da5-8882-d74a27e00b04","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_structure_dos.json":{"_id":"fa594399-6b98-5d79-986c-0713601dc06c","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure + Density of States","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps","density_of_states"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"d618df45-5af3-5da5-8882-d74a27e00b04","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"projwfc","results":["density_of_states"],"schemaVersion":"2022.8.16"},"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","head":false,"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"projwfc","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_structure_hse.json":{"_id":"ef3089f3-7460-56f2-9aa2-172d5339d3be","application":{"name":"espresso"},"model":{"functional":{"slug":"hse06"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"hybrid","type":"dft"},"name":"Band Structure - HSE","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_bands_hse.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_bands_hse","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"08bd7e4a-2454-53b7-8cc9-9a95975f7e6f","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n input_dft = 'hse',\n {% for d in qgrid.dimensions -%}\n nqx{{loop.index}} = {{d}}\n {% endfor %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal\n{{ '{{' }} {{ explicitKPath.length }} {% raw %} + KPOINTS|length {% endraw %} {{ '}}' }}\n{% raw %}\n{% for point in KPOINTS -%}\n {% for d in point.coordinates %}{{ \"%14.9f\"|format(d) }} {% endfor -%}{{ point.weight }}\n{% endfor %}\n{% endraw %}\n{% for point in explicitKPath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}0.0000001\n{% endfor %}\n","contextProviders":[{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPathFormDataManager"}],"executableName":"pw.x","name":"pw_scf_bands_hse.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n input_dft = 'hse',\n nqx1 = 1\n nqx2 = 1\n nqx3 = 1\n \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal\n{{ 101 + KPOINTS|length }}\n\n{% for point in KPOINTS -%}\n {% for d in point.coordinates %}{{ \"%14.9f\"|format(d) }} {% endfor -%}{{ point.weight }}\n{% endfor %}\n\n 0.000000000 0.000000000 0.000000000 0.0000001\n 0.050000000 0.000000000 0.050000000 0.0000001\n 0.100000000 0.000000000 0.100000000 0.0000001\n 0.150000000 0.000000000 0.150000000 0.0000001\n 0.200000000 0.000000000 0.200000000 0.0000001\n 0.250000000 0.000000000 0.250000000 0.0000001\n 0.300000000 0.000000000 0.300000000 0.0000001\n 0.350000000 0.000000000 0.350000000 0.0000001\n 0.400000000 0.000000000 0.400000000 0.0000001\n 0.450000000 0.000000000 0.450000000 0.0000001\n 0.500000000 0.000000000 0.500000000 0.0000001\n 0.500000000 0.025000000 0.525000000 0.0000001\n 0.500000000 0.050000000 0.550000000 0.0000001\n 0.500000000 0.075000000 0.575000000 0.0000001\n 0.500000000 0.100000000 0.600000000 0.0000001\n 0.500000000 0.125000000 0.625000000 0.0000001\n 0.500000000 0.150000000 0.650000000 0.0000001\n 0.500000000 0.175000000 0.675000000 0.0000001\n 0.500000000 0.200000000 0.700000000 0.0000001\n 0.500000000 0.225000000 0.725000000 0.0000001\n 0.500000000 0.250000000 0.750000000 0.0000001\n 0.487500000 0.262500000 0.750000000 0.0000001\n 0.475000000 0.275000000 0.750000000 0.0000001\n 0.462500000 0.287500000 0.750000000 0.0000001\n 0.450000000 0.300000000 0.750000000 0.0000001\n 0.437500000 0.312500000 0.750000000 0.0000001\n 0.425000000 0.325000000 0.750000000 0.0000001\n 0.412500000 0.337500000 0.750000000 0.0000001\n 0.400000000 0.350000000 0.750000000 0.0000001\n 0.387500000 0.362500000 0.750000000 0.0000001\n 0.375000000 0.375000000 0.750000000 0.0000001\n 0.337500000 0.337500000 0.675000000 0.0000001\n 0.300000000 0.300000000 0.600000000 0.0000001\n 0.262500000 0.262500000 0.525000000 0.0000001\n 0.225000000 0.225000000 0.450000000 0.0000001\n 0.187500000 0.187500000 0.375000000 0.0000001\n 0.150000000 0.150000000 0.300000000 0.0000001\n 0.112500000 0.112500000 0.225000000 0.0000001\n 0.075000000 0.075000000 0.150000000 0.0000001\n 0.037500000 0.037500000 0.075000000 0.0000001\n 0.000000000 0.000000000 0.000000000 0.0000001\n 0.050000000 0.050000000 0.050000000 0.0000001\n 0.100000000 0.100000000 0.100000000 0.0000001\n 0.150000000 0.150000000 0.150000000 0.0000001\n 0.200000000 0.200000000 0.200000000 0.0000001\n 0.250000000 0.250000000 0.250000000 0.0000001\n 0.300000000 0.300000000 0.300000000 0.0000001\n 0.350000000 0.350000000 0.350000000 0.0000001\n 0.400000000 0.400000000 0.400000000 0.0000001\n 0.450000000 0.450000000 0.450000000 0.0000001\n 0.500000000 0.500000000 0.500000000 0.0000001\n 0.512500000 0.475000000 0.512500000 0.0000001\n 0.525000000 0.450000000 0.525000000 0.0000001\n 0.537500000 0.425000000 0.537500000 0.0000001\n 0.550000000 0.400000000 0.550000000 0.0000001\n 0.562500000 0.375000000 0.562500000 0.0000001\n 0.575000000 0.350000000 0.575000000 0.0000001\n 0.587500000 0.325000000 0.587500000 0.0000001\n 0.600000000 0.300000000 0.600000000 0.0000001\n 0.612500000 0.275000000 0.612500000 0.0000001\n 0.625000000 0.250000000 0.625000000 0.0000001\n 0.612500000 0.250000000 0.637500000 0.0000001\n 0.600000000 0.250000000 0.650000000 0.0000001\n 0.587500000 0.250000000 0.662500000 0.0000001\n 0.575000000 0.250000000 0.675000000 0.0000001\n 0.562500000 0.250000000 0.687500000 0.0000001\n 0.550000000 0.250000000 0.700000000 0.0000001\n 0.537500000 0.250000000 0.712500000 0.0000001\n 0.525000000 0.250000000 0.725000000 0.0000001\n 0.512500000 0.250000000 0.737500000 0.0000001\n 0.500000000 0.250000000 0.750000000 0.0000001\n 0.500000000 0.275000000 0.725000000 0.0000001\n 0.500000000 0.300000000 0.700000000 0.0000001\n 0.500000000 0.325000000 0.675000000 0.0000001\n 0.500000000 0.350000000 0.650000000 0.0000001\n 0.500000000 0.375000000 0.625000000 0.0000001\n 0.500000000 0.400000000 0.600000000 0.0000001\n 0.500000000 0.425000000 0.575000000 0.0000001\n 0.500000000 0.450000000 0.550000000 0.0000001\n 0.500000000 0.475000000 0.525000000 0.0000001\n 0.500000000 0.500000000 0.500000000 0.0000001\n 0.512500000 0.475000000 0.512500000 0.0000001\n 0.525000000 0.450000000 0.525000000 0.0000001\n 0.537500000 0.425000000 0.537500000 0.0000001\n 0.550000000 0.400000000 0.550000000 0.0000001\n 0.562500000 0.375000000 0.562500000 0.0000001\n 0.575000000 0.350000000 0.575000000 0.0000001\n 0.587500000 0.325000000 0.587500000 0.0000001\n 0.600000000 0.300000000 0.600000000 0.0000001\n 0.612500000 0.275000000 0.612500000 0.0000001\n 0.625000000 0.250000000 0.625000000 0.0000001\n 0.612500000 0.225000000 0.612500000 0.0000001\n 0.600000000 0.200000000 0.600000000 0.0000001\n 0.587500000 0.175000000 0.587500000 0.0000001\n 0.575000000 0.150000000 0.575000000 0.0000001\n 0.562500000 0.125000000 0.562500000 0.0000001\n 0.550000000 0.100000000 0.550000000 0.0000001\n 0.537500000 0.075000000 0.537500000 0.0000001\n 0.525000000 0.050000000 0.525000000 0.0000001\n 0.512500000 0.025000000 0.512500000 0.0000001\n 0.500000000 0.000000000 0.500000000 0.0000001\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_bands_hse","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_structure_magn.json":{"_id":"4a7dced1-224e-57d7-a616-cbad99062c7b","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Spin magnetic bandstructure","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_magn.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_magn","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"c229d2a0-3c19-5f13-b3e0-ceb86cb9fbc1","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n nspin = 2\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if collinearMagnetization.isTotalMagnetization %}\n tot_magnetization = {{ collinearMagnetization.totalMagnetization }}\n{%- else %}\n{%- for item in collinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"CollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_scf_magn.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n nspin = 2\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_magn","next":"ea06c333-0cc7-51d4-bd98-cc53fa0844d1","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands_magn.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands_magn","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"ea06c333-0cc7-51d4-bd98-cc53fa0844d1","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n nspin = 2\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if collinearMagnetization.isTotalMagnetization %}\n tot_magnetization = {{ collinearMagnetization.totalMagnetization }}\n{%- else %}\n{%- for item in collinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"CollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_bands_magn.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n nspin = 2\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands_magn","next":"a8e4de4b-1f55-50e8-a712-ce0b37c04752","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands_spin_up.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands_spin_up","schemaVersion":"2022.8.16"},"flowchartId":"a8e4de4b-1f55-50e8-a712-ce0b37c04752","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands_up.dat'{% endraw %}\n spin_component = 1\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands_spin_up.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands_up.dat'\n spin_component = 1\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands_spin_up","next":"fd937050-a3f3-5d4d-bb50-d150a93ea5e0","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands_spin_dn.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands_spin_dn","schemaVersion":"2022.8.16"},"flowchartId":"fd937050-a3f3-5d4d-bb50-d150a93ea5e0","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands_dn.dat'{% endraw %}\n spin_component = 2\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands_spin_dn.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands_dn.dat'\n spin_component = 2\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands_spin_dn","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_structure_soc.json":{"_id":"51e6fb82-538a-58ee-8d4e-991c8446f657","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{"searchText":"nc-fr"},"subtype":"nc-fr","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Spin orbit coupling bandstructure","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_soc.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_soc","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"74ec024a-f247-5f15-9c21-cc169bcb62c7","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n{%- if nonCollinearMagnetization.isStartingMagnetization %}\n{%- for item in nonCollinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization %}\n constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'\n lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}\n fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}\n fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}\n fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}\n lforcet = .true.\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and not nonCollinearMagnetization.lforcet %}\n lforcet = .false.\n{%- endif %}\n{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}\n{%- for item in nonCollinearMagnetization.spinAngles %}\n angle1({{ item.index }}) = {{ item.angle1 }}\n angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n{%- if nonCollinearMagnetization.isExistingChargeDensity %}\n startingpot = 'file'\n{%- endif %}\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"NonCollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_scf_soc.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_soc","next":"cee6ae30-cf34-5138-bdc5-5c57c2a6de5b","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands_soc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands_soc","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"cee6ae30-cf34-5138-bdc5-5c57c2a6de5b","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n{%- if nonCollinearMagnetization.isStartingMagnetization %}\n{%- for item in nonCollinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization %}\n constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'\n lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}\n fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}\n fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}\n fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}\n lforcet = .true.\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and not nonCollinearMagnetization.lforcet %}\n lforcet = .false.\n{%- endif %}\n{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}\n{%- for item in nonCollinearMagnetization.spinAngles %}\n angle1({{ item.index }}) = {{ item.angle1 }}\n angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"NonCollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_bands_soc.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands_soc","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/dielectric_tensor.json":{"_id":"38340b52-83ad-5862-bc18-c140bdc0cb72","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"nc","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Compute Dielectric Function","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps","dielectric_tensor"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"3b230ec3-0791-52f7-a4db-625390b8718f","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"3b230ec3-0791-52f7-a4db-625390b8718f","head":false,"input":[],"name":"Set No-Symmetry Flag","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","operand":"NO_SYMMETRY_NO_INVERSION","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":true},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","next":"8c2ec8bd-cdbf-54a0-a217-64a7a26eaebb","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"epsilon.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"epsilon.x","input":[{"name":"epsilon.in"}],"isDefault":false,"monitors":["standard_output"],"name":"dielectric_tensor","results":["dielectric_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"8c2ec8bd-cdbf-54a0-a217-64a7a26eaebb","head":false,"input":[{"applicationName":"espresso","content":"&inputpp\n calculation = \"eps\"\n prefix = \"__prefix__\"\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n\n&energy_grid\n smeartype = \"gauss\"\n intersmear = 0.2\n intrasmear = 0.0\n wmin = 0.0\n wmax = 30.0\n nw = 500\n shift = 0.0\n/\n","contextProviders":[],"executableName":"epsilon.x","name":"epsilon.in","rendered":"&inputpp\n calculation = \"eps\"\n prefix = \"__prefix__\"\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n\n&energy_grid\n smeartype = \"gauss\"\n intersmear = 0.2\n intrasmear = 0.0\n wmin = 0.0\n wmax = 30.0\n nw = 500\n shift = 0.0\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Compute dielectric function","postProcessors":[],"preProcessors":[],"results":[{"name":"dielectric_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/dos.json":{"_id":"2cf317f3-3306-5a96-bc9b-e9103ebcd5be","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Density of States","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps","density_of_states"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"projwfc","results":["density_of_states"],"schemaVersion":"2022.8.16"},"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","head":false,"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"projwfc","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/electronic_density_mesh.json":{"_id":"e2749c5a-fcd9-589c-819b-8b88c5c90924","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Electronic Density Mesh","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"e1a6e1e9-7994-5cd0-98d7-ae8909a10061","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_density.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_density","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"e1a6e1e9-7994-5cd0-98d7-ae8909a10061","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 0\n/\n&PLOT\n iflag = 3\n output_format = 5\n fileout ='density.xsf'\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_density.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 0\n/\n&PLOT\n iflag = 3\n output_format = 5\n fileout ='density.xsf'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pp_density","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/esm.json":{"_id":"0de669f6-a455-5dae-b331-19dc85f7090f","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Effective Screening Medium (ESM)","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_esm.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_esm","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"2f487bc6-c237-53e4-bad5-be60369662cb","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = '{{ boundaryConditions.type }}'\n fcp_mu = {{ boundaryConditions.targetFermiEnergy }}\n esm_w = {{ boundaryConditions.offset }}\n esm_efield = {{ boundaryConditions.electricField }}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"BoundaryConditionsFormDataManager"}],"executableName":"pw.x","name":"pw_esm.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = 'pbc'\n fcp_mu = 0\n esm_w = 0\n esm_efield = 0\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_esm","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"potential_profile"},{"name":"charge_density_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/esm_relax.json":{"_id":"69728792-afeb-50aa-9b4e-6974a90f676a","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Effective Screening Medium (ESM) Relax","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_esm_relax.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_esm_relax","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"a2bec506-1fdd-5125-a787-85f31cde20c1","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'relax'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = '{{ boundaryConditions.type }}'\n fcp_mu = {{ boundaryConditions.targetFermiEnergy }}\n esm_w = {{ boundaryConditions.offset }}\n esm_efield = {{ boundaryConditions.electricField }}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"BoundaryConditionsFormDataManager"}],"executableName":"pw.x","name":"pw_esm_relax.in","rendered":"&CONTROL\n calculation = 'relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = 'pbc'\n fcp_mu = 0\n esm_w = 0\n esm_efield = 0\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_esm_relax","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"potential_profile"},{"name":"charge_density_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/espresso_extract_kpoints.json":{"_id":"a2785cc5-2427-5c7a-b30f-7077475b948c","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Extract KPOINTS","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"espresso_extract_kpoints.py"},{"name":"requirements.txt","templateName":"requirements_empty.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_extract_kpoints","schemaVersion":"2022.8.16"},"flowchartId":"a716b133-2d04-50b5-b497-100265e3fa24","head":true,"input":[{"applicationName":"python","content":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_extract_kpoints.py","rendered":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Please add any packages required for this unit below following #\n# the requirements.txt specification: #\n# https://pip.pypa.io/en/stable/reference/requirements-file-format/ #\n# ------------------------------------------------------------------ #\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Please add any packages required for this unit below following #\n# the requirements.txt specification: #\n# https://pip.pypa.io/en/stable/reference/requirements-file-format/ #\n# ------------------------------------------------------------------ #\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Extract kpoints","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/espresso_xml_get_qpt_irr.json":{"_id":"e4b6b2e7-7d8f-5ae1-b6bd-ee81ecbca11a","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"espresso-xml-get-qpt-irr","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"espresso_xml_get_qpt_irr.py"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_xml_get_qpt_irr","schemaVersion":"2022.8.16"},"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n{# JOB_WORK_DIR will be initialized at runtime => avoid substituion below #}\n{% raw %}\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n{% endraw %}\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_xml_get_qpt_irr.py","rendered":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n\n\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"python","next":"d0fd8654-2106-546b-8792-7bb46272befc","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"d0fd8654-2106-546b-8792-7bb46272befc","head":false,"input":[{"name":"STDOUT","scope":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219"}],"name":"assignment","operand":"Q_POINTS","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)"}]},"espresso/fixed_cell_relaxation.json":{"_id":"fb75e249-5489-5146-bd8a-786d33330d9c","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Fixed-cell Relaxation","properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_relax.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"pw_relax","results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"c42871f6-ab79-5987-b228-c3bd80f16ffd","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'relax'\n nstep = 50\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_relax.in","rendered":"&CONTROL\n calculation = 'relax'\n nstep = 50\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"pw_relax","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/gw_band_structure_band_gap_full_frequency.json":{"_id":"46bcdcc8-628e-518e-b8c3-9bf38d7a2aef","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{"searchText":".*dojo-oncv.*"},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Full Frequency GW Band Structure + Band Gap","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"d82a9858-3f20-5fcd-baeb-0f1d65e9e22e","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"gw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"gw.x","input":[{"name":"gw_bands_full_frequency.in"}],"isDefault":false,"monitors":["standard_output"],"name":"gw_bands_full_frequency","results":["band_structure","fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"d82a9858-3f20-5fcd-baeb-0f1d65e9e22e","head":false,"input":[{"applicationName":"espresso","content":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n\n ! the grid used for the linear response\n kpt_grid = {{ kgrid.dimensions|join(', ') }}\n qpt_grid = {{ qgrid.dimensions|join(', ') }}\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of W in the convolution\n max_freq_coul = 200\n num_freq_coul = 51\n\n ! configuration for the correlation self energy\n ecut_corr = 6.0\n\n ! configuration for the exchange self energy\n ecut_exch = 15.0\n/\n\n&gw_output\n/\n\nFREQUENCIES\n35\n 0.0 0.0\n 0.0 0.3\n 0.0 0.9\n 0.0 1.8\n 0.0 3.0\n 0.0 4.5\n 0.0 6.3\n 0.0 8.4\n 0.0 10.8\n 0.0 13.5\n 0.0 16.5\n 0.0 19.8\n 0.0 23.4\n 0.0 27.3\n 0.0 31.5\n 0.0 36.0\n 0.0 40.8\n 0.0 45.9\n 0.0 51.3\n 0.0 57.0\n 0.0 63.0\n 0.0 69.3\n 0.0 75.9\n 0.0 82.8\n 0.0 90.0\n 0.0 97.5\n 0.0 105.3\n 0.0 113.4\n 0.0 121.8\n 0.0 130.5\n 0.0 139.5\n 0.0 148.8\n 0.0 158.4\n 0.0 168.3\n 0.0 178.5\n/\n\nK_points\n{{ explicitKPath2PIBA.length }}\n{% for point in explicitKPath2PIBA -%}\n{% for coordinate in point.coordinates %}{{ coordinate }}{% endfor %}\n{% endfor %}\n/\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPath2PIBAFormDataManager"}],"executableName":"gw.x","name":"gw_bands_full_frequency.in","rendered":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n\n ! the grid used for the linear response\n kpt_grid = 2, 2, 2\n qpt_grid = 1, 1, 1\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of W in the convolution\n max_freq_coul = 200\n num_freq_coul = 51\n\n ! configuration for the correlation self energy\n ecut_corr = 6.0\n\n ! configuration for the exchange self energy\n ecut_exch = 15.0\n/\n\n&gw_output\n/\n\nFREQUENCIES\n35\n 0.0 0.0\n 0.0 0.3\n 0.0 0.9\n 0.0 1.8\n 0.0 3.0\n 0.0 4.5\n 0.0 6.3\n 0.0 8.4\n 0.0 10.8\n 0.0 13.5\n 0.0 16.5\n 0.0 19.8\n 0.0 23.4\n 0.0 27.3\n 0.0 31.5\n 0.0 36.0\n 0.0 40.8\n 0.0 45.9\n 0.0 51.3\n 0.0 57.0\n 0.0 63.0\n 0.0 69.3\n 0.0 75.9\n 0.0 82.8\n 0.0 90.0\n 0.0 97.5\n 0.0 105.3\n 0.0 113.4\n 0.0 121.8\n 0.0 130.5\n 0.0 139.5\n 0.0 148.8\n 0.0 158.4\n 0.0 168.3\n 0.0 178.5\n/\n\nK_points\n101\n 0.000000000 0.000000000 0.000000000\n 0.028867513 -0.040824829 0.050000000\n 0.057735027 -0.081649658 0.100000000\n 0.086602540 -0.122474487 0.150000000\n 0.115470054 -0.163299316 0.200000000\n 0.144337567 -0.204124145 0.250000000\n 0.173205081 -0.244948974 0.300000000\n 0.202072594 -0.285773803 0.350000000\n 0.230940108 -0.326598632 0.400000000\n 0.259807621 -0.367423461 0.450000000\n 0.288675135 -0.408248290 0.500000000\n 0.274241378 -0.387835876 0.525000000\n 0.259807621 -0.367423461 0.550000000\n 0.245373864 -0.347011047 0.575000000\n 0.230940108 -0.326598632 0.600000000\n 0.216506351 -0.306186218 0.625000000\n 0.202072594 -0.285773803 0.650000000\n 0.187638837 -0.265361389 0.675000000\n 0.173205081 -0.244948974 0.700000000\n 0.158771324 -0.224536560 0.725000000\n 0.144337567 -0.204124145 0.750000000\n 0.129903811 -0.183711731 0.750000000\n 0.115470054 -0.163299316 0.750000000\n 0.101036297 -0.142886902 0.750000000\n 0.086602540 -0.122474487 0.750000000\n 0.072168784 -0.102062073 0.750000000\n 0.057735027 -0.081649658 0.750000000\n 0.043301270 -0.061237244 0.750000000\n 0.028867513 -0.040824829 0.750000000\n 0.014433757 -0.020412415 0.750000000\n -0.000000000 -0.000000000 0.750000000\n -0.000000000 -0.000000000 0.675000000\n -0.000000000 -0.000000000 0.600000000\n -0.000000000 -0.000000000 0.525000000\n -0.000000000 -0.000000000 0.450000000\n -0.000000000 -0.000000000 0.375000000\n -0.000000000 -0.000000000 0.300000000\n -0.000000000 -0.000000000 0.225000000\n -0.000000000 -0.000000000 0.150000000\n -0.000000000 -0.000000000 0.075000000\n 0.000000000 0.000000000 0.000000000\n 0.028867513 0.020412415 0.050000000\n 0.057735027 0.040824829 0.100000000\n 0.086602540 0.061237244 0.150000000\n 0.115470054 0.081649658 0.200000000\n 0.144337567 0.102062073 0.250000000\n 0.173205081 0.122474487 0.300000000\n 0.202072594 0.142886902 0.350000000\n 0.230940108 0.163299316 0.400000000\n 0.259807621 0.183711731 0.450000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.339193283 -0.204124145 0.637500000\n 0.317542648 -0.204124145 0.650000000\n 0.295892013 -0.204124145 0.662500000\n 0.274241378 -0.204124145 0.675000000\n 0.252590743 -0.204124145 0.687500000\n 0.230940108 -0.204124145 0.700000000\n 0.209289473 -0.204124145 0.712500000\n 0.187638837 -0.204124145 0.725000000\n 0.165988202 -0.204124145 0.737500000\n 0.144337567 -0.204124145 0.750000000\n 0.158771324 -0.163299316 0.725000000\n 0.173205081 -0.122474487 0.700000000\n 0.187638837 -0.081649658 0.675000000\n 0.202072594 -0.040824829 0.650000000\n 0.216506351 -0.000000000 0.625000000\n 0.230940108 0.040824829 0.600000000\n 0.245373864 0.081649658 0.575000000\n 0.259807621 0.122474487 0.550000000\n 0.274241378 0.163299316 0.525000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.353627040 -0.224536560 0.612500000\n 0.346410162 -0.244948974 0.600000000\n 0.339193283 -0.265361389 0.587500000\n 0.331976405 -0.285773803 0.575000000\n 0.324759526 -0.306186218 0.562500000\n 0.317542648 -0.326598632 0.550000000\n 0.310325770 -0.347011047 0.537500000\n 0.303108891 -0.367423461 0.525000000\n 0.295892013 -0.387835876 0.512500000\n 0.288675135 -0.408248290 0.500000000\n\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"gw_bands_full_frequency","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"},{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/gw_band_structure_band_gap_plasmon_pole.json":{"_id":"72b79a87-8eef-5fe2-9d6c-6c9c256dd56c","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{"searchText":".*dojo-oncv.*"},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Plasmon-Pole GW Band Structure + Band Gap","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"f9910952-eca9-5a5f-ae03-a0060ae2fc78","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"gw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"gw.x","input":[{"name":"gw_bands_plasmon_pole.in"}],"isDefault":false,"monitors":["standard_output"],"name":"gw_bands_plasmon_pole","results":["band_structure","fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"f9910952-eca9-5a5f-ae03-a0060ae2fc78","head":false,"input":[{"applicationName":"espresso","content":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n\n ! the grid used for the linear response\n kpt_grid = {{ kgrid.dimensions|join(', ') }}\n qpt_grid = {{ qgrid.dimensions|join(', ') }}\n\n ! truncation (used for both correlation and exchange)\n truncation = '2d'\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of the Coulomb solver\n thres_coul = 1.0d-2\n\n ! configuration of W in the convolution\n model_coul = 'godby-needs'\n max_freq_coul = 120\n num_freq_coul = 35\n\n ! configuration of the Green solver\n thres_green = 1.0d-3\n max_iter_green = 300\n\n ! configuration for the correlation self energy\n ecut_corr = 5.0\n max_freq_corr = 100.0\n num_freq_corr = 11\n\n ! configuration for the exchange self energy\n ecut_exch = 20.0\n\n ! configuration for the output\n eta = 0.1\n min_freq_wind = -30.0\n max_freq_wind = 30.0\n num_freq_wind = 601\n/\n\n&gw_output\n/\n\nFREQUENCIES\n2\n 0.0 0.0\n 0.0 10.0\n/\n\nK_points\n{{ explicitKPath2PIBA.length }}\n{% for point in explicitKPath2PIBA -%}\n{% for coordinate in point.coordinates %}{{ coordinate }}{% endfor %}\n{% endfor %}\n/\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPath2PIBAFormDataManager"}],"executableName":"gw.x","name":"gw_bands_plasmon_pole.in","rendered":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n\n ! the grid used for the linear response\n kpt_grid = 2, 2, 2\n qpt_grid = 1, 1, 1\n\n ! truncation (used for both correlation and exchange)\n truncation = '2d'\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of the Coulomb solver\n thres_coul = 1.0d-2\n\n ! configuration of W in the convolution\n model_coul = 'godby-needs'\n max_freq_coul = 120\n num_freq_coul = 35\n\n ! configuration of the Green solver\n thres_green = 1.0d-3\n max_iter_green = 300\n\n ! configuration for the correlation self energy\n ecut_corr = 5.0\n max_freq_corr = 100.0\n num_freq_corr = 11\n\n ! configuration for the exchange self energy\n ecut_exch = 20.0\n\n ! configuration for the output\n eta = 0.1\n min_freq_wind = -30.0\n max_freq_wind = 30.0\n num_freq_wind = 601\n/\n\n&gw_output\n/\n\nFREQUENCIES\n2\n 0.0 0.0\n 0.0 10.0\n/\n\nK_points\n101\n 0.000000000 0.000000000 0.000000000\n 0.028867513 -0.040824829 0.050000000\n 0.057735027 -0.081649658 0.100000000\n 0.086602540 -0.122474487 0.150000000\n 0.115470054 -0.163299316 0.200000000\n 0.144337567 -0.204124145 0.250000000\n 0.173205081 -0.244948974 0.300000000\n 0.202072594 -0.285773803 0.350000000\n 0.230940108 -0.326598632 0.400000000\n 0.259807621 -0.367423461 0.450000000\n 0.288675135 -0.408248290 0.500000000\n 0.274241378 -0.387835876 0.525000000\n 0.259807621 -0.367423461 0.550000000\n 0.245373864 -0.347011047 0.575000000\n 0.230940108 -0.326598632 0.600000000\n 0.216506351 -0.306186218 0.625000000\n 0.202072594 -0.285773803 0.650000000\n 0.187638837 -0.265361389 0.675000000\n 0.173205081 -0.244948974 0.700000000\n 0.158771324 -0.224536560 0.725000000\n 0.144337567 -0.204124145 0.750000000\n 0.129903811 -0.183711731 0.750000000\n 0.115470054 -0.163299316 0.750000000\n 0.101036297 -0.142886902 0.750000000\n 0.086602540 -0.122474487 0.750000000\n 0.072168784 -0.102062073 0.750000000\n 0.057735027 -0.081649658 0.750000000\n 0.043301270 -0.061237244 0.750000000\n 0.028867513 -0.040824829 0.750000000\n 0.014433757 -0.020412415 0.750000000\n -0.000000000 -0.000000000 0.750000000\n -0.000000000 -0.000000000 0.675000000\n -0.000000000 -0.000000000 0.600000000\n -0.000000000 -0.000000000 0.525000000\n -0.000000000 -0.000000000 0.450000000\n -0.000000000 -0.000000000 0.375000000\n -0.000000000 -0.000000000 0.300000000\n -0.000000000 -0.000000000 0.225000000\n -0.000000000 -0.000000000 0.150000000\n -0.000000000 -0.000000000 0.075000000\n 0.000000000 0.000000000 0.000000000\n 0.028867513 0.020412415 0.050000000\n 0.057735027 0.040824829 0.100000000\n 0.086602540 0.061237244 0.150000000\n 0.115470054 0.081649658 0.200000000\n 0.144337567 0.102062073 0.250000000\n 0.173205081 0.122474487 0.300000000\n 0.202072594 0.142886902 0.350000000\n 0.230940108 0.163299316 0.400000000\n 0.259807621 0.183711731 0.450000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.339193283 -0.204124145 0.637500000\n 0.317542648 -0.204124145 0.650000000\n 0.295892013 -0.204124145 0.662500000\n 0.274241378 -0.204124145 0.675000000\n 0.252590743 -0.204124145 0.687500000\n 0.230940108 -0.204124145 0.700000000\n 0.209289473 -0.204124145 0.712500000\n 0.187638837 -0.204124145 0.725000000\n 0.165988202 -0.204124145 0.737500000\n 0.144337567 -0.204124145 0.750000000\n 0.158771324 -0.163299316 0.725000000\n 0.173205081 -0.122474487 0.700000000\n 0.187638837 -0.081649658 0.675000000\n 0.202072594 -0.040824829 0.650000000\n 0.216506351 -0.000000000 0.625000000\n 0.230940108 0.040824829 0.600000000\n 0.245373864 0.081649658 0.575000000\n 0.259807621 0.122474487 0.550000000\n 0.274241378 0.163299316 0.525000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.353627040 -0.224536560 0.612500000\n 0.346410162 -0.244948974 0.600000000\n 0.339193283 -0.265361389 0.587500000\n 0.331976405 -0.285773803 0.575000000\n 0.324759526 -0.306186218 0.562500000\n 0.317542648 -0.326598632 0.550000000\n 0.310325770 -0.347011047 0.537500000\n 0.303108891 -0.367423461 0.525000000\n 0.295892013 -0.387835876 0.512500000\n 0.288675135 -0.408248290 0.500000000\n\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"gw_bands_plasmon_pole","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"},{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/kpoint_convergence.json":{"_id":"ff6a8fbc-2202-5786-9a26-67c843417d0b","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"K-point Convergence","properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-tolerance","head":true,"input":[],"name":"Init tolerance","next":"init-increment","operand":"TOL","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0.00001},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-increment","head":false,"input":[],"name":"Init increment","next":"init-result","operand":"INC","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-result","head":false,"input":[],"name":"Init result","next":"init-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-parameter","head":false,"input":[],"name":"Init parameter","next":"pwscf-kpoint-convergence","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_kpt_conv.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_kpt_conv","results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"pwscf-kpoint-convergence","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}} 0 0 0{% endraw %}\n","contextProviders":[{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf_kpt_conv.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}} 0 0 0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_kpt_conv","next":"store-result","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"store-result","head":false,"input":[{"name":"total_energy","scope":"pwscf-kpoint-convergence"}],"name":"store result","next":"check-convergence","operand":"RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"else":"update-result","flowchartId":"check-convergence","head":false,"input":[],"maxOccurrences":50,"name":"check convergence","next":"update-result","postProcessors":[],"preProcessors":[],"results":[],"statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","status":"idle","statusTrack":[],"tags":[],"then":"convergence-is-reached","type":"condition"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"update-result","head":false,"input":[{"name":"RESULT","scope":"global"}],"name":"update result","next":"increment-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"RESULT"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"increment-parameter","head":false,"input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"name":"increment parameter","next":"pwscf-kpoint-convergence","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER+INC"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"convergence-is-reached","head":false,"input":[{"name":"PARAMETER","scope":"global"}],"name":"exit","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER"}]},"espresso/neb.json":{"_id":"c9034468-df28-5357-8912-02226f919042","application":{"name":"espresso"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Nudged Elastic Band (NEB)","properties":["reaction_energy_barrier","reaction_energy_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"neb.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"neb.x","input":[{"name":"neb.in"}],"isDefault":false,"monitors":["standard_output"],"name":"neb","results":["reaction_energy_barrier","reaction_energy_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"9f273ca0-d240-5b1f-89a9-64dd579304ac","head":true,"input":[{"applicationName":"espresso","content":"BEGIN\nBEGIN_PATH_INPUT\n&PATH\n restart_mode = 'from_scratch'\n string_method = 'neb',\n nstep_path = 50,\n ds = 2.D0,\n opt_scheme = \"broyden\",\n num_of_images = {{ 2 + (input.INTERMEDIATE_IMAGES.length or neb.nImages) }},\n k_max = 0.3D0,\n k_min = 0.2D0,\n CI_scheme = \"auto\",\n path_thr = 0.1D0,\n/\nEND_PATH_INPUT\nBEGIN_ENGINE_INPUT\n&CONTROL\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.03\n nspin = 2\n starting_magnetization = 0.5\n/\n&ELECTRONS\n conv_thr = 1.D-8\n mixing_beta = 0.3\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nBEGIN_POSITIONS\nFIRST_IMAGE\nATOMIC_POSITIONS crystal\n{{ input.FIRST_IMAGE }}\n{%- for IMAGE in input.INTERMEDIATE_IMAGES %}\nINTERMEDIATE_IMAGE\nATOMIC_POSITIONS crystal\n{{ IMAGE }}\n{%- endfor %}\nLAST_IMAGE\nATOMIC_POSITIONS crystal\n{{ input.LAST_IMAGE }}\nEND_POSITIONS\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\nEND_ENGINE_INPUT\nEND\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"NEBFormDataManager"},{"name":"QENEBInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"neb.x","name":"neb.in","rendered":"BEGIN\nBEGIN_PATH_INPUT\n&PATH\n restart_mode = 'from_scratch'\n string_method = 'neb',\n nstep_path = 50,\n ds = 2.D0,\n opt_scheme = \"broyden\",\n num_of_images = 3,\n k_max = 0.3D0,\n k_min = 0.2D0,\n CI_scheme = \"auto\",\n path_thr = 0.1D0,\n/\nEND_PATH_INPUT\nBEGIN_ENGINE_INPUT\n&CONTROL\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.03\n nspin = 2\n starting_magnetization = 0.5\n/\n&ELECTRONS\n conv_thr = 1.D-8\n mixing_beta = 0.3\n/\nATOMIC_SPECIES\nSi 28.0855 \nBEGIN_POSITIONS\nFIRST_IMAGE\nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nLAST_IMAGE\nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nEND_POSITIONS\nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \nEND_ENGINE_INPUT\nEND\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"neb","postProcessors":[],"preProcessors":[],"results":[{"name":"reaction_energy_barrier"},{"name":"reaction_energy_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/ph_init_qpoints.json":{"_id":"2f017bcb-f4ba-55b8-b939-1f780679a88e","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"ph-init-qpoints","properties":[],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_init_qpoints.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_init_qpoints","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"b8ea6a33-38f3-5434-b17e-b5eae8fff9fc","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .false.\n start_irr = 0\n last_irr = 0\n ldisp = .true.\n fildyn = 'dyn0'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_init_qpoints.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .false.\n start_irr = 0\n last_irr = 0\n ldisp = .true.\n fildyn = 'dyn0'\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_init_qpoints","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/ph_single_irr_qpt.json":{"_id":"e68db280-8636-53e3-81a0-88396ba6147d","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"ph-single-irr-qpt","properties":[],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_single_irr_qpt.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_single_irr_qpt","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"8db9af08-d935-57a0-a824-e7db6d936de8","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n {% raw %}\n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n {% endraw %}\n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_SCRATCH_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_single_irr_qpt.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n \n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n \n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = '{{ JOB_SCRATCH_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_single_irr_qpt","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/phonon_dispersions.json":{"_id":"bfb69b48-8fbf-5a0d-8949-448f20754766","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Phonon Dispersions","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos","phonon_dispersions"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"13bcafce-56ef-5b47-b079-317495eb6933","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"a7fded20-889b-54fc-bbb0-456e82689ab1","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_path","results":["phonon_dispersions"],"schemaVersion":"2022.8.16"},"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_path","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dispersions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/phonon_dos.json":{"_id":"2232051b-9f2a-5a48-9b4d-6231eb6e8297","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Phonon Density of States","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"13bcafce-56ef-5b47-b079-317495eb6933","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"8fe6a24b-c994-55a2-a448-88657292e8c2","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_grid","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/phonon_dos_dispersion.json":{"_id":"291d25cd-378a-5be7-9d85-c8013a4b165b","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Phonon Density of States + Dispersions","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos","phonon_dispersions"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"13bcafce-56ef-5b47-b079-317495eb6933","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"8fe6a24b-c994-55a2-a448-88657292e8c2","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_grid","next":"a7fded20-889b-54fc-bbb0-456e82689ab1","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_path","results":["phonon_dispersions"],"schemaVersion":"2022.8.16"},"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_path","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dispersions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/phonon_reduce.json":{"_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"reduce","properties":["phonon_dos","phonon_dispersions"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid_restart.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid_restart","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"cb206177-a4af-599a-81ba-6c88d24253b6","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid_restart.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid_restart","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"8fe6a24b-c994-55a2-a448-88657292e8c2","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_grid","next":"a7fded20-889b-54fc-bbb0-456e82689ab1","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_path","results":["phonon_dispersions"],"schemaVersion":"2022.8.16"},"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_path","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dispersions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/post_processor.json":{"_id":"7239fc3a-b343-513f-af35-e8687e1829da","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"post-processor","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_collect_dynmat.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_collect_dynmat","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_collect_dynmat.sh","rendered":"\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/pre_processor.json":{"_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"pre-processor","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_link_outdir_save.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_link_outdir_save","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_link_outdir_save.sh","rendered":"\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/pw_scf.json":{"_id":"f52b8039-83d0-5485-a1f1-0bc37cb01ed3","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"pw-scf","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/recalculate_bands.json":{"_id":"64551dfb-e529-5d8d-9092-ff268f4da134","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Recalculate Bands","properties":["band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/surface_energy.json":{"_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Surface Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"e463ef46-a36e-5168-87dd-e21eb980dfb8","head":true,"input":[{"endpoint":"materials","endpoint_options":{"params":{"projection":"{}","query":"{'_id': MATERIAL_ID}"}},"name":"DATA"}],"monitors":[],"name":"io-slab","next":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","head":false,"input":[{"name":"DATA","scope":"e463ef46-a36e-5168-87dd-e21eb980dfb8"}],"monitors":[],"name":"slab","next":"44263820-0c80-5bd1-b854-9da8d198eac1","operand":"SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"44263820-0c80-5bd1-b854-9da8d198eac1","head":false,"input":[{"endpoint":"materials","endpoint_options":{"params":{"projection":"{}","query":"{'_id': SLAB.metadata.bulkId}"}},"name":"DATA"}],"monitors":[],"name":"io-bulk","next":"b70656f1-a394-57f4-b4de-00096969df4b","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"b70656f1-a394-57f4-b4de-00096969df4b","head":false,"input":[{"name":"DATA","scope":"44263820-0c80-5bd1-b854-9da8d198eac1"}],"monitors":[],"name":"bulk","next":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","operand":"BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0] if DATA else None"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"errorMessage":"Bulk material does not exist!","flowchartId":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","head":false,"monitors":[],"name":"assert-bulk","next":"490635e0-c593-5809-9eb2-c794b96cfed1","postProcessors":[],"preProcessors":[],"results":[],"statement":"BULK != None","status":"idle","statusTrack":[],"tags":[],"type":"assertion"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"490635e0-c593-5809-9eb2-c794b96cfed1","head":false,"input":[{"endpoint":"refined-properties","endpoint_options":{"params":{"projection":"{'sort': {'precision.value': -1}, 'limit': 1}","query":"{ 'exabyteId': BULK.exabyteId, 'data.name': 'total_energy', 'group': {'$regex': ''.join((SUBWORKFLOW.application.shortName, ':'))} }"}},"name":"DATA"}],"monitors":[],"name":"io-e-bulk","next":"bbe13b97-4243-5a85-8f61-a279d0b797aa","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"bbe13b97-4243-5a85-8f61-a279d0b797aa","head":false,"input":[{"name":"DATA","scope":"490635e0-c593-5809-9eb2-c794b96cfed1"}],"monitors":[],"name":"e-bulk","next":"a06c9f43-7670-5fd0-ac42-7028a472235a","operand":"E_BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0].data.value if DATA else None"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"errorMessage":"E_BULK does not exist!","flowchartId":"a06c9f43-7670-5fd0-ac42-7028a472235a","head":false,"monitors":[],"name":"assert-e-bulk","next":"cdf210be-26ed-585a-b4ac-d55795ba2975","postProcessors":[],"preProcessors":[],"results":[],"statement":"E_BULK != None","status":"idle","statusTrack":[],"tags":[],"type":"assertion"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"cdf210be-26ed-585a-b4ac-d55795ba2975","head":false,"input":[],"monitors":[],"name":"surface","next":"ffa8e43d-096a-555b-b8d0-6d283365ef47","operand":"A","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"np.linalg.norm(np.cross(SLAB.lattice.vectors.a, SLAB.lattice.vectors.b))"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"ffa8e43d-096a-555b-b8d0-6d283365ef47","head":false,"input":[],"monitors":[],"name":"n-bulk","next":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","operand":"N_BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"len(BULK.basis.elements)"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","head":false,"input":[],"monitors":[],"name":"n-slab","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"N_SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"len(SLAB.basis.elements)"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"fcd88119-817c-5ac1-a430-ba892ac743eb","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"fcd88119-817c-5ac1-a430-ba892ac743eb","head":false,"input":[{"name":"total_energy","scope":"9fc7a088-5533-5f70-bb33-f676ec65f565"}],"monitors":[],"name":"e-slab","next":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","operand":"E_SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","head":false,"input":[],"monitors":[],"name":"surface-energy","operand":"SURFACE_ENERGY","postProcessors":[],"preProcessors":[],"results":[{"name":"surface_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"1 / (2 * A) * (E_SLAB - E_BULK * (N_SLAB/N_BULK))"}]},"espresso/total_energy.json":{"_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Total Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"tags":["default"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/valence_band_offset_calc_from_previous_esp_vbm.json":{"_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Calculate VBO","properties":["valence_band_offset"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"bd4eaa98-b001-5694-87ef-ec77540502ab","head":true,"input":[],"name":"Difference of valence band maxima","next":"2626f7bb-d392-5fd4-ab71-329b508de347","operand":"VBM_DIFF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"VBM_LEFT - VBM_RIGHT"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"2626f7bb-d392-5fd4-ab71-329b508de347","head":false,"input":[],"name":"Difference of macroscopically averaged ESP in bulk","next":"b7307787-53e2-599b-ad12-d627b04074b4","operand":"AVG_ESP_DIFF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"AVG_ESP_LEFT[0] - AVG_ESP_RIGHT[0]"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"b7307787-53e2-599b-ad12-d627b04074b4","head":false,"input":[],"name":"Lineup of macroscopically averaged ESP in interface","next":"197f4b4d-cb7b-57be-a885-d44cb1f61905","operand":"ESP_LINEUP","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"np.abs(AVG_ESP_INTERFACE[0] - AVG_ESP_INTERFACE[1])"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"197f4b4d-cb7b-57be-a885-d44cb1f61905","head":false,"input":[],"name":"Valence Band Offset","operand":"VALENCE_BAND_OFFSET","results":[{"name":"valence_band_offset"}],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"abs(VBM_DIFF - AVG_ESP_DIFF + (np.sign(AVG_ESP_DIFF) * ESP_LINEUP))"}]},"espresso/variable_cell_relaxation.json":{"_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Variable-cell Relaxation","properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"systemName":"espresso-variable-cell-relaxation","tags":["variable-cell_relaxation"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_vc_relax.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"pw_vc-relax","results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"e1bd0870-6245-5fc2-a50d-48cabc356ac8","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_vc_relax.in","rendered":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"pw_vc-relax","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/zero_point_energy.json":{"_id":"151538cc-9e71-5269-8b9e-cb5977151227","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Zero Point Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"107595d1-490f-53a2-8432-7f8a12f14d96","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_gamma.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_gamma","results":["zero_point_energy"],"schemaVersion":"2022.8.16"},"flowchartId":"107595d1-490f-53a2-8432-7f8a12f14d96","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n0 0 0\n","contextProviders":[],"executableName":"ph.x","name":"ph_gamma.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n0 0 0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_zpe","postProcessors":[],"preProcessors":[],"results":[{"name":"zero_point_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"nwchem/total_energy.json":{"_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","application":{"name":"nwchem"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"pople","type":"localorbital"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Total Energy","properties":["total_energy","total_energy_contributions"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"nwchem","schemaVersion":"2022.8.16","shortName":"nwchem","summary":"NWChem","version":"7.0.2"},"executable":{"hasAdvancedComputeOptions":false,"isDefault":true,"monitors":["standard_output"],"name":"nwchem","postProcessors":["error_handler"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"nwchem","executableName":"nwchem","input":[{"name":"nwchem_total_energy.inp"}],"isDefault":true,"monitors":["standard_output"],"name":"nwchem_total_energy","results":["total_energy","total_energy_contributions"],"schemaVersion":"2022.8.16"},"flowchartId":"6f1eda0b-ebe1-5ccd-92dc-c2e55de5e0c7","head":true,"input":[{"applicationName":"nwchem","content":" start nwchem\n title \"Test\"\n charge {{ input.CHARGE }}\n geometry units au noautosym\n {{ input.ATOMIC_POSITIONS }}\n end\n basis\n * library {{ input.BASIS }}\n end\n dft\n xc {{ input.FUNCTIONAL }}\n mult {{ input.MULT }}\n end\n task dft energy\n","contextProviders":[{"name":"NWChemInputDataManager"}],"executableName":"nwchem","name":"nwchem_total_energy.inp","rendered":" start nwchem\n title \"Test\"\n charge 0\n geometry units au noautosym\n Si 0.000000000 0.000000000 0.000000000 \nSi 1.116306745 0.789348070 1.933500000 \n end\n basis\n * library 6-31G\n end\n dft\n xc B3LYP\n mult 1\n end\n task dft energy\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"nwchem_total_energy","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"python/ml/classification_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:random_forest_classification:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"35436b4a-cd9c-5089-ab42-665c4f9ba049","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:roc_curve:sklearn","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ROC Curve Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]},"python/ml/clustering_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_k_means_clustering_sklearn.py","templateName":"model_k_means_clustering_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:k_means_clustering:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for k-means clustering. #\n# #\n# In k-means clustering, the labels are not provided ahead of #\n# time. Instead, one supplies the number of groups the #\n# algorithm should split the dataset into. Here, we set our #\n# own default of 4 groups (fewer than sklearn's default of 8). #\n# Otherwise, the default parameters of the clustering method #\n# are the same as in sklearn. #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.cluster\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Initialize the Model\n model = sklearn.cluster.KMeans(\n n_clusters=4,\n init=\"k-means++\",\n n_init=10,\n max_iter=300,\n tol=0.0001,\n copy_x=True,\n algorithm=\"auto\",\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors)\n context.save(model, \"k_means\")\n train_labels = model.predict(train_descriptors)\n test_labels = model.predict(test_descriptors)\n\n context.save(train_labels, \"train_labels\")\n context.save(test_labels, \"test_labels\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"k_means\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_k_means_clustering_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for k-means clustering. #\n# #\n# In k-means clustering, the labels are not provided ahead of #\n# time. Instead, one supplies the number of groups the #\n# algorithm should split the dataset into. Here, we set our #\n# own default of 4 groups (fewer than sklearn's default of 8). #\n# Otherwise, the default parameters of the clustering method #\n# are the same as in sklearn. #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.cluster\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Initialize the Model\n model = sklearn.cluster.KMeans(\n n_clusters=4,\n init=\"k-means++\",\n n_init=10,\n max_iter=300,\n tol=0.0001,\n copy_x=True,\n algorithm=\"auto\",\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors)\n context.save(model, \"k_means\")\n train_labels = model.predict(train_descriptors)\n test_labels = model.predict(test_descriptors)\n\n context.save(train_labels, \"train_labels\")\n context.save(test_labels, \"test_labels\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"k_means\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"9c95c27b-c8bd-5e8b-8829-d354611decef","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_pca_2d_clusters_matplotlib.py","templateName":"post_processing_pca_2d_clusters_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:pca_2d_clusters:matplotlib","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"9c95c27b-c8bd-5e8b-8829-d354611decef","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Cluster Visualization #\n# #\n# This unit takes an N-dimensional feature space, and uses #\n# Principal-component Analysis (PCA) to project into a 2D space #\n# to facilitate plotting on a scatter plot. #\n# #\n# The 2D space we project into are the first two principal #\n# components identified in PCA, which are the two vectors with #\n# the highest variance. #\n# #\n# Wikipedia Article on PCA: #\n# https://en.wikipedia.org/wiki/Principal_component_analysis #\n# #\n# We then plot the labels assigned to the train an test set, #\n# and color by class. #\n# #\n# ----------------------------------------------------------------- #\n\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport settings\nimport sklearn.decomposition\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_labels = context.load(\"train_labels\")\n train_descriptors = context.load(\"train_descriptors\")\n test_labels = context.load(\"test_labels\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Unscale the descriptors\n descriptor_scaler = context.load(\"descriptor_scaler\")\n train_descriptors = descriptor_scaler.inverse_transform(train_descriptors)\n test_descriptors = descriptor_scaler.inverse_transform(test_descriptors)\n\n # We need at least 2 dimensions, exit if the dataset is 1D\n if train_descriptors.ndim < 2:\n raise ValueError(\"The train descriptors do not have enough dimensions to be plot in 2D\")\n\n # The data could be multidimensional. Let's do some PCA to get things into 2 dimensions.\n pca = sklearn.decomposition.PCA(n_components=2)\n train_descriptors = pca.fit_transform(train_descriptors)\n test_descriptors = pca.transform(test_descriptors)\n xlabel = \"Principle Component 1\"\n ylabel = \"Principle Component 2\"\n\n # Determine the labels we're going to be using, and generate their colors\n labels = set(train_labels)\n colors = {}\n for count, label in enumerate(labels):\n cm = matplotlib.cm.get_cmap('jet', len(labels))\n color = cm(count / len(labels))\n colors[label] = color\n train_colors = [colors[label] for label in train_labels]\n test_colors = [colors[label] for label in test_labels]\n\n # Train / Test Split Visualization\n plt.title(\"Train Test Split Visualization\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=\"#33548c\", marker=\"o\", label=\"Training Set\")\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=\"#F0B332\", marker=\"o\", label=\"Testing Set\")\n xmin, xmax, ymin, ymax = plt.axis()\n plt.legend()\n plt.tight_layout()\n plt.savefig(\"train_test_split.png\", dpi=600)\n plt.close()\n\n def clusters_legend(cluster_colors):\n \"\"\"\n Helper function that creates a legend, given the coloration by clusters.\n Args:\n cluster_colors: A dictionary of the form {cluster_number : color_value}\n\n Returns:\n None; just creates the legend and puts it on the plot\n \"\"\"\n legend_symbols = []\n for group, color in cluster_colors.items():\n label = f\"Cluster {group}\"\n legend_symbols.append(matplotlib.lines.Line2D([], [], color=color, marker=\"o\",\n linewidth=0, label=label))\n plt.legend(handles=legend_symbols)\n\n # Training Set Clusters\n plt.title(\"Training Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=train_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"train_clusters.png\", dpi=600)\n plt.close()\n\n # Testing Set Clusters\n plt.title(\"Testing Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=test_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"test_clusters.png\", dpi=600)\n plt.close()\n\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_pca_2d_clusters_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Cluster Visualization #\n# #\n# This unit takes an N-dimensional feature space, and uses #\n# Principal-component Analysis (PCA) to project into a 2D space #\n# to facilitate plotting on a scatter plot. #\n# #\n# The 2D space we project into are the first two principal #\n# components identified in PCA, which are the two vectors with #\n# the highest variance. #\n# #\n# Wikipedia Article on PCA: #\n# https://en.wikipedia.org/wiki/Principal_component_analysis #\n# #\n# We then plot the labels assigned to the train an test set, #\n# and color by class. #\n# #\n# ----------------------------------------------------------------- #\n\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport settings\nimport sklearn.decomposition\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_labels = context.load(\"train_labels\")\n train_descriptors = context.load(\"train_descriptors\")\n test_labels = context.load(\"test_labels\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Unscale the descriptors\n descriptor_scaler = context.load(\"descriptor_scaler\")\n train_descriptors = descriptor_scaler.inverse_transform(train_descriptors)\n test_descriptors = descriptor_scaler.inverse_transform(test_descriptors)\n\n # We need at least 2 dimensions, exit if the dataset is 1D\n if train_descriptors.ndim < 2:\n raise ValueError(\"The train descriptors do not have enough dimensions to be plot in 2D\")\n\n # The data could be multidimensional. Let's do some PCA to get things into 2 dimensions.\n pca = sklearn.decomposition.PCA(n_components=2)\n train_descriptors = pca.fit_transform(train_descriptors)\n test_descriptors = pca.transform(test_descriptors)\n xlabel = \"Principle Component 1\"\n ylabel = \"Principle Component 2\"\n\n # Determine the labels we're going to be using, and generate their colors\n labels = set(train_labels)\n colors = {}\n for count, label in enumerate(labels):\n cm = matplotlib.cm.get_cmap('jet', len(labels))\n color = cm(count / len(labels))\n colors[label] = color\n train_colors = [colors[label] for label in train_labels]\n test_colors = [colors[label] for label in test_labels]\n\n # Train / Test Split Visualization\n plt.title(\"Train Test Split Visualization\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=\"#33548c\", marker=\"o\", label=\"Training Set\")\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=\"#F0B332\", marker=\"o\", label=\"Testing Set\")\n xmin, xmax, ymin, ymax = plt.axis()\n plt.legend()\n plt.tight_layout()\n plt.savefig(\"train_test_split.png\", dpi=600)\n plt.close()\n\n def clusters_legend(cluster_colors):\n \"\"\"\n Helper function that creates a legend, given the coloration by clusters.\n Args:\n cluster_colors: A dictionary of the form {cluster_number : color_value}\n\n Returns:\n None; just creates the legend and puts it on the plot\n \"\"\"\n legend_symbols = []\n for group, color in cluster_colors.items():\n label = f\"Cluster {group}\"\n legend_symbols.append(matplotlib.lines.Line2D([], [], color=color, marker=\"o\",\n linewidth=0, label=label))\n plt.legend(handles=legend_symbols)\n\n # Training Set Clusters\n plt.title(\"Training Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=train_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"train_clusters.png\", dpi=600)\n plt.close()\n\n # Testing Set Clusters\n plt.title(\"Testing Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=test_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"test_clusters.png\", dpi=600)\n plt.close()\n\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"2D PCA Clusters Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"train_test_split.png","filetype":"image","name":"file_content"},{"basename":"train_clusters.png","filetype":"image","name":"file_content"},{"basename":"test_clusters.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]},"python/ml/regression_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_mlp_sklearn.py","templateName":"model_mlp_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:multilayer_perceptron:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_mlp_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_parity_plot_matplotlib.py","templateName":"post_processing_parity_plot_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:parity_plot:matplotlib","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_parity_plot_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Parity Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"my_parity_plot.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]},"python/ml/train_head.json":{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Set Up the Job","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"head-set-predict-status","head":true,"input":[],"name":"Set Workflow Mode","next":"head-fetch-training-data","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":["pyml:workflow-type-setter"],"type":"assignment","value":"False"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-training-data","head":false,"input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"name":"Fetch Dataset","next":"head-branch-on-predict-status","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"else":"end-of-ml-train-head","flowchartId":"head-branch-on-predict-status","head":false,"input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"maxOccurrences":100,"name":"Train or Predict?","next":"head-fetch-trained-model","postProcessors":[],"preProcessors":[],"results":[],"statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":[],"then":"head-fetch-trained-model","type":"condition"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-trained-model","head":false,"input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"name":"Fetch Trained Model as file","next":"end-of-ml-train-head","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":["set-io-unit-filenames"],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"end-of-ml-train-head","head":false,"input":[],"name":"End Setup","operand":"IS_SETUP_COMPLETE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"True"}]},"python/python_script.json":{"_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Python Script","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"hello_world.py"},{"name":"requirements.txt"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"python","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"shell/batch_espresso_pwscf.json":{"_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","application":{"name":"shell"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Shell Batch Job (Espresso PWSCF)","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"job_espresso_pw_scf.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"job_espresso_pw_scf","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","contextProviders":[],"executableName":"sh","name":"job_espresso_pw_scf.sh","rendered":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"shell/hello_world.json":{"_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","application":{"name":"shell"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Shell Hello World","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"hello_world.sh"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","contextProviders":[],"executableName":"sh","name":"hello_world.sh","rendered":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/band_gap.json":{"_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Gap","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"f0d65517-9592-5bc8-948e-a0851a766cbb","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_nscf","results":["band_gaps","fermi_energy"],"schemaVersion":"2022.8.16"},"flowchartId":"f0d65517-9592-5bc8-948e-a0851a766cbb","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_nscf","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/band_structure.json":{"_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"1e1de3be-f6e4-513e-afe2-c84e567a8108","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_bands","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/band_structure_dos.json":{"_id":"d38fea11-9781-5151-8dae-d705381498be","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure + Density of States","properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"1e1de3be-f6e4-513e-afe2-c84e567a8108","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_bands","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/dos.json":{"_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Density of States","properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/fixed_cell_relaxation.json":{"_id":"db6cc94b-2f26-5688-ba97-80b11567b549","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Fixed-cell Relaxation","properties":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_RELAX"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"vasp_relax","postProcessors":["prepare_restart"],"results":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"2f718a3d-5800-57e2-b707-075c1f1755c6","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"vasp_relax","postProcessors":[{"name":"prepare_restart"}],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_force"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/initial_final_total_energies.json":{"_id":"792e8c42-86ce-5f01-812a-66378ec4f379","application":{"name":"vasp"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Initial/Final Total Energies","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_INITIAL"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_neb_initial","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"f969f010-9dae-5085-9ac5-86150ef78897","head":true,"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.FIRST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_neb_initial","next":"e65a17ce-10c8-5710-ad4d-fb3d42434091","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_FINAL"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_neb_final","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"e65a17ce-10c8-5710-ad4d-fb3d42434091","head":false,"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.LAST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_neb_final","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/kpoint_convergence.json":{"_id":"5d736d84-d616-538f-a09b-81a32ac0777c","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"K-point Convergence","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-tolerance","head":true,"input":[],"name":"Init tolerance","next":"init-increment","operand":"TOL","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0.00001},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-increment","head":false,"input":[],"name":"Init increment","next":"init-result","operand":"INC","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-result","head":false,"input":[],"name":"Init result","next":"init-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-parameter","head":false,"input":[],"name":"Init parameter","next":"vasp-kpoint-convergence","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR"},{"name":"KPOINTS","templateName":"KPOINTS_CONV"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_kpt_conv","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"vasp-kpoint-convergence","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic Mesh\n0\nGamma\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}{% endraw %}\n0 0 0\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic Mesh\n0\nGamma\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}\n0 0 0\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_kpt_conv","next":"store-result","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"store-result","head":false,"input":[{"name":"total_energy","scope":"vasp-kpoint-convergence"}],"name":"store result","next":"check-convergence","operand":"RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"else":"update-result","flowchartId":"check-convergence","head":false,"input":[],"maxOccurrences":50,"name":"check convergence","next":"update-result","postProcessors":[],"preProcessors":[],"results":[],"statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","status":"idle","statusTrack":[],"tags":[],"then":"convergence-is-reached","type":"condition"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"update-result","head":false,"input":[{"name":"RESULT","scope":"global"}],"name":"update result","next":"increment-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"RESULT"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"increment-parameter","head":false,"input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"name":"increment parameter","next":"vasp-kpoint-convergence","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER+INC"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"convergence-is-reached","head":false,"input":[{"name":"PARAMETER","scope":"global"}],"name":"exit","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER"}]},"vasp/neb_subworkflow.json":{"_id":"e6215fb9-e60c-541b-b73e-b077d64b3a95","application":{"name":"vasp"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Nudged Elastic Band (NEB)","properties":["reaction_energy_barrier","reaction_energy_profile"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB"},{"name":"KPOINTS","templateName":"KPOINTS"}],"isDefault":false,"monitors":["standard_output"],"name":"vasp_neb","results":["reaction_energy_barrier","reaction_energy_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"9a1660ab-8067-5fad-9fb8-7c039f634636","head":true,"input":[{"applicationName":"vasp","content":"ISTART = 0\nIBRION = 1\nEDIFFG = -0.001\nENCUT = 500\nNELM = 100\nNSW = 100\nIMAGES = {{ input.INTERMEDIATE_IMAGES.length or neb.nImages }}\nSPRING = -5\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nIBRION = 1\nEDIFFG = -0.001\nENCUT = 500\nNELM = 100\nNSW = 100\nIMAGES = 1\nSPRING = -5\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"vasp_neb","postProcessors":[],"preProcessors":[],"results":[{"name":"reaction_energy_barrier"},{"name":"reaction_energy_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/prepare_images.json":{"_id":"c9b7ad2a-5207-5e41-9b66-28474a8921f8","application":{"name":"vasp"},"isMultiMaterial":true,"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Prepare Directories","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"bash_vasp_prepare_neb_images.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"bash_vasp_prepare_neb_images","schemaVersion":"2022.8.16"},"flowchartId":"dc397ead-54ad-513b-992e-aedd54576409","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ------------------------------------------------------------------ #\n# This script prepares necessary directories to run VASP NEB\n# calculation. It puts initial POSCAR into directory 00, final into 0N\n# and intermediate images in 01 to 0(N-1). It is assumed that SCF\n# calculations for initial and final structures are already done in\n# previous subworkflows and their standard outputs are written into\n# \"vasp_neb_initial.out\" and \"vasp_neb_final.out\" files respectively.\n# These outputs are here copied into initial (00) and final (0N)\n# directories to calculate the reaction energy profile.\n# ------------------------------------------------------------------ #\n\n{% raw %}\ncd {{ JOB_WORK_DIR }}\n{% endraw %}\n\n# Prepare First Directory\nmkdir -p 00\ncat > 00/POSCAR < 0{{ input.INTERMEDIATE_IMAGES.length + 1 }}/POSCAR < 0{{ loop.index }}/POSCAR < 00/POSCAR < 01/POSCAR <=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Find Extrema","next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","head":false,"input":[{"name":"STDOUT","scope":"python-find-extrema"}],"name":"Set Average ESP Value","operand":"AVG_ESP","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['minima']"}]},"espresso/average_electrostatic_potential_via_band_structure.json":{"_id":"09f5f4ff-7dbd-59ae-ad27-5af1bdfc2bd0","application":{"name":"espresso"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure + average ESP","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"2d360607-c739-54ad-97a0-8a83f0971f2c","head":true,"input":[],"name":"Set Material Index","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"MATERIAL_INDEX","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"pw-bands-calculate-band-gap","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-bands-calculate-band-gap","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"a667d9fd-35d5-5897-be0e-fa0247233649","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","head":false,"input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap"}],"name":"Select indirect band gap","next":"08819369-b541-5b51-8a40-0ee135039482","operand":"BAND_GAP_INDIRECT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","head":false,"input":[],"name":"Set Valence Band Maximum","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","operand":"VBM","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"BAND_GAP_INDIRECT['eigenvalueValence']"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_electrostatic_potential","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Electrostatic Potential (ESP)","next":"average-electrostatic-potential","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"isDefault":false,"monitors":["standard_output"],"name":"average_potential","results":["average_potential_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"average-electrostatic-potential","head":false,"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"average ESP","next":"c6c11873-91d7-5422-8302-3dcc1ce971e9","postProcessors":[],"preProcessors":[],"results":[{"name":"average_potential_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","head":false,"input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential"}],"name":"Set Macroscopically Averaged ESP Data","operand":"array_from_context","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"average_potential_profile['yDataSeries'][1]"}]},"espresso/band_gap.json":{"_id":"233bb8cf-3b4a-5378-84d9-a6a95a2ab43d","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Gap","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_gap_hse_dos.json":{"_id":"f1341a29-777d-5ca3-8933-78a5e0d3f6f2","application":{"name":"espresso"},"model":{"functional":{"slug":"hse06"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"hybrid","type":"dft"},"name":"HSE Band Gap","properties":["atomic_forces","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","density_of_states"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_hse.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_hse","results":["atomic_forces","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"f494cdb2-304f-5da2-b979-ce3fbba3a6c4","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n ecutfock = 100\n occupations = 'smearing'\n degauss = 0.005\n input_dft='hse',\n nqx1 = {% if kgrid.dimensions[0]%2 == 0 %}{{kgrid.dimensions[0]/2}}{% else %}{{(kgrid.dimensions[0]+1)/2}}{% endif %}, nqx2 = {% if kgrid.dimensions[1]%2 == 0 %}{{kgrid.dimensions[1]/2}}{% else %}{{(kgrid.dimensions[1]+1)/2}}{% endif %}, nqx3 = {% if kgrid.dimensions[2]%2 == 0 %}{{kgrid.dimensions[2]/2}}{% else %}{{(kgrid.dimensions[2]+1)/2}}{% endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{% if d%2 == 0 %}{{d}} {% else %}{{d+1}} {% endif %}{% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf_hse.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n ecutfock = 100\n occupations = 'smearing'\n degauss = 0.005\n input_dft='hse',\n nqx1 = 1, nqx2 = 1, nqx3 = 1\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_hse","next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"band_gaps"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"projwfc","results":["density_of_states"],"schemaVersion":"2022.8.16"},"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","head":false,"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"projwfc","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_structure.json":{"_id":"26d32e68-c2b5-50e9-8933-15f684fcc039","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"d618df45-5af3-5da5-8882-d74a27e00b04","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_structure_dos.json":{"_id":"fa594399-6b98-5d79-986c-0713601dc06c","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure + Density of States","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps","density_of_states"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"d618df45-5af3-5da5-8882-d74a27e00b04","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"projwfc","results":["density_of_states"],"schemaVersion":"2022.8.16"},"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","head":false,"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"projwfc","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_structure_hse.json":{"_id":"ef3089f3-7460-56f2-9aa2-172d5339d3be","application":{"name":"espresso"},"model":{"functional":{"slug":"hse06"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"hybrid","type":"dft"},"name":"Band Structure - HSE","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_bands_hse.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_bands_hse","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"08bd7e4a-2454-53b7-8cc9-9a95975f7e6f","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n input_dft = 'hse',\n {% for d in qgrid.dimensions -%}\n nqx{{loop.index}} = {{d}}\n {% endfor %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal\n{{ '{{' }} {{ explicitKPath.length }} {% raw %} + KPOINTS|length {% endraw %} {{ '}}' }}\n{% raw %}\n{% for point in KPOINTS -%}\n {% for d in point.coordinates %}{{ \"%14.9f\"|format(d) }} {% endfor -%}{{ point.weight }}\n{% endfor %}\n{% endraw %}\n{% for point in explicitKPath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}0.0000001\n{% endfor %}\n","contextProviders":[{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPathFormDataManager"}],"executableName":"pw.x","name":"pw_scf_bands_hse.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n input_dft = 'hse',\n nqx1 = 1\n nqx2 = 1\n nqx3 = 1\n \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal\n{{ 101 + KPOINTS|length }}\n\n{% for point in KPOINTS -%}\n {% for d in point.coordinates %}{{ \"%14.9f\"|format(d) }} {% endfor -%}{{ point.weight }}\n{% endfor %}\n\n 0.000000000 0.000000000 0.000000000 0.0000001\n 0.050000000 0.000000000 0.050000000 0.0000001\n 0.100000000 0.000000000 0.100000000 0.0000001\n 0.150000000 0.000000000 0.150000000 0.0000001\n 0.200000000 0.000000000 0.200000000 0.0000001\n 0.250000000 0.000000000 0.250000000 0.0000001\n 0.300000000 0.000000000 0.300000000 0.0000001\n 0.350000000 0.000000000 0.350000000 0.0000001\n 0.400000000 0.000000000 0.400000000 0.0000001\n 0.450000000 0.000000000 0.450000000 0.0000001\n 0.500000000 0.000000000 0.500000000 0.0000001\n 0.500000000 0.025000000 0.525000000 0.0000001\n 0.500000000 0.050000000 0.550000000 0.0000001\n 0.500000000 0.075000000 0.575000000 0.0000001\n 0.500000000 0.100000000 0.600000000 0.0000001\n 0.500000000 0.125000000 0.625000000 0.0000001\n 0.500000000 0.150000000 0.650000000 0.0000001\n 0.500000000 0.175000000 0.675000000 0.0000001\n 0.500000000 0.200000000 0.700000000 0.0000001\n 0.500000000 0.225000000 0.725000000 0.0000001\n 0.500000000 0.250000000 0.750000000 0.0000001\n 0.487500000 0.262500000 0.750000000 0.0000001\n 0.475000000 0.275000000 0.750000000 0.0000001\n 0.462500000 0.287500000 0.750000000 0.0000001\n 0.450000000 0.300000000 0.750000000 0.0000001\n 0.437500000 0.312500000 0.750000000 0.0000001\n 0.425000000 0.325000000 0.750000000 0.0000001\n 0.412500000 0.337500000 0.750000000 0.0000001\n 0.400000000 0.350000000 0.750000000 0.0000001\n 0.387500000 0.362500000 0.750000000 0.0000001\n 0.375000000 0.375000000 0.750000000 0.0000001\n 0.337500000 0.337500000 0.675000000 0.0000001\n 0.300000000 0.300000000 0.600000000 0.0000001\n 0.262500000 0.262500000 0.525000000 0.0000001\n 0.225000000 0.225000000 0.450000000 0.0000001\n 0.187500000 0.187500000 0.375000000 0.0000001\n 0.150000000 0.150000000 0.300000000 0.0000001\n 0.112500000 0.112500000 0.225000000 0.0000001\n 0.075000000 0.075000000 0.150000000 0.0000001\n 0.037500000 0.037500000 0.075000000 0.0000001\n 0.000000000 0.000000000 0.000000000 0.0000001\n 0.050000000 0.050000000 0.050000000 0.0000001\n 0.100000000 0.100000000 0.100000000 0.0000001\n 0.150000000 0.150000000 0.150000000 0.0000001\n 0.200000000 0.200000000 0.200000000 0.0000001\n 0.250000000 0.250000000 0.250000000 0.0000001\n 0.300000000 0.300000000 0.300000000 0.0000001\n 0.350000000 0.350000000 0.350000000 0.0000001\n 0.400000000 0.400000000 0.400000000 0.0000001\n 0.450000000 0.450000000 0.450000000 0.0000001\n 0.500000000 0.500000000 0.500000000 0.0000001\n 0.512500000 0.475000000 0.512500000 0.0000001\n 0.525000000 0.450000000 0.525000000 0.0000001\n 0.537500000 0.425000000 0.537500000 0.0000001\n 0.550000000 0.400000000 0.550000000 0.0000001\n 0.562500000 0.375000000 0.562500000 0.0000001\n 0.575000000 0.350000000 0.575000000 0.0000001\n 0.587500000 0.325000000 0.587500000 0.0000001\n 0.600000000 0.300000000 0.600000000 0.0000001\n 0.612500000 0.275000000 0.612500000 0.0000001\n 0.625000000 0.250000000 0.625000000 0.0000001\n 0.612500000 0.250000000 0.637500000 0.0000001\n 0.600000000 0.250000000 0.650000000 0.0000001\n 0.587500000 0.250000000 0.662500000 0.0000001\n 0.575000000 0.250000000 0.675000000 0.0000001\n 0.562500000 0.250000000 0.687500000 0.0000001\n 0.550000000 0.250000000 0.700000000 0.0000001\n 0.537500000 0.250000000 0.712500000 0.0000001\n 0.525000000 0.250000000 0.725000000 0.0000001\n 0.512500000 0.250000000 0.737500000 0.0000001\n 0.500000000 0.250000000 0.750000000 0.0000001\n 0.500000000 0.275000000 0.725000000 0.0000001\n 0.500000000 0.300000000 0.700000000 0.0000001\n 0.500000000 0.325000000 0.675000000 0.0000001\n 0.500000000 0.350000000 0.650000000 0.0000001\n 0.500000000 0.375000000 0.625000000 0.0000001\n 0.500000000 0.400000000 0.600000000 0.0000001\n 0.500000000 0.425000000 0.575000000 0.0000001\n 0.500000000 0.450000000 0.550000000 0.0000001\n 0.500000000 0.475000000 0.525000000 0.0000001\n 0.500000000 0.500000000 0.500000000 0.0000001\n 0.512500000 0.475000000 0.512500000 0.0000001\n 0.525000000 0.450000000 0.525000000 0.0000001\n 0.537500000 0.425000000 0.537500000 0.0000001\n 0.550000000 0.400000000 0.550000000 0.0000001\n 0.562500000 0.375000000 0.562500000 0.0000001\n 0.575000000 0.350000000 0.575000000 0.0000001\n 0.587500000 0.325000000 0.587500000 0.0000001\n 0.600000000 0.300000000 0.600000000 0.0000001\n 0.612500000 0.275000000 0.612500000 0.0000001\n 0.625000000 0.250000000 0.625000000 0.0000001\n 0.612500000 0.225000000 0.612500000 0.0000001\n 0.600000000 0.200000000 0.600000000 0.0000001\n 0.587500000 0.175000000 0.587500000 0.0000001\n 0.575000000 0.150000000 0.575000000 0.0000001\n 0.562500000 0.125000000 0.562500000 0.0000001\n 0.550000000 0.100000000 0.550000000 0.0000001\n 0.537500000 0.075000000 0.537500000 0.0000001\n 0.525000000 0.050000000 0.525000000 0.0000001\n 0.512500000 0.025000000 0.512500000 0.0000001\n 0.500000000 0.000000000 0.500000000 0.0000001\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_bands_hse","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_structure_magn.json":{"_id":"4a7dced1-224e-57d7-a616-cbad99062c7b","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Spin magnetic bandstructure","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_magn.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_magn","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"c229d2a0-3c19-5f13-b3e0-ceb86cb9fbc1","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n nspin = 2\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if collinearMagnetization.isTotalMagnetization %}\n tot_magnetization = {{ collinearMagnetization.totalMagnetization }}\n{%- else %}\n{%- for item in collinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"CollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_scf_magn.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n nspin = 2\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_magn","next":"ea06c333-0cc7-51d4-bd98-cc53fa0844d1","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands_magn.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands_magn","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"ea06c333-0cc7-51d4-bd98-cc53fa0844d1","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n nspin = 2\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if collinearMagnetization.isTotalMagnetization %}\n tot_magnetization = {{ collinearMagnetization.totalMagnetization }}\n{%- else %}\n{%- for item in collinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"CollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_bands_magn.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n nspin = 2\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands_magn","next":"a8e4de4b-1f55-50e8-a712-ce0b37c04752","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands_spin_up.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands_spin_up","schemaVersion":"2022.8.16"},"flowchartId":"a8e4de4b-1f55-50e8-a712-ce0b37c04752","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands_up.dat'{% endraw %}\n spin_component = 1\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands_spin_up.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands_up.dat'\n spin_component = 1\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands_spin_up","next":"fd937050-a3f3-5d4d-bb50-d150a93ea5e0","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands_spin_dn.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands_spin_dn","schemaVersion":"2022.8.16"},"flowchartId":"fd937050-a3f3-5d4d-bb50-d150a93ea5e0","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands_dn.dat'{% endraw %}\n spin_component = 2\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands_spin_dn.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands_dn.dat'\n spin_component = 2\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands_spin_dn","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/band_structure_soc.json":{"_id":"51e6fb82-538a-58ee-8d4e-991c8446f657","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{"searchText":"nc-fr"},"subtype":"nc-fr","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Spin orbit coupling bandstructure","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_soc.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_soc","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"74ec024a-f247-5f15-9c21-cc169bcb62c7","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n{%- if nonCollinearMagnetization.isStartingMagnetization %}\n{%- for item in nonCollinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization %}\n constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'\n lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}\n fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}\n fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}\n fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}\n lforcet = .true.\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and not nonCollinearMagnetization.lforcet %}\n lforcet = .false.\n{%- endif %}\n{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}\n{%- for item in nonCollinearMagnetization.spinAngles %}\n angle1({{ item.index }}) = {{ item.angle1 }}\n angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n{%- if nonCollinearMagnetization.isExistingChargeDensity %}\n startingpot = 'file'\n{%- endif %}\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"NonCollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_scf_soc.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_soc","next":"cee6ae30-cf34-5138-bdc5-5c57c2a6de5b","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands_soc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands_soc","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"cee6ae30-cf34-5138-bdc5-5c57c2a6de5b","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n{%- if nonCollinearMagnetization.isStartingMagnetization %}\n{%- for item in nonCollinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization %}\n constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'\n lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}\n fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}\n fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}\n fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}\n lforcet = .true.\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and not nonCollinearMagnetization.lforcet %}\n lforcet = .false.\n{%- endif %}\n{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}\n{%- for item in nonCollinearMagnetization.spinAngles %}\n angle1({{ item.index }}) = {{ item.angle1 }}\n angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"NonCollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_bands_soc.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands_soc","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/dielectric_tensor.json":{"_id":"38340b52-83ad-5862-bc18-c140bdc0cb72","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"nc","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Compute Dielectric Function","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps","dielectric_tensor"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"3b230ec3-0791-52f7-a4db-625390b8718f","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"3b230ec3-0791-52f7-a4db-625390b8718f","head":false,"input":[],"name":"Set No-Symmetry Flag","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","operand":"NO_SYMMETRY_NO_INVERSION","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":true},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","next":"8c2ec8bd-cdbf-54a0-a217-64a7a26eaebb","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"epsilon.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"epsilon.x","input":[{"name":"epsilon.in"}],"isDefault":false,"monitors":["standard_output"],"name":"dielectric_tensor","results":["dielectric_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"8c2ec8bd-cdbf-54a0-a217-64a7a26eaebb","head":false,"input":[{"applicationName":"espresso","content":"&inputpp\n calculation = \"eps\"\n prefix = \"__prefix__\"\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n\n&energy_grid\n smeartype = \"gauss\"\n intersmear = 0.2\n intrasmear = 0.0\n wmin = 0.0\n wmax = 30.0\n nw = 500\n shift = 0.0\n/\n","contextProviders":[],"executableName":"epsilon.x","name":"epsilon.in","rendered":"&inputpp\n calculation = \"eps\"\n prefix = \"__prefix__\"\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n\n&energy_grid\n smeartype = \"gauss\"\n intersmear = 0.2\n intrasmear = 0.0\n wmin = 0.0\n wmax = 30.0\n nw = 500\n shift = 0.0\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Compute dielectric function","postProcessors":[],"preProcessors":[],"results":[{"name":"dielectric_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/dos.json":{"_id":"2cf317f3-3306-5a96-bc9b-e9103ebcd5be","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Density of States","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps","density_of_states"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"projwfc","results":["density_of_states"],"schemaVersion":"2022.8.16"},"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","head":false,"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"projwfc","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/electronic_density_mesh.json":{"_id":"e2749c5a-fcd9-589c-819b-8b88c5c90924","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Electronic Density Mesh","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"e1a6e1e9-7994-5cd0-98d7-ae8909a10061","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_density.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_density","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"e1a6e1e9-7994-5cd0-98d7-ae8909a10061","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 0\n/\n&PLOT\n iflag = 3\n output_format = 5\n fileout ='density.xsf'\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_density.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 0\n/\n&PLOT\n iflag = 3\n output_format = 5\n fileout ='density.xsf'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pp_density","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/esm.json":{"_id":"0de669f6-a455-5dae-b331-19dc85f7090f","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Effective Screening Medium (ESM)","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_esm.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_esm","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"2f487bc6-c237-53e4-bad5-be60369662cb","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = '{{ boundaryConditions.type }}'\n fcp_mu = {{ boundaryConditions.targetFermiEnergy }}\n esm_w = {{ boundaryConditions.offset }}\n esm_efield = {{ boundaryConditions.electricField }}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"BoundaryConditionsFormDataManager"}],"executableName":"pw.x","name":"pw_esm.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = 'pbc'\n fcp_mu = 0\n esm_w = 0\n esm_efield = 0\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_esm","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"potential_profile"},{"name":"charge_density_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/esm_relax.json":{"_id":"69728792-afeb-50aa-9b4e-6974a90f676a","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Effective Screening Medium (ESM) Relax","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_esm_relax.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_esm_relax","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"a2bec506-1fdd-5125-a787-85f31cde20c1","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'relax'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = '{{ boundaryConditions.type }}'\n fcp_mu = {{ boundaryConditions.targetFermiEnergy }}\n esm_w = {{ boundaryConditions.offset }}\n esm_efield = {{ boundaryConditions.electricField }}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"BoundaryConditionsFormDataManager"}],"executableName":"pw.x","name":"pw_esm_relax.in","rendered":"&CONTROL\n calculation = 'relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = 'pbc'\n fcp_mu = 0\n esm_w = 0\n esm_efield = 0\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_esm_relax","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"potential_profile"},{"name":"charge_density_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/espresso_extract_kpoints.json":{"_id":"a2785cc5-2427-5c7a-b30f-7077475b948c","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Extract KPOINTS","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"espresso_extract_kpoints.py"},{"name":"requirements.txt","templateName":"requirements_empty.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_extract_kpoints","schemaVersion":"2022.8.16"},"flowchartId":"a716b133-2d04-50b5-b497-100265e3fa24","head":true,"input":[{"applicationName":"python","content":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_extract_kpoints.py","rendered":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Please add any packages required for this unit below following #\n# the requirements.txt specification: #\n# https://pip.pypa.io/en/stable/reference/requirements-file-format/ #\n# ------------------------------------------------------------------ #\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Please add any packages required for this unit below following #\n# the requirements.txt specification: #\n# https://pip.pypa.io/en/stable/reference/requirements-file-format/ #\n# ------------------------------------------------------------------ #\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Extract kpoints","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/espresso_xml_get_qpt_irr.json":{"_id":"e4b6b2e7-7d8f-5ae1-b6bd-ee81ecbca11a","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"espresso-xml-get-qpt-irr","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"espresso_xml_get_qpt_irr.py"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_xml_get_qpt_irr","schemaVersion":"2022.8.16"},"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n{# JOB_WORK_DIR will be initialized at runtime => avoid substituion below #}\n{% raw %}\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n{% endraw %}\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_xml_get_qpt_irr.py","rendered":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n\n\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"python","next":"d0fd8654-2106-546b-8792-7bb46272befc","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"d0fd8654-2106-546b-8792-7bb46272befc","head":false,"input":[{"name":"STDOUT","scope":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219"}],"name":"assignment","operand":"Q_POINTS","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)"}]},"espresso/extract_bands_fermi.json":{"_id":"1bb75a6a-4c8c-5336-a24c-1963e83825bc","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Extract Bands Near Fermi","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"extract_bands_fermi.py"},{"name":"requirements.txt","templateName":"requirements_bands_fermi.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"extract_bands_fermi","schemaVersion":"2022.8.16"},"flowchartId":"extract-band-fermi","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"extract_bands_fermi.py","rendered":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"extract_bands_fermi","next":"8771dc7f-878e-5f13-a840-a3a416854f1e","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8771dc7f-878e-5f13-a840-a3a416854f1e","head":false,"input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"name":"Store Band Below EF","next":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","operand":"KBAND_VALUE_BELOW_EF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['band_below_fermi']"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","head":false,"input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"name":"Store Band Above EF","next":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","operand":"KBAND_VALUE_ABOVE_EF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['band_above_fermi']"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","head":false,"input":[],"name":"Select Band","operand":"KBAND_VALUE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"KBAND_VALUE_BELOW_EF"}]},"espresso/fixed_cell_relaxation.json":{"_id":"fb75e249-5489-5146-bd8a-786d33330d9c","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Fixed-cell Relaxation","properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_relax.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"pw_relax","results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"c42871f6-ab79-5987-b228-c3bd80f16ffd","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'relax'\n nstep = 50\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_relax.in","rendered":"&CONTROL\n calculation = 'relax'\n nstep = 50\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"pw_relax","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/gw_band_structure_band_gap_full_frequency.json":{"_id":"46bcdcc8-628e-518e-b8c3-9bf38d7a2aef","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{"searchText":".*dojo-oncv.*"},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Full Frequency GW Band Structure + Band Gap","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"d82a9858-3f20-5fcd-baeb-0f1d65e9e22e","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"gw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"gw.x","input":[{"name":"gw_bands_full_frequency.in"}],"isDefault":false,"monitors":["standard_output"],"name":"gw_bands_full_frequency","results":["band_structure","fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"d82a9858-3f20-5fcd-baeb-0f1d65e9e22e","head":false,"input":[{"applicationName":"espresso","content":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n\n ! the grid used for the linear response\n kpt_grid = {{ kgrid.dimensions|join(', ') }}\n qpt_grid = {{ qgrid.dimensions|join(', ') }}\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of W in the convolution\n max_freq_coul = 200\n num_freq_coul = 51\n\n ! configuration for the correlation self energy\n ecut_corr = 6.0\n\n ! configuration for the exchange self energy\n ecut_exch = 15.0\n/\n\n&gw_output\n/\n\nFREQUENCIES\n35\n 0.0 0.0\n 0.0 0.3\n 0.0 0.9\n 0.0 1.8\n 0.0 3.0\n 0.0 4.5\n 0.0 6.3\n 0.0 8.4\n 0.0 10.8\n 0.0 13.5\n 0.0 16.5\n 0.0 19.8\n 0.0 23.4\n 0.0 27.3\n 0.0 31.5\n 0.0 36.0\n 0.0 40.8\n 0.0 45.9\n 0.0 51.3\n 0.0 57.0\n 0.0 63.0\n 0.0 69.3\n 0.0 75.9\n 0.0 82.8\n 0.0 90.0\n 0.0 97.5\n 0.0 105.3\n 0.0 113.4\n 0.0 121.8\n 0.0 130.5\n 0.0 139.5\n 0.0 148.8\n 0.0 158.4\n 0.0 168.3\n 0.0 178.5\n/\n\nK_points\n{{ explicitKPath2PIBA.length }}\n{% for point in explicitKPath2PIBA -%}\n{% for coordinate in point.coordinates %}{{ coordinate }}{% endfor %}\n{% endfor %}\n/\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPath2PIBAFormDataManager"}],"executableName":"gw.x","name":"gw_bands_full_frequency.in","rendered":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n\n ! the grid used for the linear response\n kpt_grid = 2, 2, 2\n qpt_grid = 1, 1, 1\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of W in the convolution\n max_freq_coul = 200\n num_freq_coul = 51\n\n ! configuration for the correlation self energy\n ecut_corr = 6.0\n\n ! configuration for the exchange self energy\n ecut_exch = 15.0\n/\n\n&gw_output\n/\n\nFREQUENCIES\n35\n 0.0 0.0\n 0.0 0.3\n 0.0 0.9\n 0.0 1.8\n 0.0 3.0\n 0.0 4.5\n 0.0 6.3\n 0.0 8.4\n 0.0 10.8\n 0.0 13.5\n 0.0 16.5\n 0.0 19.8\n 0.0 23.4\n 0.0 27.3\n 0.0 31.5\n 0.0 36.0\n 0.0 40.8\n 0.0 45.9\n 0.0 51.3\n 0.0 57.0\n 0.0 63.0\n 0.0 69.3\n 0.0 75.9\n 0.0 82.8\n 0.0 90.0\n 0.0 97.5\n 0.0 105.3\n 0.0 113.4\n 0.0 121.8\n 0.0 130.5\n 0.0 139.5\n 0.0 148.8\n 0.0 158.4\n 0.0 168.3\n 0.0 178.5\n/\n\nK_points\n101\n 0.000000000 0.000000000 0.000000000\n 0.028867513 -0.040824829 0.050000000\n 0.057735027 -0.081649658 0.100000000\n 0.086602540 -0.122474487 0.150000000\n 0.115470054 -0.163299316 0.200000000\n 0.144337567 -0.204124145 0.250000000\n 0.173205081 -0.244948974 0.300000000\n 0.202072594 -0.285773803 0.350000000\n 0.230940108 -0.326598632 0.400000000\n 0.259807621 -0.367423461 0.450000000\n 0.288675135 -0.408248290 0.500000000\n 0.274241378 -0.387835876 0.525000000\n 0.259807621 -0.367423461 0.550000000\n 0.245373864 -0.347011047 0.575000000\n 0.230940108 -0.326598632 0.600000000\n 0.216506351 -0.306186218 0.625000000\n 0.202072594 -0.285773803 0.650000000\n 0.187638837 -0.265361389 0.675000000\n 0.173205081 -0.244948974 0.700000000\n 0.158771324 -0.224536560 0.725000000\n 0.144337567 -0.204124145 0.750000000\n 0.129903811 -0.183711731 0.750000000\n 0.115470054 -0.163299316 0.750000000\n 0.101036297 -0.142886902 0.750000000\n 0.086602540 -0.122474487 0.750000000\n 0.072168784 -0.102062073 0.750000000\n 0.057735027 -0.081649658 0.750000000\n 0.043301270 -0.061237244 0.750000000\n 0.028867513 -0.040824829 0.750000000\n 0.014433757 -0.020412415 0.750000000\n -0.000000000 -0.000000000 0.750000000\n -0.000000000 -0.000000000 0.675000000\n -0.000000000 -0.000000000 0.600000000\n -0.000000000 -0.000000000 0.525000000\n -0.000000000 -0.000000000 0.450000000\n -0.000000000 -0.000000000 0.375000000\n -0.000000000 -0.000000000 0.300000000\n -0.000000000 -0.000000000 0.225000000\n -0.000000000 -0.000000000 0.150000000\n -0.000000000 -0.000000000 0.075000000\n 0.000000000 0.000000000 0.000000000\n 0.028867513 0.020412415 0.050000000\n 0.057735027 0.040824829 0.100000000\n 0.086602540 0.061237244 0.150000000\n 0.115470054 0.081649658 0.200000000\n 0.144337567 0.102062073 0.250000000\n 0.173205081 0.122474487 0.300000000\n 0.202072594 0.142886902 0.350000000\n 0.230940108 0.163299316 0.400000000\n 0.259807621 0.183711731 0.450000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.339193283 -0.204124145 0.637500000\n 0.317542648 -0.204124145 0.650000000\n 0.295892013 -0.204124145 0.662500000\n 0.274241378 -0.204124145 0.675000000\n 0.252590743 -0.204124145 0.687500000\n 0.230940108 -0.204124145 0.700000000\n 0.209289473 -0.204124145 0.712500000\n 0.187638837 -0.204124145 0.725000000\n 0.165988202 -0.204124145 0.737500000\n 0.144337567 -0.204124145 0.750000000\n 0.158771324 -0.163299316 0.725000000\n 0.173205081 -0.122474487 0.700000000\n 0.187638837 -0.081649658 0.675000000\n 0.202072594 -0.040824829 0.650000000\n 0.216506351 -0.000000000 0.625000000\n 0.230940108 0.040824829 0.600000000\n 0.245373864 0.081649658 0.575000000\n 0.259807621 0.122474487 0.550000000\n 0.274241378 0.163299316 0.525000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.353627040 -0.224536560 0.612500000\n 0.346410162 -0.244948974 0.600000000\n 0.339193283 -0.265361389 0.587500000\n 0.331976405 -0.285773803 0.575000000\n 0.324759526 -0.306186218 0.562500000\n 0.317542648 -0.326598632 0.550000000\n 0.310325770 -0.347011047 0.537500000\n 0.303108891 -0.367423461 0.525000000\n 0.295892013 -0.387835876 0.512500000\n 0.288675135 -0.408248290 0.500000000\n\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"gw_bands_full_frequency","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"},{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/gw_band_structure_band_gap_plasmon_pole.json":{"_id":"72b79a87-8eef-5fe2-9d6c-6c9c256dd56c","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{"searchText":".*dojo-oncv.*"},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Plasmon-Pole GW Band Structure + Band Gap","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"f9910952-eca9-5a5f-ae03-a0060ae2fc78","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"gw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"gw.x","input":[{"name":"gw_bands_plasmon_pole.in"}],"isDefault":false,"monitors":["standard_output"],"name":"gw_bands_plasmon_pole","results":["band_structure","fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"f9910952-eca9-5a5f-ae03-a0060ae2fc78","head":false,"input":[{"applicationName":"espresso","content":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n\n ! the grid used for the linear response\n kpt_grid = {{ kgrid.dimensions|join(', ') }}\n qpt_grid = {{ qgrid.dimensions|join(', ') }}\n\n ! truncation (used for both correlation and exchange)\n truncation = '2d'\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of the Coulomb solver\n thres_coul = 1.0d-2\n\n ! configuration of W in the convolution\n model_coul = 'godby-needs'\n max_freq_coul = 120\n num_freq_coul = 35\n\n ! configuration of the Green solver\n thres_green = 1.0d-3\n max_iter_green = 300\n\n ! configuration for the correlation self energy\n ecut_corr = 5.0\n max_freq_corr = 100.0\n num_freq_corr = 11\n\n ! configuration for the exchange self energy\n ecut_exch = 20.0\n\n ! configuration for the output\n eta = 0.1\n min_freq_wind = -30.0\n max_freq_wind = 30.0\n num_freq_wind = 601\n/\n\n&gw_output\n/\n\nFREQUENCIES\n2\n 0.0 0.0\n 0.0 10.0\n/\n\nK_points\n{{ explicitKPath2PIBA.length }}\n{% for point in explicitKPath2PIBA -%}\n{% for coordinate in point.coordinates %}{{ coordinate }}{% endfor %}\n{% endfor %}\n/\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPath2PIBAFormDataManager"}],"executableName":"gw.x","name":"gw_bands_plasmon_pole.in","rendered":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n\n ! the grid used for the linear response\n kpt_grid = 2, 2, 2\n qpt_grid = 1, 1, 1\n\n ! truncation (used for both correlation and exchange)\n truncation = '2d'\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of the Coulomb solver\n thres_coul = 1.0d-2\n\n ! configuration of W in the convolution\n model_coul = 'godby-needs'\n max_freq_coul = 120\n num_freq_coul = 35\n\n ! configuration of the Green solver\n thres_green = 1.0d-3\n max_iter_green = 300\n\n ! configuration for the correlation self energy\n ecut_corr = 5.0\n max_freq_corr = 100.0\n num_freq_corr = 11\n\n ! configuration for the exchange self energy\n ecut_exch = 20.0\n\n ! configuration for the output\n eta = 0.1\n min_freq_wind = -30.0\n max_freq_wind = 30.0\n num_freq_wind = 601\n/\n\n&gw_output\n/\n\nFREQUENCIES\n2\n 0.0 0.0\n 0.0 10.0\n/\n\nK_points\n101\n 0.000000000 0.000000000 0.000000000\n 0.028867513 -0.040824829 0.050000000\n 0.057735027 -0.081649658 0.100000000\n 0.086602540 -0.122474487 0.150000000\n 0.115470054 -0.163299316 0.200000000\n 0.144337567 -0.204124145 0.250000000\n 0.173205081 -0.244948974 0.300000000\n 0.202072594 -0.285773803 0.350000000\n 0.230940108 -0.326598632 0.400000000\n 0.259807621 -0.367423461 0.450000000\n 0.288675135 -0.408248290 0.500000000\n 0.274241378 -0.387835876 0.525000000\n 0.259807621 -0.367423461 0.550000000\n 0.245373864 -0.347011047 0.575000000\n 0.230940108 -0.326598632 0.600000000\n 0.216506351 -0.306186218 0.625000000\n 0.202072594 -0.285773803 0.650000000\n 0.187638837 -0.265361389 0.675000000\n 0.173205081 -0.244948974 0.700000000\n 0.158771324 -0.224536560 0.725000000\n 0.144337567 -0.204124145 0.750000000\n 0.129903811 -0.183711731 0.750000000\n 0.115470054 -0.163299316 0.750000000\n 0.101036297 -0.142886902 0.750000000\n 0.086602540 -0.122474487 0.750000000\n 0.072168784 -0.102062073 0.750000000\n 0.057735027 -0.081649658 0.750000000\n 0.043301270 -0.061237244 0.750000000\n 0.028867513 -0.040824829 0.750000000\n 0.014433757 -0.020412415 0.750000000\n -0.000000000 -0.000000000 0.750000000\n -0.000000000 -0.000000000 0.675000000\n -0.000000000 -0.000000000 0.600000000\n -0.000000000 -0.000000000 0.525000000\n -0.000000000 -0.000000000 0.450000000\n -0.000000000 -0.000000000 0.375000000\n -0.000000000 -0.000000000 0.300000000\n -0.000000000 -0.000000000 0.225000000\n -0.000000000 -0.000000000 0.150000000\n -0.000000000 -0.000000000 0.075000000\n 0.000000000 0.000000000 0.000000000\n 0.028867513 0.020412415 0.050000000\n 0.057735027 0.040824829 0.100000000\n 0.086602540 0.061237244 0.150000000\n 0.115470054 0.081649658 0.200000000\n 0.144337567 0.102062073 0.250000000\n 0.173205081 0.122474487 0.300000000\n 0.202072594 0.142886902 0.350000000\n 0.230940108 0.163299316 0.400000000\n 0.259807621 0.183711731 0.450000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.339193283 -0.204124145 0.637500000\n 0.317542648 -0.204124145 0.650000000\n 0.295892013 -0.204124145 0.662500000\n 0.274241378 -0.204124145 0.675000000\n 0.252590743 -0.204124145 0.687500000\n 0.230940108 -0.204124145 0.700000000\n 0.209289473 -0.204124145 0.712500000\n 0.187638837 -0.204124145 0.725000000\n 0.165988202 -0.204124145 0.737500000\n 0.144337567 -0.204124145 0.750000000\n 0.158771324 -0.163299316 0.725000000\n 0.173205081 -0.122474487 0.700000000\n 0.187638837 -0.081649658 0.675000000\n 0.202072594 -0.040824829 0.650000000\n 0.216506351 -0.000000000 0.625000000\n 0.230940108 0.040824829 0.600000000\n 0.245373864 0.081649658 0.575000000\n 0.259807621 0.122474487 0.550000000\n 0.274241378 0.163299316 0.525000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.353627040 -0.224536560 0.612500000\n 0.346410162 -0.244948974 0.600000000\n 0.339193283 -0.265361389 0.587500000\n 0.331976405 -0.285773803 0.575000000\n 0.324759526 -0.306186218 0.562500000\n 0.317542648 -0.326598632 0.550000000\n 0.310325770 -0.347011047 0.537500000\n 0.303108891 -0.367423461 0.525000000\n 0.295892013 -0.387835876 0.512500000\n 0.288675135 -0.408248290 0.500000000\n\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"gw_bands_plasmon_pole","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"},{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/kpoint_convergence.json":{"_id":"ff6a8fbc-2202-5786-9a26-67c843417d0b","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"K-point Convergence","properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-tolerance","head":true,"input":[],"name":"Init tolerance","next":"init-increment","operand":"TOL","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0.00001},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-increment","head":false,"input":[],"name":"Init increment","next":"init-result","operand":"INC","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-result","head":false,"input":[],"name":"Init result","next":"init-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-parameter","head":false,"input":[],"name":"Init parameter","next":"pwscf-kpoint-convergence","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_kpt_conv.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_kpt_conv","results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"pwscf-kpoint-convergence","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}} 0 0 0{% endraw %}\n","contextProviders":[{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf_kpt_conv.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}} 0 0 0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_kpt_conv","next":"store-result","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"store-result","head":false,"input":[{"name":"total_energy","scope":"pwscf-kpoint-convergence"}],"name":"store result","next":"check-convergence","operand":"RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"else":"update-result","flowchartId":"check-convergence","head":false,"input":[],"maxOccurrences":50,"name":"check convergence","next":"update-result","postProcessors":[],"preProcessors":[],"results":[],"statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","status":"idle","statusTrack":[],"tags":[],"then":"convergence-is-reached","type":"condition"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"update-result","head":false,"input":[{"name":"RESULT","scope":"global"}],"name":"update result","next":"increment-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"RESULT"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"increment-parameter","head":false,"input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"name":"increment parameter","next":"pwscf-kpoint-convergence","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER+INC"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"convergence-is-reached","head":false,"input":[{"name":"PARAMETER","scope":"global"}],"name":"exit","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER"}]},"espresso/neb.json":{"_id":"c9034468-df28-5357-8912-02226f919042","application":{"name":"espresso"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Nudged Elastic Band (NEB)","properties":["reaction_energy_barrier","reaction_energy_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"neb.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"neb.x","input":[{"name":"neb.in"}],"isDefault":false,"monitors":["standard_output"],"name":"neb","results":["reaction_energy_barrier","reaction_energy_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"9f273ca0-d240-5b1f-89a9-64dd579304ac","head":true,"input":[{"applicationName":"espresso","content":"BEGIN\nBEGIN_PATH_INPUT\n&PATH\n restart_mode = 'from_scratch'\n string_method = 'neb',\n nstep_path = 50,\n ds = 2.D0,\n opt_scheme = \"broyden\",\n num_of_images = {{ 2 + (input.INTERMEDIATE_IMAGES.length or neb.nImages) }},\n k_max = 0.3D0,\n k_min = 0.2D0,\n CI_scheme = \"auto\",\n path_thr = 0.1D0,\n/\nEND_PATH_INPUT\nBEGIN_ENGINE_INPUT\n&CONTROL\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.03\n nspin = 2\n starting_magnetization = 0.5\n/\n&ELECTRONS\n conv_thr = 1.D-8\n mixing_beta = 0.3\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nBEGIN_POSITIONS\nFIRST_IMAGE\nATOMIC_POSITIONS crystal\n{{ input.FIRST_IMAGE }}\n{%- for IMAGE in input.INTERMEDIATE_IMAGES %}\nINTERMEDIATE_IMAGE\nATOMIC_POSITIONS crystal\n{{ IMAGE }}\n{%- endfor %}\nLAST_IMAGE\nATOMIC_POSITIONS crystal\n{{ input.LAST_IMAGE }}\nEND_POSITIONS\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\nEND_ENGINE_INPUT\nEND\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"NEBFormDataManager"},{"name":"QENEBInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"neb.x","name":"neb.in","rendered":"BEGIN\nBEGIN_PATH_INPUT\n&PATH\n restart_mode = 'from_scratch'\n string_method = 'neb',\n nstep_path = 50,\n ds = 2.D0,\n opt_scheme = \"broyden\",\n num_of_images = 3,\n k_max = 0.3D0,\n k_min = 0.2D0,\n CI_scheme = \"auto\",\n path_thr = 0.1D0,\n/\nEND_PATH_INPUT\nBEGIN_ENGINE_INPUT\n&CONTROL\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.03\n nspin = 2\n starting_magnetization = 0.5\n/\n&ELECTRONS\n conv_thr = 1.D-8\n mixing_beta = 0.3\n/\nATOMIC_SPECIES\nSi 28.0855 \nBEGIN_POSITIONS\nFIRST_IMAGE\nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nLAST_IMAGE\nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nEND_POSITIONS\nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \nEND_ENGINE_INPUT\nEND\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"neb","postProcessors":[],"preProcessors":[],"results":[{"name":"reaction_energy_barrier"},{"name":"reaction_energy_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/ph_init_qpoints.json":{"_id":"2f017bcb-f4ba-55b8-b939-1f780679a88e","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"ph-init-qpoints","properties":[],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_init_qpoints.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_init_qpoints","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"b8ea6a33-38f3-5434-b17e-b5eae8fff9fc","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .false.\n start_irr = 0\n last_irr = 0\n ldisp = .true.\n fildyn = 'dyn0'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_init_qpoints.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .false.\n start_irr = 0\n last_irr = 0\n ldisp = .true.\n fildyn = 'dyn0'\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_init_qpoints","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/ph_single_irr_qpt.json":{"_id":"e68db280-8636-53e3-81a0-88396ba6147d","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"ph-single-irr-qpt","properties":[],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_single_irr_qpt.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_single_irr_qpt","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"8db9af08-d935-57a0-a824-e7db6d936de8","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n {% raw %}\n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n {% endraw %}\n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_SCRATCH_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_single_irr_qpt.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n \n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n \n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = '{{ JOB_SCRATCH_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_single_irr_qpt","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/phonon_dispersions.json":{"_id":"bfb69b48-8fbf-5a0d-8949-448f20754766","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Phonon Dispersions","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos","phonon_dispersions"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"13bcafce-56ef-5b47-b079-317495eb6933","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"a7fded20-889b-54fc-bbb0-456e82689ab1","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_path","results":["phonon_dispersions"],"schemaVersion":"2022.8.16"},"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_path","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dispersions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/phonon_dos.json":{"_id":"2232051b-9f2a-5a48-9b4d-6231eb6e8297","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Phonon Density of States","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"13bcafce-56ef-5b47-b079-317495eb6933","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"8fe6a24b-c994-55a2-a448-88657292e8c2","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_grid","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/phonon_dos_dispersion.json":{"_id":"291d25cd-378a-5be7-9d85-c8013a4b165b","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Phonon Density of States + Dispersions","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos","phonon_dispersions"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"13bcafce-56ef-5b47-b079-317495eb6933","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"8fe6a24b-c994-55a2-a448-88657292e8c2","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_grid","next":"a7fded20-889b-54fc-bbb0-456e82689ab1","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_path","results":["phonon_dispersions"],"schemaVersion":"2022.8.16"},"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_path","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dispersions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/phonon_reduce.json":{"_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"reduce","properties":["phonon_dos","phonon_dispersions"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid_restart.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid_restart","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"cb206177-a4af-599a-81ba-6c88d24253b6","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid_restart.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid_restart","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"8fe6a24b-c994-55a2-a448-88657292e8c2","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_grid","next":"a7fded20-889b-54fc-bbb0-456e82689ab1","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_path","results":["phonon_dispersions"],"schemaVersion":"2022.8.16"},"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_path","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dispersions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/plot_wavefunction.json":{"_id":"e4ec581f-1cb3-5036-b698-999a96711559","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Plot Wavefunction","properties":["potential_profile","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"plot_wavefunction.py"},{"name":"requirements.txt","templateName":"requirements_plot_wavefunction.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"plot_wavefunction","results":["potential_profile","file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"57fca898-8e8b-5ef2-81a5-9d2b612bc18d","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"plot WFN","postProcessors":[],"preProcessors":[],"results":[{"name":"potential_profile"},{"name":"file_content"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/post_processor.json":{"_id":"7239fc3a-b343-513f-af35-e8687e1829da","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"post-processor","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_collect_dynmat.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_collect_dynmat","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_collect_dynmat.sh","rendered":"\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/pp_wfn.json":{"_id":"7edc20aa-d533-57d8-b8a0-1e504ceb19fd","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"PP Wavefunction","properties":[],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_wfn.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_wfn","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"pp-wfn","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {% raw %}{{ KBAND_VALUE }}{% endraw %},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_wfn.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {{ KBAND_VALUE }},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pp_wfn","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/pre_processor.json":{"_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"pre-processor","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_link_outdir_save.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_link_outdir_save","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_link_outdir_save.sh","rendered":"\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/pw_scf.json":{"_id":"f52b8039-83d0-5485-a1f1-0bc37cb01ed3","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"pw-scf","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/recalculate_bands.json":{"_id":"64551dfb-e529-5d8d-9092-ff268f4da134","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Recalculate Bands","properties":["band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/surface_energy.json":{"_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Surface Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"e463ef46-a36e-5168-87dd-e21eb980dfb8","head":true,"input":[{"endpoint":"materials","endpoint_options":{"params":{"projection":"{}","query":"{'_id': MATERIAL_ID}"}},"name":"DATA"}],"monitors":[],"name":"io-slab","next":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","head":false,"input":[{"name":"DATA","scope":"e463ef46-a36e-5168-87dd-e21eb980dfb8"}],"monitors":[],"name":"slab","next":"44263820-0c80-5bd1-b854-9da8d198eac1","operand":"SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"44263820-0c80-5bd1-b854-9da8d198eac1","head":false,"input":[{"endpoint":"materials","endpoint_options":{"params":{"projection":"{}","query":"{'_id': SLAB.metadata.bulkId}"}},"name":"DATA"}],"monitors":[],"name":"io-bulk","next":"b70656f1-a394-57f4-b4de-00096969df4b","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"b70656f1-a394-57f4-b4de-00096969df4b","head":false,"input":[{"name":"DATA","scope":"44263820-0c80-5bd1-b854-9da8d198eac1"}],"monitors":[],"name":"bulk","next":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","operand":"BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0] if DATA else None"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"errorMessage":"Bulk material does not exist!","flowchartId":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","head":false,"monitors":[],"name":"assert-bulk","next":"490635e0-c593-5809-9eb2-c794b96cfed1","postProcessors":[],"preProcessors":[],"results":[],"statement":"BULK != None","status":"idle","statusTrack":[],"tags":[],"type":"assertion"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"490635e0-c593-5809-9eb2-c794b96cfed1","head":false,"input":[{"endpoint":"refined-properties","endpoint_options":{"params":{"projection":"{'sort': {'precision.value': -1}, 'limit': 1}","query":"{ 'exabyteId': BULK.exabyteId, 'data.name': 'total_energy', 'group': {'$regex': ''.join((SUBWORKFLOW.application.shortName, ':'))} }"}},"name":"DATA"}],"monitors":[],"name":"io-e-bulk","next":"bbe13b97-4243-5a85-8f61-a279d0b797aa","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"bbe13b97-4243-5a85-8f61-a279d0b797aa","head":false,"input":[{"name":"DATA","scope":"490635e0-c593-5809-9eb2-c794b96cfed1"}],"monitors":[],"name":"e-bulk","next":"a06c9f43-7670-5fd0-ac42-7028a472235a","operand":"E_BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0].data.value if DATA else None"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"errorMessage":"E_BULK does not exist!","flowchartId":"a06c9f43-7670-5fd0-ac42-7028a472235a","head":false,"monitors":[],"name":"assert-e-bulk","next":"cdf210be-26ed-585a-b4ac-d55795ba2975","postProcessors":[],"preProcessors":[],"results":[],"statement":"E_BULK != None","status":"idle","statusTrack":[],"tags":[],"type":"assertion"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"cdf210be-26ed-585a-b4ac-d55795ba2975","head":false,"input":[],"monitors":[],"name":"surface","next":"ffa8e43d-096a-555b-b8d0-6d283365ef47","operand":"A","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"np.linalg.norm(np.cross(SLAB.lattice.vectors.a, SLAB.lattice.vectors.b))"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"ffa8e43d-096a-555b-b8d0-6d283365ef47","head":false,"input":[],"monitors":[],"name":"n-bulk","next":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","operand":"N_BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"len(BULK.basis.elements)"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","head":false,"input":[],"monitors":[],"name":"n-slab","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"N_SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"len(SLAB.basis.elements)"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"fcd88119-817c-5ac1-a430-ba892ac743eb","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"fcd88119-817c-5ac1-a430-ba892ac743eb","head":false,"input":[{"name":"total_energy","scope":"9fc7a088-5533-5f70-bb33-f676ec65f565"}],"monitors":[],"name":"e-slab","next":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","operand":"E_SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","head":false,"input":[],"monitors":[],"name":"surface-energy","operand":"SURFACE_ENERGY","postProcessors":[],"preProcessors":[],"results":[{"name":"surface_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"1 / (2 * A) * (E_SLAB - E_BULK * (N_SLAB/N_BULK))"}]},"espresso/total_energy.json":{"_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Total Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"tags":["default"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/total_energy_with_bands.json":{"_id":"109ac366-8f6d-56d5-9b45-6f665f13a511","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Total Energy with Bands","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"tags":["wfn_plot"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-scf-total-energy","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"pw-bands-total-energy","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-bands-total-energy","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"18a26058-7d37-57ac-a685-335862dbf4db","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"18a26058-7d37-57ac-a685-335862dbf4db","head":false,"input":[{"name":"band_structure","scope":"pw-bands-total-energy"}],"name":"assignment BS","next":"7d103bf9-40b8-5f90-8934-bbcb6c7b9802","operand":"band_structure","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"band_structure"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"7d103bf9-40b8-5f90-8934-bbcb6c7b9802","head":false,"input":[{"name":"fermi_energy","scope":"pw-scf-total-energy"}],"name":"assignment FE","operand":"fermi_energy","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"fermi_energy"}]},"espresso/valence_band_offset_calc_from_previous_esp_vbm.json":{"_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","application":{"name":"espresso"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Calculate VBO","properties":["valence_band_offset"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"bd4eaa98-b001-5694-87ef-ec77540502ab","head":true,"input":[],"name":"Difference of valence band maxima","next":"2626f7bb-d392-5fd4-ab71-329b508de347","operand":"VBM_DIFF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"VBM_LEFT - VBM_RIGHT"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"2626f7bb-d392-5fd4-ab71-329b508de347","head":false,"input":[],"name":"Difference of macroscopically averaged ESP in bulk","next":"b7307787-53e2-599b-ad12-d627b04074b4","operand":"AVG_ESP_DIFF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"AVG_ESP_LEFT[0] - AVG_ESP_RIGHT[0]"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"b7307787-53e2-599b-ad12-d627b04074b4","head":false,"input":[],"name":"Lineup of macroscopically averaged ESP in interface","next":"197f4b4d-cb7b-57be-a885-d44cb1f61905","operand":"ESP_LINEUP","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"np.abs(AVG_ESP_INTERFACE[0] - AVG_ESP_INTERFACE[1])"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"197f4b4d-cb7b-57be-a885-d44cb1f61905","head":false,"input":[],"name":"Valence Band Offset","operand":"VALENCE_BAND_OFFSET","results":[{"name":"valence_band_offset"}],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"abs(VBM_DIFF - AVG_ESP_DIFF + (np.sign(AVG_ESP_DIFF) * ESP_LINEUP))"}]},"espresso/variable_cell_relaxation.json":{"_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Variable-cell Relaxation","properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"systemName":"espresso-variable-cell-relaxation","tags":["variable-cell_relaxation"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_vc_relax.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"pw_vc-relax","results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"e1bd0870-6245-5fc2-a50d-48cabc356ac8","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_vc_relax.in","rendered":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"pw_vc-relax","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"espresso/zero_point_energy.json":{"_id":"151538cc-9e71-5269-8b9e-cb5977151227","application":{"name":"espresso"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Zero Point Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"107595d1-490f-53a2-8432-7f8a12f14d96","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_gamma.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_gamma","results":["zero_point_energy"],"schemaVersion":"2022.8.16"},"flowchartId":"107595d1-490f-53a2-8432-7f8a12f14d96","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n0 0 0\n","contextProviders":[],"executableName":"ph.x","name":"ph_gamma.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n0 0 0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_zpe","postProcessors":[],"preProcessors":[],"results":[{"name":"zero_point_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"nwchem/total_energy.json":{"_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","application":{"name":"nwchem"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"pople","type":"localorbital"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Total Energy","properties":["total_energy","total_energy_contributions"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"nwchem","schemaVersion":"2022.8.16","shortName":"nwchem","summary":"NWChem","version":"7.0.2"},"executable":{"hasAdvancedComputeOptions":false,"isDefault":true,"monitors":["standard_output"],"name":"nwchem","postProcessors":["error_handler"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"nwchem","executableName":"nwchem","input":[{"name":"nwchem_total_energy.inp"}],"isDefault":true,"monitors":["standard_output"],"name":"nwchem_total_energy","results":["total_energy","total_energy_contributions"],"schemaVersion":"2022.8.16"},"flowchartId":"6f1eda0b-ebe1-5ccd-92dc-c2e55de5e0c7","head":true,"input":[{"applicationName":"nwchem","content":" start nwchem\n title \"Test\"\n charge {{ input.CHARGE }}\n geometry units au noautosym\n {{ input.ATOMIC_POSITIONS }}\n end\n basis\n * library {{ input.BASIS }}\n end\n dft\n xc {{ input.FUNCTIONAL }}\n mult {{ input.MULT }}\n end\n task dft energy\n","contextProviders":[{"name":"NWChemInputDataManager"}],"executableName":"nwchem","name":"nwchem_total_energy.inp","rendered":" start nwchem\n title \"Test\"\n charge 0\n geometry units au noautosym\n Si 0.000000000 0.000000000 0.000000000 \nSi 1.116306745 0.789348070 1.933500000 \n end\n basis\n * library 6-31G\n end\n dft\n xc B3LYP\n mult 1\n end\n task dft energy\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"nwchem_total_energy","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"python/extract_bands_fermi.json":{"_id":"1bb75a6a-4c8c-5336-a24c-1963e83825bc","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Extract Bands Near Fermi","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"extract_bands_fermi.py"},{"name":"requirements.txt","templateName":"requirements_bands_fermi.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"extract_bands_fermi","schemaVersion":"2022.8.16"},"flowchartId":"extract-band-fermi","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"extract_bands_fermi.py","rendered":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"extract_bands_fermi","next":"8771dc7f-878e-5f13-a840-a3a416854f1e","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8771dc7f-878e-5f13-a840-a3a416854f1e","head":false,"input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"name":"Store Band Below EF","next":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","operand":"KBAND_VALUE_BELOW_EF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['band_below_fermi']"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","head":false,"input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"name":"Store Band Above EF","next":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","operand":"KBAND_VALUE_ABOVE_EF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['band_above_fermi']"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","head":false,"input":[],"name":"Select Band","operand":"KBAND_VALUE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"KBAND_VALUE_BELOW_EF"}]},"python/ml/classification_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:random_forest_classification:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"35436b4a-cd9c-5089-ab42-665c4f9ba049","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:roc_curve:sklearn","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ROC Curve Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]},"python/ml/clustering_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_k_means_clustering_sklearn.py","templateName":"model_k_means_clustering_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:k_means_clustering:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for k-means clustering. #\n# #\n# In k-means clustering, the labels are not provided ahead of #\n# time. Instead, one supplies the number of groups the #\n# algorithm should split the dataset into. Here, we set our #\n# own default of 4 groups (fewer than sklearn's default of 8). #\n# Otherwise, the default parameters of the clustering method #\n# are the same as in sklearn. #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.cluster\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Initialize the Model\n model = sklearn.cluster.KMeans(\n n_clusters=4,\n init=\"k-means++\",\n n_init=10,\n max_iter=300,\n tol=0.0001,\n copy_x=True,\n algorithm=\"auto\",\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors)\n context.save(model, \"k_means\")\n train_labels = model.predict(train_descriptors)\n test_labels = model.predict(test_descriptors)\n\n context.save(train_labels, \"train_labels\")\n context.save(test_labels, \"test_labels\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"k_means\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_k_means_clustering_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for k-means clustering. #\n# #\n# In k-means clustering, the labels are not provided ahead of #\n# time. Instead, one supplies the number of groups the #\n# algorithm should split the dataset into. Here, we set our #\n# own default of 4 groups (fewer than sklearn's default of 8). #\n# Otherwise, the default parameters of the clustering method #\n# are the same as in sklearn. #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.cluster\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Initialize the Model\n model = sklearn.cluster.KMeans(\n n_clusters=4,\n init=\"k-means++\",\n n_init=10,\n max_iter=300,\n tol=0.0001,\n copy_x=True,\n algorithm=\"auto\",\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors)\n context.save(model, \"k_means\")\n train_labels = model.predict(train_descriptors)\n test_labels = model.predict(test_descriptors)\n\n context.save(train_labels, \"train_labels\")\n context.save(test_labels, \"test_labels\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"k_means\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"9c95c27b-c8bd-5e8b-8829-d354611decef","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_pca_2d_clusters_matplotlib.py","templateName":"post_processing_pca_2d_clusters_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:pca_2d_clusters:matplotlib","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"9c95c27b-c8bd-5e8b-8829-d354611decef","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Cluster Visualization #\n# #\n# This unit takes an N-dimensional feature space, and uses #\n# Principal-component Analysis (PCA) to project into a 2D space #\n# to facilitate plotting on a scatter plot. #\n# #\n# The 2D space we project into are the first two principal #\n# components identified in PCA, which are the two vectors with #\n# the highest variance. #\n# #\n# Wikipedia Article on PCA: #\n# https://en.wikipedia.org/wiki/Principal_component_analysis #\n# #\n# We then plot the labels assigned to the train an test set, #\n# and color by class. #\n# #\n# ----------------------------------------------------------------- #\n\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport settings\nimport sklearn.decomposition\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_labels = context.load(\"train_labels\")\n train_descriptors = context.load(\"train_descriptors\")\n test_labels = context.load(\"test_labels\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Unscale the descriptors\n descriptor_scaler = context.load(\"descriptor_scaler\")\n train_descriptors = descriptor_scaler.inverse_transform(train_descriptors)\n test_descriptors = descriptor_scaler.inverse_transform(test_descriptors)\n\n # We need at least 2 dimensions, exit if the dataset is 1D\n if train_descriptors.ndim < 2:\n raise ValueError(\"The train descriptors do not have enough dimensions to be plot in 2D\")\n\n # The data could be multidimensional. Let's do some PCA to get things into 2 dimensions.\n pca = sklearn.decomposition.PCA(n_components=2)\n train_descriptors = pca.fit_transform(train_descriptors)\n test_descriptors = pca.transform(test_descriptors)\n xlabel = \"Principle Component 1\"\n ylabel = \"Principle Component 2\"\n\n # Determine the labels we're going to be using, and generate their colors\n labels = set(train_labels)\n colors = {}\n for count, label in enumerate(labels):\n cm = matplotlib.cm.get_cmap('jet', len(labels))\n color = cm(count / len(labels))\n colors[label] = color\n train_colors = [colors[label] for label in train_labels]\n test_colors = [colors[label] for label in test_labels]\n\n # Train / Test Split Visualization\n plt.title(\"Train Test Split Visualization\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=\"#33548c\", marker=\"o\", label=\"Training Set\")\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=\"#F0B332\", marker=\"o\", label=\"Testing Set\")\n xmin, xmax, ymin, ymax = plt.axis()\n plt.legend()\n plt.tight_layout()\n plt.savefig(\"train_test_split.png\", dpi=600)\n plt.close()\n\n def clusters_legend(cluster_colors):\n \"\"\"\n Helper function that creates a legend, given the coloration by clusters.\n Args:\n cluster_colors: A dictionary of the form {cluster_number : color_value}\n\n Returns:\n None; just creates the legend and puts it on the plot\n \"\"\"\n legend_symbols = []\n for group, color in cluster_colors.items():\n label = f\"Cluster {group}\"\n legend_symbols.append(matplotlib.lines.Line2D([], [], color=color, marker=\"o\",\n linewidth=0, label=label))\n plt.legend(handles=legend_symbols)\n\n # Training Set Clusters\n plt.title(\"Training Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=train_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"train_clusters.png\", dpi=600)\n plt.close()\n\n # Testing Set Clusters\n plt.title(\"Testing Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=test_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"test_clusters.png\", dpi=600)\n plt.close()\n\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_pca_2d_clusters_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Cluster Visualization #\n# #\n# This unit takes an N-dimensional feature space, and uses #\n# Principal-component Analysis (PCA) to project into a 2D space #\n# to facilitate plotting on a scatter plot. #\n# #\n# The 2D space we project into are the first two principal #\n# components identified in PCA, which are the two vectors with #\n# the highest variance. #\n# #\n# Wikipedia Article on PCA: #\n# https://en.wikipedia.org/wiki/Principal_component_analysis #\n# #\n# We then plot the labels assigned to the train an test set, #\n# and color by class. #\n# #\n# ----------------------------------------------------------------- #\n\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport settings\nimport sklearn.decomposition\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_labels = context.load(\"train_labels\")\n train_descriptors = context.load(\"train_descriptors\")\n test_labels = context.load(\"test_labels\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Unscale the descriptors\n descriptor_scaler = context.load(\"descriptor_scaler\")\n train_descriptors = descriptor_scaler.inverse_transform(train_descriptors)\n test_descriptors = descriptor_scaler.inverse_transform(test_descriptors)\n\n # We need at least 2 dimensions, exit if the dataset is 1D\n if train_descriptors.ndim < 2:\n raise ValueError(\"The train descriptors do not have enough dimensions to be plot in 2D\")\n\n # The data could be multidimensional. Let's do some PCA to get things into 2 dimensions.\n pca = sklearn.decomposition.PCA(n_components=2)\n train_descriptors = pca.fit_transform(train_descriptors)\n test_descriptors = pca.transform(test_descriptors)\n xlabel = \"Principle Component 1\"\n ylabel = \"Principle Component 2\"\n\n # Determine the labels we're going to be using, and generate their colors\n labels = set(train_labels)\n colors = {}\n for count, label in enumerate(labels):\n cm = matplotlib.cm.get_cmap('jet', len(labels))\n color = cm(count / len(labels))\n colors[label] = color\n train_colors = [colors[label] for label in train_labels]\n test_colors = [colors[label] for label in test_labels]\n\n # Train / Test Split Visualization\n plt.title(\"Train Test Split Visualization\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=\"#33548c\", marker=\"o\", label=\"Training Set\")\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=\"#F0B332\", marker=\"o\", label=\"Testing Set\")\n xmin, xmax, ymin, ymax = plt.axis()\n plt.legend()\n plt.tight_layout()\n plt.savefig(\"train_test_split.png\", dpi=600)\n plt.close()\n\n def clusters_legend(cluster_colors):\n \"\"\"\n Helper function that creates a legend, given the coloration by clusters.\n Args:\n cluster_colors: A dictionary of the form {cluster_number : color_value}\n\n Returns:\n None; just creates the legend and puts it on the plot\n \"\"\"\n legend_symbols = []\n for group, color in cluster_colors.items():\n label = f\"Cluster {group}\"\n legend_symbols.append(matplotlib.lines.Line2D([], [], color=color, marker=\"o\",\n linewidth=0, label=label))\n plt.legend(handles=legend_symbols)\n\n # Training Set Clusters\n plt.title(\"Training Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=train_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"train_clusters.png\", dpi=600)\n plt.close()\n\n # Testing Set Clusters\n plt.title(\"Testing Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=test_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"test_clusters.png\", dpi=600)\n plt.close()\n\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"2D PCA Clusters Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"train_test_split.png","filetype":"image","name":"file_content"},{"basename":"train_clusters.png","filetype":"image","name":"file_content"},{"basename":"test_clusters.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]},"python/ml/regression_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_mlp_sklearn.py","templateName":"model_mlp_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:multilayer_perceptron:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_mlp_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_parity_plot_matplotlib.py","templateName":"post_processing_parity_plot_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:parity_plot:matplotlib","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_parity_plot_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Parity Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"my_parity_plot.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]},"python/ml/train_head.json":{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Set Up the Job","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"head-set-predict-status","head":true,"input":[],"name":"Set Workflow Mode","next":"head-fetch-training-data","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":["pyml:workflow-type-setter"],"type":"assignment","value":"False"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-training-data","head":false,"input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"name":"Fetch Dataset","next":"head-branch-on-predict-status","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"else":"end-of-ml-train-head","flowchartId":"head-branch-on-predict-status","head":false,"input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"maxOccurrences":100,"name":"Train or Predict?","next":"head-fetch-trained-model","postProcessors":[],"preProcessors":[],"results":[],"statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":[],"then":"head-fetch-trained-model","type":"condition"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-trained-model","head":false,"input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"name":"Fetch Trained Model as file","next":"end-of-ml-train-head","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":["set-io-unit-filenames"],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"end-of-ml-train-head","head":false,"input":[],"name":"End Setup","operand":"IS_SETUP_COMPLETE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"True"}]},"python/plot_wavefunction.json":{"_id":"e4ec581f-1cb3-5036-b698-999a96711559","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Plot Wavefunction","properties":["potential_profile","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"plot_wavefunction.py"},{"name":"requirements.txt","templateName":"requirements_plot_wavefunction.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"plot_wavefunction","results":["potential_profile","file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"57fca898-8e8b-5ef2-81a5-9d2b612bc18d","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"plot WFN","postProcessors":[],"preProcessors":[],"results":[{"name":"potential_profile"},{"name":"file_content"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"python/python_script.json":{"_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","application":{"name":"python"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Python Script","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"hello_world.py"},{"name":"requirements.txt"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"python","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"shell/batch_espresso_pwscf.json":{"_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","application":{"name":"shell"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Shell Batch Job (Espresso PWSCF)","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"job_espresso_pw_scf.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"job_espresso_pw_scf","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","contextProviders":[],"executableName":"sh","name":"job_espresso_pw_scf.sh","rendered":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"shell/hello_world.json":{"_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","application":{"name":"shell"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Shell Hello World","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"hello_world.sh"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","contextProviders":[],"executableName":"sh","name":"hello_world.sh","rendered":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/band_gap.json":{"_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Gap","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"f0d65517-9592-5bc8-948e-a0851a766cbb","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_nscf","results":["band_gaps","fermi_energy"],"schemaVersion":"2022.8.16"},"flowchartId":"f0d65517-9592-5bc8-948e-a0851a766cbb","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_nscf","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/band_structure.json":{"_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"1e1de3be-f6e4-513e-afe2-c84e567a8108","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_bands","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/band_structure_dos.json":{"_id":"d38fea11-9781-5151-8dae-d705381498be","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure + Density of States","properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"1e1de3be-f6e4-513e-afe2-c84e567a8108","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_bands","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/dos.json":{"_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Density of States","properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/fixed_cell_relaxation.json":{"_id":"db6cc94b-2f26-5688-ba97-80b11567b549","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Fixed-cell Relaxation","properties":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_RELAX"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"vasp_relax","postProcessors":["prepare_restart"],"results":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"2f718a3d-5800-57e2-b707-075c1f1755c6","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"vasp_relax","postProcessors":[{"name":"prepare_restart"}],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_force"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/initial_final_total_energies.json":{"_id":"792e8c42-86ce-5f01-812a-66378ec4f379","application":{"name":"vasp"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Initial/Final Total Energies","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_INITIAL"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_neb_initial","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"f969f010-9dae-5085-9ac5-86150ef78897","head":true,"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.FIRST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_neb_initial","next":"e65a17ce-10c8-5710-ad4d-fb3d42434091","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_FINAL"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_neb_final","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"e65a17ce-10c8-5710-ad4d-fb3d42434091","head":false,"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.LAST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_neb_final","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/kpoint_convergence.json":{"_id":"5d736d84-d616-538f-a09b-81a32ac0777c","application":{"name":"vasp"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"K-point Convergence","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-tolerance","head":true,"input":[],"name":"Init tolerance","next":"init-increment","operand":"TOL","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0.00001},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-increment","head":false,"input":[],"name":"Init increment","next":"init-result","operand":"INC","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-result","head":false,"input":[],"name":"Init result","next":"init-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-parameter","head":false,"input":[],"name":"Init parameter","next":"vasp-kpoint-convergence","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR"},{"name":"KPOINTS","templateName":"KPOINTS_CONV"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_kpt_conv","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"vasp-kpoint-convergence","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic Mesh\n0\nGamma\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}{% endraw %}\n0 0 0\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic Mesh\n0\nGamma\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}\n0 0 0\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_kpt_conv","next":"store-result","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"store-result","head":false,"input":[{"name":"total_energy","scope":"vasp-kpoint-convergence"}],"name":"store result","next":"check-convergence","operand":"RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"else":"update-result","flowchartId":"check-convergence","head":false,"input":[],"maxOccurrences":50,"name":"check convergence","next":"update-result","postProcessors":[],"preProcessors":[],"results":[],"statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","status":"idle","statusTrack":[],"tags":[],"then":"convergence-is-reached","type":"condition"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"update-result","head":false,"input":[{"name":"RESULT","scope":"global"}],"name":"update result","next":"increment-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"RESULT"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"increment-parameter","head":false,"input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"name":"increment parameter","next":"vasp-kpoint-convergence","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER+INC"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"convergence-is-reached","head":false,"input":[{"name":"PARAMETER","scope":"global"}],"name":"exit","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER"}]},"vasp/neb_subworkflow.json":{"_id":"e6215fb9-e60c-541b-b73e-b077d64b3a95","application":{"name":"vasp"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Nudged Elastic Band (NEB)","properties":["reaction_energy_barrier","reaction_energy_profile"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB"},{"name":"KPOINTS","templateName":"KPOINTS"}],"isDefault":false,"monitors":["standard_output"],"name":"vasp_neb","results":["reaction_energy_barrier","reaction_energy_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"9a1660ab-8067-5fad-9fb8-7c039f634636","head":true,"input":[{"applicationName":"vasp","content":"ISTART = 0\nIBRION = 1\nEDIFFG = -0.001\nENCUT = 500\nNELM = 100\nNSW = 100\nIMAGES = {{ input.INTERMEDIATE_IMAGES.length or neb.nImages }}\nSPRING = -5\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nIBRION = 1\nEDIFFG = -0.001\nENCUT = 500\nNELM = 100\nNSW = 100\nIMAGES = 1\nSPRING = -5\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"vasp_neb","postProcessors":[],"preProcessors":[],"results":[{"name":"reaction_energy_barrier"},{"name":"reaction_energy_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},"vasp/prepare_images.json":{"_id":"c9b7ad2a-5207-5e41-9b66-28474a8921f8","application":{"name":"vasp"},"isMultiMaterial":true,"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Prepare Directories","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"bash_vasp_prepare_neb_images.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"bash_vasp_prepare_neb_images","schemaVersion":"2022.8.16"},"flowchartId":"dc397ead-54ad-513b-992e-aedd54576409","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ------------------------------------------------------------------ #\n# This script prepares necessary directories to run VASP NEB\n# calculation. It puts initial POSCAR into directory 00, final into 0N\n# and intermediate images in 01 to 0(N-1). It is assumed that SCF\n# calculations for initial and final structures are already done in\n# previous subworkflows and their standard outputs are written into\n# \"vasp_neb_initial.out\" and \"vasp_neb_final.out\" files respectively.\n# These outputs are here copied into initial (00) and final (0N)\n# directories to calculate the reaction energy profile.\n# ------------------------------------------------------------------ #\n\n{% raw %}\ncd {{ JOB_WORK_DIR }}\n{% endraw %}\n\n# Prepare First Directory\nmkdir -p 00\ncat > 00/POSCAR < 0{{ input.INTERMEDIATE_IMAGES.length + 1 }}/POSCAR < 0{{ loop.index }}/POSCAR < 00/POSCAR < 01/POSCAR < fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"extract_bands_fermi.py","rendered":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","schemaVersion":"2022.8.16"}],"next":"8771dc7f-878e-5f13-a840-a3a416854f1e"},{"name":"Store Band Below EF","type":"assignment","operand":"KBAND_VALUE_BELOW_EF","value":"json.loads(STDOUT)['band_below_fermi']","input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"status":"idle","statusTrack":[],"flowchartId":"8771dc7f-878e-5f13-a840-a3a416854f1e","tags":[],"head":false,"next":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","application":{"name":"python","version":"3.10.13","build":"Default","schemaVersion":"2022.8.16","isDefault":false}},{"name":"Store Band Above EF","type":"assignment","operand":"KBAND_VALUE_ABOVE_EF","value":"json.loads(STDOUT)['band_above_fermi']","input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"status":"idle","statusTrack":[],"flowchartId":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","tags":[],"head":false,"next":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","application":{"name":"python","version":"3.10.13","build":"Default","schemaVersion":"2022.8.16","isDefault":false}},{"name":"Select Band","type":"assignment","operand":"KBAND_VALUE","value":"KBAND_VALUE_BELOW_EF","input":[],"status":"idle","statusTrack":[],"flowchartId":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","tags":[],"head":false,"application":{"name":"python","version":"3.10.13","build":"Default","schemaVersion":"2022.8.16","isDefault":false}}]} diff --git a/dist/js/runtime_data/subworkflows/espresso/plot_wavefunction.json b/dist/js/runtime_data/subworkflows/espresso/plot_wavefunction.json new file mode 100644 index 00000000..ea132f72 --- /dev/null +++ b/dist/js/runtime_data/subworkflows/espresso/plot_wavefunction.json @@ -0,0 +1 @@ +{"_id":"e4ec581f-1cb3-5036-b698-999a96711559","name":"Plot Wavefunction","application":{"name":"espresso"},"properties":["potential_profile","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"plot WFN","head":true,"results":[{"name":"potential_profile"},{"name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"57fca898-8e8b-5ef2-81a5-9d2b612bc18d","preProcessors":[],"postProcessors":[],"application":{"name":"python","version":"3.10.13","build":"Default","schemaVersion":"2022.8.16","isDefault":false},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"plot_wavefunction.py"},{"name":"requirements.txt","templateName":"requirements_plot_wavefunction.txt"}],"monitors":["standard_output"],"results":["potential_profile","file_content"],"name":"plot_wavefunction","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","schemaVersion":"2022.8.16"}]}]} diff --git a/dist/js/runtime_data/subworkflows/espresso/pp_wfn.json b/dist/js/runtime_data/subworkflows/espresso/pp_wfn.json new file mode 100644 index 00000000..7c6c5677 --- /dev/null +++ b/dist/js/runtime_data/subworkflows/espresso/pp_wfn.json @@ -0,0 +1 @@ +{"_id":"7edc20aa-d533-57d8-b8a0-1e504ceb19fd","name":"PP Wavefunction","application":{"name":"espresso"},"properties":[],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pp_wfn","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"pp-wfn","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_wfn.in"}],"monitors":["standard_output"],"results":[],"name":"pp_wfn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {% raw %}{{ KBAND_VALUE }}{% endraw %},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_wfn.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {{ KBAND_VALUE }},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n","schemaVersion":"2022.8.16"}]}]} diff --git a/dist/js/runtime_data/subworkflows/espresso/total_energy_with_bands.json b/dist/js/runtime_data/subworkflows/espresso/total_energy_with_bands.json new file mode 100644 index 00000000..bb8f9286 --- /dev/null +++ b/dist/js/runtime_data/subworkflows/espresso/total_energy_with_bands.json @@ -0,0 +1 @@ +{"_id":"109ac366-8f6d-56d5-9b45-6f665f13a511","name":"Total Energy with Bands","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"pw-scf-total-energy","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-total-energy"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-total-energy","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"18a26058-7d37-57ac-a685-335862dbf4db"},{"name":"assignment BS","type":"assignment","operand":"band_structure","value":"band_structure","input":[{"name":"band_structure","scope":"pw-bands-total-energy"}],"status":"idle","statusTrack":[],"flowchartId":"18a26058-7d37-57ac-a685-335862dbf4db","tags":[],"head":false,"next":"7d103bf9-40b8-5f90-8934-bbcb6c7b9802","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"assignment FE","type":"assignment","operand":"fermi_energy","value":"fermi_energy","input":[{"name":"fermi_energy","scope":"pw-scf-total-energy"}],"status":"idle","statusTrack":[],"flowchartId":"7d103bf9-40b8-5f90-8934-bbcb6c7b9802","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}],"tags":["wfn_plot"]} diff --git a/dist/js/runtime_data/subworkflows/python/extract_bands_fermi.json b/dist/js/runtime_data/subworkflows/python/extract_bands_fermi.json new file mode 100644 index 00000000..1b60e523 --- /dev/null +++ b/dist/js/runtime_data/subworkflows/python/extract_bands_fermi.json @@ -0,0 +1 @@ +{"_id":"1bb75a6a-4c8c-5336-a24c-1963e83825bc","name":"Extract Bands Near Fermi","application":{"name":"python"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"extract_bands_fermi","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"extract-band-fermi","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"extract_bands_fermi.py"},{"name":"requirements.txt","templateName":"requirements_bands_fermi.txt"}],"monitors":["standard_output"],"name":"extract_bands_fermi","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"extract_bands_fermi.py","rendered":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","schemaVersion":"2022.8.16"}],"next":"8771dc7f-878e-5f13-a840-a3a416854f1e"},{"name":"Store Band Below EF","type":"assignment","operand":"KBAND_VALUE_BELOW_EF","value":"json.loads(STDOUT)['band_below_fermi']","input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"status":"idle","statusTrack":[],"flowchartId":"8771dc7f-878e-5f13-a840-a3a416854f1e","tags":[],"head":false,"next":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Store Band Above EF","type":"assignment","operand":"KBAND_VALUE_ABOVE_EF","value":"json.loads(STDOUT)['band_above_fermi']","input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"status":"idle","statusTrack":[],"flowchartId":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","tags":[],"head":false,"next":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Select Band","type":"assignment","operand":"KBAND_VALUE","value":"KBAND_VALUE_BELOW_EF","input":[],"status":"idle","statusTrack":[],"flowchartId":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]} diff --git a/dist/js/runtime_data/subworkflows/python/plot_wavefunction.json b/dist/js/runtime_data/subworkflows/python/plot_wavefunction.json new file mode 100644 index 00000000..f720090b --- /dev/null +++ b/dist/js/runtime_data/subworkflows/python/plot_wavefunction.json @@ -0,0 +1 @@ +{"_id":"e4ec581f-1cb3-5036-b698-999a96711559","name":"Plot Wavefunction","application":{"name":"python"},"properties":["potential_profile","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"plot WFN","head":true,"results":[{"name":"potential_profile"},{"name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"57fca898-8e8b-5ef2-81a5-9d2b612bc18d","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"plot_wavefunction.py"},{"name":"requirements.txt","templateName":"requirements_plot_wavefunction.txt"}],"monitors":["standard_output"],"results":["potential_profile","file_content"],"name":"plot_wavefunction","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","schemaVersion":"2022.8.16"}]}]} diff --git a/dist/js/runtime_data/workflows.json b/dist/js/runtime_data/workflows.json index 651a09ce..cd1a9c7a 100644 --- a/dist/js/runtime_data/workflows.json +++ b/dist/js/runtime_data/workflows.json @@ -1 +1 @@ -{"filesMapByName":{"espresso/band_gap.json":{"_id":"cd826954-8c96-59f7-b2de-f36ce2d86105","application":{"name":"espresso"},"isDefault":false,"name":"Band Gap","properties":["atomic_forces","band_gaps","fermi_energy","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"233bb8cf-3b4a-5378-84d9-a6a95a2ab43d","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Gap","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"233bb8cf-3b4a-5378-84d9-a6a95a2ab43d","flowchartId":"db3b83ea-0ef5-594c-89a8-bde38dbc6105","head":true,"name":"Band Gap","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/band_gap_dos_hse.json":{"_id":"ab28e7cf-a363-5223-ae0b-a60c82bb4f9a","application":{"name":"espresso"},"isDefault":false,"name":"Band Gap + DoS - HSE","properties":["atomic_forces","band_gaps","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"f1341a29-777d-5ca3-8933-78a5e0d3f6f2","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"hse06"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"hybrid","type":"dft"},"name":"HSE Band Gap","properties":["atomic_forces","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","density_of_states"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_hse.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_hse","results":["atomic_forces","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"f494cdb2-304f-5da2-b979-ce3fbba3a6c4","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n ecutfock = 100\n occupations = 'smearing'\n degauss = 0.005\n input_dft='hse',\n nqx1 = {% if kgrid.dimensions[0]%2 == 0 %}{{kgrid.dimensions[0]/2}}{% else %}{{(kgrid.dimensions[0]+1)/2}}{% endif %}, nqx2 = {% if kgrid.dimensions[1]%2 == 0 %}{{kgrid.dimensions[1]/2}}{% else %}{{(kgrid.dimensions[1]+1)/2}}{% endif %}, nqx3 = {% if kgrid.dimensions[2]%2 == 0 %}{{kgrid.dimensions[2]/2}}{% else %}{{(kgrid.dimensions[2]+1)/2}}{% endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{% if d%2 == 0 %}{{d}} {% else %}{{d+1}} {% endif %}{% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf_hse.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n ecutfock = 100\n occupations = 'smearing'\n degauss = 0.005\n input_dft='hse',\n nqx1 = 1, nqx2 = 1, nqx3 = 1\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_hse","next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"band_gaps"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"projwfc","results":["density_of_states"],"schemaVersion":"2022.8.16"},"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","head":false,"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"projwfc","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"f1341a29-777d-5ca3-8933-78a5e0d3f6f2","flowchartId":"f7a0860d-6f9e-59e3-b600-07bbf986998a","head":true,"name":"HSE Band Gap","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/band_structure.json":{"_id":"cc901d3d-bf3f-522c-9dec-849ffc06f62a","application":{"name":"espresso"},"isDefault":false,"name":"Band Structure","properties":["atomic_forces","band_structure","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"26d32e68-c2b5-50e9-8933-15f684fcc039","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"d618df45-5af3-5da5-8882-d74a27e00b04","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"26d32e68-c2b5-50e9-8933-15f684fcc039","flowchartId":"c573187f-a8bb-5084-9fcf-1560bf4a7786","head":true,"name":"Band Structure","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/band_structure_dos.json":{"_id":"9b36cf93-81b9-5a40-bba3-d25955a9bfa8","application":{"name":"espresso"},"isDefault":false,"name":"Band Structure + Density of States","properties":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"fa594399-6b98-5d79-986c-0713601dc06c","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure + Density of States","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps","density_of_states"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"d618df45-5af3-5da5-8882-d74a27e00b04","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"projwfc","results":["density_of_states"],"schemaVersion":"2022.8.16"},"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","head":false,"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"projwfc","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"fa594399-6b98-5d79-986c-0713601dc06c","flowchartId":"8a098bb9-73b1-5e84-bfc7-b783e02d0f53","head":true,"name":"Band Structure + Density of States","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/band_structure_hse.json":{"_id":"23b9058b-884c-52d4-82a8-ee162b9761e0","application":{"name":"espresso"},"isDefault":false,"name":"Band Structure - HSE","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"79f2cb6a-7994-5369-8c85-af07c55ad26f","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Preliminary SCF Calculation","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"a2785cc5-2427-5c7a-b30f-7077475b948c","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Extract KPOINTS","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"espresso_extract_kpoints.py"},{"name":"requirements.txt","templateName":"requirements_empty.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_extract_kpoints","schemaVersion":"2022.8.16"},"flowchartId":"a716b133-2d04-50b5-b497-100265e3fa24","head":true,"input":[{"applicationName":"python","content":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_extract_kpoints.py","rendered":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Please add any packages required for this unit below following #\n# the requirements.txt specification: #\n# https://pip.pypa.io/en/stable/reference/requirements-file-format/ #\n# ------------------------------------------------------------------ #\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Please add any packages required for this unit below following #\n# the requirements.txt specification: #\n# https://pip.pypa.io/en/stable/reference/requirements-file-format/ #\n# ------------------------------------------------------------------ #\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Extract kpoints","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"e47ca302-96f2-5726-9b4c-f34cdfaa7f72","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"hse06"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"hybrid","type":"dft"},"name":"Main HSE Run","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_bands_hse.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_bands_hse","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"08bd7e4a-2454-53b7-8cc9-9a95975f7e6f","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n input_dft = 'hse',\n {% for d in qgrid.dimensions -%}\n nqx{{loop.index}} = {{d}}\n {% endfor %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal\n{{ '{{' }} {{ explicitKPath.length }} {% raw %} + KPOINTS|length {% endraw %} {{ '}}' }}\n{% raw %}\n{% for point in KPOINTS -%}\n {% for d in point.coordinates %}{{ \"%14.9f\"|format(d) }} {% endfor -%}{{ point.weight }}\n{% endfor %}\n{% endraw %}\n{% for point in explicitKPath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}0.0000001\n{% endfor %}\n","contextProviders":[{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPathFormDataManager"}],"executableName":"pw.x","name":"pw_scf_bands_hse.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n input_dft = 'hse',\n nqx1 = 1\n nqx2 = 1\n nqx3 = 1\n \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal\n{{ 101 + KPOINTS|length }}\n\n{% for point in KPOINTS -%}\n {% for d in point.coordinates %}{{ \"%14.9f\"|format(d) }} {% endfor -%}{{ point.weight }}\n{% endfor %}\n\n 0.000000000 0.000000000 0.000000000 0.0000001\n 0.050000000 0.000000000 0.050000000 0.0000001\n 0.100000000 0.000000000 0.100000000 0.0000001\n 0.150000000 0.000000000 0.150000000 0.0000001\n 0.200000000 0.000000000 0.200000000 0.0000001\n 0.250000000 0.000000000 0.250000000 0.0000001\n 0.300000000 0.000000000 0.300000000 0.0000001\n 0.350000000 0.000000000 0.350000000 0.0000001\n 0.400000000 0.000000000 0.400000000 0.0000001\n 0.450000000 0.000000000 0.450000000 0.0000001\n 0.500000000 0.000000000 0.500000000 0.0000001\n 0.500000000 0.025000000 0.525000000 0.0000001\n 0.500000000 0.050000000 0.550000000 0.0000001\n 0.500000000 0.075000000 0.575000000 0.0000001\n 0.500000000 0.100000000 0.600000000 0.0000001\n 0.500000000 0.125000000 0.625000000 0.0000001\n 0.500000000 0.150000000 0.650000000 0.0000001\n 0.500000000 0.175000000 0.675000000 0.0000001\n 0.500000000 0.200000000 0.700000000 0.0000001\n 0.500000000 0.225000000 0.725000000 0.0000001\n 0.500000000 0.250000000 0.750000000 0.0000001\n 0.487500000 0.262500000 0.750000000 0.0000001\n 0.475000000 0.275000000 0.750000000 0.0000001\n 0.462500000 0.287500000 0.750000000 0.0000001\n 0.450000000 0.300000000 0.750000000 0.0000001\n 0.437500000 0.312500000 0.750000000 0.0000001\n 0.425000000 0.325000000 0.750000000 0.0000001\n 0.412500000 0.337500000 0.750000000 0.0000001\n 0.400000000 0.350000000 0.750000000 0.0000001\n 0.387500000 0.362500000 0.750000000 0.0000001\n 0.375000000 0.375000000 0.750000000 0.0000001\n 0.337500000 0.337500000 0.675000000 0.0000001\n 0.300000000 0.300000000 0.600000000 0.0000001\n 0.262500000 0.262500000 0.525000000 0.0000001\n 0.225000000 0.225000000 0.450000000 0.0000001\n 0.187500000 0.187500000 0.375000000 0.0000001\n 0.150000000 0.150000000 0.300000000 0.0000001\n 0.112500000 0.112500000 0.225000000 0.0000001\n 0.075000000 0.075000000 0.150000000 0.0000001\n 0.037500000 0.037500000 0.075000000 0.0000001\n 0.000000000 0.000000000 0.000000000 0.0000001\n 0.050000000 0.050000000 0.050000000 0.0000001\n 0.100000000 0.100000000 0.100000000 0.0000001\n 0.150000000 0.150000000 0.150000000 0.0000001\n 0.200000000 0.200000000 0.200000000 0.0000001\n 0.250000000 0.250000000 0.250000000 0.0000001\n 0.300000000 0.300000000 0.300000000 0.0000001\n 0.350000000 0.350000000 0.350000000 0.0000001\n 0.400000000 0.400000000 0.400000000 0.0000001\n 0.450000000 0.450000000 0.450000000 0.0000001\n 0.500000000 0.500000000 0.500000000 0.0000001\n 0.512500000 0.475000000 0.512500000 0.0000001\n 0.525000000 0.450000000 0.525000000 0.0000001\n 0.537500000 0.425000000 0.537500000 0.0000001\n 0.550000000 0.400000000 0.550000000 0.0000001\n 0.562500000 0.375000000 0.562500000 0.0000001\n 0.575000000 0.350000000 0.575000000 0.0000001\n 0.587500000 0.325000000 0.587500000 0.0000001\n 0.600000000 0.300000000 0.600000000 0.0000001\n 0.612500000 0.275000000 0.612500000 0.0000001\n 0.625000000 0.250000000 0.625000000 0.0000001\n 0.612500000 0.250000000 0.637500000 0.0000001\n 0.600000000 0.250000000 0.650000000 0.0000001\n 0.587500000 0.250000000 0.662500000 0.0000001\n 0.575000000 0.250000000 0.675000000 0.0000001\n 0.562500000 0.250000000 0.687500000 0.0000001\n 0.550000000 0.250000000 0.700000000 0.0000001\n 0.537500000 0.250000000 0.712500000 0.0000001\n 0.525000000 0.250000000 0.725000000 0.0000001\n 0.512500000 0.250000000 0.737500000 0.0000001\n 0.500000000 0.250000000 0.750000000 0.0000001\n 0.500000000 0.275000000 0.725000000 0.0000001\n 0.500000000 0.300000000 0.700000000 0.0000001\n 0.500000000 0.325000000 0.675000000 0.0000001\n 0.500000000 0.350000000 0.650000000 0.0000001\n 0.500000000 0.375000000 0.625000000 0.0000001\n 0.500000000 0.400000000 0.600000000 0.0000001\n 0.500000000 0.425000000 0.575000000 0.0000001\n 0.500000000 0.450000000 0.550000000 0.0000001\n 0.500000000 0.475000000 0.525000000 0.0000001\n 0.500000000 0.500000000 0.500000000 0.0000001\n 0.512500000 0.475000000 0.512500000 0.0000001\n 0.525000000 0.450000000 0.525000000 0.0000001\n 0.537500000 0.425000000 0.537500000 0.0000001\n 0.550000000 0.400000000 0.550000000 0.0000001\n 0.562500000 0.375000000 0.562500000 0.0000001\n 0.575000000 0.350000000 0.575000000 0.0000001\n 0.587500000 0.325000000 0.587500000 0.0000001\n 0.600000000 0.300000000 0.600000000 0.0000001\n 0.612500000 0.275000000 0.612500000 0.0000001\n 0.625000000 0.250000000 0.625000000 0.0000001\n 0.612500000 0.225000000 0.612500000 0.0000001\n 0.600000000 0.200000000 0.600000000 0.0000001\n 0.587500000 0.175000000 0.587500000 0.0000001\n 0.575000000 0.150000000 0.575000000 0.0000001\n 0.562500000 0.125000000 0.562500000 0.0000001\n 0.550000000 0.100000000 0.550000000 0.0000001\n 0.537500000 0.075000000 0.537500000 0.0000001\n 0.525000000 0.050000000 0.525000000 0.0000001\n 0.512500000 0.025000000 0.512500000 0.0000001\n 0.500000000 0.000000000 0.500000000 0.0000001\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_bands_hse","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"79f2cb6a-7994-5369-8c85-af07c55ad26f","flowchartId":"b6a2b27a-0fec-5e0e-8974-073ee9d2ad83","head":true,"name":"Preliminary SCF Calculation","next":"65789b0a-cfe2-5062-a53e-89f71112fb57","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"a2785cc5-2427-5c7a-b30f-7077475b948c","flowchartId":"65789b0a-cfe2-5062-a53e-89f71112fb57","head":false,"name":"Extract KPOINTS","next":"8f4c63a3-a06a-5f73-88d7-a57d7958b91d","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"e47ca302-96f2-5726-9b4c-f34cdfaa7f72","flowchartId":"8f4c63a3-a06a-5f73-88d7-a57d7958b91d","head":false,"name":"Main HSE Run","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/band_structure_magn.json":{"_id":"f2767e1a-fce7-578f-b627-8806d3cd59de","application":{"name":"espresso"},"isDefault":false,"name":"Bandstructure with spin magnetism - QE","properties":["atomic_forces","band_structure","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"354942f1-9f3d-57a9-b5ae-6bdf5b3a60af","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Bandstructure with spin magnetism","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_magn.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_magn","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"c229d2a0-3c19-5f13-b3e0-ceb86cb9fbc1","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n nspin = 2\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if collinearMagnetization.isTotalMagnetization %}\n tot_magnetization = {{ collinearMagnetization.totalMagnetization }}\n{%- else %}\n{%- for item in collinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"CollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_scf_magn.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n nspin = 2\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_magn","next":"ea06c333-0cc7-51d4-bd98-cc53fa0844d1","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands_magn.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands_magn","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"ea06c333-0cc7-51d4-bd98-cc53fa0844d1","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n nspin = 2\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if collinearMagnetization.isTotalMagnetization %}\n tot_magnetization = {{ collinearMagnetization.totalMagnetization }}\n{%- else %}\n{%- for item in collinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"CollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_bands_magn.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n nspin = 2\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands_magn","next":"a8e4de4b-1f55-50e8-a712-ce0b37c04752","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands_spin_up.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands_spin_up","schemaVersion":"2022.8.16"},"flowchartId":"a8e4de4b-1f55-50e8-a712-ce0b37c04752","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands_up.dat'{% endraw %}\n spin_component = 1\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands_spin_up.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands_up.dat'\n spin_component = 1\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands_spin_up","next":"fd937050-a3f3-5d4d-bb50-d150a93ea5e0","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands_spin_dn.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands_spin_dn","schemaVersion":"2022.8.16"},"flowchartId":"fd937050-a3f3-5d4d-bb50-d150a93ea5e0","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands_dn.dat'{% endraw %}\n spin_component = 2\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands_spin_dn.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands_dn.dat'\n spin_component = 2\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands_spin_dn","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"354942f1-9f3d-57a9-b5ae-6bdf5b3a60af","flowchartId":"41e70bc1-ba00-5871-9289-4d57c7b79452","head":true,"name":"Bandstructure with spin magnetism","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/band_structure_soc.json":{"_id":"b4587b15-eb6f-5316-8497-a79f321b3c76","application":{"name":"espresso"},"isDefault":false,"name":"Bandstructure with SOC - QE","properties":["atomic_forces","band_structure","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"153b4a88-5d56-553f-b7d3-40df96968eb4","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{"searchText":"nc-fr"},"subtype":"nc-fr","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Bandstructure with SOC","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_soc.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_soc","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"74ec024a-f247-5f15-9c21-cc169bcb62c7","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n{%- if nonCollinearMagnetization.isStartingMagnetization %}\n{%- for item in nonCollinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization %}\n constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'\n lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}\n fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}\n fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}\n fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}\n lforcet = .true.\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and not nonCollinearMagnetization.lforcet %}\n lforcet = .false.\n{%- endif %}\n{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}\n{%- for item in nonCollinearMagnetization.spinAngles %}\n angle1({{ item.index }}) = {{ item.angle1 }}\n angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n{%- if nonCollinearMagnetization.isExistingChargeDensity %}\n startingpot = 'file'\n{%- endif %}\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"NonCollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_scf_soc.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_soc","next":"cee6ae30-cf34-5138-bdc5-5c57c2a6de5b","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands_soc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands_soc","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"cee6ae30-cf34-5138-bdc5-5c57c2a6de5b","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n{%- if nonCollinearMagnetization.isStartingMagnetization %}\n{%- for item in nonCollinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization %}\n constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'\n lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}\n fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}\n fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}\n fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}\n lforcet = .true.\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and not nonCollinearMagnetization.lforcet %}\n lforcet = .false.\n{%- endif %}\n{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}\n{%- for item in nonCollinearMagnetization.spinAngles %}\n angle1({{ item.index }}) = {{ item.angle1 }}\n angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"NonCollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_bands_soc.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands_soc","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"153b4a88-5d56-553f-b7d3-40df96968eb4","flowchartId":"872d54a6-679c-5af5-a153-72709fcf46df","head":true,"name":"Bandstructure with SOC","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/dielectric_tensor.json":{"_id":"cba28656-925a-59ad-b572-b6dee17a63ce","application":{"name":"espresso"},"isDefault":false,"name":"Dielectric Function","properties":["atomic_forces","band_gaps","dielectric_tensor","fermi_energy","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"38340b52-83ad-5862-bc18-c140bdc0cb72","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"nc","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Compute Dielectric Function","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps","dielectric_tensor"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"3b230ec3-0791-52f7-a4db-625390b8718f","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"3b230ec3-0791-52f7-a4db-625390b8718f","head":false,"input":[],"name":"Set No-Symmetry Flag","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","operand":"NO_SYMMETRY_NO_INVERSION","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":true},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","next":"8c2ec8bd-cdbf-54a0-a217-64a7a26eaebb","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"epsilon.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"epsilon.x","input":[{"name":"epsilon.in"}],"isDefault":false,"monitors":["standard_output"],"name":"dielectric_tensor","results":["dielectric_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"8c2ec8bd-cdbf-54a0-a217-64a7a26eaebb","head":false,"input":[{"applicationName":"espresso","content":"&inputpp\n calculation = \"eps\"\n prefix = \"__prefix__\"\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n\n&energy_grid\n smeartype = \"gauss\"\n intersmear = 0.2\n intrasmear = 0.0\n wmin = 0.0\n wmax = 30.0\n nw = 500\n shift = 0.0\n/\n","contextProviders":[],"executableName":"epsilon.x","name":"epsilon.in","rendered":"&inputpp\n calculation = \"eps\"\n prefix = \"__prefix__\"\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n\n&energy_grid\n smeartype = \"gauss\"\n intersmear = 0.2\n intrasmear = 0.0\n wmin = 0.0\n wmax = 30.0\n nw = 500\n shift = 0.0\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Compute dielectric function","postProcessors":[],"preProcessors":[],"results":[{"name":"dielectric_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"38340b52-83ad-5862-bc18-c140bdc0cb72","flowchartId":"8408f3c4-1c42-5ffe-bc29-bee11b5a6a05","head":true,"name":"Compute Dielectric Function","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/dos.json":{"_id":"b91a64fa-8b98-5aee-a568-9247fb9a00b3","application":{"name":"espresso"},"isDefault":false,"name":"Density of States","properties":["atomic_forces","band_gaps","density_of_states","fermi_energy","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"2cf317f3-3306-5a96-bc9b-e9103ebcd5be","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Density of States","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps","density_of_states"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_nscf","results":["fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_nscf","next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","postProcessors":[],"preProcessors":[],"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"isDefault":false,"monitors":["standard_output"],"name":"projwfc","results":["density_of_states"],"schemaVersion":"2022.8.16"},"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","head":false,"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"projwfc","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"2cf317f3-3306-5a96-bc9b-e9103ebcd5be","flowchartId":"3e64fdb4-ab5b-52a0-a1d5-51343c49481c","head":true,"name":"Density of States","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/electronic_density_mesh.json":{"_id":"67b8445c-14ea-5efb-acbf-7dd7bd9df4b4","application":{"name":"espresso"},"isDefault":false,"name":"Electronic Density Mesh","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"e2749c5a-fcd9-589c-819b-8b88c5c90924","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Electronic Density Mesh","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"e1a6e1e9-7994-5cd0-98d7-ae8909a10061","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_density.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_density","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"e1a6e1e9-7994-5cd0-98d7-ae8909a10061","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 0\n/\n&PLOT\n iflag = 3\n output_format = 5\n fileout ='density.xsf'\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_density.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 0\n/\n&PLOT\n iflag = 3\n output_format = 5\n fileout ='density.xsf'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pp_density","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"e2749c5a-fcd9-589c-819b-8b88c5c90924","flowchartId":"79e421a1-18aa-5c27-b8a8-9a769c1a89a0","head":true,"name":"Electronic Density Mesh","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/esm.json":{"_id":"1f17c10d-9554-5f41-994e-fee3fc0d22a7","application":{"name":"espresso"},"isDefault":false,"name":"Effective Screening Medium (ESM)","properties":["atomic_forces","charge_density_profile","fermi_energy","potential_profile","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"0de669f6-a455-5dae-b331-19dc85f7090f","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Effective Screening Medium (ESM)","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_esm.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_esm","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"2f487bc6-c237-53e4-bad5-be60369662cb","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = '{{ boundaryConditions.type }}'\n fcp_mu = {{ boundaryConditions.targetFermiEnergy }}\n esm_w = {{ boundaryConditions.offset }}\n esm_efield = {{ boundaryConditions.electricField }}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"BoundaryConditionsFormDataManager"}],"executableName":"pw.x","name":"pw_esm.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = 'pbc'\n fcp_mu = 0\n esm_w = 0\n esm_efield = 0\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_esm","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"potential_profile"},{"name":"charge_density_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"0de669f6-a455-5dae-b331-19dc85f7090f","flowchartId":"e7893fdf-0515-58a0-a9e1-0393bdc57d33","head":true,"name":"Effective Screening Medium (ESM)","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/esm_relax.json":{"_id":"059da61f-b061-5626-92c4-c103c28b737e","application":{"name":"espresso"},"isDefault":false,"name":"Effective Screening Medium (ESM) Relax","properties":["atomic_forces","charge_density_profile","fermi_energy","potential_profile","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"69728792-afeb-50aa-9b4e-6974a90f676a","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Effective Screening Medium (ESM) Relax","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_esm_relax.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_esm_relax","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"a2bec506-1fdd-5125-a787-85f31cde20c1","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'relax'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = '{{ boundaryConditions.type }}'\n fcp_mu = {{ boundaryConditions.targetFermiEnergy }}\n esm_w = {{ boundaryConditions.offset }}\n esm_efield = {{ boundaryConditions.electricField }}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"BoundaryConditionsFormDataManager"}],"executableName":"pw.x","name":"pw_esm_relax.in","rendered":"&CONTROL\n calculation = 'relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = 'pbc'\n fcp_mu = 0\n esm_w = 0\n esm_efield = 0\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_esm_relax","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"potential_profile"},{"name":"charge_density_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"69728792-afeb-50aa-9b4e-6974a90f676a","flowchartId":"f0733dc9-f3ad-5a1c-82fc-515edc0276b6","head":true,"name":"Effective Screening Medium (ESM) Relax","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/fixed_cell_relaxation.json":{"_id":"10343bab-9cf8-51ed-a0bc-6991cc5ffa8f","application":{"name":"espresso"},"isDefault":false,"name":"Fixed-cell Relaxation","properties":["atomic_forces","fermi_energy","final_structure","pressure","stress_tensor","total_energy","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"fb75e249-5489-5146-bd8a-786d33330d9c","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Fixed-cell Relaxation","properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_relax.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"pw_relax","results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"c42871f6-ab79-5987-b228-c3bd80f16ffd","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'relax'\n nstep = 50\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_relax.in","rendered":"&CONTROL\n calculation = 'relax'\n nstep = 50\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"pw_relax","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"fb75e249-5489-5146-bd8a-786d33330d9c","flowchartId":"0de8c4c8-b722-5cd2-ae68-b484262e0a01","head":true,"name":"Fixed-cell Relaxation","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/gw_band_structure_band_gap_full_frequency.json":{"_id":"b2b4871b-30e5-5320-a130-a73027560156","application":{"name":"espresso"},"isDefault":false,"name":"Full Frequency GW Band Structure + Band Gap","properties":["atomic_forces","band_gaps","band_structure","fermi_energy","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"46bcdcc8-628e-518e-b8c3-9bf38d7a2aef","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{"searchText":".*dojo-oncv.*"},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Full Frequency GW Band Structure + Band Gap","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"d82a9858-3f20-5fcd-baeb-0f1d65e9e22e","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"gw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"gw.x","input":[{"name":"gw_bands_full_frequency.in"}],"isDefault":false,"monitors":["standard_output"],"name":"gw_bands_full_frequency","results":["band_structure","fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"d82a9858-3f20-5fcd-baeb-0f1d65e9e22e","head":false,"input":[{"applicationName":"espresso","content":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n\n ! the grid used for the linear response\n kpt_grid = {{ kgrid.dimensions|join(', ') }}\n qpt_grid = {{ qgrid.dimensions|join(', ') }}\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of W in the convolution\n max_freq_coul = 200\n num_freq_coul = 51\n\n ! configuration for the correlation self energy\n ecut_corr = 6.0\n\n ! configuration for the exchange self energy\n ecut_exch = 15.0\n/\n\n&gw_output\n/\n\nFREQUENCIES\n35\n 0.0 0.0\n 0.0 0.3\n 0.0 0.9\n 0.0 1.8\n 0.0 3.0\n 0.0 4.5\n 0.0 6.3\n 0.0 8.4\n 0.0 10.8\n 0.0 13.5\n 0.0 16.5\n 0.0 19.8\n 0.0 23.4\n 0.0 27.3\n 0.0 31.5\n 0.0 36.0\n 0.0 40.8\n 0.0 45.9\n 0.0 51.3\n 0.0 57.0\n 0.0 63.0\n 0.0 69.3\n 0.0 75.9\n 0.0 82.8\n 0.0 90.0\n 0.0 97.5\n 0.0 105.3\n 0.0 113.4\n 0.0 121.8\n 0.0 130.5\n 0.0 139.5\n 0.0 148.8\n 0.0 158.4\n 0.0 168.3\n 0.0 178.5\n/\n\nK_points\n{{ explicitKPath2PIBA.length }}\n{% for point in explicitKPath2PIBA -%}\n{% for coordinate in point.coordinates %}{{ coordinate }}{% endfor %}\n{% endfor %}\n/\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPath2PIBAFormDataManager"}],"executableName":"gw.x","name":"gw_bands_full_frequency.in","rendered":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n\n ! the grid used for the linear response\n kpt_grid = 2, 2, 2\n qpt_grid = 1, 1, 1\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of W in the convolution\n max_freq_coul = 200\n num_freq_coul = 51\n\n ! configuration for the correlation self energy\n ecut_corr = 6.0\n\n ! configuration for the exchange self energy\n ecut_exch = 15.0\n/\n\n&gw_output\n/\n\nFREQUENCIES\n35\n 0.0 0.0\n 0.0 0.3\n 0.0 0.9\n 0.0 1.8\n 0.0 3.0\n 0.0 4.5\n 0.0 6.3\n 0.0 8.4\n 0.0 10.8\n 0.0 13.5\n 0.0 16.5\n 0.0 19.8\n 0.0 23.4\n 0.0 27.3\n 0.0 31.5\n 0.0 36.0\n 0.0 40.8\n 0.0 45.9\n 0.0 51.3\n 0.0 57.0\n 0.0 63.0\n 0.0 69.3\n 0.0 75.9\n 0.0 82.8\n 0.0 90.0\n 0.0 97.5\n 0.0 105.3\n 0.0 113.4\n 0.0 121.8\n 0.0 130.5\n 0.0 139.5\n 0.0 148.8\n 0.0 158.4\n 0.0 168.3\n 0.0 178.5\n/\n\nK_points\n101\n 0.000000000 0.000000000 0.000000000\n 0.028867513 -0.040824829 0.050000000\n 0.057735027 -0.081649658 0.100000000\n 0.086602540 -0.122474487 0.150000000\n 0.115470054 -0.163299316 0.200000000\n 0.144337567 -0.204124145 0.250000000\n 0.173205081 -0.244948974 0.300000000\n 0.202072594 -0.285773803 0.350000000\n 0.230940108 -0.326598632 0.400000000\n 0.259807621 -0.367423461 0.450000000\n 0.288675135 -0.408248290 0.500000000\n 0.274241378 -0.387835876 0.525000000\n 0.259807621 -0.367423461 0.550000000\n 0.245373864 -0.347011047 0.575000000\n 0.230940108 -0.326598632 0.600000000\n 0.216506351 -0.306186218 0.625000000\n 0.202072594 -0.285773803 0.650000000\n 0.187638837 -0.265361389 0.675000000\n 0.173205081 -0.244948974 0.700000000\n 0.158771324 -0.224536560 0.725000000\n 0.144337567 -0.204124145 0.750000000\n 0.129903811 -0.183711731 0.750000000\n 0.115470054 -0.163299316 0.750000000\n 0.101036297 -0.142886902 0.750000000\n 0.086602540 -0.122474487 0.750000000\n 0.072168784 -0.102062073 0.750000000\n 0.057735027 -0.081649658 0.750000000\n 0.043301270 -0.061237244 0.750000000\n 0.028867513 -0.040824829 0.750000000\n 0.014433757 -0.020412415 0.750000000\n -0.000000000 -0.000000000 0.750000000\n -0.000000000 -0.000000000 0.675000000\n -0.000000000 -0.000000000 0.600000000\n -0.000000000 -0.000000000 0.525000000\n -0.000000000 -0.000000000 0.450000000\n -0.000000000 -0.000000000 0.375000000\n -0.000000000 -0.000000000 0.300000000\n -0.000000000 -0.000000000 0.225000000\n -0.000000000 -0.000000000 0.150000000\n -0.000000000 -0.000000000 0.075000000\n 0.000000000 0.000000000 0.000000000\n 0.028867513 0.020412415 0.050000000\n 0.057735027 0.040824829 0.100000000\n 0.086602540 0.061237244 0.150000000\n 0.115470054 0.081649658 0.200000000\n 0.144337567 0.102062073 0.250000000\n 0.173205081 0.122474487 0.300000000\n 0.202072594 0.142886902 0.350000000\n 0.230940108 0.163299316 0.400000000\n 0.259807621 0.183711731 0.450000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.339193283 -0.204124145 0.637500000\n 0.317542648 -0.204124145 0.650000000\n 0.295892013 -0.204124145 0.662500000\n 0.274241378 -0.204124145 0.675000000\n 0.252590743 -0.204124145 0.687500000\n 0.230940108 -0.204124145 0.700000000\n 0.209289473 -0.204124145 0.712500000\n 0.187638837 -0.204124145 0.725000000\n 0.165988202 -0.204124145 0.737500000\n 0.144337567 -0.204124145 0.750000000\n 0.158771324 -0.163299316 0.725000000\n 0.173205081 -0.122474487 0.700000000\n 0.187638837 -0.081649658 0.675000000\n 0.202072594 -0.040824829 0.650000000\n 0.216506351 -0.000000000 0.625000000\n 0.230940108 0.040824829 0.600000000\n 0.245373864 0.081649658 0.575000000\n 0.259807621 0.122474487 0.550000000\n 0.274241378 0.163299316 0.525000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.353627040 -0.224536560 0.612500000\n 0.346410162 -0.244948974 0.600000000\n 0.339193283 -0.265361389 0.587500000\n 0.331976405 -0.285773803 0.575000000\n 0.324759526 -0.306186218 0.562500000\n 0.317542648 -0.326598632 0.550000000\n 0.310325770 -0.347011047 0.537500000\n 0.303108891 -0.367423461 0.525000000\n 0.295892013 -0.387835876 0.512500000\n 0.288675135 -0.408248290 0.500000000\n\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"gw_bands_full_frequency","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"},{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"46bcdcc8-628e-518e-b8c3-9bf38d7a2aef","flowchartId":"b1748925-1c8e-5c73-a8ff-ec4da33a49ce","head":true,"name":"Full Frequency GW Band Structure + Band Gap","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/gw_band_structure_band_gap_plasmon_pole.json":{"_id":"7d083bf3-c506-5294-8f3c-74d49d6d8aa2","application":{"name":"espresso"},"isDefault":false,"name":"Plasmon-Pole GW Band Structure + Band Gap","properties":["atomic_forces","band_gaps","band_structure","fermi_energy","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"72b79a87-8eef-5fe2-9d6c-6c9c256dd56c","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{"searchText":".*dojo-oncv.*"},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Plasmon-Pole GW Band Structure + Band Gap","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"f9910952-eca9-5a5f-ae03-a0060ae2fc78","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"gw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"gw.x","input":[{"name":"gw_bands_plasmon_pole.in"}],"isDefault":false,"monitors":["standard_output"],"name":"gw_bands_plasmon_pole","results":["band_structure","fermi_energy","band_gaps"],"schemaVersion":"2022.8.16"},"flowchartId":"f9910952-eca9-5a5f-ae03-a0060ae2fc78","head":false,"input":[{"applicationName":"espresso","content":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n\n ! the grid used for the linear response\n kpt_grid = {{ kgrid.dimensions|join(', ') }}\n qpt_grid = {{ qgrid.dimensions|join(', ') }}\n\n ! truncation (used for both correlation and exchange)\n truncation = '2d'\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of the Coulomb solver\n thres_coul = 1.0d-2\n\n ! configuration of W in the convolution\n model_coul = 'godby-needs'\n max_freq_coul = 120\n num_freq_coul = 35\n\n ! configuration of the Green solver\n thres_green = 1.0d-3\n max_iter_green = 300\n\n ! configuration for the correlation self energy\n ecut_corr = 5.0\n max_freq_corr = 100.0\n num_freq_corr = 11\n\n ! configuration for the exchange self energy\n ecut_exch = 20.0\n\n ! configuration for the output\n eta = 0.1\n min_freq_wind = -30.0\n max_freq_wind = 30.0\n num_freq_wind = 601\n/\n\n&gw_output\n/\n\nFREQUENCIES\n2\n 0.0 0.0\n 0.0 10.0\n/\n\nK_points\n{{ explicitKPath2PIBA.length }}\n{% for point in explicitKPath2PIBA -%}\n{% for coordinate in point.coordinates %}{{ coordinate }}{% endfor %}\n{% endfor %}\n/\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPath2PIBAFormDataManager"}],"executableName":"gw.x","name":"gw_bands_plasmon_pole.in","rendered":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n\n ! the grid used for the linear response\n kpt_grid = 2, 2, 2\n qpt_grid = 1, 1, 1\n\n ! truncation (used for both correlation and exchange)\n truncation = '2d'\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of the Coulomb solver\n thres_coul = 1.0d-2\n\n ! configuration of W in the convolution\n model_coul = 'godby-needs'\n max_freq_coul = 120\n num_freq_coul = 35\n\n ! configuration of the Green solver\n thres_green = 1.0d-3\n max_iter_green = 300\n\n ! configuration for the correlation self energy\n ecut_corr = 5.0\n max_freq_corr = 100.0\n num_freq_corr = 11\n\n ! configuration for the exchange self energy\n ecut_exch = 20.0\n\n ! configuration for the output\n eta = 0.1\n min_freq_wind = -30.0\n max_freq_wind = 30.0\n num_freq_wind = 601\n/\n\n&gw_output\n/\n\nFREQUENCIES\n2\n 0.0 0.0\n 0.0 10.0\n/\n\nK_points\n101\n 0.000000000 0.000000000 0.000000000\n 0.028867513 -0.040824829 0.050000000\n 0.057735027 -0.081649658 0.100000000\n 0.086602540 -0.122474487 0.150000000\n 0.115470054 -0.163299316 0.200000000\n 0.144337567 -0.204124145 0.250000000\n 0.173205081 -0.244948974 0.300000000\n 0.202072594 -0.285773803 0.350000000\n 0.230940108 -0.326598632 0.400000000\n 0.259807621 -0.367423461 0.450000000\n 0.288675135 -0.408248290 0.500000000\n 0.274241378 -0.387835876 0.525000000\n 0.259807621 -0.367423461 0.550000000\n 0.245373864 -0.347011047 0.575000000\n 0.230940108 -0.326598632 0.600000000\n 0.216506351 -0.306186218 0.625000000\n 0.202072594 -0.285773803 0.650000000\n 0.187638837 -0.265361389 0.675000000\n 0.173205081 -0.244948974 0.700000000\n 0.158771324 -0.224536560 0.725000000\n 0.144337567 -0.204124145 0.750000000\n 0.129903811 -0.183711731 0.750000000\n 0.115470054 -0.163299316 0.750000000\n 0.101036297 -0.142886902 0.750000000\n 0.086602540 -0.122474487 0.750000000\n 0.072168784 -0.102062073 0.750000000\n 0.057735027 -0.081649658 0.750000000\n 0.043301270 -0.061237244 0.750000000\n 0.028867513 -0.040824829 0.750000000\n 0.014433757 -0.020412415 0.750000000\n -0.000000000 -0.000000000 0.750000000\n -0.000000000 -0.000000000 0.675000000\n -0.000000000 -0.000000000 0.600000000\n -0.000000000 -0.000000000 0.525000000\n -0.000000000 -0.000000000 0.450000000\n -0.000000000 -0.000000000 0.375000000\n -0.000000000 -0.000000000 0.300000000\n -0.000000000 -0.000000000 0.225000000\n -0.000000000 -0.000000000 0.150000000\n -0.000000000 -0.000000000 0.075000000\n 0.000000000 0.000000000 0.000000000\n 0.028867513 0.020412415 0.050000000\n 0.057735027 0.040824829 0.100000000\n 0.086602540 0.061237244 0.150000000\n 0.115470054 0.081649658 0.200000000\n 0.144337567 0.102062073 0.250000000\n 0.173205081 0.122474487 0.300000000\n 0.202072594 0.142886902 0.350000000\n 0.230940108 0.163299316 0.400000000\n 0.259807621 0.183711731 0.450000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.339193283 -0.204124145 0.637500000\n 0.317542648 -0.204124145 0.650000000\n 0.295892013 -0.204124145 0.662500000\n 0.274241378 -0.204124145 0.675000000\n 0.252590743 -0.204124145 0.687500000\n 0.230940108 -0.204124145 0.700000000\n 0.209289473 -0.204124145 0.712500000\n 0.187638837 -0.204124145 0.725000000\n 0.165988202 -0.204124145 0.737500000\n 0.144337567 -0.204124145 0.750000000\n 0.158771324 -0.163299316 0.725000000\n 0.173205081 -0.122474487 0.700000000\n 0.187638837 -0.081649658 0.675000000\n 0.202072594 -0.040824829 0.650000000\n 0.216506351 -0.000000000 0.625000000\n 0.230940108 0.040824829 0.600000000\n 0.245373864 0.081649658 0.575000000\n 0.259807621 0.122474487 0.550000000\n 0.274241378 0.163299316 0.525000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.353627040 -0.224536560 0.612500000\n 0.346410162 -0.244948974 0.600000000\n 0.339193283 -0.265361389 0.587500000\n 0.331976405 -0.285773803 0.575000000\n 0.324759526 -0.306186218 0.562500000\n 0.317542648 -0.326598632 0.550000000\n 0.310325770 -0.347011047 0.537500000\n 0.303108891 -0.367423461 0.525000000\n 0.295892013 -0.387835876 0.512500000\n 0.288675135 -0.408248290 0.500000000\n\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"gw_bands_plasmon_pole","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"},{"name":"fermi_energy"},{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"72b79a87-8eef-5fe2-9d6c-6c9c256dd56c","flowchartId":"911d4cc1-cde5-5097-a7be-0e11f73113a7","head":true,"name":"Plasmon-Pole GW Band Structure + Band Gap","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/kpoint_convergence.json":{"_id":"e8141224-dcea-576b-a556-80f65ab2e230","application":{"name":"espresso"},"isDefault":false,"name":"K-point Convergence","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"ff6a8fbc-2202-5786-9a26-67c843417d0b","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"K-point Convergence","properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-tolerance","head":true,"input":[],"name":"Init tolerance","next":"init-increment","operand":"TOL","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0.00001},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-increment","head":false,"input":[],"name":"Init increment","next":"init-result","operand":"INC","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-result","head":false,"input":[],"name":"Init result","next":"init-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"init-parameter","head":false,"input":[],"name":"Init parameter","next":"pwscf-kpoint-convergence","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_kpt_conv.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf_kpt_conv","results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"pwscf-kpoint-convergence","head":false,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}} 0 0 0{% endraw %}\n","contextProviders":[{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf_kpt_conv.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}} 0 0 0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf_kpt_conv","next":"store-result","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"store-result","head":false,"input":[{"name":"total_energy","scope":"pwscf-kpoint-convergence"}],"name":"store result","next":"check-convergence","operand":"RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"else":"update-result","flowchartId":"check-convergence","head":false,"input":[],"maxOccurrences":50,"name":"check convergence","next":"update-result","postProcessors":[],"preProcessors":[],"results":[],"statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","status":"idle","statusTrack":[],"tags":[],"then":"convergence-is-reached","type":"condition"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"update-result","head":false,"input":[{"name":"RESULT","scope":"global"}],"name":"update result","next":"increment-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"RESULT"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"increment-parameter","head":false,"input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"name":"increment parameter","next":"pwscf-kpoint-convergence","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER+INC"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"convergence-is-reached","head":false,"input":[{"name":"PARAMETER","scope":"global"}],"name":"exit","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER"}]}],"units":[{"_id":"ff6a8fbc-2202-5786-9a26-67c843417d0b","flowchartId":"a34eec2c-cdb2-537d-88c0-ed1d7b205879","head":true,"name":"K-point Convergence","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/neb.json":{"_id":"6dc0a5af-7ec5-50e4-b663-42fc5ddf0ef1","application":{"name":"espresso"},"isDefault":false,"name":"Nudged Elastic Band (NEB)","properties":["reaction_energy_barrier","reaction_energy_profile"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"c9034468-df28-5357-8912-02226f919042","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Nudged Elastic Band (NEB)","properties":["reaction_energy_barrier","reaction_energy_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"neb.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"neb.x","input":[{"name":"neb.in"}],"isDefault":false,"monitors":["standard_output"],"name":"neb","results":["reaction_energy_barrier","reaction_energy_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"9f273ca0-d240-5b1f-89a9-64dd579304ac","head":true,"input":[{"applicationName":"espresso","content":"BEGIN\nBEGIN_PATH_INPUT\n&PATH\n restart_mode = 'from_scratch'\n string_method = 'neb',\n nstep_path = 50,\n ds = 2.D0,\n opt_scheme = \"broyden\",\n num_of_images = {{ 2 + (input.INTERMEDIATE_IMAGES.length or neb.nImages) }},\n k_max = 0.3D0,\n k_min = 0.2D0,\n CI_scheme = \"auto\",\n path_thr = 0.1D0,\n/\nEND_PATH_INPUT\nBEGIN_ENGINE_INPUT\n&CONTROL\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.03\n nspin = 2\n starting_magnetization = 0.5\n/\n&ELECTRONS\n conv_thr = 1.D-8\n mixing_beta = 0.3\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nBEGIN_POSITIONS\nFIRST_IMAGE\nATOMIC_POSITIONS crystal\n{{ input.FIRST_IMAGE }}\n{%- for IMAGE in input.INTERMEDIATE_IMAGES %}\nINTERMEDIATE_IMAGE\nATOMIC_POSITIONS crystal\n{{ IMAGE }}\n{%- endfor %}\nLAST_IMAGE\nATOMIC_POSITIONS crystal\n{{ input.LAST_IMAGE }}\nEND_POSITIONS\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\nEND_ENGINE_INPUT\nEND\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"NEBFormDataManager"},{"name":"QENEBInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"neb.x","name":"neb.in","rendered":"BEGIN\nBEGIN_PATH_INPUT\n&PATH\n restart_mode = 'from_scratch'\n string_method = 'neb',\n nstep_path = 50,\n ds = 2.D0,\n opt_scheme = \"broyden\",\n num_of_images = 3,\n k_max = 0.3D0,\n k_min = 0.2D0,\n CI_scheme = \"auto\",\n path_thr = 0.1D0,\n/\nEND_PATH_INPUT\nBEGIN_ENGINE_INPUT\n&CONTROL\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.03\n nspin = 2\n starting_magnetization = 0.5\n/\n&ELECTRONS\n conv_thr = 1.D-8\n mixing_beta = 0.3\n/\nATOMIC_SPECIES\nSi 28.0855 \nBEGIN_POSITIONS\nFIRST_IMAGE\nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nLAST_IMAGE\nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nEND_POSITIONS\nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \nEND_ENGINE_INPUT\nEND\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"neb","postProcessors":[],"preProcessors":[],"results":[{"name":"reaction_energy_barrier"},{"name":"reaction_energy_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"c9034468-df28-5357-8912-02226f919042","flowchartId":"134c70e2-aeaf-543d-aded-1585cd71b800","head":true,"name":"Nudged Elastic Band (NEB)","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/phonon_dispersions.json":{"_id":"8623c689-9ba3-5454-a3c8-0c6c49c402b4","application":{"name":"espresso"},"isDefault":false,"name":"Phonon Dispersions","properties":["atomic_forces","fermi_energy","phonon_dispersions","phonon_dos","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"bfb69b48-8fbf-5a0d-8949-448f20754766","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Phonon Dispersions","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos","phonon_dispersions"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"13bcafce-56ef-5b47-b079-317495eb6933","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"a7fded20-889b-54fc-bbb0-456e82689ab1","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_path","results":["phonon_dispersions"],"schemaVersion":"2022.8.16"},"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_path","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dispersions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"bfb69b48-8fbf-5a0d-8949-448f20754766","flowchartId":"2cd13237-d089-5d5e-8372-1db8bb8e383f","head":true,"name":"Phonon Dispersions","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/phonon_dos.json":{"_id":"3f7ff505-615d-5544-ab5f-407e67e1add6","application":{"name":"espresso"},"isDefault":false,"name":"Phonon Density of States","properties":["atomic_forces","fermi_energy","phonon_dos","phonon_dos","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"2232051b-9f2a-5a48-9b4d-6231eb6e8297","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Phonon Density of States","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"13bcafce-56ef-5b47-b079-317495eb6933","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"8fe6a24b-c994-55a2-a448-88657292e8c2","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_grid","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"2232051b-9f2a-5a48-9b4d-6231eb6e8297","flowchartId":"1954e749-1d37-50e6-8ae7-7292f5ef59c0","head":true,"name":"Phonon Density of States","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/phonon_dos_dispersion.json":{"_id":"82043e83-bf1d-5b08-bed6-369c7dfcc1ae","application":{"name":"espresso"},"isDefault":false,"name":"Phonon Density of States + Dispersions","properties":["atomic_forces","fermi_energy","phonon_dispersions","phonon_dos","phonon_dos","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"291d25cd-378a-5be7-9d85-c8013a4b165b","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Phonon Density of States + Dispersions","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos","phonon_dispersions"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"13bcafce-56ef-5b47-b079-317495eb6933","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"8fe6a24b-c994-55a2-a448-88657292e8c2","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_grid","next":"a7fded20-889b-54fc-bbb0-456e82689ab1","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_path","results":["phonon_dispersions"],"schemaVersion":"2022.8.16"},"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_path","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dispersions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"291d25cd-378a-5be7-9d85-c8013a4b165b","flowchartId":"7897ed9a-6b48-5a79-a50e-28797f3912a5","head":true,"name":"Phonon Density of States + Dispersions","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/phonon_map.json":{"_id":"23b9058b-884c-52d4-82a8-ee162b9761e0","application":{"name":"espresso"},"isDefault":false,"name":"Phonon Map","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"79f2cb6a-7994-5369-8c85-af07c55ad26f","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Preliminary SCF Calculation","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"2f017bcb-f4ba-55b8-b939-1f780679a88e","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"ph-init-qpoints","properties":[],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_init_qpoints.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_init_qpoints","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"b8ea6a33-38f3-5434-b17e-b5eae8fff9fc","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .false.\n start_irr = 0\n last_irr = 0\n ldisp = .true.\n fildyn = 'dyn0'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_init_qpoints.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .false.\n start_irr = 0\n last_irr = 0\n ldisp = .true.\n fildyn = 'dyn0'\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_init_qpoints","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"e4b6b2e7-7d8f-5ae1-b6bd-ee81ecbca11a","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"espresso-xml-get-qpt-irr","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"espresso_xml_get_qpt_irr.py"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_xml_get_qpt_irr","schemaVersion":"2022.8.16"},"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n{# JOB_WORK_DIR will be initialized at runtime => avoid substituion below #}\n{% raw %}\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n{% endraw %}\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_xml_get_qpt_irr.py","rendered":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n\n\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"python","next":"d0fd8654-2106-546b-8792-7bb46272befc","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"d0fd8654-2106-546b-8792-7bb46272befc","head":false,"input":[{"name":"STDOUT","scope":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219"}],"name":"assignment","operand":"Q_POINTS","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)"}]},{"_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"reduce","properties":["phonon_dos","phonon_dispersions"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid_restart.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid_restart","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"cb206177-a4af-599a-81ba-6c88d24253b6","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid_restart.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid_restart","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"8fe6a24b-c994-55a2-a448-88657292e8c2","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_grid","next":"a7fded20-889b-54fc-bbb0-456e82689ab1","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_path","results":["phonon_dispersions"],"schemaVersion":"2022.8.16"},"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_path","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dispersions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"79f2cb6a-7994-5369-8c85-af07c55ad26f","flowchartId":"b6a2b27a-0fec-5e0e-8974-073ee9d2ad83","head":true,"name":"Preliminary SCF Calculation","next":"4bb74dfb-46a6-5bf4-a477-5d374dc2e271","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"2f017bcb-f4ba-55b8-b939-1f780679a88e","flowchartId":"4bb74dfb-46a6-5bf4-a477-5d374dc2e271","head":false,"name":"ph-init-qpoints","next":"9894b91f-6e97-5ee6-af02-0bef26bd62c0","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"e4b6b2e7-7d8f-5ae1-b6bd-ee81ecbca11a","flowchartId":"9894b91f-6e97-5ee6-af02-0bef26bd62c0","head":false,"name":"espresso-xml-get-qpt-irr","next":"24e3c1f0-8090-512e-9727-8770071d17c8","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"flowchartId":"24e3c1f0-8090-512e-9727-8770071d17c8","head":false,"input":{"name":"Q_POINTS","scope":"global","target":"MAP_DATA","useValues":false,"values":[]},"name":"map","next":"55a9e9fb-3545-5c4b-a1bb-b64a899b78c6","status":"idle","statusTrack":[],"tags":[],"type":"map","workflowId":"731d3397-3278-516a-b28e-53626ef50f0a"},{"_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","flowchartId":"55a9e9fb-3545-5c4b-a1bb-b64a899b78c6","head":false,"name":"reduce","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[{"_id":"731d3397-3278-516a-b28e-53626ef50f0a","compute":{"cluster":{"fqdn":""},"nodes":1,"notify":"n","ppn":1,"queue":"D","timeLimit":"01:00:00"},"isDefault":false,"name":"pre-processor","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"pre-processor","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_link_outdir_save.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_link_outdir_save","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_link_outdir_save.sh","rendered":"\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"e68db280-8636-53e3-81a0-88396ba6147d","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"ph-single-irr-qpt","properties":[],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_single_irr_qpt.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_single_irr_qpt","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"8db9af08-d935-57a0-a824-e7db6d936de8","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n {% raw %}\n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n {% endraw %}\n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_SCRATCH_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_single_irr_qpt.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n \n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n \n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = '{{ JOB_SCRATCH_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_single_irr_qpt","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"7239fc3a-b343-513f-af35-e8687e1829da","application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"post-processor","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_collect_dynmat.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_collect_dynmat","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_collect_dynmat.sh","rendered":"\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","flowchartId":"e9a790f4-dec6-52c1-b951-014f0ff01cb4","head":true,"name":"pre-processor","next":"c2195045-7a5c-54d3-ab88-211c82de09f1","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"e68db280-8636-53e3-81a0-88396ba6147d","flowchartId":"c2195045-7a5c-54d3-ab88-211c82de09f1","head":false,"name":"ph-single-irr-qpt","next":"e483c7fb-2a29-5e91-819a-7465ead70134","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"7239fc3a-b343-513f-af35-e8687e1829da","flowchartId":"e483c7fb-2a29-5e91-819a-7465ead70134","head":false,"name":"post-processor","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]}]},"espresso/recalculate_bands.json":{"_id":"42b2b964-8ccc-5b36-9e33-41a954abc2ba","application":{"name":"espresso"},"isDefault":false,"name":"Recalculate Bands","properties":["band_structure"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"64551dfb-e529-5d8d-9092-ff268f4da134","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Recalculate Bands","properties":["band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"64551dfb-e529-5d8d-9092-ff268f4da134","flowchartId":"e8b72a45-765e-565f-ab17-c91a21aec09d","head":true,"name":"Recalculate Bands","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/surface_energy.json":{"_id":"68512987-de73-5614-bab2-0f8b575cffa3","application":{"name":"espresso"},"isDefault":false,"name":"Surface Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","surface_energy","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Surface Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"e463ef46-a36e-5168-87dd-e21eb980dfb8","head":true,"input":[{"endpoint":"materials","endpoint_options":{"params":{"projection":"{}","query":"{'_id': MATERIAL_ID}"}},"name":"DATA"}],"monitors":[],"name":"io-slab","next":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","head":false,"input":[{"name":"DATA","scope":"e463ef46-a36e-5168-87dd-e21eb980dfb8"}],"monitors":[],"name":"slab","next":"44263820-0c80-5bd1-b854-9da8d198eac1","operand":"SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"44263820-0c80-5bd1-b854-9da8d198eac1","head":false,"input":[{"endpoint":"materials","endpoint_options":{"params":{"projection":"{}","query":"{'_id': SLAB.metadata.bulkId}"}},"name":"DATA"}],"monitors":[],"name":"io-bulk","next":"b70656f1-a394-57f4-b4de-00096969df4b","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"b70656f1-a394-57f4-b4de-00096969df4b","head":false,"input":[{"name":"DATA","scope":"44263820-0c80-5bd1-b854-9da8d198eac1"}],"monitors":[],"name":"bulk","next":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","operand":"BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0] if DATA else None"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"errorMessage":"Bulk material does not exist!","flowchartId":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","head":false,"monitors":[],"name":"assert-bulk","next":"490635e0-c593-5809-9eb2-c794b96cfed1","postProcessors":[],"preProcessors":[],"results":[],"statement":"BULK != None","status":"idle","statusTrack":[],"tags":[],"type":"assertion"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"490635e0-c593-5809-9eb2-c794b96cfed1","head":false,"input":[{"endpoint":"refined-properties","endpoint_options":{"params":{"projection":"{'sort': {'precision.value': -1}, 'limit': 1}","query":"{ 'exabyteId': BULK.exabyteId, 'data.name': 'total_energy', 'group': {'$regex': ''.join((SUBWORKFLOW.application.shortName, ':'))} }"}},"name":"DATA"}],"monitors":[],"name":"io-e-bulk","next":"bbe13b97-4243-5a85-8f61-a279d0b797aa","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"bbe13b97-4243-5a85-8f61-a279d0b797aa","head":false,"input":[{"name":"DATA","scope":"490635e0-c593-5809-9eb2-c794b96cfed1"}],"monitors":[],"name":"e-bulk","next":"a06c9f43-7670-5fd0-ac42-7028a472235a","operand":"E_BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0].data.value if DATA else None"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"errorMessage":"E_BULK does not exist!","flowchartId":"a06c9f43-7670-5fd0-ac42-7028a472235a","head":false,"monitors":[],"name":"assert-e-bulk","next":"cdf210be-26ed-585a-b4ac-d55795ba2975","postProcessors":[],"preProcessors":[],"results":[],"statement":"E_BULK != None","status":"idle","statusTrack":[],"tags":[],"type":"assertion"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"cdf210be-26ed-585a-b4ac-d55795ba2975","head":false,"input":[],"monitors":[],"name":"surface","next":"ffa8e43d-096a-555b-b8d0-6d283365ef47","operand":"A","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"np.linalg.norm(np.cross(SLAB.lattice.vectors.a, SLAB.lattice.vectors.b))"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"ffa8e43d-096a-555b-b8d0-6d283365ef47","head":false,"input":[],"monitors":[],"name":"n-bulk","next":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","operand":"N_BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"len(BULK.basis.elements)"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","head":false,"input":[],"monitors":[],"name":"n-slab","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"N_SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"len(SLAB.basis.elements)"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"fcd88119-817c-5ac1-a430-ba892ac743eb","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"fcd88119-817c-5ac1-a430-ba892ac743eb","head":false,"input":[{"name":"total_energy","scope":"9fc7a088-5533-5f70-bb33-f676ec65f565"}],"monitors":[],"name":"e-slab","next":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","operand":"E_SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","head":false,"input":[],"monitors":[],"name":"surface-energy","operand":"SURFACE_ENERGY","postProcessors":[],"preProcessors":[],"results":[{"name":"surface_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"1 / (2 * A) * (E_SLAB - E_BULK * (N_SLAB/N_BULK))"}]}],"units":[{"_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","flowchartId":"d81dc9ce-bb50-5bc6-af1d-e5ede03bb0a6","head":true,"name":"Surface Energy","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/total_energy.json":{"_id":"4e36ca25-fa46-5628-a227-27d22dea8553","application":{"name":"espresso"},"isDefault":false,"name":"Total Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Total Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"tags":["default"],"units":[{"_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","flowchartId":"6059d61a-6a92-5657-9130-02208639aff8","head":true,"name":"Total Energy","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/valence_band_offset.json":{"_id":"d8e08cac-7747-50aa-b925-41f214d722c6","application":{"name":"espresso"},"isDefault":false,"name":"Valence Band Offset (2D)","properties":["atomic_forces","average_potential_profile","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"9c65d03e-6a30-58f3-947a-f174342be0c3","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"BS + Avg ESP (Interface)","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"0f21d8c4-ab32-53ba-b40d-fc9b6608e1b9","head":true,"input":[],"name":"Set Material Index (Interface)","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"MATERIAL_INDEX","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"0"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"pw-bands-calculate-band-gap","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-bands-calculate-band-gap","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"a667d9fd-35d5-5897-be0e-fa0247233649","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","head":false,"input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap"}],"name":"Select indirect band gap","next":"08819369-b541-5b51-8a40-0ee135039482","operand":"BAND_GAP_INDIRECT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","head":false,"input":[],"name":"Set Valence Band Maximum","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","operand":"VBM","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"BAND_GAP_INDIRECT['eigenvalueValence']"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_electrostatic_potential","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Electrostatic Potential (ESP)","next":"average-electrostatic-potential","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"isDefault":false,"monitors":["standard_output"],"name":"average_potential","results":["average_potential_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"average-electrostatic-potential","head":false,"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"average ESP","next":"c6c11873-91d7-5422-8302-3dcc1ce971e9","postProcessors":[],"preProcessors":[],"results":[{"name":"average_potential_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","head":false,"input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential"}],"name":"Set Macroscopically Averaged ESP Data","operand":"array_from_context","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"average_potential_profile['yDataSeries'][1]"}]},{"_id":"ce26adc1-6a26-53ef-9626-5eb6a6b9ccb7","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Find ESP Values (Interface)","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16"},"flowchartId":"python-find-extrema","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Find Extrema","next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","head":false,"input":[{"name":"STDOUT","scope":"python-find-extrema"}],"name":"Set Average ESP Value","operand":"AVG_ESP_INTERFACE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['minima']"}]},{"_id":"ba46d9b4-610f-537e-ae39-e39ce5240cda","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"BS + Avg ESP (interface left)","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"0bd31760-f6e4-5826-b282-882c06c97f94","head":true,"input":[],"name":"Set Material Index (Interface left)","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"MATERIAL_INDEX","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"1"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"pw-bands-calculate-band-gap-left","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-bands-calculate-band-gap-left","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"a667d9fd-35d5-5897-be0e-fa0247233649","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","head":false,"input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap-left"}],"name":"Select indirect band gap","next":"08819369-b541-5b51-8a40-0ee135039482","operand":"BAND_GAP_INDIRECT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","head":false,"input":[],"name":"Set Valence Band Maximum","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","operand":"VBM_LEFT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"BAND_GAP_INDIRECT['eigenvalueValence']"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_electrostatic_potential","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Electrostatic Potential (ESP)","next":"average-electrostatic-potential-left","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"isDefault":false,"monitors":["standard_output"],"name":"average_potential","results":["average_potential_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"average-electrostatic-potential-left","head":false,"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"average ESP","next":"c6c11873-91d7-5422-8302-3dcc1ce971e9","postProcessors":[],"preProcessors":[],"results":[{"name":"average_potential_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","head":false,"input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential-left"}],"name":"Set Macroscopically Averaged ESP Data","operand":"array_from_context","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"average_potential_profile['yDataSeries'][1]"}]},{"_id":"6c303926-905c-5749-81d5-2d2964fdf09a","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Find ESP Value (Interface left)","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16"},"flowchartId":"python-find-extrema-left","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Find Extrema","next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","head":false,"input":[{"name":"STDOUT","scope":"python-find-extrema-left"}],"name":"Set Average ESP Value","operand":"AVG_ESP_LEFT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['minima']"}]},{"_id":"aa611fe8-1e6a-5e5c-976a-f64bfaaaace9","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"BS + Avg ESP (interface right)","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a05809d1-cc0d-5a0b-bf5e-d43b90a6ac4b","head":true,"input":[],"name":"Set Material Index (Interface right)","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"MATERIAL_INDEX","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"2"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"pw-bands-calculate-band-gap-right","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-bands-calculate-band-gap-right","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"a667d9fd-35d5-5897-be0e-fa0247233649","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","head":false,"input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap-right"}],"name":"Select indirect band gap","next":"08819369-b541-5b51-8a40-0ee135039482","operand":"BAND_GAP_INDIRECT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","head":false,"input":[],"name":"Set Valence Band Maximum","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","operand":"VBM_RIGHT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"BAND_GAP_INDIRECT['eigenvalueValence']"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_electrostatic_potential","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Electrostatic Potential (ESP)","next":"average-electrostatic-potential-right","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"isDefault":false,"monitors":["standard_output"],"name":"average_potential","results":["average_potential_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"average-electrostatic-potential-right","head":false,"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"average ESP","next":"c6c11873-91d7-5422-8302-3dcc1ce971e9","postProcessors":[],"preProcessors":[],"results":[{"name":"average_potential_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","head":false,"input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential-right"}],"name":"Set Macroscopically Averaged ESP Data","operand":"array_from_context","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"average_potential_profile['yDataSeries'][1]"}]},{"_id":"736295e8-2ee0-5974-83bc-362061ac0688","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Find ESP Value (Interface right)","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16"},"flowchartId":"python-find-extrema-right","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Find Extrema","next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","head":false,"input":[{"name":"STDOUT","scope":"python-find-extrema-right"}],"name":"Set Average ESP Value","operand":"AVG_ESP_RIGHT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['minima']"}]},{"_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Calculate VBO","properties":["valence_band_offset"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"bd4eaa98-b001-5694-87ef-ec77540502ab","head":true,"input":[],"name":"Difference of valence band maxima","next":"2626f7bb-d392-5fd4-ab71-329b508de347","operand":"VBM_DIFF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"VBM_LEFT - VBM_RIGHT"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"2626f7bb-d392-5fd4-ab71-329b508de347","head":false,"input":[],"name":"Difference of macroscopically averaged ESP in bulk","next":"b7307787-53e2-599b-ad12-d627b04074b4","operand":"AVG_ESP_DIFF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"AVG_ESP_LEFT[0] - AVG_ESP_RIGHT[0]"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"b7307787-53e2-599b-ad12-d627b04074b4","head":false,"input":[],"name":"Lineup of macroscopically averaged ESP in interface","next":"197f4b4d-cb7b-57be-a885-d44cb1f61905","operand":"ESP_LINEUP","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"np.abs(AVG_ESP_INTERFACE[0] - AVG_ESP_INTERFACE[1])"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"197f4b4d-cb7b-57be-a885-d44cb1f61905","head":false,"input":[],"name":"Valence Band Offset","operand":"VALENCE_BAND_OFFSET","results":[{"name":"valence_band_offset"}],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"abs(VBM_DIFF - AVG_ESP_DIFF + (np.sign(AVG_ESP_DIFF) * ESP_LINEUP))"}]}],"units":[{"_id":"9c65d03e-6a30-58f3-947a-f174342be0c3","flowchartId":"fd622b5c-5c02-594e-b582-b245c17ca9a4","head":true,"name":"BS + Avg ESP (Interface)","next":"ad3b1e4c-5965-5605-a067-dd0c59907c4b","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"ce26adc1-6a26-53ef-9626-5eb6a6b9ccb7","flowchartId":"ad3b1e4c-5965-5605-a067-dd0c59907c4b","head":false,"name":"Find ESP Values (Interface)","next":"8d5b4734-edfd-55cc-ad80-aaa72487398d","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"ba46d9b4-610f-537e-ae39-e39ce5240cda","flowchartId":"8d5b4734-edfd-55cc-ad80-aaa72487398d","head":false,"name":"BS + Avg ESP (interface left)","next":"102ec582-5b75-52f5-8b39-19ca725ed47a","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"6c303926-905c-5749-81d5-2d2964fdf09a","flowchartId":"102ec582-5b75-52f5-8b39-19ca725ed47a","head":false,"name":"Find ESP Value (Interface left)","next":"603c45db-93aa-54ce-a7fe-6e9b65b0037d","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"aa611fe8-1e6a-5e5c-976a-f64bfaaaace9","flowchartId":"603c45db-93aa-54ce-a7fe-6e9b65b0037d","head":false,"name":"BS + Avg ESP (interface right)","next":"e3444d35-cc41-59f5-8481-78d0c383b84e","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"736295e8-2ee0-5974-83bc-362061ac0688","flowchartId":"e3444d35-cc41-59f5-8481-78d0c383b84e","head":false,"name":"Find ESP Value (Interface right)","next":"0e0b141a-39ca-52bc-9094-e5f96dc72f39","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","flowchartId":"0e0b141a-39ca-52bc-9094-e5f96dc72f39","head":false,"name":"Calculate VBO","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/variable_cell_relaxation.json":{"_id":"c45dcef1-d16b-59d1-9318-cedd0b1acf08","application":{"name":"espresso"},"isDefault":false,"name":"Variable-cell Relaxation","properties":["atomic_forces","fermi_energy","final_structure","pressure","stress_tensor","total_energy","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Variable-cell Relaxation","properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"systemName":"espresso-variable-cell-relaxation","units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_vc_relax.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"pw_vc-relax","results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"e1bd0870-6245-5fc2-a50d-48cabc356ac8","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_vc_relax.in","rendered":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"pw_vc-relax","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"tags":["variable-cell_relaxation"],"units":[{"_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","flowchartId":"8f6e9590-6a87-584b-abd7-1fb98253054c","head":true,"name":"Variable-cell Relaxation","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/zero_point_energy.json":{"_id":"3158c78d-58bb-5675-8c7f-6f2337061015","application":{"name":"espresso"},"isDefault":false,"name":"Zero Point Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"151538cc-9e71-5269-8b9e-cb5977151227","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Zero Point Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"107595d1-490f-53a2-8432-7f8a12f14d96","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_gamma.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_gamma","results":["zero_point_energy"],"schemaVersion":"2022.8.16"},"flowchartId":"107595d1-490f-53a2-8432-7f8a12f14d96","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n0 0 0\n","contextProviders":[],"executableName":"ph.x","name":"ph_gamma.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n0 0 0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_zpe","postProcessors":[],"preProcessors":[],"results":[{"name":"zero_point_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"151538cc-9e71-5269-8b9e-cb5977151227","flowchartId":"d906bd20-eb92-5a01-a0e2-c81a2d9b2a41","head":true,"name":"Zero Point Energy","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"nwchem/total_energy.json":{"_id":"937fbac8-2dec-5fb1-a46f-b8a0cc3d3d05","application":{"name":"nwchem"},"isDefault":false,"name":"Total Energy","properties":["total_energy","total_energy_contributions"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","application":{"build":"GNU","isDefault":true,"name":"nwchem","schemaVersion":"2022.8.16","shortName":"nwchem","summary":"NWChem","version":"7.0.2"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"pople","type":"localorbital"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Total Energy","properties":["total_energy","total_energy_contributions"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"nwchem","schemaVersion":"2022.8.16","shortName":"nwchem","summary":"NWChem","version":"7.0.2"},"executable":{"hasAdvancedComputeOptions":false,"isDefault":true,"monitors":["standard_output"],"name":"nwchem","postProcessors":["error_handler"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"nwchem","executableName":"nwchem","input":[{"name":"nwchem_total_energy.inp"}],"isDefault":true,"monitors":["standard_output"],"name":"nwchem_total_energy","results":["total_energy","total_energy_contributions"],"schemaVersion":"2022.8.16"},"flowchartId":"6f1eda0b-ebe1-5ccd-92dc-c2e55de5e0c7","head":true,"input":[{"applicationName":"nwchem","content":" start nwchem\n title \"Test\"\n charge {{ input.CHARGE }}\n geometry units au noautosym\n {{ input.ATOMIC_POSITIONS }}\n end\n basis\n * library {{ input.BASIS }}\n end\n dft\n xc {{ input.FUNCTIONAL }}\n mult {{ input.MULT }}\n end\n task dft energy\n","contextProviders":[{"name":"NWChemInputDataManager"}],"executableName":"nwchem","name":"nwchem_total_energy.inp","rendered":" start nwchem\n title \"Test\"\n charge 0\n geometry units au noautosym\n Si 0.000000000 0.000000000 0.000000000 \nSi 1.116306745 0.789348070 1.933500000 \n end\n basis\n * library 6-31G\n end\n dft\n xc B3LYP\n mult 1\n end\n task dft energy\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"nwchem_total_energy","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","flowchartId":"6059d61a-6a92-5657-9130-02208639aff8","head":true,"name":"Total Energy","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"python/ml/classification_workflow.json":{"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","application":{"name":"python"},"isDefault":false,"isUsingDataset":true,"name":"Python ML Train Classification","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Set Up the Job","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"head-set-predict-status","head":true,"input":[],"name":"Set Workflow Mode","next":"head-fetch-training-data","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":["pyml:workflow-type-setter"],"type":"assignment","value":"False"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-training-data","head":false,"input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"name":"Fetch Dataset","next":"head-branch-on-predict-status","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"else":"end-of-ml-train-head","flowchartId":"head-branch-on-predict-status","head":false,"input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"maxOccurrences":100,"name":"Train or Predict?","next":"head-fetch-trained-model","postProcessors":[],"preProcessors":[],"results":[],"statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":[],"then":"head-fetch-trained-model","type":"condition"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-trained-model","head":false,"input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"name":"Fetch Trained Model as file","next":"end-of-ml-train-head","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":["set-io-unit-filenames"],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"end-of-ml-train-head","head":false,"input":[],"name":"End Setup","operand":"IS_SETUP_COMPLETE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"True"}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:random_forest_classification:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"35436b4a-cd9c-5089-ab42-665c4f9ba049","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:roc_curve:sklearn","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ROC Curve Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]}],"units":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","head":true,"name":"Set Up the Job","next":"90738aae-daac-599f-913f-29fb6acdff00","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","head":false,"name":"Machine Learning","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"python/ml/clustering_workflow.json":{"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","application":{"name":"python"},"isDefault":false,"isUsingDataset":true,"name":"Python ML Train Clustering","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Set Up the Job","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"head-set-predict-status","head":true,"input":[],"name":"Set Workflow Mode","next":"head-fetch-training-data","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":["pyml:workflow-type-setter"],"type":"assignment","value":"False"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-training-data","head":false,"input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"name":"Fetch Dataset","next":"head-branch-on-predict-status","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"else":"end-of-ml-train-head","flowchartId":"head-branch-on-predict-status","head":false,"input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"maxOccurrences":100,"name":"Train or Predict?","next":"head-fetch-trained-model","postProcessors":[],"preProcessors":[],"results":[],"statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":[],"then":"head-fetch-trained-model","type":"condition"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-trained-model","head":false,"input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"name":"Fetch Trained Model as file","next":"end-of-ml-train-head","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":["set-io-unit-filenames"],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"end-of-ml-train-head","head":false,"input":[],"name":"End Setup","operand":"IS_SETUP_COMPLETE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"True"}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:random_forest_classification:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"35436b4a-cd9c-5089-ab42-665c4f9ba049","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:roc_curve:sklearn","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ROC Curve Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]}],"units":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","head":true,"name":"Set Up the Job","next":"90738aae-daac-599f-913f-29fb6acdff00","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","head":false,"name":"Machine Learning","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"python/ml/regression_workflow.json":{"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","application":{"name":"python"},"isDefault":false,"isUsingDataset":true,"name":"Python ML Train Regression","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Set Up the Job","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"head-set-predict-status","head":true,"input":[],"name":"Set Workflow Mode","next":"head-fetch-training-data","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":["pyml:workflow-type-setter"],"type":"assignment","value":"False"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-training-data","head":false,"input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"name":"Fetch Dataset","next":"head-branch-on-predict-status","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"else":"end-of-ml-train-head","flowchartId":"head-branch-on-predict-status","head":false,"input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"maxOccurrences":100,"name":"Train or Predict?","next":"head-fetch-trained-model","postProcessors":[],"preProcessors":[],"results":[],"statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":[],"then":"head-fetch-trained-model","type":"condition"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-trained-model","head":false,"input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"name":"Fetch Trained Model as file","next":"end-of-ml-train-head","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":["set-io-unit-filenames"],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"end-of-ml-train-head","head":false,"input":[],"name":"End Setup","operand":"IS_SETUP_COMPLETE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"True"}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_mlp_sklearn.py","templateName":"model_mlp_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:multilayer_perceptron:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_mlp_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_parity_plot_matplotlib.py","templateName":"post_processing_parity_plot_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:parity_plot:matplotlib","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_parity_plot_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Parity Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"my_parity_plot.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]}],"units":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","head":true,"name":"Set Up the Job","next":"90738aae-daac-599f-913f-29fb6acdff00","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","head":false,"name":"Machine Learning","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"python/python_script.json":{"_id":"de816646-766b-5f97-b468-0937d4381440","application":{"name":"python"},"isDefault":false,"name":"Python Script","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Python Script","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"hello_world.py"},{"name":"requirements.txt"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"python","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","flowchartId":"c50e28b2-a0c5-5324-8b6f-e99b5a546bd8","head":true,"name":"Python Script","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"shell/batch_espresso_pwscf.json":{"_id":"e0046fb4-37db-5732-bf81-c48e13081a4c","application":{"name":"shell"},"isDefault":false,"name":"Shell Batch Job (Espresso PWSCF)","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Shell Batch Job (Espresso PWSCF)","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"job_espresso_pw_scf.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"job_espresso_pw_scf","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","contextProviders":[],"executableName":"sh","name":"job_espresso_pw_scf.sh","rendered":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","flowchartId":"d884e8f7-7acf-5a03-bc9a-186903bdaa0e","head":true,"name":"Shell Batch Job (Espresso PWSCF)","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"shell/hello_world.json":{"_id":"d2fd444c-06b4-5d66-baeb-449c680ae1bf","application":{"name":"shell"},"isDefault":false,"name":"Shell Script","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Shell Hello World","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"hello_world.sh"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","contextProviders":[],"executableName":"sh","name":"hello_world.sh","rendered":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","flowchartId":"319307c2-bf22-5bf2-b4e9-a4cdf671b786","head":true,"name":"Shell Hello World","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/band_gap.json":{"_id":"16ca0232-a570-53d1-a4d3-32bbd6f3f0a2","application":{"name":"vasp"},"isDefault":false,"name":"Band Gap","properties":["atomic_forces","band_gaps","fermi_energy","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Gap","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"f0d65517-9592-5bc8-948e-a0851a766cbb","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_nscf","results":["band_gaps","fermi_energy"],"schemaVersion":"2022.8.16"},"flowchartId":"f0d65517-9592-5bc8-948e-a0851a766cbb","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_nscf","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","flowchartId":"db3b83ea-0ef5-594c-89a8-bde38dbc6105","head":true,"name":"Band Gap","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/band_structure.json":{"_id":"25b0ad08-87bb-5400-bea4-acd5fe2163c0","application":{"name":"vasp"},"isDefault":false,"name":"Band Structure","properties":["atomic_forces","band_structure","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"1e1de3be-f6e4-513e-afe2-c84e567a8108","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_bands","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","flowchartId":"c573187f-a8bb-5084-9fcf-1560bf4a7786","head":true,"name":"Band Structure","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/band_structure_dos.json":{"_id":"c8338d40-3c6e-5581-b03c-d7fb5cbb8df5","application":{"name":"vasp"},"isDefault":false,"name":"Band Structure + Density of States","properties":["atomic_forces","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"d38fea11-9781-5151-8dae-d705381498be","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure + Density of States","properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"1e1de3be-f6e4-513e-afe2-c84e567a8108","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_bands","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"d38fea11-9781-5151-8dae-d705381498be","flowchartId":"8a098bb9-73b1-5e84-bfc7-b783e02d0f53","head":true,"name":"Band Structure + Density of States","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/dos.json":{"_id":"629a79fb-a03f-5e34-b2ce-9c735e8ef6c0","application":{"name":"vasp"},"isDefault":false,"name":"Density of States","properties":["atomic_forces","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Density of States","properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","flowchartId":"3e64fdb4-ab5b-52a0-a1d5-51343c49481c","head":true,"name":"Density of States","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/fixed_cell_relaxation.json":{"_id":"cb69418c-2f6c-551d-af81-0cf20ec1113d","application":{"name":"vasp"},"isDefault":false,"name":"Fixed-cell Relaxation","properties":["atomic_forces","fermi_energy","final_structure","pressure","stress_tensor","total_energy","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"db6cc94b-2f26-5688-ba97-80b11567b549","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Fixed-cell Relaxation","properties":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_RELAX"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"vasp_relax","postProcessors":["prepare_restart"],"results":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"2f718a3d-5800-57e2-b707-075c1f1755c6","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"vasp_relax","postProcessors":[{"name":"prepare_restart"}],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_force"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"db6cc94b-2f26-5688-ba97-80b11567b549","flowchartId":"0de8c4c8-b722-5cd2-ae68-b484262e0a01","head":true,"name":"Fixed-cell Relaxation","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/kpoint_convergence.json":{"_id":"fcf105f9-5ae7-5c32-a6b3-e3579cbdf39a","application":{"name":"vasp"},"isDefault":false,"name":"K-point Convergence","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"5d736d84-d616-538f-a09b-81a32ac0777c","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"K-point Convergence","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-tolerance","head":true,"input":[],"name":"Init tolerance","next":"init-increment","operand":"TOL","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0.00001},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-increment","head":false,"input":[],"name":"Init increment","next":"init-result","operand":"INC","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-result","head":false,"input":[],"name":"Init result","next":"init-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-parameter","head":false,"input":[],"name":"Init parameter","next":"vasp-kpoint-convergence","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR"},{"name":"KPOINTS","templateName":"KPOINTS_CONV"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_kpt_conv","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"vasp-kpoint-convergence","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic Mesh\n0\nGamma\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}{% endraw %}\n0 0 0\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic Mesh\n0\nGamma\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}\n0 0 0\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_kpt_conv","next":"store-result","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"store-result","head":false,"input":[{"name":"total_energy","scope":"vasp-kpoint-convergence"}],"name":"store result","next":"check-convergence","operand":"RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"else":"update-result","flowchartId":"check-convergence","head":false,"input":[],"maxOccurrences":50,"name":"check convergence","next":"update-result","postProcessors":[],"preProcessors":[],"results":[],"statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","status":"idle","statusTrack":[],"tags":[],"then":"convergence-is-reached","type":"condition"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"update-result","head":false,"input":[{"name":"RESULT","scope":"global"}],"name":"update result","next":"increment-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"RESULT"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"increment-parameter","head":false,"input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"name":"increment parameter","next":"vasp-kpoint-convergence","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER+INC"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"convergence-is-reached","head":false,"input":[{"name":"PARAMETER","scope":"global"}],"name":"exit","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER"}]}],"units":[{"_id":"5d736d84-d616-538f-a09b-81a32ac0777c","flowchartId":"a34eec2c-cdb2-537d-88c0-ed1d7b205879","head":true,"name":"K-point Convergence","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/neb.json":{"_id":"df41740d-5989-553c-b845-0559d6f8f86b","application":{"name":"vasp"},"isDefault":false,"name":"Nudged Elastic Band (NEB)","properties":["atomic_forces","atomic_forces","fermi_energy","fermi_energy","pressure","pressure","stress_tensor","stress_tensor","total_energy","total_energy","total_energy_contributions","total_energy_contributions","total_force","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"792e8c42-86ce-5f01-812a-66378ec4f379","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Initial/Final Total Energies","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_INITIAL"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_neb_initial","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"f969f010-9dae-5085-9ac5-86150ef78897","head":true,"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.FIRST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_neb_initial","next":"e65a17ce-10c8-5710-ad4d-fb3d42434091","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_FINAL"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_neb_final","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"e65a17ce-10c8-5710-ad4d-fb3d42434091","head":false,"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.LAST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_neb_final","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"c9b7ad2a-5207-5e41-9b66-28474a8921f8","application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"isMultiMaterial":true,"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Prepare Directories","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"bash_vasp_prepare_neb_images.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"bash_vasp_prepare_neb_images","schemaVersion":"2022.8.16"},"flowchartId":"dc397ead-54ad-513b-992e-aedd54576409","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ------------------------------------------------------------------ #\n# This script prepares necessary directories to run VASP NEB\n# calculation. It puts initial POSCAR into directory 00, final into 0N\n# and intermediate images in 01 to 0(N-1). It is assumed that SCF\n# calculations for initial and final structures are already done in\n# previous subworkflows and their standard outputs are written into\n# \"vasp_neb_initial.out\" and \"vasp_neb_final.out\" files respectively.\n# These outputs are here copied into initial (00) and final (0N)\n# directories to calculate the reaction energy profile.\n# ------------------------------------------------------------------ #\n\n{% raw %}\ncd {{ JOB_WORK_DIR }}\n{% endraw %}\n\n# Prepare First Directory\nmkdir -p 00\ncat > 00/POSCAR < 0{{ input.INTERMEDIATE_IMAGES.length + 1 }}/POSCAR < 0{{ loop.index }}/POSCAR < 00/POSCAR < 01/POSCAR < avoid substituion below #}\n{% raw %}\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n{% endraw %}\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_xml_get_qpt_irr.py","rendered":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n\n\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"python","next":"d0fd8654-2106-546b-8792-7bb46272befc","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"d0fd8654-2106-546b-8792-7bb46272befc","head":false,"input":[{"name":"STDOUT","scope":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219"}],"name":"assignment","operand":"Q_POINTS","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)"}]},{"_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"reduce","properties":["phonon_dos","phonon_dispersions"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid_restart.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_grid_restart","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"cb206177-a4af-599a-81ba-6c88d24253b6","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid_restart.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_grid_restart","next":"3b4507a7-9244-540b-abe0-66bceab700f5","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"isDefault":false,"monitors":["standard_output"],"name":"q2r","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"q2r","next":"8fe6a24b-c994-55a2-a448-88657292e8c2","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_grid","results":["phonon_dos"],"schemaVersion":"2022.8.16"},"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_grid","next":"a7fded20-889b-54fc-bbb0-456e82689ab1","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dos"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"isDefault":false,"monitors":["standard_output"],"name":"matdyn_path","results":["phonon_dispersions"],"schemaVersion":"2022.8.16"},"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","head":false,"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"matdyn_path","postProcessors":[],"preProcessors":[],"results":[{"name":"phonon_dispersions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"79f2cb6a-7994-5369-8c85-af07c55ad26f","flowchartId":"b6a2b27a-0fec-5e0e-8974-073ee9d2ad83","head":true,"name":"Preliminary SCF Calculation","next":"4bb74dfb-46a6-5bf4-a477-5d374dc2e271","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"2f017bcb-f4ba-55b8-b939-1f780679a88e","flowchartId":"4bb74dfb-46a6-5bf4-a477-5d374dc2e271","head":false,"name":"ph-init-qpoints","next":"9894b91f-6e97-5ee6-af02-0bef26bd62c0","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"e4b6b2e7-7d8f-5ae1-b6bd-ee81ecbca11a","flowchartId":"9894b91f-6e97-5ee6-af02-0bef26bd62c0","head":false,"name":"espresso-xml-get-qpt-irr","next":"24e3c1f0-8090-512e-9727-8770071d17c8","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"flowchartId":"24e3c1f0-8090-512e-9727-8770071d17c8","head":false,"input":{"name":"Q_POINTS","scope":"global","target":"MAP_DATA","useValues":false,"values":[]},"name":"map","next":"55a9e9fb-3545-5c4b-a1bb-b64a899b78c6","status":"idle","statusTrack":[],"tags":[],"type":"map","workflowId":"731d3397-3278-516a-b28e-53626ef50f0a"},{"_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","flowchartId":"55a9e9fb-3545-5c4b-a1bb-b64a899b78c6","head":false,"name":"reduce","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[{"_id":"731d3397-3278-516a-b28e-53626ef50f0a","compute":{"cluster":{"fqdn":""},"nodes":1,"notify":"n","ppn":1,"queue":"D","timeLimit":"01:00:00"},"isDefault":false,"name":"pre-processor","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"pre-processor","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_link_outdir_save.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_link_outdir_save","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_link_outdir_save.sh","rendered":"\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"e68db280-8636-53e3-81a0-88396ba6147d","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"ph-single-irr-qpt","properties":[],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_single_irr_qpt.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_single_irr_qpt","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"8db9af08-d935-57a0-a824-e7db6d936de8","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n {% raw %}\n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n {% endraw %}\n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_SCRATCH_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_single_irr_qpt.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n \n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n \n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = '{{ JOB_SCRATCH_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_single_irr_qpt","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"7239fc3a-b343-513f-af35-e8687e1829da","application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"post-processor","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_collect_dynmat.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"espresso_collect_dynmat","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_collect_dynmat.sh","rendered":"\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","flowchartId":"e9a790f4-dec6-52c1-b951-014f0ff01cb4","head":true,"name":"pre-processor","next":"c2195045-7a5c-54d3-ab88-211c82de09f1","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"e68db280-8636-53e3-81a0-88396ba6147d","flowchartId":"c2195045-7a5c-54d3-ab88-211c82de09f1","head":false,"name":"ph-single-irr-qpt","next":"e483c7fb-2a29-5e91-819a-7465ead70134","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"7239fc3a-b343-513f-af35-e8687e1829da","flowchartId":"e483c7fb-2a29-5e91-819a-7465ead70134","head":false,"name":"post-processor","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]}]},"espresso/recalculate_bands.json":{"_id":"42b2b964-8ccc-5b36-9e33-41a954abc2ba","application":{"name":"espresso"},"isDefault":false,"name":"Recalculate Bands","properties":["band_structure"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"64551dfb-e529-5d8d-9092-ff268f4da134","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Recalculate Bands","properties":["band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"64551dfb-e529-5d8d-9092-ff268f4da134","flowchartId":"e8b72a45-765e-565f-ab17-c91a21aec09d","head":true,"name":"Recalculate Bands","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/surface_energy.json":{"_id":"68512987-de73-5614-bab2-0f8b575cffa3","application":{"name":"espresso"},"isDefault":false,"name":"Surface Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","surface_energy","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Surface Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"e463ef46-a36e-5168-87dd-e21eb980dfb8","head":true,"input":[{"endpoint":"materials","endpoint_options":{"params":{"projection":"{}","query":"{'_id': MATERIAL_ID}"}},"name":"DATA"}],"monitors":[],"name":"io-slab","next":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","head":false,"input":[{"name":"DATA","scope":"e463ef46-a36e-5168-87dd-e21eb980dfb8"}],"monitors":[],"name":"slab","next":"44263820-0c80-5bd1-b854-9da8d198eac1","operand":"SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"44263820-0c80-5bd1-b854-9da8d198eac1","head":false,"input":[{"endpoint":"materials","endpoint_options":{"params":{"projection":"{}","query":"{'_id': SLAB.metadata.bulkId}"}},"name":"DATA"}],"monitors":[],"name":"io-bulk","next":"b70656f1-a394-57f4-b4de-00096969df4b","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"b70656f1-a394-57f4-b4de-00096969df4b","head":false,"input":[{"name":"DATA","scope":"44263820-0c80-5bd1-b854-9da8d198eac1"}],"monitors":[],"name":"bulk","next":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","operand":"BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0] if DATA else None"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"errorMessage":"Bulk material does not exist!","flowchartId":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","head":false,"monitors":[],"name":"assert-bulk","next":"490635e0-c593-5809-9eb2-c794b96cfed1","postProcessors":[],"preProcessors":[],"results":[],"statement":"BULK != None","status":"idle","statusTrack":[],"tags":[],"type":"assertion"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"490635e0-c593-5809-9eb2-c794b96cfed1","head":false,"input":[{"endpoint":"refined-properties","endpoint_options":{"params":{"projection":"{'sort': {'precision.value': -1}, 'limit': 1}","query":"{ 'exabyteId': BULK.exabyteId, 'data.name': 'total_energy', 'group': {'$regex': ''.join((SUBWORKFLOW.application.shortName, ':'))} }"}},"name":"DATA"}],"monitors":[],"name":"io-e-bulk","next":"bbe13b97-4243-5a85-8f61-a279d0b797aa","postProcessors":[],"preProcessors":[],"results":[],"source":"api","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"bbe13b97-4243-5a85-8f61-a279d0b797aa","head":false,"input":[{"name":"DATA","scope":"490635e0-c593-5809-9eb2-c794b96cfed1"}],"monitors":[],"name":"e-bulk","next":"a06c9f43-7670-5fd0-ac42-7028a472235a","operand":"E_BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"DATA[0].data.value if DATA else None"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"errorMessage":"E_BULK does not exist!","flowchartId":"a06c9f43-7670-5fd0-ac42-7028a472235a","head":false,"monitors":[],"name":"assert-e-bulk","next":"cdf210be-26ed-585a-b4ac-d55795ba2975","postProcessors":[],"preProcessors":[],"results":[],"statement":"E_BULK != None","status":"idle","statusTrack":[],"tags":[],"type":"assertion"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"cdf210be-26ed-585a-b4ac-d55795ba2975","head":false,"input":[],"monitors":[],"name":"surface","next":"ffa8e43d-096a-555b-b8d0-6d283365ef47","operand":"A","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"np.linalg.norm(np.cross(SLAB.lattice.vectors.a, SLAB.lattice.vectors.b))"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"ffa8e43d-096a-555b-b8d0-6d283365ef47","head":false,"input":[],"monitors":[],"name":"n-bulk","next":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","operand":"N_BULK","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"len(BULK.basis.elements)"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","head":false,"input":[],"monitors":[],"name":"n-slab","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"N_SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"len(SLAB.basis.elements)"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"fcd88119-817c-5ac1-a430-ba892ac743eb","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"fcd88119-817c-5ac1-a430-ba892ac743eb","head":false,"input":[{"name":"total_energy","scope":"9fc7a088-5533-5f70-bb33-f676ec65f565"}],"monitors":[],"name":"e-slab","next":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","operand":"E_SLAB","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","head":false,"input":[],"monitors":[],"name":"surface-energy","operand":"SURFACE_ENERGY","postProcessors":[],"preProcessors":[],"results":[{"name":"surface_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"1 / (2 * A) * (E_SLAB - E_BULK * (N_SLAB/N_BULK))"}]}],"units":[{"_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","flowchartId":"d81dc9ce-bb50-5bc6-af1d-e5ede03bb0a6","head":true,"name":"Surface Energy","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/total_energy.json":{"_id":"4e36ca25-fa46-5628-a227-27d22dea8553","application":{"name":"espresso"},"isDefault":false,"name":"Total Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Total Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"tags":["default"],"units":[{"_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","flowchartId":"6059d61a-6a92-5657-9130-02208639aff8","head":true,"name":"Total Energy","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/valence_band_offset.json":{"_id":"d8e08cac-7747-50aa-b925-41f214d722c6","application":{"name":"espresso"},"isDefault":false,"name":"Valence Band Offset (2D)","properties":["atomic_forces","average_potential_profile","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"9c65d03e-6a30-58f3-947a-f174342be0c3","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"BS + Avg ESP (Interface)","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"0f21d8c4-ab32-53ba-b40d-fc9b6608e1b9","head":true,"input":[],"name":"Set Material Index (Interface)","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"MATERIAL_INDEX","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"0"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"pw-bands-calculate-band-gap","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-bands-calculate-band-gap","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"a667d9fd-35d5-5897-be0e-fa0247233649","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","head":false,"input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap"}],"name":"Select indirect band gap","next":"08819369-b541-5b51-8a40-0ee135039482","operand":"BAND_GAP_INDIRECT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","head":false,"input":[],"name":"Set Valence Band Maximum","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","operand":"VBM","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"BAND_GAP_INDIRECT['eigenvalueValence']"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_electrostatic_potential","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Electrostatic Potential (ESP)","next":"average-electrostatic-potential","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"isDefault":false,"monitors":["standard_output"],"name":"average_potential","results":["average_potential_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"average-electrostatic-potential","head":false,"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"average ESP","next":"c6c11873-91d7-5422-8302-3dcc1ce971e9","postProcessors":[],"preProcessors":[],"results":[{"name":"average_potential_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","head":false,"input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential"}],"name":"Set Macroscopically Averaged ESP Data","operand":"array_from_context","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"average_potential_profile['yDataSeries'][1]"}]},{"_id":"ce26adc1-6a26-53ef-9626-5eb6a6b9ccb7","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Find ESP Values (Interface)","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16"},"flowchartId":"python-find-extrema","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Find Extrema","next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","head":false,"input":[{"name":"STDOUT","scope":"python-find-extrema"}],"name":"Set Average ESP Value","operand":"AVG_ESP_INTERFACE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['minima']"}]},{"_id":"ba46d9b4-610f-537e-ae39-e39ce5240cda","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"BS + Avg ESP (interface left)","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"0bd31760-f6e4-5826-b282-882c06c97f94","head":true,"input":[],"name":"Set Material Index (Interface left)","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"MATERIAL_INDEX","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"1"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"pw-bands-calculate-band-gap-left","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-bands-calculate-band-gap-left","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"a667d9fd-35d5-5897-be0e-fa0247233649","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","head":false,"input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap-left"}],"name":"Select indirect band gap","next":"08819369-b541-5b51-8a40-0ee135039482","operand":"BAND_GAP_INDIRECT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","head":false,"input":[],"name":"Set Valence Band Maximum","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","operand":"VBM_LEFT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"BAND_GAP_INDIRECT['eigenvalueValence']"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_electrostatic_potential","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Electrostatic Potential (ESP)","next":"average-electrostatic-potential-left","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"isDefault":false,"monitors":["standard_output"],"name":"average_potential","results":["average_potential_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"average-electrostatic-potential-left","head":false,"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"average ESP","next":"c6c11873-91d7-5422-8302-3dcc1ce971e9","postProcessors":[],"preProcessors":[],"results":[{"name":"average_potential_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","head":false,"input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential-left"}],"name":"Set Macroscopically Averaged ESP Data","operand":"array_from_context","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"average_potential_profile['yDataSeries'][1]"}]},{"_id":"6c303926-905c-5749-81d5-2d2964fdf09a","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Find ESP Value (Interface left)","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16"},"flowchartId":"python-find-extrema-left","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Find Extrema","next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","head":false,"input":[{"name":"STDOUT","scope":"python-find-extrema-left"}],"name":"Set Average ESP Value","operand":"AVG_ESP_LEFT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['minima']"}]},{"_id":"aa611fe8-1e6a-5e5c-976a-f64bfaaaace9","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"BS + Avg ESP (interface right)","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a05809d1-cc0d-5a0b-bf5e-d43b90a6ac4b","head":true,"input":[],"name":"Set Material Index (Interface right)","next":"9fc7a088-5533-5f70-bb33-f676ec65f565","operand":"MATERIAL_INDEX","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"2"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"pw-bands-calculate-band-gap-right","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-bands-calculate-band-gap-right","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"a667d9fd-35d5-5897-be0e-fa0247233649","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","head":false,"input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap-right"}],"name":"Select indirect band gap","next":"08819369-b541-5b51-8a40-0ee135039482","operand":"BAND_GAP_INDIRECT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","head":false,"input":[],"name":"Set Valence Band Maximum","next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","operand":"VBM_RIGHT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"BAND_GAP_INDIRECT['eigenvalueValence']"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16"},"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","head":false,"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"bands","next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_electrostatic_potential","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Electrostatic Potential (ESP)","next":"average-electrostatic-potential-right","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"isDefault":false,"monitors":["standard_output"],"name":"average_potential","results":["average_potential_profile"],"schemaVersion":"2022.8.16"},"flowchartId":"average-electrostatic-potential-right","head":false,"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"average ESP","next":"c6c11873-91d7-5422-8302-3dcc1ce971e9","postProcessors":[],"preProcessors":[],"results":[{"name":"average_potential_profile"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","head":false,"input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential-right"}],"name":"Set Macroscopically Averaged ESP Data","operand":"array_from_context","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"average_potential_profile['yDataSeries'][1]"}]},{"_id":"736295e8-2ee0-5974-83bc-362061ac0688","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Find ESP Value (Interface right)","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16"},"flowchartId":"python-find-extrema-right","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Find Extrema","next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","head":false,"input":[{"name":"STDOUT","scope":"python-find-extrema-right"}],"name":"Set Average ESP Value","operand":"AVG_ESP_RIGHT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['minima']"}]},{"_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Calculate VBO","properties":["valence_band_offset"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"bd4eaa98-b001-5694-87ef-ec77540502ab","head":true,"input":[],"name":"Difference of valence band maxima","next":"2626f7bb-d392-5fd4-ab71-329b508de347","operand":"VBM_DIFF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"VBM_LEFT - VBM_RIGHT"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"2626f7bb-d392-5fd4-ab71-329b508de347","head":false,"input":[],"name":"Difference of macroscopically averaged ESP in bulk","next":"b7307787-53e2-599b-ad12-d627b04074b4","operand":"AVG_ESP_DIFF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"AVG_ESP_LEFT[0] - AVG_ESP_RIGHT[0]"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"b7307787-53e2-599b-ad12-d627b04074b4","head":false,"input":[],"name":"Lineup of macroscopically averaged ESP in interface","next":"197f4b4d-cb7b-57be-a885-d44cb1f61905","operand":"ESP_LINEUP","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"np.abs(AVG_ESP_INTERFACE[0] - AVG_ESP_INTERFACE[1])"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"197f4b4d-cb7b-57be-a885-d44cb1f61905","head":false,"input":[],"name":"Valence Band Offset","operand":"VALENCE_BAND_OFFSET","results":[{"name":"valence_band_offset"}],"status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"abs(VBM_DIFF - AVG_ESP_DIFF + (np.sign(AVG_ESP_DIFF) * ESP_LINEUP))"}]}],"units":[{"_id":"9c65d03e-6a30-58f3-947a-f174342be0c3","flowchartId":"fd622b5c-5c02-594e-b582-b245c17ca9a4","head":true,"name":"BS + Avg ESP (Interface)","next":"ad3b1e4c-5965-5605-a067-dd0c59907c4b","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"ce26adc1-6a26-53ef-9626-5eb6a6b9ccb7","flowchartId":"ad3b1e4c-5965-5605-a067-dd0c59907c4b","head":false,"name":"Find ESP Values (Interface)","next":"8d5b4734-edfd-55cc-ad80-aaa72487398d","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"ba46d9b4-610f-537e-ae39-e39ce5240cda","flowchartId":"8d5b4734-edfd-55cc-ad80-aaa72487398d","head":false,"name":"BS + Avg ESP (interface left)","next":"102ec582-5b75-52f5-8b39-19ca725ed47a","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"6c303926-905c-5749-81d5-2d2964fdf09a","flowchartId":"102ec582-5b75-52f5-8b39-19ca725ed47a","head":false,"name":"Find ESP Value (Interface left)","next":"603c45db-93aa-54ce-a7fe-6e9b65b0037d","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"aa611fe8-1e6a-5e5c-976a-f64bfaaaace9","flowchartId":"603c45db-93aa-54ce-a7fe-6e9b65b0037d","head":false,"name":"BS + Avg ESP (interface right)","next":"e3444d35-cc41-59f5-8481-78d0c383b84e","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"736295e8-2ee0-5974-83bc-362061ac0688","flowchartId":"e3444d35-cc41-59f5-8481-78d0c383b84e","head":false,"name":"Find ESP Value (Interface right)","next":"0e0b141a-39ca-52bc-9094-e5f96dc72f39","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","flowchartId":"0e0b141a-39ca-52bc-9094-e5f96dc72f39","head":false,"name":"Calculate VBO","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/variable_cell_relaxation.json":{"_id":"c45dcef1-d16b-59d1-9318-cedd0b1acf08","application":{"name":"espresso"},"isDefault":false,"name":"Variable-cell Relaxation","properties":["atomic_forces","fermi_energy","final_structure","pressure","stress_tensor","total_energy","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Variable-cell Relaxation","properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"systemName":"espresso-variable-cell-relaxation","units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_vc_relax.in"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"pw_vc-relax","results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"e1bd0870-6245-5fc2-a50d-48cabc356ac8","head":true,"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_vc_relax.in","rendered":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"pw_vc-relax","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"tags":["variable-cell_relaxation"],"units":[{"_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","flowchartId":"8f6e9590-6a87-584b-abd7-1fb98253054c","head":true,"name":"Variable-cell Relaxation","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/wavefunction_plot.json":{"_id":"9f523214-605f-5eed-8b58-2e2d8fbc18e3","application":{"name":"espresso"},"isDefault":false,"name":"Wavefunction Plot","properties":["atomic_forces","band_structure","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"109ac366-8f6d-56d5-9b45-6f665f13a511","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Total Energy with Bands","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-scf-total-energy","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"pw-bands-total-energy","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pw_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"pw-bands-total-energy","head":false,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pw_bands","next":"18a26058-7d37-57ac-a685-335862dbf4db","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"18a26058-7d37-57ac-a685-335862dbf4db","head":false,"input":[{"name":"band_structure","scope":"pw-bands-total-energy"}],"name":"assignment BS","next":"7d103bf9-40b8-5f90-8934-bbcb6c7b9802","operand":"band_structure","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"band_structure"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"flowchartId":"7d103bf9-40b8-5f90-8934-bbcb6c7b9802","head":false,"input":[{"name":"fermi_energy","scope":"pw-scf-total-energy"}],"name":"assignment FE","operand":"fermi_energy","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"fermi_energy"}]},{"_id":"1bb75a6a-4c8c-5336-a24c-1963e83825bc","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Extract Bands Near Fermi","properties":[],"unitConfigs":[{"config":{"attributes":{"input":[{"name":"band_structure","scope":"total_energy_with_bands"},{"name":"fermi_energy","scope":"total_energy_with_bands"}]}},"index":0,"type":"executionBuilder"},{"config":{"attributes":{"input":[{"name":"KBAND_VALUE_BELOW_EF"},{"name":"KBAND_VALUE_ABOVE_EF"}]}},"index":3,"type":"assignment"}],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"extract_bands_fermi.py"},{"name":"requirements.txt","templateName":"requirements_bands_fermi.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"extract_bands_fermi","schemaVersion":"2022.8.16"},"flowchartId":"extract-band-fermi","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"extract_bands_fermi.py","rendered":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"extract_bands_fermi","next":"8771dc7f-878e-5f13-a840-a3a416854f1e","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"8771dc7f-878e-5f13-a840-a3a416854f1e","head":false,"input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"name":"Store Band Below EF","next":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","operand":"KBAND_VALUE_BELOW_EF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['band_below_fermi']"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","head":false,"input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"name":"Store Band Above EF","next":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","operand":"KBAND_VALUE_ABOVE_EF","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"json.loads(STDOUT)['band_above_fermi']"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","head":false,"input":[],"name":"Select Band","operand":"KBAND_VALUE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"KBAND_VALUE_BELOW_EF"}]},{"_id":"7edc20aa-d533-57d8-b8a0-1e504ceb19fd","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"PP Wavefunction","properties":[],"unitConfigs":[{"config":{"attributes":{"input":[{"name":"KBAND_VALUE","scope":"extract_bands_fermi"}]}},"index":0,"type":"executionBuilder"}],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_wfn.in"}],"isDefault":false,"monitors":["standard_output"],"name":"pp_wfn","results":[],"schemaVersion":"2022.8.16"},"flowchartId":"pp-wfn","head":true,"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {% raw %}{{ KBAND_VALUE }}{% endraw %},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_wfn.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {{ KBAND_VALUE }},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"pp_wfn","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"e4ec581f-1cb3-5036-b698-999a96711559","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Plot Wavefunction","properties":["potential_profile","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"plot_wavefunction.py"},{"name":"requirements.txt","templateName":"requirements_plot_wavefunction.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"plot_wavefunction","results":["potential_profile","file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"57fca898-8e8b-5ef2-81a5-9d2b612bc18d","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"plot WFN","postProcessors":[],"preProcessors":[],"results":[{"name":"potential_profile"},{"name":"file_content"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"tags":["wfn_plot"],"units":[{"_id":"109ac366-8f6d-56d5-9b45-6f665f13a511","flowchartId":"84f1102e-5cbf-54ce-bc09-48bced817f9f","head":true,"name":"Total Energy with Bands","next":"8c691f3c-556e-5f4c-8db4-46d6f08d6c9b","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"1bb75a6a-4c8c-5336-a24c-1963e83825bc","flowchartId":"8c691f3c-556e-5f4c-8db4-46d6f08d6c9b","head":false,"name":"Extract Bands Near Fermi","next":"b26bb41f-0237-51db-9e59-16c157c8dd03","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"7edc20aa-d533-57d8-b8a0-1e504ceb19fd","flowchartId":"b26bb41f-0237-51db-9e59-16c157c8dd03","head":false,"name":"PP Wavefunction","next":"4ce49281-e731-550e-af66-6d2408db8237","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"e4ec581f-1cb3-5036-b698-999a96711559","flowchartId":"4ce49281-e731-550e-af66-6d2408db8237","head":false,"name":"Plot Wavefunction","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"espresso/zero_point_energy.json":{"_id":"3158c78d-58bb-5675-8c7f-6f2337061015","application":{"name":"espresso"},"isDefault":false,"name":"Zero Point Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"151538cc-9e71-5269-8b9e-cb5977151227","application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"us","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Zero Point Energy","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"units":[{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"pw.x","postProcessors":["remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"pw_scf","results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16"},"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","head":true,"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"pw_scf","next":"107595d1-490f-53a2-8432-7f8a12f14d96","postProcessors":[],"preProcessors":[],"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"name":"espresso","schemaVersion":"2022.8.16","shortName":"qe","summary":"Quantum ESPRESSO","version":"6.3"},"executable":{"isDefault":false,"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_gamma.in"}],"isDefault":false,"monitors":["standard_output"],"name":"ph_gamma","results":["zero_point_energy"],"schemaVersion":"2022.8.16"},"flowchartId":"107595d1-490f-53a2-8432-7f8a12f14d96","head":false,"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n0 0 0\n","contextProviders":[],"executableName":"ph.x","name":"ph_gamma.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n0 0 0\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ph_zpe","postProcessors":[],"preProcessors":[],"results":[{"name":"zero_point_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"151538cc-9e71-5269-8b9e-cb5977151227","flowchartId":"d906bd20-eb92-5a01-a0e2-c81a2d9b2a41","head":true,"name":"Zero Point Energy","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"nwchem/total_energy.json":{"_id":"937fbac8-2dec-5fb1-a46f-b8a0cc3d3d05","application":{"name":"nwchem"},"isDefault":false,"name":"Total Energy","properties":["total_energy","total_energy_contributions"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","application":{"build":"GNU","isDefault":true,"name":"nwchem","schemaVersion":"2022.8.16","shortName":"nwchem","summary":"NWChem","version":"7.0.2"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"pople","type":"localorbital"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Total Energy","properties":["total_energy","total_energy_contributions"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"nwchem","schemaVersion":"2022.8.16","shortName":"nwchem","summary":"NWChem","version":"7.0.2"},"executable":{"hasAdvancedComputeOptions":false,"isDefault":true,"monitors":["standard_output"],"name":"nwchem","postProcessors":["error_handler"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"nwchem","executableName":"nwchem","input":[{"name":"nwchem_total_energy.inp"}],"isDefault":true,"monitors":["standard_output"],"name":"nwchem_total_energy","results":["total_energy","total_energy_contributions"],"schemaVersion":"2022.8.16"},"flowchartId":"6f1eda0b-ebe1-5ccd-92dc-c2e55de5e0c7","head":true,"input":[{"applicationName":"nwchem","content":" start nwchem\n title \"Test\"\n charge {{ input.CHARGE }}\n geometry units au noautosym\n {{ input.ATOMIC_POSITIONS }}\n end\n basis\n * library {{ input.BASIS }}\n end\n dft\n xc {{ input.FUNCTIONAL }}\n mult {{ input.MULT }}\n end\n task dft energy\n","contextProviders":[{"name":"NWChemInputDataManager"}],"executableName":"nwchem","name":"nwchem_total_energy.inp","rendered":" start nwchem\n title \"Test\"\n charge 0\n geometry units au noautosym\n Si 0.000000000 0.000000000 0.000000000 \nSi 1.116306745 0.789348070 1.933500000 \n end\n basis\n * library 6-31G\n end\n dft\n xc B3LYP\n mult 1\n end\n task dft energy\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"nwchem_total_energy","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","flowchartId":"6059d61a-6a92-5657-9130-02208639aff8","head":true,"name":"Total Energy","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"python/ml/classification_workflow.json":{"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","application":{"name":"python"},"isDefault":false,"isUsingDataset":true,"name":"Python ML Train Classification","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Set Up the Job","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"head-set-predict-status","head":true,"input":[],"name":"Set Workflow Mode","next":"head-fetch-training-data","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":["pyml:workflow-type-setter"],"type":"assignment","value":"False"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-training-data","head":false,"input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"name":"Fetch Dataset","next":"head-branch-on-predict-status","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"else":"end-of-ml-train-head","flowchartId":"head-branch-on-predict-status","head":false,"input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"maxOccurrences":100,"name":"Train or Predict?","next":"head-fetch-trained-model","postProcessors":[],"preProcessors":[],"results":[],"statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":[],"then":"head-fetch-trained-model","type":"condition"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-trained-model","head":false,"input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"name":"Fetch Trained Model as file","next":"end-of-ml-train-head","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":["set-io-unit-filenames"],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"end-of-ml-train-head","head":false,"input":[],"name":"End Setup","operand":"IS_SETUP_COMPLETE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"True"}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:random_forest_classification:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"35436b4a-cd9c-5089-ab42-665c4f9ba049","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:roc_curve:sklearn","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ROC Curve Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]}],"units":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","head":true,"name":"Set Up the Job","next":"90738aae-daac-599f-913f-29fb6acdff00","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","head":false,"name":"Machine Learning","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"python/ml/clustering_workflow.json":{"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","application":{"name":"python"},"isDefault":false,"isUsingDataset":true,"name":"Python ML Train Clustering","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Set Up the Job","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"head-set-predict-status","head":true,"input":[],"name":"Set Workflow Mode","next":"head-fetch-training-data","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":["pyml:workflow-type-setter"],"type":"assignment","value":"False"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-training-data","head":false,"input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"name":"Fetch Dataset","next":"head-branch-on-predict-status","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"else":"end-of-ml-train-head","flowchartId":"head-branch-on-predict-status","head":false,"input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"maxOccurrences":100,"name":"Train or Predict?","next":"head-fetch-trained-model","postProcessors":[],"preProcessors":[],"results":[],"statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":[],"then":"head-fetch-trained-model","type":"condition"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-trained-model","head":false,"input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"name":"Fetch Trained Model as file","next":"end-of-ml-train-head","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":["set-io-unit-filenames"],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"end-of-ml-train-head","head":false,"input":[],"name":"End Setup","operand":"IS_SETUP_COMPLETE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"True"}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:random_forest_classification:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"35436b4a-cd9c-5089-ab42-665c4f9ba049","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:roc_curve:sklearn","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"ROC Curve Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]}],"units":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","head":true,"name":"Set Up the Job","next":"90738aae-daac-599f-913f-29fb6acdff00","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","head":false,"name":"Machine Learning","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"python/ml/regression_workflow.json":{"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","application":{"name":"python"},"isDefault":false,"isUsingDataset":true,"name":"Python ML Train Regression","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Set Up the Job","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"head-set-predict-status","head":true,"input":[],"name":"Set Workflow Mode","next":"head-fetch-training-data","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":["pyml:workflow-type-setter"],"type":"assignment","value":"False"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-training-data","head":false,"input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"name":"Fetch Dataset","next":"head-branch-on-predict-status","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":[],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"else":"end-of-ml-train-head","flowchartId":"head-branch-on-predict-status","head":false,"input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"maxOccurrences":100,"name":"Train or Predict?","next":"head-fetch-trained-model","postProcessors":[],"preProcessors":[],"results":[],"statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","status":"idle","statusTrack":[],"tags":[],"then":"head-fetch-trained-model","type":"condition"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"flowchartId":"head-fetch-trained-model","head":false,"input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"name":"Fetch Trained Model as file","next":"end-of-ml-train-head","source":"object_storage","status":"idle","statusTrack":[],"subtype":"input","tags":["set-io-unit-filenames"],"type":"io"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"flowchartId":"end-of-ml-train-head","head":false,"input":[],"name":"End Setup","operand":"IS_SETUP_COMPLETE","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"True"}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Machine Learning","properties":["workflow:pyml_predict","file_content"],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"enableRender":true,"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16"},"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","head":true,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Setup Variables and Packages","next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16"},"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Input","next":"7fff5212-6c6d-586b-9997-4d4485e09383","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Train Test Split","next":"799de7dc-9394-571b-8e0d-3ff876a3df02","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16"},"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Data Standardize","next":"8dfc61c3-067d-5ea8-bd26-7296628d707a","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_mlp_sklearn.py","templateName":"model_mlp_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:model:multilayer_perceptron:sklearn","results":["workflow:pyml_predict"],"schemaVersion":"2022.8.16"},"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","head":false,"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_mlp_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Model Train and Predict","next":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","postProcessors":[],"preProcessors":[],"results":[{"name":"workflow:pyml_predict"}],"status":"idle","statusTrack":[],"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_parity_plot_matplotlib.py","templateName":"post_processing_parity_plot_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"isDefault":false,"monitors":["standard_output"],"name":"pyml:post_processing:parity_plot:matplotlib","results":["file_content"],"schemaVersion":"2022.8.16"},"flowchartId":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","head":false,"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_parity_plot_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"Parity Plot","postProcessors":[{"name":"remove_virtual_environment"}],"preProcessors":[],"results":[{"basename":"my_parity_plot.png","filetype":"image","name":"file_content"}],"status":"idle","statusTrack":[],"tags":["remove-all-results"],"type":"execution"}]}],"units":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","head":true,"name":"Set Up the Job","next":"90738aae-daac-599f-913f-29fb6acdff00","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","head":false,"name":"Machine Learning","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"python/python_script.json":{"_id":"de816646-766b-5f97-b468-0937d4381440","application":{"name":"python"},"isDefault":false,"name":"Python Script","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Python Script","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"python","schemaVersion":"2022.8.16","shortName":"py","summary":"Python Script","version":"3.10.13"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"hello_world.py"},{"name":"requirements.txt"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","head":true,"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"python","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","flowchartId":"c50e28b2-a0c5-5324-8b6f-e99b5a546bd8","head":true,"name":"Python Script","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"shell/batch_espresso_pwscf.json":{"_id":"e0046fb4-37db-5732-bf81-c48e13081a4c","application":{"name":"shell"},"isDefault":false,"name":"Shell Batch Job (Espresso PWSCF)","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Shell Batch Job (Espresso PWSCF)","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"job_espresso_pw_scf.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"job_espresso_pw_scf","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","contextProviders":[],"executableName":"sh","name":"job_espresso_pw_scf.sh","rendered":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","flowchartId":"d884e8f7-7acf-5a03-bc9a-186903bdaa0e","head":true,"name":"Shell Batch Job (Espresso PWSCF)","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"shell/hello_world.json":{"_id":"d2fd444c-06b4-5d66-baeb-449c680ae1bf","application":{"name":"shell"},"isDefault":false,"name":"Shell Script","properties":[],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Shell Hello World","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"hello_world.sh"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","contextProviders":[],"executableName":"sh","name":"hello_world.sh","rendered":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"}],"name":"shell","postProcessors":[],"preProcessors":[],"results":[],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","flowchartId":"319307c2-bf22-5bf2-b4e9-a4cdf671b786","head":true,"name":"Shell Hello World","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/band_gap.json":{"_id":"16ca0232-a570-53d1-a4d3-32bbd6f3f0a2","application":{"name":"vasp"},"isDefault":false,"name":"Band Gap","properties":["atomic_forces","band_gaps","fermi_energy","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Gap","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"f0d65517-9592-5bc8-948e-a0851a766cbb","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_nscf","results":["band_gaps","fermi_energy"],"schemaVersion":"2022.8.16"},"flowchartId":"f0d65517-9592-5bc8-948e-a0851a766cbb","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_nscf","postProcessors":[],"preProcessors":[],"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","flowchartId":"db3b83ea-0ef5-594c-89a8-bde38dbc6105","head":true,"name":"Band Gap","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/band_structure.json":{"_id":"25b0ad08-87bb-5400-bea4-acd5fe2163c0","application":{"name":"vasp"},"isDefault":false,"name":"Band Structure","properties":["atomic_forces","band_structure","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"1e1de3be-f6e4-513e-afe2-c84e567a8108","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_bands","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","flowchartId":"c573187f-a8bb-5084-9fcf-1560bf4a7786","head":true,"name":"Band Structure","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/band_structure_dos.json":{"_id":"c8338d40-3c6e-5581-b03c-d7fb5cbb8df5","application":{"name":"vasp"},"isDefault":false,"name":"Band Structure + Density of States","properties":["atomic_forces","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"d38fea11-9781-5151-8dae-d705381498be","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Band Structure + Density of States","properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","next":"1e1de3be-f6e4-513e-afe2-c84e567a8108","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_bands","results":["band_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_bands","postProcessors":[],"preProcessors":[],"results":[{"name":"band_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"d38fea11-9781-5151-8dae-d705381498be","flowchartId":"8a098bb9-73b1-5e84-bfc7-b783e02d0f53","head":true,"name":"Band Structure + Density of States","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/dos.json":{"_id":"629a79fb-a03f-5e34-b2ce-9c735e8ef6c0","application":{"name":"vasp"},"isDefault":false,"name":"Density of States","properties":["atomic_forces","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Density of States","properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"name":"vasp","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp","postProcessors":[],"preProcessors":[],"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","flowchartId":"3e64fdb4-ab5b-52a0-a1d5-51343c49481c","head":true,"name":"Density of States","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/fixed_cell_relaxation.json":{"_id":"cb69418c-2f6c-551d-af81-0cf20ec1113d","application":{"name":"vasp"},"isDefault":false,"name":"Fixed-cell Relaxation","properties":["atomic_forces","fermi_energy","final_structure","pressure","stress_tensor","total_energy","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"db6cc94b-2f26-5688-ba97-80b11567b549","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Fixed-cell Relaxation","properties":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_RELAX"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic","convergence_ionic"],"name":"vasp_relax","postProcessors":["prepare_restart"],"results":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"schemaVersion":"2022.8.16"},"flowchartId":"2f718a3d-5800-57e2-b707-075c1f1755c6","head":true,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"name":"vasp_relax","postProcessors":[{"name":"prepare_restart"}],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_force"},{"name":"final_structure"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]}],"units":[{"_id":"db6cc94b-2f26-5688-ba97-80b11567b549","flowchartId":"0de8c4c8-b722-5cd2-ae68-b484262e0a01","head":true,"name":"Fixed-cell Relaxation","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/kpoint_convergence.json":{"_id":"fcf105f9-5ae7-5c32-a6b3-e3579cbdf39a","application":{"name":"vasp"},"isDefault":false,"name":"K-point Convergence","properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"5d736d84-d616-538f-a09b-81a32ac0777c","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"K-point Convergence","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-tolerance","head":true,"input":[],"name":"Init tolerance","next":"init-increment","operand":"TOL","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0.00001},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-increment","head":false,"input":[],"name":"Init increment","next":"init-result","operand":"INC","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-result","head":false,"input":[],"name":"Init result","next":"init-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":0},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"init-parameter","head":false,"input":[],"name":"Init parameter","next":"vasp-kpoint-convergence","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":1},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR"},{"name":"KPOINTS","templateName":"KPOINTS_CONV"},{"name":"POSCAR","templateName":"POSCAR"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_kpt_conv","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"vasp-kpoint-convergence","head":false,"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic Mesh\n0\nGamma\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}{% endraw %}\n0 0 0\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic Mesh\n0\nGamma\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}\n0 0 0\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_kpt_conv","next":"store-result","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"store-result","head":false,"input":[{"name":"total_energy","scope":"vasp-kpoint-convergence"}],"name":"store result","next":"check-convergence","operand":"RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"total_energy"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"else":"update-result","flowchartId":"check-convergence","head":false,"input":[],"maxOccurrences":50,"name":"check convergence","next":"update-result","postProcessors":[],"preProcessors":[],"results":[],"statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","status":"idle","statusTrack":[],"tags":[],"then":"convergence-is-reached","type":"condition"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"update-result","head":false,"input":[{"name":"RESULT","scope":"global"}],"name":"update result","next":"increment-parameter","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"RESULT"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"increment-parameter","head":false,"input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"name":"increment parameter","next":"vasp-kpoint-convergence","operand":"PREV_RESULT","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER+INC"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"flowchartId":"convergence-is-reached","head":false,"input":[{"name":"PARAMETER","scope":"global"}],"name":"exit","operand":"PARAMETER","status":"idle","statusTrack":[],"tags":[],"type":"assignment","value":"PARAMETER"}]}],"units":[{"_id":"5d736d84-d616-538f-a09b-81a32ac0777c","flowchartId":"a34eec2c-cdb2-537d-88c0-ed1d7b205879","head":true,"name":"K-point Convergence","status":"idle","statusTrack":[],"tags":[],"type":"subworkflow"}],"workflows":[]},"vasp/neb.json":{"_id":"df41740d-5989-553c-b845-0559d6f8f86b","application":{"name":"vasp"},"isDefault":false,"name":"Nudged Elastic Band (NEB)","properties":["atomic_forces","atomic_forces","fermi_energy","fermi_energy","pressure","pressure","stress_tensor","stress_tensor","total_energy","total_energy","total_energy_contributions","total_energy_contributions","total_force","total_force"],"schemaVersion":"2022.8.16","subworkflows":[{"_id":"792e8c42-86ce-5f01-812a-66378ec4f379","application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"isMultiMaterial":true,"model":{"functional":{"slug":"pbe"},"method":{"data":{},"subtype":"paw","type":"pseudopotential"},"modifiers":[],"refiners":[],"subtype":"gga","type":"dft"},"name":"Initial/Final Total Energies","properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"units":[{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_INITIAL"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_neb_initial","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"f969f010-9dae-5085-9ac5-86150ef78897","head":true,"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.FIRST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_neb_initial","next":"e65a17ce-10c8-5710-ad4d-fb3d42434091","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"},{"application":{"build":"GNU","isDefault":true,"isLicensed":true,"name":"vasp","schemaVersion":"2022.8.16","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","version":"5.4.4"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"name":"vasp","postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_FINAL"}],"isDefault":false,"monitors":["standard_output","convergence_electronic"],"name":"vasp_neb_final","results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"schemaVersion":"2022.8.16"},"flowchartId":"e65a17ce-10c8-5710-ad4d-fb3d42434091","head":false,"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.LAST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"name":"vasp_neb_final","postProcessors":[],"preProcessors":[],"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"status":"idle","statusTrack":[],"tags":[],"type":"execution"}]},{"_id":"c9b7ad2a-5207-5e41-9b66-28474a8921f8","application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"isMultiMaterial":true,"model":{"method":{"data":{},"subtype":"unknown","type":"unknown"},"subtype":"unknown","type":"unknown"},"name":"Prepare Directories","properties":[],"units":[{"application":{"build":"GNU","isDefault":true,"name":"shell","schemaVersion":"2022.8.16","shortName":"sh","summary":"Shell Script","version":"5.1.8"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"bash_vasp_prepare_neb_images.sh"}],"isDefault":false,"monitors":["standard_output"],"name":"bash_vasp_prepare_neb_images","schemaVersion":"2022.8.16"},"flowchartId":"dc397ead-54ad-513b-992e-aedd54576409","head":true,"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ------------------------------------------------------------------ #\n# This script prepares necessary directories to run VASP NEB\n# calculation. It puts initial POSCAR into directory 00, final into 0N\n# and intermediate images in 01 to 0(N-1). It is assumed that SCF\n# calculations for initial and final structures are already done in\n# previous subworkflows and their standard outputs are written into\n# \"vasp_neb_initial.out\" and \"vasp_neb_final.out\" files respectively.\n# These outputs are here copied into initial (00) and final (0N)\n# directories to calculate the reaction energy profile.\n# ------------------------------------------------------------------ #\n\n{% raw %}\ncd {{ JOB_WORK_DIR }}\n{% endraw %}\n\n# Prepare First Directory\nmkdir -p 00\ncat > 00/POSCAR < 0{{ input.INTERMEDIATE_IMAGES.length + 1 }}/POSCAR < 0{{ loop.index }}/POSCAR < 00/POSCAR < 01/POSCAR <=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d"},{"name":"Set Average ESP Value","type":"assignment","operand":"AVG_ESP","value":"json.loads(STDOUT)['minima']","input":[{"name":"STDOUT","scope":"python-find-extrema"}],"status":"idle","statusTrack":[],"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},"espresso/average_electrostatic_potential_via_band_structure.json":{"isMultiMaterial":true,"_id":"09f5f4ff-7dbd-59ae-ad27-5af1bdfc2bd0","name":"Band Structure + average ESP","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Set Material Index","type":"assignment","operand":"MATERIAL_INDEX","value":0,"input":[],"status":"idle","statusTrack":[],"flowchartId":"2d360607-c739-54ad-97a0-8a83f0971f2c","tags":[],"head":true,"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-calculate-band-gap"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-calculate-band-gap","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"a667d9fd-35d5-5897-be0e-fa0247233649"},{"name":"Select indirect band gap","type":"assignment","operand":"BAND_GAP_INDIRECT","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]","input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap"}],"status":"idle","statusTrack":[],"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","tags":[],"head":false,"next":"08819369-b541-5b51-8a40-0ee135039482","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Set Valence Band Maximum","type":"assignment","operand":"VBM","value":"BAND_GAP_INDIRECT['eigenvalueValence']","input":[],"status":"idle","statusTrack":[],"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","tags":[],"head":false,"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde"},{"type":"execution","name":"Electrostatic Potential (ESP)","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"monitors":["standard_output"],"results":[],"name":"pp_electrostatic_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"next":"average-electrostatic-potential"},{"type":"execution","name":"average ESP","head":false,"results":[{"name":"average_potential_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"average-electrostatic-potential","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"monitors":["standard_output"],"results":["average_potential_profile"],"name":"average_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"next":"c6c11873-91d7-5422-8302-3dcc1ce971e9"},{"name":"Set Macroscopically Averaged ESP Data","type":"assignment","operand":"array_from_context","value":"average_potential_profile['yDataSeries'][1]","input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential"}],"status":"idle","statusTrack":[],"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},"espresso/band_gap_hse_dos.json":{"_id":"f1341a29-777d-5ca3-8933-78a5e0d3f6f2","name":"HSE Band Gap","application":{"name":"espresso"},"properties":["atomic_forces","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","density_of_states"],"model":{"type":"dft","subtype":"hybrid","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"hse06"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf_hse","head":true,"results":[{"name":"atomic_forces"},{"name":"band_gaps"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"f494cdb2-304f-5da2-b979-ce3fbba3a6c4","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_hse.in"}],"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf_hse","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n ecutfock = 100\n occupations = 'smearing'\n degauss = 0.005\n input_dft='hse',\n nqx1 = {% if kgrid.dimensions[0]%2 == 0 %}{{kgrid.dimensions[0]/2}}{% else %}{{(kgrid.dimensions[0]+1)/2}}{% endif %}, nqx2 = {% if kgrid.dimensions[1]%2 == 0 %}{{kgrid.dimensions[1]/2}}{% else %}{{(kgrid.dimensions[1]+1)/2}}{% endif %}, nqx3 = {% if kgrid.dimensions[2]%2 == 0 %}{{kgrid.dimensions[2]/2}}{% else %}{{(kgrid.dimensions[2]+1)/2}}{% endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{% if d%2 == 0 %}{{d}} {% else %}{{d+1}} {% endif %}{% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf_hse.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n ecutfock = 100\n occupations = 'smearing'\n degauss = 0.005\n input_dft='hse',\n nqx1 = 1, nqx2 = 1, nqx3 = 1\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651"},{"type":"execution","name":"projwfc","head":false,"results":[{"name":"density_of_states"}],"monitors":[{"name":"standard_output"}],"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"monitors":["standard_output"],"results":["density_of_states"],"name":"projwfc","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/band_gap.json":{"_id":"233bb8cf-3b4a-5378-84d9-a6a95a2ab43d","name":"Band Gap","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0"},{"type":"execution","name":"pw_nscf","head":false,"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"monitors":["standard_output"],"results":["fermi_energy","band_gaps"],"name":"pw_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"espresso/band_structure_dos.json":{"_id":"fa594399-6b98-5d79-986c-0713601dc06c","name":"Band Structure + Density of States","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps","density_of_states"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"d618df45-5af3-5da5-8882-d74a27e00b04"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0"},{"type":"execution","name":"pw_nscf","head":false,"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"monitors":["standard_output"],"results":["fermi_energy","band_gaps"],"name":"pw_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651"},{"type":"execution","name":"projwfc","head":false,"results":[{"name":"density_of_states"}],"monitors":[{"name":"standard_output"}],"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"monitors":["standard_output"],"results":["density_of_states"],"name":"projwfc","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/band_structure_hse.json":{"_id":"ef3089f3-7460-56f2-9aa2-172d5339d3be","name":"Band Structure - HSE","application":{"name":"espresso"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"hybrid","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"hse06"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf_bands_hse","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"08bd7e4a-2454-53b7-8cc9-9a95975f7e6f","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_bands_hse.in"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"pw_scf_bands_hse","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n input_dft = 'hse',\n {% for d in qgrid.dimensions -%}\n nqx{{loop.index}} = {{d}}\n {% endfor %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal\n{{ '{{' }} {{ explicitKPath.length }} {% raw %} + KPOINTS|length {% endraw %} {{ '}}' }}\n{% raw %}\n{% for point in KPOINTS -%}\n {% for d in point.coordinates %}{{ \"%14.9f\"|format(d) }} {% endfor -%}{{ point.weight }}\n{% endfor %}\n{% endraw %}\n{% for point in explicitKPath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}0.0000001\n{% endfor %}\n","contextProviders":[{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPathFormDataManager"}],"executableName":"pw.x","name":"pw_scf_bands_hse.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n input_dft = 'hse',\n nqx1 = 1\n nqx2 = 1\n nqx3 = 1\n \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal\n{{ 101 + KPOINTS|length }}\n\n{% for point in KPOINTS -%}\n {% for d in point.coordinates %}{{ \"%14.9f\"|format(d) }} {% endfor -%}{{ point.weight }}\n{% endfor %}\n\n 0.000000000 0.000000000 0.000000000 0.0000001\n 0.050000000 0.000000000 0.050000000 0.0000001\n 0.100000000 0.000000000 0.100000000 0.0000001\n 0.150000000 0.000000000 0.150000000 0.0000001\n 0.200000000 0.000000000 0.200000000 0.0000001\n 0.250000000 0.000000000 0.250000000 0.0000001\n 0.300000000 0.000000000 0.300000000 0.0000001\n 0.350000000 0.000000000 0.350000000 0.0000001\n 0.400000000 0.000000000 0.400000000 0.0000001\n 0.450000000 0.000000000 0.450000000 0.0000001\n 0.500000000 0.000000000 0.500000000 0.0000001\n 0.500000000 0.025000000 0.525000000 0.0000001\n 0.500000000 0.050000000 0.550000000 0.0000001\n 0.500000000 0.075000000 0.575000000 0.0000001\n 0.500000000 0.100000000 0.600000000 0.0000001\n 0.500000000 0.125000000 0.625000000 0.0000001\n 0.500000000 0.150000000 0.650000000 0.0000001\n 0.500000000 0.175000000 0.675000000 0.0000001\n 0.500000000 0.200000000 0.700000000 0.0000001\n 0.500000000 0.225000000 0.725000000 0.0000001\n 0.500000000 0.250000000 0.750000000 0.0000001\n 0.487500000 0.262500000 0.750000000 0.0000001\n 0.475000000 0.275000000 0.750000000 0.0000001\n 0.462500000 0.287500000 0.750000000 0.0000001\n 0.450000000 0.300000000 0.750000000 0.0000001\n 0.437500000 0.312500000 0.750000000 0.0000001\n 0.425000000 0.325000000 0.750000000 0.0000001\n 0.412500000 0.337500000 0.750000000 0.0000001\n 0.400000000 0.350000000 0.750000000 0.0000001\n 0.387500000 0.362500000 0.750000000 0.0000001\n 0.375000000 0.375000000 0.750000000 0.0000001\n 0.337500000 0.337500000 0.675000000 0.0000001\n 0.300000000 0.300000000 0.600000000 0.0000001\n 0.262500000 0.262500000 0.525000000 0.0000001\n 0.225000000 0.225000000 0.450000000 0.0000001\n 0.187500000 0.187500000 0.375000000 0.0000001\n 0.150000000 0.150000000 0.300000000 0.0000001\n 0.112500000 0.112500000 0.225000000 0.0000001\n 0.075000000 0.075000000 0.150000000 0.0000001\n 0.037500000 0.037500000 0.075000000 0.0000001\n 0.000000000 0.000000000 0.000000000 0.0000001\n 0.050000000 0.050000000 0.050000000 0.0000001\n 0.100000000 0.100000000 0.100000000 0.0000001\n 0.150000000 0.150000000 0.150000000 0.0000001\n 0.200000000 0.200000000 0.200000000 0.0000001\n 0.250000000 0.250000000 0.250000000 0.0000001\n 0.300000000 0.300000000 0.300000000 0.0000001\n 0.350000000 0.350000000 0.350000000 0.0000001\n 0.400000000 0.400000000 0.400000000 0.0000001\n 0.450000000 0.450000000 0.450000000 0.0000001\n 0.500000000 0.500000000 0.500000000 0.0000001\n 0.512500000 0.475000000 0.512500000 0.0000001\n 0.525000000 0.450000000 0.525000000 0.0000001\n 0.537500000 0.425000000 0.537500000 0.0000001\n 0.550000000 0.400000000 0.550000000 0.0000001\n 0.562500000 0.375000000 0.562500000 0.0000001\n 0.575000000 0.350000000 0.575000000 0.0000001\n 0.587500000 0.325000000 0.587500000 0.0000001\n 0.600000000 0.300000000 0.600000000 0.0000001\n 0.612500000 0.275000000 0.612500000 0.0000001\n 0.625000000 0.250000000 0.625000000 0.0000001\n 0.612500000 0.250000000 0.637500000 0.0000001\n 0.600000000 0.250000000 0.650000000 0.0000001\n 0.587500000 0.250000000 0.662500000 0.0000001\n 0.575000000 0.250000000 0.675000000 0.0000001\n 0.562500000 0.250000000 0.687500000 0.0000001\n 0.550000000 0.250000000 0.700000000 0.0000001\n 0.537500000 0.250000000 0.712500000 0.0000001\n 0.525000000 0.250000000 0.725000000 0.0000001\n 0.512500000 0.250000000 0.737500000 0.0000001\n 0.500000000 0.250000000 0.750000000 0.0000001\n 0.500000000 0.275000000 0.725000000 0.0000001\n 0.500000000 0.300000000 0.700000000 0.0000001\n 0.500000000 0.325000000 0.675000000 0.0000001\n 0.500000000 0.350000000 0.650000000 0.0000001\n 0.500000000 0.375000000 0.625000000 0.0000001\n 0.500000000 0.400000000 0.600000000 0.0000001\n 0.500000000 0.425000000 0.575000000 0.0000001\n 0.500000000 0.450000000 0.550000000 0.0000001\n 0.500000000 0.475000000 0.525000000 0.0000001\n 0.500000000 0.500000000 0.500000000 0.0000001\n 0.512500000 0.475000000 0.512500000 0.0000001\n 0.525000000 0.450000000 0.525000000 0.0000001\n 0.537500000 0.425000000 0.537500000 0.0000001\n 0.550000000 0.400000000 0.550000000 0.0000001\n 0.562500000 0.375000000 0.562500000 0.0000001\n 0.575000000 0.350000000 0.575000000 0.0000001\n 0.587500000 0.325000000 0.587500000 0.0000001\n 0.600000000 0.300000000 0.600000000 0.0000001\n 0.612500000 0.275000000 0.612500000 0.0000001\n 0.625000000 0.250000000 0.625000000 0.0000001\n 0.612500000 0.225000000 0.612500000 0.0000001\n 0.600000000 0.200000000 0.600000000 0.0000001\n 0.587500000 0.175000000 0.587500000 0.0000001\n 0.575000000 0.150000000 0.575000000 0.0000001\n 0.562500000 0.125000000 0.562500000 0.0000001\n 0.550000000 0.100000000 0.550000000 0.0000001\n 0.537500000 0.075000000 0.537500000 0.0000001\n 0.525000000 0.050000000 0.525000000 0.0000001\n 0.512500000 0.025000000 0.512500000 0.0000001\n 0.500000000 0.000000000 0.500000000 0.0000001\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/band_structure_magn.json":{"_id":"4a7dced1-224e-57d7-a616-cbad99062c7b","name":"Spin magnetic bandstructure","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf_magn","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"c229d2a0-3c19-5f13-b3e0-ceb86cb9fbc1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_magn.in"}],"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf_magn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n nspin = 2\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if collinearMagnetization.isTotalMagnetization %}\n tot_magnetization = {{ collinearMagnetization.totalMagnetization }}\n{%- else %}\n{%- for item in collinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"CollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_scf_magn.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n nspin = 2\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"ea06c333-0cc7-51d4-bd98-cc53fa0844d1"},{"type":"execution","name":"pw_bands_magn","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"ea06c333-0cc7-51d4-bd98-cc53fa0844d1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands_magn.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands_magn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n nspin = 2\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if collinearMagnetization.isTotalMagnetization %}\n tot_magnetization = {{ collinearMagnetization.totalMagnetization }}\n{%- else %}\n{%- for item in collinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"CollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_bands_magn.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n nspin = 2\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"a8e4de4b-1f55-50e8-a712-ce0b37c04752"},{"type":"execution","name":"bands_spin_up","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"a8e4de4b-1f55-50e8-a712-ce0b37c04752","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands_spin_up.in"}],"monitors":["standard_output"],"name":"bands_spin_up","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands_up.dat'{% endraw %}\n spin_component = 1\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands_spin_up.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands_up.dat'\n spin_component = 1\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"fd937050-a3f3-5d4d-bb50-d150a93ea5e0"},{"type":"execution","name":"bands_spin_dn","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"fd937050-a3f3-5d4d-bb50-d150a93ea5e0","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands_spin_dn.in"}],"monitors":["standard_output"],"name":"bands_spin_dn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands_dn.dat'{% endraw %}\n spin_component = 2\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands_spin_dn.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands_dn.dat'\n spin_component = 2\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/band_structure_soc.json":{"_id":"51e6fb82-538a-58ee-8d4e-991c8446f657","name":"Spin orbit coupling bandstructure","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"nc-fr","data":{"searchText":"nc-fr"}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf_soc","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"74ec024a-f247-5f15-9c21-cc169bcb62c7","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_soc.in"}],"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf_soc","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n{%- if nonCollinearMagnetization.isStartingMagnetization %}\n{%- for item in nonCollinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization %}\n constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'\n lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}\n fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}\n fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}\n fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}\n lforcet = .true.\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and not nonCollinearMagnetization.lforcet %}\n lforcet = .false.\n{%- endif %}\n{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}\n{%- for item in nonCollinearMagnetization.spinAngles %}\n angle1({{ item.index }}) = {{ item.angle1 }}\n angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n{%- if nonCollinearMagnetization.isExistingChargeDensity %}\n startingpot = 'file'\n{%- endif %}\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"NonCollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_scf_soc.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"cee6ae30-cf34-5138-bdc5-5c57c2a6de5b"},{"type":"execution","name":"pw_bands_soc","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"cee6ae30-cf34-5138-bdc5-5c57c2a6de5b","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands_soc.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands_soc","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n{%- if nonCollinearMagnetization.isStartingMagnetization %}\n{%- for item in nonCollinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization %}\n constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'\n lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}\n fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}\n fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}\n fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}\n lforcet = .true.\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and not nonCollinearMagnetization.lforcet %}\n lforcet = .false.\n{%- endif %}\n{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}\n{%- for item in nonCollinearMagnetization.spinAngles %}\n angle1({{ item.index }}) = {{ item.angle1 }}\n angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"NonCollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_bands_soc.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/band_structure.json":{"_id":"26d32e68-c2b5-50e9-8933-15f684fcc039","name":"Band Structure","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"d618df45-5af3-5da5-8882-d74a27e00b04"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/dielectric_tensor.json":{"_id":"38340b52-83ad-5862-bc18-c140bdc0cb72","name":"Compute Dielectric Function","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps","dielectric_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"nc","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"3b230ec3-0791-52f7-a4db-625390b8718f"},{"name":"Set No-Symmetry Flag","type":"assignment","operand":"NO_SYMMETRY_NO_INVERSION","value":true,"input":[],"status":"idle","statusTrack":[],"flowchartId":"3b230ec3-0791-52f7-a4db-625390b8718f","tags":[],"head":false,"next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_nscf","head":false,"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"monitors":["standard_output"],"results":["fermi_energy","band_gaps"],"name":"pw_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"8c2ec8bd-cdbf-54a0-a217-64a7a26eaebb"},{"type":"execution","name":"Compute dielectric function","head":false,"results":[{"name":"dielectric_tensor"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8c2ec8bd-cdbf-54a0-a217-64a7a26eaebb","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"epsilon.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"epsilon.x","input":[{"name":"epsilon.in"}],"monitors":["standard_output"],"results":["dielectric_tensor"],"name":"dielectric_tensor","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&inputpp\n calculation = \"eps\"\n prefix = \"__prefix__\"\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n\n&energy_grid\n smeartype = \"gauss\"\n intersmear = 0.2\n intrasmear = 0.0\n wmin = 0.0\n wmax = 30.0\n nw = 500\n shift = 0.0\n/\n","contextProviders":[],"executableName":"epsilon.x","name":"epsilon.in","rendered":"&inputpp\n calculation = \"eps\"\n prefix = \"__prefix__\"\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n\n&energy_grid\n smeartype = \"gauss\"\n intersmear = 0.2\n intrasmear = 0.0\n wmin = 0.0\n wmax = 30.0\n nw = 500\n shift = 0.0\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/dos.json":{"_id":"2cf317f3-3306-5a96-bc9b-e9103ebcd5be","name":"Density of States","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps","density_of_states"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0"},{"type":"execution","name":"pw_nscf","head":false,"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"monitors":["standard_output"],"results":["fermi_energy","band_gaps"],"name":"pw_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651"},{"type":"execution","name":"projwfc","head":false,"results":[{"name":"density_of_states"}],"monitors":[{"name":"standard_output"}],"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"monitors":["standard_output"],"results":["density_of_states"],"name":"projwfc","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/electronic_density_mesh.json":{"_id":"e2749c5a-fcd9-589c-819b-8b88c5c90924","name":"Electronic Density Mesh","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"e1a6e1e9-7994-5cd0-98d7-ae8909a10061"},{"type":"execution","name":"pp_density","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"e1a6e1e9-7994-5cd0-98d7-ae8909a10061","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_density.in"}],"monitors":["standard_output"],"results":[],"name":"pp_density","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 0\n/\n&PLOT\n iflag = 3\n output_format = 5\n fileout ='density.xsf'\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_density.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 0\n/\n&PLOT\n iflag = 3\n output_format = 5\n fileout ='density.xsf'\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/esm_relax.json":{"_id":"69728792-afeb-50aa-9b4e-6974a90f676a","name":"Effective Screening Medium (ESM) Relax","application":{"name":"espresso"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_esm_relax","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"potential_profile"},{"name":"charge_density_profile"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"a2bec506-1fdd-5125-a787-85f31cde20c1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_esm_relax.in"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"name":"pw_esm_relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'relax'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = '{{ boundaryConditions.type }}'\n fcp_mu = {{ boundaryConditions.targetFermiEnergy }}\n esm_w = {{ boundaryConditions.offset }}\n esm_efield = {{ boundaryConditions.electricField }}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"BoundaryConditionsFormDataManager"}],"executableName":"pw.x","name":"pw_esm_relax.in","rendered":"&CONTROL\n calculation = 'relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = 'pbc'\n fcp_mu = 0\n esm_w = 0\n esm_efield = 0\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"espresso/esm.json":{"_id":"0de669f6-a455-5dae-b331-19dc85f7090f","name":"Effective Screening Medium (ESM)","application":{"name":"espresso"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_esm","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"potential_profile"},{"name":"charge_density_profile"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"2f487bc6-c237-53e4-bad5-be60369662cb","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_esm.in"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"name":"pw_esm","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = '{{ boundaryConditions.type }}'\n fcp_mu = {{ boundaryConditions.targetFermiEnergy }}\n esm_w = {{ boundaryConditions.offset }}\n esm_efield = {{ boundaryConditions.electricField }}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"BoundaryConditionsFormDataManager"}],"executableName":"pw.x","name":"pw_esm.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = 'pbc'\n fcp_mu = 0\n esm_w = 0\n esm_efield = 0\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"espresso/espresso_extract_kpoints.json":{"_id":"a2785cc5-2427-5c7a-b30f-7077475b948c","name":"Extract KPOINTS","application":{"name":"espresso"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Extract kpoints","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"a716b133-2d04-50b5-b497-100265e3fa24","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"espresso_extract_kpoints.py"},{"name":"requirements.txt","templateName":"requirements_empty.txt"}],"monitors":["standard_output"],"name":"espresso_extract_kpoints","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_extract_kpoints.py","rendered":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Please add any packages required for this unit below following #\n# the requirements.txt specification: #\n# https://pip.pypa.io/en/stable/reference/requirements-file-format/ #\n# ------------------------------------------------------------------ #\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Please add any packages required for this unit below following #\n# the requirements.txt specification: #\n# https://pip.pypa.io/en/stable/reference/requirements-file-format/ #\n# ------------------------------------------------------------------ #\n","schemaVersion":"2022.8.16"}]}]},"espresso/espresso_xml_get_qpt_irr.json":{"_id":"e4b6b2e7-7d8f-5ae1-b6bd-ee81ecbca11a","name":"espresso-xml-get-qpt-irr","application":{"name":"espresso"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"python","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"espresso_xml_get_qpt_irr.py"}],"monitors":["standard_output"],"name":"espresso_xml_get_qpt_irr","schemaVersion":"2022.8.16","isDefault":false},"next":"d0fd8654-2106-546b-8792-7bb46272befc","status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n{# JOB_WORK_DIR will be initialized at runtime => avoid substituion below #}\n{% raw %}\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n{% endraw %}\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_xml_get_qpt_irr.py","rendered":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n\n\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","schemaVersion":"2022.8.16"}]},{"name":"assignment","type":"assignment","operand":"Q_POINTS","value":"json.loads(STDOUT)","input":[{"scope":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","name":"STDOUT"}],"status":"idle","statusTrack":[],"flowchartId":"d0fd8654-2106-546b-8792-7bb46272befc","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},"espresso/fixed_cell_relaxation.json":{"_id":"fb75e249-5489-5146-bd8a-786d33330d9c","name":"Fixed-cell Relaxation","application":{"name":"espresso"},"properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_relax","head":true,"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"flowchartId":"c42871f6-ab79-5987-b228-c3bd80f16ffd","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_relax.in"}],"monitors":["standard_output","convergence_electronic","convergence_ionic"],"results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"name":"pw_relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'relax'\n nstep = 50\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_relax.in","rendered":"&CONTROL\n calculation = 'relax'\n nstep = 50\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"espresso/gw_band_structure_band_gap_full_frequency.json":{"_id":"46bcdcc8-628e-518e-b8c3-9bf38d7a2aef","name":"Full Frequency GW Band Structure + Band Gap","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{"searchText":".*dojo-oncv.*"}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"d82a9858-3f20-5fcd-baeb-0f1d65e9e22e"},{"type":"execution","name":"gw_bands_full_frequency","head":false,"results":[{"name":"band_structure"},{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"d82a9858-3f20-5fcd-baeb-0f1d65e9e22e","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"gw.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"gw.x","input":[{"name":"gw_bands_full_frequency.in"}],"monitors":["standard_output"],"results":["band_structure","fermi_energy","band_gaps"],"name":"gw_bands_full_frequency","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n\n ! the grid used for the linear response\n kpt_grid = {{ kgrid.dimensions|join(', ') }}\n qpt_grid = {{ qgrid.dimensions|join(', ') }}\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of W in the convolution\n max_freq_coul = 200\n num_freq_coul = 51\n\n ! configuration for the correlation self energy\n ecut_corr = 6.0\n\n ! configuration for the exchange self energy\n ecut_exch = 15.0\n/\n\n&gw_output\n/\n\nFREQUENCIES\n35\n 0.0 0.0\n 0.0 0.3\n 0.0 0.9\n 0.0 1.8\n 0.0 3.0\n 0.0 4.5\n 0.0 6.3\n 0.0 8.4\n 0.0 10.8\n 0.0 13.5\n 0.0 16.5\n 0.0 19.8\n 0.0 23.4\n 0.0 27.3\n 0.0 31.5\n 0.0 36.0\n 0.0 40.8\n 0.0 45.9\n 0.0 51.3\n 0.0 57.0\n 0.0 63.0\n 0.0 69.3\n 0.0 75.9\n 0.0 82.8\n 0.0 90.0\n 0.0 97.5\n 0.0 105.3\n 0.0 113.4\n 0.0 121.8\n 0.0 130.5\n 0.0 139.5\n 0.0 148.8\n 0.0 158.4\n 0.0 168.3\n 0.0 178.5\n/\n\nK_points\n{{ explicitKPath2PIBA.length }}\n{% for point in explicitKPath2PIBA -%}\n{% for coordinate in point.coordinates %}{{ coordinate }}{% endfor %}\n{% endfor %}\n/\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPath2PIBAFormDataManager"}],"executableName":"gw.x","name":"gw_bands_full_frequency.in","rendered":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n\n ! the grid used for the linear response\n kpt_grid = 2, 2, 2\n qpt_grid = 1, 1, 1\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of W in the convolution\n max_freq_coul = 200\n num_freq_coul = 51\n\n ! configuration for the correlation self energy\n ecut_corr = 6.0\n\n ! configuration for the exchange self energy\n ecut_exch = 15.0\n/\n\n&gw_output\n/\n\nFREQUENCIES\n35\n 0.0 0.0\n 0.0 0.3\n 0.0 0.9\n 0.0 1.8\n 0.0 3.0\n 0.0 4.5\n 0.0 6.3\n 0.0 8.4\n 0.0 10.8\n 0.0 13.5\n 0.0 16.5\n 0.0 19.8\n 0.0 23.4\n 0.0 27.3\n 0.0 31.5\n 0.0 36.0\n 0.0 40.8\n 0.0 45.9\n 0.0 51.3\n 0.0 57.0\n 0.0 63.0\n 0.0 69.3\n 0.0 75.9\n 0.0 82.8\n 0.0 90.0\n 0.0 97.5\n 0.0 105.3\n 0.0 113.4\n 0.0 121.8\n 0.0 130.5\n 0.0 139.5\n 0.0 148.8\n 0.0 158.4\n 0.0 168.3\n 0.0 178.5\n/\n\nK_points\n101\n 0.000000000 0.000000000 0.000000000\n 0.028867513 -0.040824829 0.050000000\n 0.057735027 -0.081649658 0.100000000\n 0.086602540 -0.122474487 0.150000000\n 0.115470054 -0.163299316 0.200000000\n 0.144337567 -0.204124145 0.250000000\n 0.173205081 -0.244948974 0.300000000\n 0.202072594 -0.285773803 0.350000000\n 0.230940108 -0.326598632 0.400000000\n 0.259807621 -0.367423461 0.450000000\n 0.288675135 -0.408248290 0.500000000\n 0.274241378 -0.387835876 0.525000000\n 0.259807621 -0.367423461 0.550000000\n 0.245373864 -0.347011047 0.575000000\n 0.230940108 -0.326598632 0.600000000\n 0.216506351 -0.306186218 0.625000000\n 0.202072594 -0.285773803 0.650000000\n 0.187638837 -0.265361389 0.675000000\n 0.173205081 -0.244948974 0.700000000\n 0.158771324 -0.224536560 0.725000000\n 0.144337567 -0.204124145 0.750000000\n 0.129903811 -0.183711731 0.750000000\n 0.115470054 -0.163299316 0.750000000\n 0.101036297 -0.142886902 0.750000000\n 0.086602540 -0.122474487 0.750000000\n 0.072168784 -0.102062073 0.750000000\n 0.057735027 -0.081649658 0.750000000\n 0.043301270 -0.061237244 0.750000000\n 0.028867513 -0.040824829 0.750000000\n 0.014433757 -0.020412415 0.750000000\n -0.000000000 -0.000000000 0.750000000\n -0.000000000 -0.000000000 0.675000000\n -0.000000000 -0.000000000 0.600000000\n -0.000000000 -0.000000000 0.525000000\n -0.000000000 -0.000000000 0.450000000\n -0.000000000 -0.000000000 0.375000000\n -0.000000000 -0.000000000 0.300000000\n -0.000000000 -0.000000000 0.225000000\n -0.000000000 -0.000000000 0.150000000\n -0.000000000 -0.000000000 0.075000000\n 0.000000000 0.000000000 0.000000000\n 0.028867513 0.020412415 0.050000000\n 0.057735027 0.040824829 0.100000000\n 0.086602540 0.061237244 0.150000000\n 0.115470054 0.081649658 0.200000000\n 0.144337567 0.102062073 0.250000000\n 0.173205081 0.122474487 0.300000000\n 0.202072594 0.142886902 0.350000000\n 0.230940108 0.163299316 0.400000000\n 0.259807621 0.183711731 0.450000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.339193283 -0.204124145 0.637500000\n 0.317542648 -0.204124145 0.650000000\n 0.295892013 -0.204124145 0.662500000\n 0.274241378 -0.204124145 0.675000000\n 0.252590743 -0.204124145 0.687500000\n 0.230940108 -0.204124145 0.700000000\n 0.209289473 -0.204124145 0.712500000\n 0.187638837 -0.204124145 0.725000000\n 0.165988202 -0.204124145 0.737500000\n 0.144337567 -0.204124145 0.750000000\n 0.158771324 -0.163299316 0.725000000\n 0.173205081 -0.122474487 0.700000000\n 0.187638837 -0.081649658 0.675000000\n 0.202072594 -0.040824829 0.650000000\n 0.216506351 -0.000000000 0.625000000\n 0.230940108 0.040824829 0.600000000\n 0.245373864 0.081649658 0.575000000\n 0.259807621 0.122474487 0.550000000\n 0.274241378 0.163299316 0.525000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.353627040 -0.224536560 0.612500000\n 0.346410162 -0.244948974 0.600000000\n 0.339193283 -0.265361389 0.587500000\n 0.331976405 -0.285773803 0.575000000\n 0.324759526 -0.306186218 0.562500000\n 0.317542648 -0.326598632 0.550000000\n 0.310325770 -0.347011047 0.537500000\n 0.303108891 -0.367423461 0.525000000\n 0.295892013 -0.387835876 0.512500000\n 0.288675135 -0.408248290 0.500000000\n\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/gw_band_structure_band_gap_plasmon_pole.json":{"_id":"72b79a87-8eef-5fe2-9d6c-6c9c256dd56c","name":"Plasmon-Pole GW Band Structure + Band Gap","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{"searchText":".*dojo-oncv.*"}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"f9910952-eca9-5a5f-ae03-a0060ae2fc78"},{"type":"execution","name":"gw_bands_plasmon_pole","head":false,"results":[{"name":"band_structure"},{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"f9910952-eca9-5a5f-ae03-a0060ae2fc78","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"gw.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"gw.x","input":[{"name":"gw_bands_plasmon_pole.in"}],"monitors":["standard_output"],"results":["band_structure","fermi_energy","band_gaps"],"name":"gw_bands_plasmon_pole","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n\n ! the grid used for the linear response\n kpt_grid = {{ kgrid.dimensions|join(', ') }}\n qpt_grid = {{ qgrid.dimensions|join(', ') }}\n\n ! truncation (used for both correlation and exchange)\n truncation = '2d'\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of the Coulomb solver\n thres_coul = 1.0d-2\n\n ! configuration of W in the convolution\n model_coul = 'godby-needs'\n max_freq_coul = 120\n num_freq_coul = 35\n\n ! configuration of the Green solver\n thres_green = 1.0d-3\n max_iter_green = 300\n\n ! configuration for the correlation self energy\n ecut_corr = 5.0\n max_freq_corr = 100.0\n num_freq_corr = 11\n\n ! configuration for the exchange self energy\n ecut_exch = 20.0\n\n ! configuration for the output\n eta = 0.1\n min_freq_wind = -30.0\n max_freq_wind = 30.0\n num_freq_wind = 601\n/\n\n&gw_output\n/\n\nFREQUENCIES\n2\n 0.0 0.0\n 0.0 10.0\n/\n\nK_points\n{{ explicitKPath2PIBA.length }}\n{% for point in explicitKPath2PIBA -%}\n{% for coordinate in point.coordinates %}{{ coordinate }}{% endfor %}\n{% endfor %}\n/\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPath2PIBAFormDataManager"}],"executableName":"gw.x","name":"gw_bands_plasmon_pole.in","rendered":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n\n ! the grid used for the linear response\n kpt_grid = 2, 2, 2\n qpt_grid = 1, 1, 1\n\n ! truncation (used for both correlation and exchange)\n truncation = '2d'\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of the Coulomb solver\n thres_coul = 1.0d-2\n\n ! configuration of W in the convolution\n model_coul = 'godby-needs'\n max_freq_coul = 120\n num_freq_coul = 35\n\n ! configuration of the Green solver\n thres_green = 1.0d-3\n max_iter_green = 300\n\n ! configuration for the correlation self energy\n ecut_corr = 5.0\n max_freq_corr = 100.0\n num_freq_corr = 11\n\n ! configuration for the exchange self energy\n ecut_exch = 20.0\n\n ! configuration for the output\n eta = 0.1\n min_freq_wind = -30.0\n max_freq_wind = 30.0\n num_freq_wind = 601\n/\n\n&gw_output\n/\n\nFREQUENCIES\n2\n 0.0 0.0\n 0.0 10.0\n/\n\nK_points\n101\n 0.000000000 0.000000000 0.000000000\n 0.028867513 -0.040824829 0.050000000\n 0.057735027 -0.081649658 0.100000000\n 0.086602540 -0.122474487 0.150000000\n 0.115470054 -0.163299316 0.200000000\n 0.144337567 -0.204124145 0.250000000\n 0.173205081 -0.244948974 0.300000000\n 0.202072594 -0.285773803 0.350000000\n 0.230940108 -0.326598632 0.400000000\n 0.259807621 -0.367423461 0.450000000\n 0.288675135 -0.408248290 0.500000000\n 0.274241378 -0.387835876 0.525000000\n 0.259807621 -0.367423461 0.550000000\n 0.245373864 -0.347011047 0.575000000\n 0.230940108 -0.326598632 0.600000000\n 0.216506351 -0.306186218 0.625000000\n 0.202072594 -0.285773803 0.650000000\n 0.187638837 -0.265361389 0.675000000\n 0.173205081 -0.244948974 0.700000000\n 0.158771324 -0.224536560 0.725000000\n 0.144337567 -0.204124145 0.750000000\n 0.129903811 -0.183711731 0.750000000\n 0.115470054 -0.163299316 0.750000000\n 0.101036297 -0.142886902 0.750000000\n 0.086602540 -0.122474487 0.750000000\n 0.072168784 -0.102062073 0.750000000\n 0.057735027 -0.081649658 0.750000000\n 0.043301270 -0.061237244 0.750000000\n 0.028867513 -0.040824829 0.750000000\n 0.014433757 -0.020412415 0.750000000\n -0.000000000 -0.000000000 0.750000000\n -0.000000000 -0.000000000 0.675000000\n -0.000000000 -0.000000000 0.600000000\n -0.000000000 -0.000000000 0.525000000\n -0.000000000 -0.000000000 0.450000000\n -0.000000000 -0.000000000 0.375000000\n -0.000000000 -0.000000000 0.300000000\n -0.000000000 -0.000000000 0.225000000\n -0.000000000 -0.000000000 0.150000000\n -0.000000000 -0.000000000 0.075000000\n 0.000000000 0.000000000 0.000000000\n 0.028867513 0.020412415 0.050000000\n 0.057735027 0.040824829 0.100000000\n 0.086602540 0.061237244 0.150000000\n 0.115470054 0.081649658 0.200000000\n 0.144337567 0.102062073 0.250000000\n 0.173205081 0.122474487 0.300000000\n 0.202072594 0.142886902 0.350000000\n 0.230940108 0.163299316 0.400000000\n 0.259807621 0.183711731 0.450000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.339193283 -0.204124145 0.637500000\n 0.317542648 -0.204124145 0.650000000\n 0.295892013 -0.204124145 0.662500000\n 0.274241378 -0.204124145 0.675000000\n 0.252590743 -0.204124145 0.687500000\n 0.230940108 -0.204124145 0.700000000\n 0.209289473 -0.204124145 0.712500000\n 0.187638837 -0.204124145 0.725000000\n 0.165988202 -0.204124145 0.737500000\n 0.144337567 -0.204124145 0.750000000\n 0.158771324 -0.163299316 0.725000000\n 0.173205081 -0.122474487 0.700000000\n 0.187638837 -0.081649658 0.675000000\n 0.202072594 -0.040824829 0.650000000\n 0.216506351 -0.000000000 0.625000000\n 0.230940108 0.040824829 0.600000000\n 0.245373864 0.081649658 0.575000000\n 0.259807621 0.122474487 0.550000000\n 0.274241378 0.163299316 0.525000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.353627040 -0.224536560 0.612500000\n 0.346410162 -0.244948974 0.600000000\n 0.339193283 -0.265361389 0.587500000\n 0.331976405 -0.285773803 0.575000000\n 0.324759526 -0.306186218 0.562500000\n 0.317542648 -0.326598632 0.550000000\n 0.310325770 -0.347011047 0.537500000\n 0.303108891 -0.367423461 0.525000000\n 0.295892013 -0.387835876 0.512500000\n 0.288675135 -0.408248290 0.500000000\n\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/kpoint_convergence.json":{"_id":"ff6a8fbc-2202-5786-9a26-67c843417d0b","name":"K-point Convergence","application":{"name":"espresso"},"properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Init tolerance","type":"assignment","operand":"TOL","value":0.00001,"input":[],"flowchartId":"init-tolerance","status":"idle","statusTrack":[],"tags":[],"head":true,"next":"init-increment","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Init increment","type":"assignment","operand":"INC","value":1,"input":[],"flowchartId":"init-increment","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-result","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Init result","type":"assignment","operand":"PREV_RESULT","value":0,"input":[],"flowchartId":"init-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-parameter","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Init parameter","type":"assignment","operand":"PARAMETER","value":1,"input":[],"flowchartId":"init-parameter","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"pwscf-kpoint-convergence","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_scf_kpt_conv","head":false,"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"pwscf-kpoint-convergence","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_kpt_conv.in"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor"],"name":"pw_scf_kpt_conv","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}} 0 0 0{% endraw %}\n","contextProviders":[{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf_kpt_conv.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}} 0 0 0\n","schemaVersion":"2022.8.16"}],"next":"store-result"},{"name":"store result","type":"assignment","operand":"RESULT","value":"total_energy","input":[{"name":"total_energy","scope":"pwscf-kpoint-convergence"}],"flowchartId":"store-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"check-convergence","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"check convergence","type":"condition","input":[],"results":[],"preProcessors":[],"postProcessors":[],"then":"convergence-is-reached","else":"update-result","statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","maxOccurrences":50,"flowchartId":"check-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"update-result","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"update result","type":"assignment","operand":"PREV_RESULT","value":"RESULT","input":[{"name":"RESULT","scope":"global"}],"flowchartId":"update-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"increment-parameter","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"increment parameter","type":"assignment","operand":"PREV_RESULT","value":"PARAMETER+INC","input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"flowchartId":"increment-parameter","next":"pwscf-kpoint-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"exit","type":"assignment","operand":"PARAMETER","value":"PARAMETER","input":[{"name":"PARAMETER","scope":"global"}],"flowchartId":"convergence-is-reached","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},"espresso/neb.json":{"isMultiMaterial":true,"_id":"c9034468-df28-5357-8912-02226f919042","name":"Nudged Elastic Band (NEB)","application":{"name":"espresso"},"properties":["reaction_energy_barrier","reaction_energy_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"neb","head":true,"results":[{"name":"reaction_energy_barrier"},{"name":"reaction_energy_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"9f273ca0-d240-5b1f-89a9-64dd579304ac","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"neb.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"neb.x","input":[{"name":"neb.in"}],"monitors":["standard_output"],"results":["reaction_energy_barrier","reaction_energy_profile"],"name":"neb","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"BEGIN\nBEGIN_PATH_INPUT\n&PATH\n restart_mode = 'from_scratch'\n string_method = 'neb',\n nstep_path = 50,\n ds = 2.D0,\n opt_scheme = \"broyden\",\n num_of_images = {{ 2 + (input.INTERMEDIATE_IMAGES.length or neb.nImages) }},\n k_max = 0.3D0,\n k_min = 0.2D0,\n CI_scheme = \"auto\",\n path_thr = 0.1D0,\n/\nEND_PATH_INPUT\nBEGIN_ENGINE_INPUT\n&CONTROL\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.03\n nspin = 2\n starting_magnetization = 0.5\n/\n&ELECTRONS\n conv_thr = 1.D-8\n mixing_beta = 0.3\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nBEGIN_POSITIONS\nFIRST_IMAGE\nATOMIC_POSITIONS crystal\n{{ input.FIRST_IMAGE }}\n{%- for IMAGE in input.INTERMEDIATE_IMAGES %}\nINTERMEDIATE_IMAGE\nATOMIC_POSITIONS crystal\n{{ IMAGE }}\n{%- endfor %}\nLAST_IMAGE\nATOMIC_POSITIONS crystal\n{{ input.LAST_IMAGE }}\nEND_POSITIONS\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\nEND_ENGINE_INPUT\nEND\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"NEBFormDataManager"},{"name":"QENEBInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"neb.x","name":"neb.in","rendered":"BEGIN\nBEGIN_PATH_INPUT\n&PATH\n restart_mode = 'from_scratch'\n string_method = 'neb',\n nstep_path = 50,\n ds = 2.D0,\n opt_scheme = \"broyden\",\n num_of_images = 3,\n k_max = 0.3D0,\n k_min = 0.2D0,\n CI_scheme = \"auto\",\n path_thr = 0.1D0,\n/\nEND_PATH_INPUT\nBEGIN_ENGINE_INPUT\n&CONTROL\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.03\n nspin = 2\n starting_magnetization = 0.5\n/\n&ELECTRONS\n conv_thr = 1.D-8\n mixing_beta = 0.3\n/\nATOMIC_SPECIES\nSi 28.0855 \nBEGIN_POSITIONS\nFIRST_IMAGE\nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nLAST_IMAGE\nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nEND_POSITIONS\nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \nEND_ENGINE_INPUT\nEND\n","schemaVersion":"2022.8.16"}]}]},"espresso/ph_init_qpoints.json":{"_id":"2f017bcb-f4ba-55b8-b939-1f780679a88e","name":"ph-init-qpoints","application":{"name":"espresso"},"properties":[],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"ph_init_qpoints","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"b8ea6a33-38f3-5434-b17e-b5eae8fff9fc","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_init_qpoints.in"}],"monitors":["standard_output"],"results":[],"name":"ph_init_qpoints","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .false.\n start_irr = 0\n last_irr = 0\n ldisp = .true.\n fildyn = 'dyn0'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_init_qpoints.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .false.\n start_irr = 0\n last_irr = 0\n ldisp = .true.\n fildyn = 'dyn0'\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/ph_single_irr_qpt.json":{"_id":"e68db280-8636-53e3-81a0-88396ba6147d","name":"ph-single-irr-qpt","application":{"name":"espresso"},"properties":[],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"ph_single_irr_qpt","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"8db9af08-d935-57a0-a824-e7db6d936de8","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_single_irr_qpt.in"}],"monitors":["standard_output"],"results":[],"name":"ph_single_irr_qpt","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n {% raw %}\n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n {% endraw %}\n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_SCRATCH_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_single_irr_qpt.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n \n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n \n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = '{{ JOB_SCRATCH_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/phonon_dispersions.json":{"_id":"bfb69b48-8fbf-5a0d-8949-448f20754766","name":"Phonon Dispersions","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos","phonon_dispersions"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"13bcafce-56ef-5b47-b079-317495eb6933"},{"type":"execution","name":"ph_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"ph_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"next":"3b4507a7-9244-540b-abe0-66bceab700f5"},{"type":"execution","name":"q2r","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"monitors":["standard_output"],"results":[],"name":"q2r","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"next":"a7fded20-889b-54fc-bbb0-456e82689ab1"},{"type":"execution","name":"matdyn_path","head":false,"results":[{"name":"phonon_dispersions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"monitors":["standard_output"],"results":["phonon_dispersions"],"name":"matdyn_path","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}]}]},"espresso/phonon_dos_dispersion.json":{"_id":"291d25cd-378a-5be7-9d85-c8013a4b165b","name":"Phonon Density of States + Dispersions","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos","phonon_dispersions"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"13bcafce-56ef-5b47-b079-317495eb6933"},{"type":"execution","name":"ph_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"ph_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"next":"3b4507a7-9244-540b-abe0-66bceab700f5"},{"type":"execution","name":"q2r","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"monitors":["standard_output"],"results":[],"name":"q2r","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"next":"8fe6a24b-c994-55a2-a448-88657292e8c2"},{"type":"execution","name":"matdyn_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"matdyn_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"next":"a7fded20-889b-54fc-bbb0-456e82689ab1"},{"type":"execution","name":"matdyn_path","head":false,"results":[{"name":"phonon_dispersions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"monitors":["standard_output"],"results":["phonon_dispersions"],"name":"matdyn_path","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}]}]},"espresso/phonon_dos.json":{"_id":"2232051b-9f2a-5a48-9b4d-6231eb6e8297","name":"Phonon Density of States","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"13bcafce-56ef-5b47-b079-317495eb6933"},{"type":"execution","name":"ph_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"ph_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"next":"3b4507a7-9244-540b-abe0-66bceab700f5"},{"type":"execution","name":"q2r","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"monitors":["standard_output"],"results":[],"name":"q2r","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"next":"8fe6a24b-c994-55a2-a448-88657292e8c2"},{"type":"execution","name":"matdyn_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"matdyn_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}]}]},"espresso/phonon_reduce.json":{"_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","name":"reduce","application":{"name":"espresso"},"properties":["phonon_dos","phonon_dispersions"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"ph_grid_restart","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb206177-a4af-599a-81ba-6c88d24253b6","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid_restart.in"}],"monitors":["standard_output"],"results":[],"name":"ph_grid_restart","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid_restart.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"next":"3b4507a7-9244-540b-abe0-66bceab700f5"},{"type":"execution","name":"q2r","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"monitors":["standard_output"],"results":[],"name":"q2r","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"next":"8fe6a24b-c994-55a2-a448-88657292e8c2"},{"type":"execution","name":"matdyn_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"matdyn_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"next":"a7fded20-889b-54fc-bbb0-456e82689ab1"},{"type":"execution","name":"matdyn_path","head":false,"results":[{"name":"phonon_dispersions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"monitors":["standard_output"],"results":["phonon_dispersions"],"name":"matdyn_path","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}]}]},"espresso/post_processor.json":{"_id":"7239fc3a-b343-513f-af35-e8687e1829da","name":"post-processor","application":{"name":"espresso"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_collect_dynmat.sh"}],"monitors":["standard_output"],"name":"espresso_collect_dynmat","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_collect_dynmat.sh","rendered":"\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n\n","schemaVersion":"2022.8.16"}]}]},"espresso/pre_processor.json":{"_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","name":"pre-processor","application":{"name":"espresso"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_link_outdir_save.sh"}],"monitors":["standard_output"],"name":"espresso_link_outdir_save","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_link_outdir_save.sh","rendered":"\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n\n","schemaVersion":"2022.8.16"}]}]},"espresso/pw_scf.json":{"_id":"f52b8039-83d0-5485-a1f1-0bc37cb01ed3","name":"pw-scf","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"espresso/recalculate_bands.json":{"_id":"64551dfb-e529-5d8d-9092-ff268f4da134","name":"Recalculate Bands","application":{"name":"espresso"},"properties":["band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_bands","head":true,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/surface_energy.json":{"_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","name":"Surface Energy","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"io-slab","type":"io","subtype":"input","head":true,"results":[],"monitors":[],"flowchartId":"e463ef46-a36e-5168-87dd-e21eb980dfb8","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"materials","endpoint_options":{"params":{"query":"{'_id': MATERIAL_ID}","projection":"{}"}},"name":"DATA"}],"next":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"slab","type":"assignment","operand":"SLAB","value":"DATA[0]","input":[{"name":"DATA","scope":"e463ef46-a36e-5168-87dd-e21eb980dfb8"}],"head":false,"results":[],"monitors":[],"flowchartId":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","preProcessors":[],"postProcessors":[],"next":"44263820-0c80-5bd1-b854-9da8d198eac1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"io-bulk","type":"io","subtype":"input","head":false,"results":[],"monitors":[],"flowchartId":"44263820-0c80-5bd1-b854-9da8d198eac1","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"materials","endpoint_options":{"params":{"query":"{'_id': SLAB.metadata.bulkId}","projection":"{}"}},"name":"DATA"}],"next":"b70656f1-a394-57f4-b4de-00096969df4b","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"bulk","type":"assignment","operand":"BULK","value":"DATA[0] if DATA else None","input":[{"name":"DATA","scope":"44263820-0c80-5bd1-b854-9da8d198eac1"}],"head":false,"results":[],"monitors":[],"flowchartId":"b70656f1-a394-57f4-b4de-00096969df4b","preProcessors":[],"postProcessors":[],"next":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"assert-bulk","type":"assertion","statement":"BULK != None","errorMessage":"Bulk material does not exist!","head":false,"results":[],"monitors":[],"flowchartId":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","preProcessors":[],"postProcessors":[],"next":"490635e0-c593-5809-9eb2-c794b96cfed1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"io-e-bulk","type":"io","subtype":"input","head":false,"results":[],"monitors":[],"flowchartId":"490635e0-c593-5809-9eb2-c794b96cfed1","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"refined-properties","endpoint_options":{"params":{"query":"{ 'exabyteId': BULK.exabyteId, 'data.name': 'total_energy', 'group': {'$regex': ''.join((SUBWORKFLOW.application.shortName, ':'))} }","projection":"{'sort': {'precision.value': -1}, 'limit': 1}"}},"name":"DATA"}],"next":"bbe13b97-4243-5a85-8f61-a279d0b797aa","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"e-bulk","type":"assignment","operand":"E_BULK","value":"DATA[0].data.value if DATA else None","input":[{"name":"DATA","scope":"490635e0-c593-5809-9eb2-c794b96cfed1"}],"head":false,"results":[],"monitors":[],"flowchartId":"bbe13b97-4243-5a85-8f61-a279d0b797aa","preProcessors":[],"postProcessors":[],"next":"a06c9f43-7670-5fd0-ac42-7028a472235a","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"assert-e-bulk","type":"assertion","statement":"E_BULK != None","errorMessage":"E_BULK does not exist!","head":false,"results":[],"monitors":[],"flowchartId":"a06c9f43-7670-5fd0-ac42-7028a472235a","preProcessors":[],"postProcessors":[],"next":"cdf210be-26ed-585a-b4ac-d55795ba2975","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"surface","type":"assignment","operand":"A","value":"np.linalg.norm(np.cross(SLAB.lattice.vectors.a, SLAB.lattice.vectors.b))","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"cdf210be-26ed-585a-b4ac-d55795ba2975","preProcessors":[],"postProcessors":[],"next":"ffa8e43d-096a-555b-b8d0-6d283365ef47","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"n-bulk","type":"assignment","operand":"N_BULK","value":"len(BULK.basis.elements)","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"ffa8e43d-096a-555b-b8d0-6d283365ef47","preProcessors":[],"postProcessors":[],"next":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"n-slab","type":"assignment","operand":"N_SLAB","value":"len(SLAB.basis.elements)","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","preProcessors":[],"postProcessors":[],"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"fcd88119-817c-5ac1-a430-ba892ac743eb"},{"name":"e-slab","type":"assignment","operand":"E_SLAB","value":"total_energy","input":[{"name":"total_energy","scope":"9fc7a088-5533-5f70-bb33-f676ec65f565"}],"head":false,"results":[],"monitors":[],"flowchartId":"fcd88119-817c-5ac1-a430-ba892ac743eb","preProcessors":[],"postProcessors":[],"next":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"surface-energy","type":"assignment","operand":"SURFACE_ENERGY","value":"1 / (2 * A) * (E_SLAB - E_BULK * (N_SLAB/N_BULK))","input":[],"head":false,"results":[{"name":"surface_energy"}],"monitors":[],"flowchartId":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]}]},"espresso/total_energy.json":{"_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","name":"Total Energy","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}],"tags":["default"]},"espresso/valence_band_offset_calc_from_previous_esp_vbm.json":{"_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","name":"Calculate VBO","application":{"name":"espresso"},"properties":["valence_band_offset"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Difference of valence band maxima","type":"assignment","operand":"VBM_DIFF","value":"VBM_LEFT - VBM_RIGHT","input":[],"status":"idle","statusTrack":[],"flowchartId":"bd4eaa98-b001-5694-87ef-ec77540502ab","tags":[],"head":true,"next":"2626f7bb-d392-5fd4-ab71-329b508de347","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Difference of macroscopically averaged ESP in bulk","type":"assignment","operand":"AVG_ESP_DIFF","value":"AVG_ESP_LEFT[0] - AVG_ESP_RIGHT[0]","input":[],"status":"idle","statusTrack":[],"flowchartId":"2626f7bb-d392-5fd4-ab71-329b508de347","tags":[],"head":false,"next":"b7307787-53e2-599b-ad12-d627b04074b4","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Lineup of macroscopically averaged ESP in interface","type":"assignment","operand":"ESP_LINEUP","value":"np.abs(AVG_ESP_INTERFACE[0] - AVG_ESP_INTERFACE[1])","input":[],"status":"idle","statusTrack":[],"flowchartId":"b7307787-53e2-599b-ad12-d627b04074b4","tags":[],"head":false,"next":"197f4b4d-cb7b-57be-a885-d44cb1f61905","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Valence Band Offset","type":"assignment","operand":"VALENCE_BAND_OFFSET","value":"abs(VBM_DIFF - AVG_ESP_DIFF + (np.sign(AVG_ESP_DIFF) * ESP_LINEUP))","input":[],"results":[{"name":"valence_band_offset"}],"status":"idle","statusTrack":[],"flowchartId":"197f4b4d-cb7b-57be-a885-d44cb1f61905","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},"espresso/variable_cell_relaxation.json":{"systemName":"espresso-variable-cell-relaxation","_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","name":"Variable-cell Relaxation","application":{"name":"espresso"},"properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_vc-relax","head":true,"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"flowchartId":"e1bd0870-6245-5fc2-a50d-48cabc356ac8","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_vc_relax.in"}],"monitors":["standard_output","convergence_electronic","convergence_ionic"],"results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"name":"pw_vc-relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_vc_relax.in","rendered":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}],"tags":["variable-cell_relaxation"]},"espresso/zero_point_energy.json":{"_id":"151538cc-9e71-5269-8b9e-cb5977151227","name":"Zero Point Energy","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"107595d1-490f-53a2-8432-7f8a12f14d96"},{"type":"execution","name":"ph_zpe","head":false,"results":[{"name":"zero_point_energy"}],"monitors":[{"name":"standard_output"}],"flowchartId":"107595d1-490f-53a2-8432-7f8a12f14d96","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_gamma.in"}],"monitors":["standard_output"],"results":["zero_point_energy"],"name":"ph_gamma","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n0 0 0\n","contextProviders":[],"executableName":"ph.x","name":"ph_gamma.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n0 0 0\n","schemaVersion":"2022.8.16"}]}]},"nwchem/total_energy.json":{"_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","name":"Total Energy","application":{"name":"nwchem"},"properties":["total_energy","total_energy_contributions"],"model":{"type":"dft","subtype":"gga","method":{"type":"localorbital","subtype":"pople","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"nwchem_total_energy","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"6f1eda0b-ebe1-5ccd-92dc-c2e55de5e0c7","preProcessors":[],"postProcessors":[],"application":{"name":"nwchem","shortName":"nwchem","summary":"NWChem","build":"GNU","isDefault":true,"version":"7.0.2","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":false,"isDefault":true,"monitors":["standard_output"],"postProcessors":["error_handler"],"name":"nwchem","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"nwchem","executableName":"nwchem","input":[{"name":"nwchem_total_energy.inp"}],"isDefault":true,"monitors":["standard_output"],"results":["total_energy","total_energy_contributions"],"name":"nwchem_total_energy","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"nwchem","content":" start nwchem\n title \"Test\"\n charge {{ input.CHARGE }}\n geometry units au noautosym\n {{ input.ATOMIC_POSITIONS }}\n end\n basis\n * library {{ input.BASIS }}\n end\n dft\n xc {{ input.FUNCTIONAL }}\n mult {{ input.MULT }}\n end\n task dft energy\n","contextProviders":[{"name":"NWChemInputDataManager"}],"executableName":"nwchem","name":"nwchem_total_energy.inp","rendered":" start nwchem\n title \"Test\"\n charge 0\n geometry units au noautosym\n Si 0.000000000 0.000000000 0.000000000 \nSi 1.116306745 0.789348070 1.933500000 \n end\n basis\n * library 6-31G\n end\n dft\n xc B3LYP\n mult 1\n end\n task dft energy\n","schemaVersion":"2022.8.16"}]}]},"python/ml/classification_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:random_forest_classification:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"35436b4a-cd9c-5089-ab42-665c4f9ba049"},{"type":"execution","name":"ROC Curve Plot","head":false,"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:roc_curve:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]},"python/ml/clustering_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_k_means_clustering_sklearn.py","templateName":"model_k_means_clustering_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:k_means_clustering:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for k-means clustering. #\n# #\n# In k-means clustering, the labels are not provided ahead of #\n# time. Instead, one supplies the number of groups the #\n# algorithm should split the dataset into. Here, we set our #\n# own default of 4 groups (fewer than sklearn's default of 8). #\n# Otherwise, the default parameters of the clustering method #\n# are the same as in sklearn. #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.cluster\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Initialize the Model\n model = sklearn.cluster.KMeans(\n n_clusters=4,\n init=\"k-means++\",\n n_init=10,\n max_iter=300,\n tol=0.0001,\n copy_x=True,\n algorithm=\"auto\",\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors)\n context.save(model, \"k_means\")\n train_labels = model.predict(train_descriptors)\n test_labels = model.predict(test_descriptors)\n\n context.save(train_labels, \"train_labels\")\n context.save(test_labels, \"test_labels\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"k_means\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_k_means_clustering_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for k-means clustering. #\n# #\n# In k-means clustering, the labels are not provided ahead of #\n# time. Instead, one supplies the number of groups the #\n# algorithm should split the dataset into. Here, we set our #\n# own default of 4 groups (fewer than sklearn's default of 8). #\n# Otherwise, the default parameters of the clustering method #\n# are the same as in sklearn. #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.cluster\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Initialize the Model\n model = sklearn.cluster.KMeans(\n n_clusters=4,\n init=\"k-means++\",\n n_init=10,\n max_iter=300,\n tol=0.0001,\n copy_x=True,\n algorithm=\"auto\",\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors)\n context.save(model, \"k_means\")\n train_labels = model.predict(train_descriptors)\n test_labels = model.predict(test_descriptors)\n\n context.save(train_labels, \"train_labels\")\n context.save(test_labels, \"test_labels\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"k_means\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"9c95c27b-c8bd-5e8b-8829-d354611decef"},{"type":"execution","name":"2D PCA Clusters Plot","head":false,"results":[{"basename":"train_test_split.png","filetype":"image","name":"file_content"},{"basename":"train_clusters.png","filetype":"image","name":"file_content"},{"basename":"test_clusters.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"9c95c27b-c8bd-5e8b-8829-d354611decef","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_pca_2d_clusters_matplotlib.py","templateName":"post_processing_pca_2d_clusters_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:pca_2d_clusters:matplotlib","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Cluster Visualization #\n# #\n# This unit takes an N-dimensional feature space, and uses #\n# Principal-component Analysis (PCA) to project into a 2D space #\n# to facilitate plotting on a scatter plot. #\n# #\n# The 2D space we project into are the first two principal #\n# components identified in PCA, which are the two vectors with #\n# the highest variance. #\n# #\n# Wikipedia Article on PCA: #\n# https://en.wikipedia.org/wiki/Principal_component_analysis #\n# #\n# We then plot the labels assigned to the train an test set, #\n# and color by class. #\n# #\n# ----------------------------------------------------------------- #\n\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport settings\nimport sklearn.decomposition\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_labels = context.load(\"train_labels\")\n train_descriptors = context.load(\"train_descriptors\")\n test_labels = context.load(\"test_labels\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Unscale the descriptors\n descriptor_scaler = context.load(\"descriptor_scaler\")\n train_descriptors = descriptor_scaler.inverse_transform(train_descriptors)\n test_descriptors = descriptor_scaler.inverse_transform(test_descriptors)\n\n # We need at least 2 dimensions, exit if the dataset is 1D\n if train_descriptors.ndim < 2:\n raise ValueError(\"The train descriptors do not have enough dimensions to be plot in 2D\")\n\n # The data could be multidimensional. Let's do some PCA to get things into 2 dimensions.\n pca = sklearn.decomposition.PCA(n_components=2)\n train_descriptors = pca.fit_transform(train_descriptors)\n test_descriptors = pca.transform(test_descriptors)\n xlabel = \"Principle Component 1\"\n ylabel = \"Principle Component 2\"\n\n # Determine the labels we're going to be using, and generate their colors\n labels = set(train_labels)\n colors = {}\n for count, label in enumerate(labels):\n cm = matplotlib.cm.get_cmap('jet', len(labels))\n color = cm(count / len(labels))\n colors[label] = color\n train_colors = [colors[label] for label in train_labels]\n test_colors = [colors[label] for label in test_labels]\n\n # Train / Test Split Visualization\n plt.title(\"Train Test Split Visualization\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=\"#33548c\", marker=\"o\", label=\"Training Set\")\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=\"#F0B332\", marker=\"o\", label=\"Testing Set\")\n xmin, xmax, ymin, ymax = plt.axis()\n plt.legend()\n plt.tight_layout()\n plt.savefig(\"train_test_split.png\", dpi=600)\n plt.close()\n\n def clusters_legend(cluster_colors):\n \"\"\"\n Helper function that creates a legend, given the coloration by clusters.\n Args:\n cluster_colors: A dictionary of the form {cluster_number : color_value}\n\n Returns:\n None; just creates the legend and puts it on the plot\n \"\"\"\n legend_symbols = []\n for group, color in cluster_colors.items():\n label = f\"Cluster {group}\"\n legend_symbols.append(matplotlib.lines.Line2D([], [], color=color, marker=\"o\",\n linewidth=0, label=label))\n plt.legend(handles=legend_symbols)\n\n # Training Set Clusters\n plt.title(\"Training Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=train_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"train_clusters.png\", dpi=600)\n plt.close()\n\n # Testing Set Clusters\n plt.title(\"Testing Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=test_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"test_clusters.png\", dpi=600)\n plt.close()\n\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_pca_2d_clusters_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Cluster Visualization #\n# #\n# This unit takes an N-dimensional feature space, and uses #\n# Principal-component Analysis (PCA) to project into a 2D space #\n# to facilitate plotting on a scatter plot. #\n# #\n# The 2D space we project into are the first two principal #\n# components identified in PCA, which are the two vectors with #\n# the highest variance. #\n# #\n# Wikipedia Article on PCA: #\n# https://en.wikipedia.org/wiki/Principal_component_analysis #\n# #\n# We then plot the labels assigned to the train an test set, #\n# and color by class. #\n# #\n# ----------------------------------------------------------------- #\n\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport settings\nimport sklearn.decomposition\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_labels = context.load(\"train_labels\")\n train_descriptors = context.load(\"train_descriptors\")\n test_labels = context.load(\"test_labels\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Unscale the descriptors\n descriptor_scaler = context.load(\"descriptor_scaler\")\n train_descriptors = descriptor_scaler.inverse_transform(train_descriptors)\n test_descriptors = descriptor_scaler.inverse_transform(test_descriptors)\n\n # We need at least 2 dimensions, exit if the dataset is 1D\n if train_descriptors.ndim < 2:\n raise ValueError(\"The train descriptors do not have enough dimensions to be plot in 2D\")\n\n # The data could be multidimensional. Let's do some PCA to get things into 2 dimensions.\n pca = sklearn.decomposition.PCA(n_components=2)\n train_descriptors = pca.fit_transform(train_descriptors)\n test_descriptors = pca.transform(test_descriptors)\n xlabel = \"Principle Component 1\"\n ylabel = \"Principle Component 2\"\n\n # Determine the labels we're going to be using, and generate their colors\n labels = set(train_labels)\n colors = {}\n for count, label in enumerate(labels):\n cm = matplotlib.cm.get_cmap('jet', len(labels))\n color = cm(count / len(labels))\n colors[label] = color\n train_colors = [colors[label] for label in train_labels]\n test_colors = [colors[label] for label in test_labels]\n\n # Train / Test Split Visualization\n plt.title(\"Train Test Split Visualization\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=\"#33548c\", marker=\"o\", label=\"Training Set\")\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=\"#F0B332\", marker=\"o\", label=\"Testing Set\")\n xmin, xmax, ymin, ymax = plt.axis()\n plt.legend()\n plt.tight_layout()\n plt.savefig(\"train_test_split.png\", dpi=600)\n plt.close()\n\n def clusters_legend(cluster_colors):\n \"\"\"\n Helper function that creates a legend, given the coloration by clusters.\n Args:\n cluster_colors: A dictionary of the form {cluster_number : color_value}\n\n Returns:\n None; just creates the legend and puts it on the plot\n \"\"\"\n legend_symbols = []\n for group, color in cluster_colors.items():\n label = f\"Cluster {group}\"\n legend_symbols.append(matplotlib.lines.Line2D([], [], color=color, marker=\"o\",\n linewidth=0, label=label))\n plt.legend(handles=legend_symbols)\n\n # Training Set Clusters\n plt.title(\"Training Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=train_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"train_clusters.png\", dpi=600)\n plt.close()\n\n # Testing Set Clusters\n plt.title(\"Testing Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=test_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"test_clusters.png\", dpi=600)\n plt.close()\n\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]},"python/ml/regression_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_mlp_sklearn.py","templateName":"model_mlp_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:multilayer_perceptron:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_mlp_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c"},{"type":"execution","name":"Parity Plot","head":false,"results":[{"basename":"my_parity_plot.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_parity_plot_matplotlib.py","templateName":"post_processing_parity_plot_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:parity_plot:matplotlib","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_parity_plot_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]},"python/ml/train_head.json":{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","name":"Set Up the Job","application":{"name":"python"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Set Workflow Mode","type":"assignment","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","value":"False","input":[],"flowchartId":"head-set-predict-status","tags":["pyml:workflow-type-setter"],"status":"idle","statusTrack":[],"head":true,"next":"head-fetch-training-data","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Dataset","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-training-data","input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"source":"object_storage","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-branch-on-predict-status","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Train or Predict?","type":"condition","input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"results":[],"preProcessors":[],"postProcessors":[],"then":"head-fetch-trained-model","else":"end-of-ml-train-head","statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","maxOccurrences":100,"flowchartId":"head-branch-on-predict-status","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-fetch-trained-model","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Trained Model as file","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-trained-model","input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"source":"object_storage","tags":["set-io-unit-filenames"],"status":"idle","statusTrack":[],"head":false,"next":"end-of-ml-train-head","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"End Setup","type":"assignment","operand":"IS_SETUP_COMPLETE","value":"True","input":[],"flowchartId":"end-of-ml-train-head","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},"python/python_script.json":{"_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","name":"Python Script","application":{"name":"python"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"python","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"hello_world.py"},{"name":"requirements.txt"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","schemaVersion":"2022.8.16"}]}]},"shell/batch_espresso_pwscf.json":{"_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","name":"Shell Batch Job (Espresso PWSCF)","application":{"name":"shell"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"job_espresso_pw_scf.sh"}],"monitors":["standard_output"],"name":"job_espresso_pw_scf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","contextProviders":[],"executableName":"sh","name":"job_espresso_pw_scf.sh","rendered":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","schemaVersion":"2022.8.16"}]}]},"shell/hello_world.json":{"_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","name":"Shell Hello World","application":{"name":"shell"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"hello_world.sh"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","contextProviders":[],"executableName":"sh","name":"hello_world.sh","rendered":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","schemaVersion":"2022.8.16"}]}]},"vasp/band_gap.json":{"_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","name":"Band Gap","application":{"name":"vasp"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"f0d65517-9592-5bc8-948e-a0851a766cbb"},{"type":"execution","name":"vasp_nscf","head":false,"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"f0d65517-9592-5bc8-948e-a0851a766cbb","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic"],"results":["band_gaps","fermi_energy"],"name":"vasp_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/band_structure_dos.json":{"_id":"d38fea11-9781-5151-8dae-d705381498be","name":"Band Structure + Density of States","application":{"name":"vasp"},"properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"1e1de3be-f6e4-513e-afe2-c84e567a8108"},{"type":"execution","name":"vasp_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"monitors":["standard_output","convergence_electronic"],"results":["band_structure"],"name":"vasp_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/band_structure.json":{"_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","name":"Band Structure","application":{"name":"vasp"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"1e1de3be-f6e4-513e-afe2-c84e567a8108"},{"type":"execution","name":"vasp_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"monitors":["standard_output","convergence_electronic"],"results":["band_structure"],"name":"vasp_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/dos.json":{"_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","name":"Density of States","application":{"name":"vasp"},"properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/fixed_cell_relaxation.json":{"_id":"db6cc94b-2f26-5688-ba97-80b11567b549","name":"Fixed-cell Relaxation","application":{"name":"vasp"},"properties":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp_relax","head":true,"results":[{"name":"total_energy"},{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_force"},{"name":"final_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"flowchartId":"2f718a3d-5800-57e2-b707-075c1f1755c6","preProcessors":[],"postProcessors":[{"name":"prepare_restart"}],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_RELAX"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic","convergence_ionic"],"postProcessors":["prepare_restart"],"results":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"name":"vasp_relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/initial_final_total_energies.json":{"isMultiMaterial":true,"_id":"792e8c42-86ce-5f01-812a-66378ec4f379","name":"Initial/Final Total Energies","application":{"name":"vasp"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp_neb_initial","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"f969f010-9dae-5085-9ac5-86150ef78897","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_INITIAL"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_neb_initial","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.FIRST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"e65a17ce-10c8-5710-ad4d-fb3d42434091"},{"type":"execution","name":"vasp_neb_final","head":false,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"e65a17ce-10c8-5710-ad4d-fb3d42434091","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_FINAL"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_neb_final","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.LAST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/kpoint_convergence.json":{"_id":"5d736d84-d616-538f-a09b-81a32ac0777c","name":"K-point Convergence","application":{"name":"vasp"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Init tolerance","type":"assignment","operand":"TOL","value":0.00001,"input":[],"flowchartId":"init-tolerance","status":"idle","statusTrack":[],"tags":[],"head":true,"next":"init-increment","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init increment","type":"assignment","operand":"INC","value":1,"input":[],"flowchartId":"init-increment","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-result","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init result","type":"assignment","operand":"PREV_RESULT","value":0,"input":[],"flowchartId":"init-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-parameter","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init parameter","type":"assignment","operand":"PARAMETER","value":1,"input":[],"flowchartId":"init-parameter","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"vasp-kpoint-convergence","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"type":"execution","name":"vasp_kpt_conv","head":false,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"vasp-kpoint-convergence","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR"},{"name":"KPOINTS","templateName":"KPOINTS_CONV"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_kpt_conv","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic Mesh\n0\nGamma\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}{% endraw %}\n0 0 0\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic Mesh\n0\nGamma\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}\n0 0 0\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"store-result"},{"name":"store result","type":"assignment","operand":"RESULT","value":"total_energy","input":[{"name":"total_energy","scope":"vasp-kpoint-convergence"}],"flowchartId":"store-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"check-convergence","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"check convergence","type":"condition","input":[],"results":[],"preProcessors":[],"postProcessors":[],"then":"convergence-is-reached","else":"update-result","statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","maxOccurrences":50,"flowchartId":"check-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"update-result","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"update result","type":"assignment","operand":"PREV_RESULT","value":"RESULT","input":[{"name":"RESULT","scope":"global"}],"flowchartId":"update-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"increment-parameter","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"increment parameter","type":"assignment","operand":"PREV_RESULT","value":"PARAMETER+INC","input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"flowchartId":"increment-parameter","next":"vasp-kpoint-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"exit","type":"assignment","operand":"PARAMETER","value":"PARAMETER","input":[{"name":"PARAMETER","scope":"global"}],"flowchartId":"convergence-is-reached","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}}]},"vasp/neb_subworkflow.json":{"isMultiMaterial":true,"_id":"e6215fb9-e60c-541b-b73e-b077d64b3a95","name":"Nudged Elastic Band (NEB)","application":{"name":"vasp"},"properties":["reaction_energy_barrier","reaction_energy_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp_neb","head":true,"results":[{"name":"reaction_energy_barrier"},{"name":"reaction_energy_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"9a1660ab-8067-5fad-9fb8-7c039f634636","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB"},{"name":"KPOINTS","templateName":"KPOINTS"}],"monitors":["standard_output"],"results":["reaction_energy_barrier","reaction_energy_profile"],"name":"vasp_neb","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISTART = 0\nIBRION = 1\nEDIFFG = -0.001\nENCUT = 500\nNELM = 100\nNSW = 100\nIMAGES = {{ input.INTERMEDIATE_IMAGES.length or neb.nImages }}\nSPRING = -5\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nIBRION = 1\nEDIFFG = -0.001\nENCUT = 500\nNELM = 100\nNSW = 100\nIMAGES = 1\nSPRING = -5\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"vasp/prepare_images.json":{"isMultiMaterial":true,"_id":"c9b7ad2a-5207-5e41-9b66-28474a8921f8","name":"Prepare Directories","application":{"name":"vasp"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"prepare-neb-images","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"dc397ead-54ad-513b-992e-aedd54576409","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"bash_vasp_prepare_neb_images.sh"}],"monitors":["standard_output"],"name":"bash_vasp_prepare_neb_images","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ------------------------------------------------------------------ #\n# This script prepares necessary directories to run VASP NEB\n# calculation. It puts initial POSCAR into directory 00, final into 0N\n# and intermediate images in 01 to 0(N-1). It is assumed that SCF\n# calculations for initial and final structures are already done in\n# previous subworkflows and their standard outputs are written into\n# \"vasp_neb_initial.out\" and \"vasp_neb_final.out\" files respectively.\n# These outputs are here copied into initial (00) and final (0N)\n# directories to calculate the reaction energy profile.\n# ------------------------------------------------------------------ #\n\n{% raw %}\ncd {{ JOB_WORK_DIR }}\n{% endraw %}\n\n# Prepare First Directory\nmkdir -p 00\ncat > 00/POSCAR < 0{{ input.INTERMEDIATE_IMAGES.length + 1 }}/POSCAR < 0{{ loop.index }}/POSCAR < 00/POSCAR < 01/POSCAR <=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d"},{"name":"Set Average ESP Value","type":"assignment","operand":"AVG_ESP","value":"json.loads(STDOUT)['minima']","input":[{"name":"STDOUT","scope":"python-find-extrema"}],"status":"idle","statusTrack":[],"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},"espresso/average_electrostatic_potential_via_band_structure.json":{"isMultiMaterial":true,"_id":"09f5f4ff-7dbd-59ae-ad27-5af1bdfc2bd0","name":"Band Structure + average ESP","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Set Material Index","type":"assignment","operand":"MATERIAL_INDEX","value":0,"input":[],"status":"idle","statusTrack":[],"flowchartId":"2d360607-c739-54ad-97a0-8a83f0971f2c","tags":[],"head":true,"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-calculate-band-gap"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-calculate-band-gap","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"a667d9fd-35d5-5897-be0e-fa0247233649"},{"name":"Select indirect band gap","type":"assignment","operand":"BAND_GAP_INDIRECT","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]","input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap"}],"status":"idle","statusTrack":[],"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","tags":[],"head":false,"next":"08819369-b541-5b51-8a40-0ee135039482","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Set Valence Band Maximum","type":"assignment","operand":"VBM","value":"BAND_GAP_INDIRECT['eigenvalueValence']","input":[],"status":"idle","statusTrack":[],"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","tags":[],"head":false,"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde"},{"type":"execution","name":"Electrostatic Potential (ESP)","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"monitors":["standard_output"],"results":[],"name":"pp_electrostatic_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"next":"average-electrostatic-potential"},{"type":"execution","name":"average ESP","head":false,"results":[{"name":"average_potential_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"average-electrostatic-potential","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"monitors":["standard_output"],"results":["average_potential_profile"],"name":"average_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"next":"c6c11873-91d7-5422-8302-3dcc1ce971e9"},{"name":"Set Macroscopically Averaged ESP Data","type":"assignment","operand":"array_from_context","value":"average_potential_profile['yDataSeries'][1]","input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential"}],"status":"idle","statusTrack":[],"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},"espresso/band_gap_hse_dos.json":{"_id":"f1341a29-777d-5ca3-8933-78a5e0d3f6f2","name":"HSE Band Gap","application":{"name":"espresso"},"properties":["atomic_forces","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","density_of_states"],"model":{"type":"dft","subtype":"hybrid","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"hse06"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf_hse","head":true,"results":[{"name":"atomic_forces"},{"name":"band_gaps"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"f494cdb2-304f-5da2-b979-ce3fbba3a6c4","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_hse.in"}],"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf_hse","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n ecutfock = 100\n occupations = 'smearing'\n degauss = 0.005\n input_dft='hse',\n nqx1 = {% if kgrid.dimensions[0]%2 == 0 %}{{kgrid.dimensions[0]/2}}{% else %}{{(kgrid.dimensions[0]+1)/2}}{% endif %}, nqx2 = {% if kgrid.dimensions[1]%2 == 0 %}{{kgrid.dimensions[1]/2}}{% else %}{{(kgrid.dimensions[1]+1)/2}}{% endif %}, nqx3 = {% if kgrid.dimensions[2]%2 == 0 %}{{kgrid.dimensions[2]/2}}{% else %}{{(kgrid.dimensions[2]+1)/2}}{% endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{% if d%2 == 0 %}{{d}} {% else %}{{d+1}} {% endif %}{% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf_hse.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n ecutfock = 100\n occupations = 'smearing'\n degauss = 0.005\n input_dft='hse',\n nqx1 = 1, nqx2 = 1, nqx3 = 1\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651"},{"type":"execution","name":"projwfc","head":false,"results":[{"name":"density_of_states"}],"monitors":[{"name":"standard_output"}],"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"monitors":["standard_output"],"results":["density_of_states"],"name":"projwfc","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/band_gap.json":{"_id":"233bb8cf-3b4a-5378-84d9-a6a95a2ab43d","name":"Band Gap","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0"},{"type":"execution","name":"pw_nscf","head":false,"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"monitors":["standard_output"],"results":["fermi_energy","band_gaps"],"name":"pw_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"espresso/band_structure_dos.json":{"_id":"fa594399-6b98-5d79-986c-0713601dc06c","name":"Band Structure + Density of States","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps","density_of_states"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"d618df45-5af3-5da5-8882-d74a27e00b04"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0"},{"type":"execution","name":"pw_nscf","head":false,"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"monitors":["standard_output"],"results":["fermi_energy","band_gaps"],"name":"pw_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651"},{"type":"execution","name":"projwfc","head":false,"results":[{"name":"density_of_states"}],"monitors":[{"name":"standard_output"}],"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"monitors":["standard_output"],"results":["density_of_states"],"name":"projwfc","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/band_structure_hse.json":{"_id":"ef3089f3-7460-56f2-9aa2-172d5339d3be","name":"Band Structure - HSE","application":{"name":"espresso"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"hybrid","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"hse06"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf_bands_hse","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"08bd7e4a-2454-53b7-8cc9-9a95975f7e6f","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_bands_hse.in"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"pw_scf_bands_hse","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n input_dft = 'hse',\n {% for d in qgrid.dimensions -%}\n nqx{{loop.index}} = {{d}}\n {% endfor %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal\n{{ '{{' }} {{ explicitKPath.length }} {% raw %} + KPOINTS|length {% endraw %} {{ '}}' }}\n{% raw %}\n{% for point in KPOINTS -%}\n {% for d in point.coordinates %}{{ \"%14.9f\"|format(d) }} {% endfor -%}{{ point.weight }}\n{% endfor %}\n{% endraw %}\n{% for point in explicitKPath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}0.0000001\n{% endfor %}\n","contextProviders":[{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPathFormDataManager"}],"executableName":"pw.x","name":"pw_scf_bands_hse.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n input_dft = 'hse',\n nqx1 = 1\n nqx2 = 1\n nqx3 = 1\n \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal\n{{ 101 + KPOINTS|length }}\n\n{% for point in KPOINTS -%}\n {% for d in point.coordinates %}{{ \"%14.9f\"|format(d) }} {% endfor -%}{{ point.weight }}\n{% endfor %}\n\n 0.000000000 0.000000000 0.000000000 0.0000001\n 0.050000000 0.000000000 0.050000000 0.0000001\n 0.100000000 0.000000000 0.100000000 0.0000001\n 0.150000000 0.000000000 0.150000000 0.0000001\n 0.200000000 0.000000000 0.200000000 0.0000001\n 0.250000000 0.000000000 0.250000000 0.0000001\n 0.300000000 0.000000000 0.300000000 0.0000001\n 0.350000000 0.000000000 0.350000000 0.0000001\n 0.400000000 0.000000000 0.400000000 0.0000001\n 0.450000000 0.000000000 0.450000000 0.0000001\n 0.500000000 0.000000000 0.500000000 0.0000001\n 0.500000000 0.025000000 0.525000000 0.0000001\n 0.500000000 0.050000000 0.550000000 0.0000001\n 0.500000000 0.075000000 0.575000000 0.0000001\n 0.500000000 0.100000000 0.600000000 0.0000001\n 0.500000000 0.125000000 0.625000000 0.0000001\n 0.500000000 0.150000000 0.650000000 0.0000001\n 0.500000000 0.175000000 0.675000000 0.0000001\n 0.500000000 0.200000000 0.700000000 0.0000001\n 0.500000000 0.225000000 0.725000000 0.0000001\n 0.500000000 0.250000000 0.750000000 0.0000001\n 0.487500000 0.262500000 0.750000000 0.0000001\n 0.475000000 0.275000000 0.750000000 0.0000001\n 0.462500000 0.287500000 0.750000000 0.0000001\n 0.450000000 0.300000000 0.750000000 0.0000001\n 0.437500000 0.312500000 0.750000000 0.0000001\n 0.425000000 0.325000000 0.750000000 0.0000001\n 0.412500000 0.337500000 0.750000000 0.0000001\n 0.400000000 0.350000000 0.750000000 0.0000001\n 0.387500000 0.362500000 0.750000000 0.0000001\n 0.375000000 0.375000000 0.750000000 0.0000001\n 0.337500000 0.337500000 0.675000000 0.0000001\n 0.300000000 0.300000000 0.600000000 0.0000001\n 0.262500000 0.262500000 0.525000000 0.0000001\n 0.225000000 0.225000000 0.450000000 0.0000001\n 0.187500000 0.187500000 0.375000000 0.0000001\n 0.150000000 0.150000000 0.300000000 0.0000001\n 0.112500000 0.112500000 0.225000000 0.0000001\n 0.075000000 0.075000000 0.150000000 0.0000001\n 0.037500000 0.037500000 0.075000000 0.0000001\n 0.000000000 0.000000000 0.000000000 0.0000001\n 0.050000000 0.050000000 0.050000000 0.0000001\n 0.100000000 0.100000000 0.100000000 0.0000001\n 0.150000000 0.150000000 0.150000000 0.0000001\n 0.200000000 0.200000000 0.200000000 0.0000001\n 0.250000000 0.250000000 0.250000000 0.0000001\n 0.300000000 0.300000000 0.300000000 0.0000001\n 0.350000000 0.350000000 0.350000000 0.0000001\n 0.400000000 0.400000000 0.400000000 0.0000001\n 0.450000000 0.450000000 0.450000000 0.0000001\n 0.500000000 0.500000000 0.500000000 0.0000001\n 0.512500000 0.475000000 0.512500000 0.0000001\n 0.525000000 0.450000000 0.525000000 0.0000001\n 0.537500000 0.425000000 0.537500000 0.0000001\n 0.550000000 0.400000000 0.550000000 0.0000001\n 0.562500000 0.375000000 0.562500000 0.0000001\n 0.575000000 0.350000000 0.575000000 0.0000001\n 0.587500000 0.325000000 0.587500000 0.0000001\n 0.600000000 0.300000000 0.600000000 0.0000001\n 0.612500000 0.275000000 0.612500000 0.0000001\n 0.625000000 0.250000000 0.625000000 0.0000001\n 0.612500000 0.250000000 0.637500000 0.0000001\n 0.600000000 0.250000000 0.650000000 0.0000001\n 0.587500000 0.250000000 0.662500000 0.0000001\n 0.575000000 0.250000000 0.675000000 0.0000001\n 0.562500000 0.250000000 0.687500000 0.0000001\n 0.550000000 0.250000000 0.700000000 0.0000001\n 0.537500000 0.250000000 0.712500000 0.0000001\n 0.525000000 0.250000000 0.725000000 0.0000001\n 0.512500000 0.250000000 0.737500000 0.0000001\n 0.500000000 0.250000000 0.750000000 0.0000001\n 0.500000000 0.275000000 0.725000000 0.0000001\n 0.500000000 0.300000000 0.700000000 0.0000001\n 0.500000000 0.325000000 0.675000000 0.0000001\n 0.500000000 0.350000000 0.650000000 0.0000001\n 0.500000000 0.375000000 0.625000000 0.0000001\n 0.500000000 0.400000000 0.600000000 0.0000001\n 0.500000000 0.425000000 0.575000000 0.0000001\n 0.500000000 0.450000000 0.550000000 0.0000001\n 0.500000000 0.475000000 0.525000000 0.0000001\n 0.500000000 0.500000000 0.500000000 0.0000001\n 0.512500000 0.475000000 0.512500000 0.0000001\n 0.525000000 0.450000000 0.525000000 0.0000001\n 0.537500000 0.425000000 0.537500000 0.0000001\n 0.550000000 0.400000000 0.550000000 0.0000001\n 0.562500000 0.375000000 0.562500000 0.0000001\n 0.575000000 0.350000000 0.575000000 0.0000001\n 0.587500000 0.325000000 0.587500000 0.0000001\n 0.600000000 0.300000000 0.600000000 0.0000001\n 0.612500000 0.275000000 0.612500000 0.0000001\n 0.625000000 0.250000000 0.625000000 0.0000001\n 0.612500000 0.225000000 0.612500000 0.0000001\n 0.600000000 0.200000000 0.600000000 0.0000001\n 0.587500000 0.175000000 0.587500000 0.0000001\n 0.575000000 0.150000000 0.575000000 0.0000001\n 0.562500000 0.125000000 0.562500000 0.0000001\n 0.550000000 0.100000000 0.550000000 0.0000001\n 0.537500000 0.075000000 0.537500000 0.0000001\n 0.525000000 0.050000000 0.525000000 0.0000001\n 0.512500000 0.025000000 0.512500000 0.0000001\n 0.500000000 0.000000000 0.500000000 0.0000001\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/band_structure_magn.json":{"_id":"4a7dced1-224e-57d7-a616-cbad99062c7b","name":"Spin magnetic bandstructure","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf_magn","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"c229d2a0-3c19-5f13-b3e0-ceb86cb9fbc1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_magn.in"}],"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf_magn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n nspin = 2\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if collinearMagnetization.isTotalMagnetization %}\n tot_magnetization = {{ collinearMagnetization.totalMagnetization }}\n{%- else %}\n{%- for item in collinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"CollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_scf_magn.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n nspin = 2\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"ea06c333-0cc7-51d4-bd98-cc53fa0844d1"},{"type":"execution","name":"pw_bands_magn","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"ea06c333-0cc7-51d4-bd98-cc53fa0844d1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands_magn.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands_magn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n nspin = 2\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if collinearMagnetization.isTotalMagnetization %}\n tot_magnetization = {{ collinearMagnetization.totalMagnetization }}\n{%- else %}\n{%- for item in collinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"CollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_bands_magn.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n nspin = 2\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"a8e4de4b-1f55-50e8-a712-ce0b37c04752"},{"type":"execution","name":"bands_spin_up","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"a8e4de4b-1f55-50e8-a712-ce0b37c04752","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands_spin_up.in"}],"monitors":["standard_output"],"name":"bands_spin_up","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands_up.dat'{% endraw %}\n spin_component = 1\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands_spin_up.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands_up.dat'\n spin_component = 1\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"fd937050-a3f3-5d4d-bb50-d150a93ea5e0"},{"type":"execution","name":"bands_spin_dn","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"fd937050-a3f3-5d4d-bb50-d150a93ea5e0","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands_spin_dn.in"}],"monitors":["standard_output"],"name":"bands_spin_dn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands_dn.dat'{% endraw %}\n spin_component = 2\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands_spin_dn.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands_dn.dat'\n spin_component = 2\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/band_structure_soc.json":{"_id":"51e6fb82-538a-58ee-8d4e-991c8446f657","name":"Spin orbit coupling bandstructure","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"nc-fr","data":{"searchText":"nc-fr"}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf_soc","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"74ec024a-f247-5f15-9c21-cc169bcb62c7","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_soc.in"}],"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf_soc","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n{%- if nonCollinearMagnetization.isStartingMagnetization %}\n{%- for item in nonCollinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization %}\n constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'\n lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}\n fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}\n fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}\n fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}\n lforcet = .true.\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and not nonCollinearMagnetization.lforcet %}\n lforcet = .false.\n{%- endif %}\n{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}\n{%- for item in nonCollinearMagnetization.spinAngles %}\n angle1({{ item.index }}) = {{ item.angle1 }}\n angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n{%- if nonCollinearMagnetization.isExistingChargeDensity %}\n startingpot = 'file'\n{%- endif %}\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"NonCollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_scf_soc.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"cee6ae30-cf34-5138-bdc5-5c57c2a6de5b"},{"type":"execution","name":"pw_bands_soc","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"cee6ae30-cf34-5138-bdc5-5c57c2a6de5b","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands_soc.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands_soc","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP_WITH_LABELS }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n{%- if nonCollinearMagnetization.isStartingMagnetization %}\n{%- for item in nonCollinearMagnetization.startingMagnetization %}\n starting_magnetization({{ item.index }}) = {{ item.value }} {% endfor -%}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization %}\n constrained_magnetization = '{{ nonCollinearMagnetization.constrainedMagnetization.constrainType }}'\n lambda = {{ nonCollinearMagnetization.constrainedMagnetization.lambda }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isConstrainedMagnetization and nonCollinearMagnetization.isFixedMagnetization %}\n fixed_magnetization(1) = {{ nonCollinearMagnetization.fixedMagnetization.x }}\n fixed_magnetization(2) = {{ nonCollinearMagnetization.fixedMagnetization.y }}\n fixed_magnetization(3) = {{ nonCollinearMagnetization.fixedMagnetization.z }}\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and nonCollinearMagnetization.lforcet %}\n lforcet = .true.\n{%- endif %}\n{%- if nonCollinearMagnetization.isExistingChargeDensity and not nonCollinearMagnetization.lforcet %}\n lforcet = .false.\n{%- endif %}\n{%- if nonCollinearMagnetization.isArbitrarySpinDirection %}\n{%- for item in nonCollinearMagnetization.spinAngles %}\n angle1({{ item.index }}) = {{ item.angle1 }}\n angle2({{ item.index }}) = {{ item.angle2 }} {% endfor %}\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES_WITH_LABELS }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"NonCollinearMagnetizationDataManager"}],"executableName":"pw.x","name":"pw_bands_soc.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n noncolin = .true.\n lspinorb = .true.\n starting_magnetization(1) = 0 \n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/band_structure.json":{"_id":"26d32e68-c2b5-50e9-8933-15f684fcc039","name":"Band Structure","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"d618df45-5af3-5da5-8882-d74a27e00b04"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/dielectric_tensor.json":{"_id":"38340b52-83ad-5862-bc18-c140bdc0cb72","name":"Compute Dielectric Function","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps","dielectric_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"nc","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"3b230ec3-0791-52f7-a4db-625390b8718f"},{"name":"Set No-Symmetry Flag","type":"assignment","operand":"NO_SYMMETRY_NO_INVERSION","value":true,"input":[],"status":"idle","statusTrack":[],"flowchartId":"3b230ec3-0791-52f7-a4db-625390b8718f","tags":[],"head":false,"next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_nscf","head":false,"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"monitors":["standard_output"],"results":["fermi_energy","band_gaps"],"name":"pw_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"8c2ec8bd-cdbf-54a0-a217-64a7a26eaebb"},{"type":"execution","name":"Compute dielectric function","head":false,"results":[{"name":"dielectric_tensor"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8c2ec8bd-cdbf-54a0-a217-64a7a26eaebb","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"epsilon.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"epsilon.x","input":[{"name":"epsilon.in"}],"monitors":["standard_output"],"results":["dielectric_tensor"],"name":"dielectric_tensor","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&inputpp\n calculation = \"eps\"\n prefix = \"__prefix__\"\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n\n&energy_grid\n smeartype = \"gauss\"\n intersmear = 0.2\n intrasmear = 0.0\n wmin = 0.0\n wmax = 30.0\n nw = 500\n shift = 0.0\n/\n","contextProviders":[],"executableName":"epsilon.x","name":"epsilon.in","rendered":"&inputpp\n calculation = \"eps\"\n prefix = \"__prefix__\"\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n\n&energy_grid\n smeartype = \"gauss\"\n intersmear = 0.2\n intrasmear = 0.0\n wmin = 0.0\n wmax = 30.0\n nw = 500\n shift = 0.0\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/dos.json":{"_id":"2cf317f3-3306-5a96-bc9b-e9103ebcd5be","name":"Density of States","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","fermi_energy","band_gaps","density_of_states"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0"},{"type":"execution","name":"pw_nscf","head":false,"results":[{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"7b4c726e-3c46-501a-9a3a-ca19e06de5f0","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_nscf.in"}],"monitors":["standard_output"],"results":["fermi_energy","band_gaps"],"name":"pw_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n{%- if subworkflowContext.NO_SYMMETRY_NO_INVERSION %}\n nosym = .true.\n noinv = .true.\n{%- endif %}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_nscf.in","rendered":"&CONTROL\n calculation = 'nscf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651"},{"type":"execution","name":"projwfc","head":false,"results":[{"name":"density_of_states"}],"monitors":[{"name":"standard_output"}],"flowchartId":"3c8ffaf7-d01d-57e3-a0ae-118b3ecfc651","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"projwfc.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"projwfc.x","input":[{"name":"projwfc.in"}],"monitors":["standard_output"],"results":["density_of_states"],"name":"projwfc","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","contextProviders":[],"executableName":"projwfc.x","name":"projwfc.in","rendered":"&PROJWFC\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n degauss = 0.01\n deltaE = 0.05\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/electronic_density_mesh.json":{"_id":"e2749c5a-fcd9-589c-819b-8b88c5c90924","name":"Electronic Density Mesh","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"e1a6e1e9-7994-5cd0-98d7-ae8909a10061"},{"type":"execution","name":"pp_density","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"e1a6e1e9-7994-5cd0-98d7-ae8909a10061","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_density.in"}],"monitors":["standard_output"],"results":[],"name":"pp_density","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 0\n/\n&PLOT\n iflag = 3\n output_format = 5\n fileout ='density.xsf'\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_density.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 0\n/\n&PLOT\n iflag = 3\n output_format = 5\n fileout ='density.xsf'\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/esm_relax.json":{"_id":"69728792-afeb-50aa-9b4e-6974a90f676a","name":"Effective Screening Medium (ESM) Relax","application":{"name":"espresso"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_esm_relax","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"potential_profile"},{"name":"charge_density_profile"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"a2bec506-1fdd-5125-a787-85f31cde20c1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_esm_relax.in"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"name":"pw_esm_relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'relax'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = '{{ boundaryConditions.type }}'\n fcp_mu = {{ boundaryConditions.targetFermiEnergy }}\n esm_w = {{ boundaryConditions.offset }}\n esm_efield = {{ boundaryConditions.electricField }}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"BoundaryConditionsFormDataManager"}],"executableName":"pw.x","name":"pw_esm_relax.in","rendered":"&CONTROL\n calculation = 'relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = 'pbc'\n fcp_mu = 0\n esm_w = 0\n esm_efield = 0\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"espresso/esm.json":{"_id":"0de669f6-a455-5dae-b331-19dc85f7090f","name":"Effective Screening Medium (ESM)","application":{"name":"espresso"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_esm","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"potential_profile"},{"name":"charge_density_profile"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"2f487bc6-c237-53e4-bad5-be60369662cb","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_esm.in"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","potential_profile","charge_density_profile"],"name":"pw_esm","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = '{{ boundaryConditions.type }}'\n fcp_mu = {{ boundaryConditions.targetFermiEnergy }}\n esm_w = {{ boundaryConditions.offset }}\n esm_efield = {{ boundaryConditions.electricField }}\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"},{"name":"BoundaryConditionsFormDataManager"}],"executableName":"pw.x","name":"pw_esm.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n assume_isolated = 'esm'\n esm_bc = 'pbc'\n fcp_mu = 0\n esm_w = 0\n esm_efield = 0\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"espresso/espresso_extract_kpoints.json":{"_id":"a2785cc5-2427-5c7a-b30f-7077475b948c","name":"Extract KPOINTS","application":{"name":"espresso"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Extract kpoints","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"a716b133-2d04-50b5-b497-100265e3fa24","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"espresso_extract_kpoints.py"},{"name":"requirements.txt","templateName":"requirements_empty.txt"}],"monitors":["standard_output"],"name":"espresso_extract_kpoints","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_extract_kpoints.py","rendered":"import json\nimport re\n\ndouble_regex = r'[-+]?\\d*\\.\\d+(?:[eE][-+]?\\d+)?'\nregex = r\"\\s+k\\(\\s+\\d*\\)\\s+=\\s+\\(\\s+({0})\\s+({0})\\s+({0})\\),\\s+wk\\s+=\\s+({0}).+?\\n\".format(double_regex)\n\nwith open(\"pw_scf.out\") as f:\n text = f.read()\n\npattern = re.compile(regex, re.I | re.MULTILINE)\nmatch = pattern.findall(text[text.rfind(\" cryst. coord.\"):])\nkpoints = [{\"coordinates\": list(map(float, m[:3])), \"weight\": float(m[3])} for m in match]\nprint(json.dumps({\"name\": \"KPOINTS\", \"value\": kpoints, \"scope\": \"global\"}, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Please add any packages required for this unit below following #\n# the requirements.txt specification: #\n# https://pip.pypa.io/en/stable/reference/requirements-file-format/ #\n# ------------------------------------------------------------------ #\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Please add any packages required for this unit below following #\n# the requirements.txt specification: #\n# https://pip.pypa.io/en/stable/reference/requirements-file-format/ #\n# ------------------------------------------------------------------ #\n","schemaVersion":"2022.8.16"}]}]},"espresso/espresso_xml_get_qpt_irr.json":{"_id":"e4b6b2e7-7d8f-5ae1-b6bd-ee81ecbca11a","name":"espresso-xml-get-qpt-irr","application":{"name":"espresso"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"python","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"espresso_xml_get_qpt_irr.py"}],"monitors":["standard_output"],"name":"espresso_xml_get_qpt_irr","schemaVersion":"2022.8.16","isDefault":false},"next":"d0fd8654-2106-546b-8792-7bb46272befc","status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n{# JOB_WORK_DIR will be initialized at runtime => avoid substituion below #}\n{% raw %}\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n{% endraw %}\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_xml_get_qpt_irr.py","rendered":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n\n\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","schemaVersion":"2022.8.16"}]},{"name":"assignment","type":"assignment","operand":"Q_POINTS","value":"json.loads(STDOUT)","input":[{"scope":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","name":"STDOUT"}],"status":"idle","statusTrack":[],"flowchartId":"d0fd8654-2106-546b-8792-7bb46272befc","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},"espresso/extract_bands_fermi.json":{"_id":"1bb75a6a-4c8c-5336-a24c-1963e83825bc","name":"Extract Bands Near Fermi","application":{"name":"espresso"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"extract_bands_fermi","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"extract-band-fermi","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"extract_bands_fermi.py"},{"name":"requirements.txt","templateName":"requirements_bands_fermi.txt"}],"monitors":["standard_output"],"name":"extract_bands_fermi","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"extract_bands_fermi.py","rendered":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","schemaVersion":"2022.8.16"}],"next":"8771dc7f-878e-5f13-a840-a3a416854f1e"},{"name":"Store Band Below EF","type":"assignment","operand":"KBAND_VALUE_BELOW_EF","value":"json.loads(STDOUT)['band_below_fermi']","input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"status":"idle","statusTrack":[],"flowchartId":"8771dc7f-878e-5f13-a840-a3a416854f1e","tags":[],"head":false,"next":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Store Band Above EF","type":"assignment","operand":"KBAND_VALUE_ABOVE_EF","value":"json.loads(STDOUT)['band_above_fermi']","input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"status":"idle","statusTrack":[],"flowchartId":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","tags":[],"head":false,"next":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Select Band","type":"assignment","operand":"KBAND_VALUE","value":"KBAND_VALUE_BELOW_EF","input":[],"status":"idle","statusTrack":[],"flowchartId":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},"espresso/fixed_cell_relaxation.json":{"_id":"fb75e249-5489-5146-bd8a-786d33330d9c","name":"Fixed-cell Relaxation","application":{"name":"espresso"},"properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_relax","head":true,"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"flowchartId":"c42871f6-ab79-5987-b228-c3bd80f16ffd","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_relax.in"}],"monitors":["standard_output","convergence_electronic","convergence_ionic"],"results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"name":"pw_relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'relax'\n nstep = 50\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_relax.in","rendered":"&CONTROL\n calculation = 'relax'\n nstep = 50\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"espresso/gw_band_structure_band_gap_full_frequency.json":{"_id":"46bcdcc8-628e-518e-b8c3-9bf38d7a2aef","name":"Full Frequency GW Band Structure + Band Gap","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{"searchText":".*dojo-oncv.*"}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"d82a9858-3f20-5fcd-baeb-0f1d65e9e22e"},{"type":"execution","name":"gw_bands_full_frequency","head":false,"results":[{"name":"band_structure"},{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"d82a9858-3f20-5fcd-baeb-0f1d65e9e22e","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"gw.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"gw.x","input":[{"name":"gw_bands_full_frequency.in"}],"monitors":["standard_output"],"results":["band_structure","fermi_energy","band_gaps"],"name":"gw_bands_full_frequency","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n\n ! the grid used for the linear response\n kpt_grid = {{ kgrid.dimensions|join(', ') }}\n qpt_grid = {{ qgrid.dimensions|join(', ') }}\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of W in the convolution\n max_freq_coul = 200\n num_freq_coul = 51\n\n ! configuration for the correlation self energy\n ecut_corr = 6.0\n\n ! configuration for the exchange self energy\n ecut_exch = 15.0\n/\n\n&gw_output\n/\n\nFREQUENCIES\n35\n 0.0 0.0\n 0.0 0.3\n 0.0 0.9\n 0.0 1.8\n 0.0 3.0\n 0.0 4.5\n 0.0 6.3\n 0.0 8.4\n 0.0 10.8\n 0.0 13.5\n 0.0 16.5\n 0.0 19.8\n 0.0 23.4\n 0.0 27.3\n 0.0 31.5\n 0.0 36.0\n 0.0 40.8\n 0.0 45.9\n 0.0 51.3\n 0.0 57.0\n 0.0 63.0\n 0.0 69.3\n 0.0 75.9\n 0.0 82.8\n 0.0 90.0\n 0.0 97.5\n 0.0 105.3\n 0.0 113.4\n 0.0 121.8\n 0.0 130.5\n 0.0 139.5\n 0.0 148.8\n 0.0 158.4\n 0.0 168.3\n 0.0 178.5\n/\n\nK_points\n{{ explicitKPath2PIBA.length }}\n{% for point in explicitKPath2PIBA -%}\n{% for coordinate in point.coordinates %}{{ coordinate }}{% endfor %}\n{% endfor %}\n/\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPath2PIBAFormDataManager"}],"executableName":"gw.x","name":"gw_bands_full_frequency.in","rendered":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n\n ! the grid used for the linear response\n kpt_grid = 2, 2, 2\n qpt_grid = 1, 1, 1\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of W in the convolution\n max_freq_coul = 200\n num_freq_coul = 51\n\n ! configuration for the correlation self energy\n ecut_corr = 6.0\n\n ! configuration for the exchange self energy\n ecut_exch = 15.0\n/\n\n&gw_output\n/\n\nFREQUENCIES\n35\n 0.0 0.0\n 0.0 0.3\n 0.0 0.9\n 0.0 1.8\n 0.0 3.0\n 0.0 4.5\n 0.0 6.3\n 0.0 8.4\n 0.0 10.8\n 0.0 13.5\n 0.0 16.5\n 0.0 19.8\n 0.0 23.4\n 0.0 27.3\n 0.0 31.5\n 0.0 36.0\n 0.0 40.8\n 0.0 45.9\n 0.0 51.3\n 0.0 57.0\n 0.0 63.0\n 0.0 69.3\n 0.0 75.9\n 0.0 82.8\n 0.0 90.0\n 0.0 97.5\n 0.0 105.3\n 0.0 113.4\n 0.0 121.8\n 0.0 130.5\n 0.0 139.5\n 0.0 148.8\n 0.0 158.4\n 0.0 168.3\n 0.0 178.5\n/\n\nK_points\n101\n 0.000000000 0.000000000 0.000000000\n 0.028867513 -0.040824829 0.050000000\n 0.057735027 -0.081649658 0.100000000\n 0.086602540 -0.122474487 0.150000000\n 0.115470054 -0.163299316 0.200000000\n 0.144337567 -0.204124145 0.250000000\n 0.173205081 -0.244948974 0.300000000\n 0.202072594 -0.285773803 0.350000000\n 0.230940108 -0.326598632 0.400000000\n 0.259807621 -0.367423461 0.450000000\n 0.288675135 -0.408248290 0.500000000\n 0.274241378 -0.387835876 0.525000000\n 0.259807621 -0.367423461 0.550000000\n 0.245373864 -0.347011047 0.575000000\n 0.230940108 -0.326598632 0.600000000\n 0.216506351 -0.306186218 0.625000000\n 0.202072594 -0.285773803 0.650000000\n 0.187638837 -0.265361389 0.675000000\n 0.173205081 -0.244948974 0.700000000\n 0.158771324 -0.224536560 0.725000000\n 0.144337567 -0.204124145 0.750000000\n 0.129903811 -0.183711731 0.750000000\n 0.115470054 -0.163299316 0.750000000\n 0.101036297 -0.142886902 0.750000000\n 0.086602540 -0.122474487 0.750000000\n 0.072168784 -0.102062073 0.750000000\n 0.057735027 -0.081649658 0.750000000\n 0.043301270 -0.061237244 0.750000000\n 0.028867513 -0.040824829 0.750000000\n 0.014433757 -0.020412415 0.750000000\n -0.000000000 -0.000000000 0.750000000\n -0.000000000 -0.000000000 0.675000000\n -0.000000000 -0.000000000 0.600000000\n -0.000000000 -0.000000000 0.525000000\n -0.000000000 -0.000000000 0.450000000\n -0.000000000 -0.000000000 0.375000000\n -0.000000000 -0.000000000 0.300000000\n -0.000000000 -0.000000000 0.225000000\n -0.000000000 -0.000000000 0.150000000\n -0.000000000 -0.000000000 0.075000000\n 0.000000000 0.000000000 0.000000000\n 0.028867513 0.020412415 0.050000000\n 0.057735027 0.040824829 0.100000000\n 0.086602540 0.061237244 0.150000000\n 0.115470054 0.081649658 0.200000000\n 0.144337567 0.102062073 0.250000000\n 0.173205081 0.122474487 0.300000000\n 0.202072594 0.142886902 0.350000000\n 0.230940108 0.163299316 0.400000000\n 0.259807621 0.183711731 0.450000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.339193283 -0.204124145 0.637500000\n 0.317542648 -0.204124145 0.650000000\n 0.295892013 -0.204124145 0.662500000\n 0.274241378 -0.204124145 0.675000000\n 0.252590743 -0.204124145 0.687500000\n 0.230940108 -0.204124145 0.700000000\n 0.209289473 -0.204124145 0.712500000\n 0.187638837 -0.204124145 0.725000000\n 0.165988202 -0.204124145 0.737500000\n 0.144337567 -0.204124145 0.750000000\n 0.158771324 -0.163299316 0.725000000\n 0.173205081 -0.122474487 0.700000000\n 0.187638837 -0.081649658 0.675000000\n 0.202072594 -0.040824829 0.650000000\n 0.216506351 -0.000000000 0.625000000\n 0.230940108 0.040824829 0.600000000\n 0.245373864 0.081649658 0.575000000\n 0.259807621 0.122474487 0.550000000\n 0.274241378 0.163299316 0.525000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.353627040 -0.224536560 0.612500000\n 0.346410162 -0.244948974 0.600000000\n 0.339193283 -0.265361389 0.587500000\n 0.331976405 -0.285773803 0.575000000\n 0.324759526 -0.306186218 0.562500000\n 0.317542648 -0.326598632 0.550000000\n 0.310325770 -0.347011047 0.537500000\n 0.303108891 -0.367423461 0.525000000\n 0.295892013 -0.387835876 0.512500000\n 0.288675135 -0.408248290 0.500000000\n\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/gw_band_structure_band_gap_plasmon_pole.json":{"_id":"72b79a87-8eef-5fe2-9d6c-6c9c256dd56c","name":"Plasmon-Pole GW Band Structure + Band Gap","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure","fermi_energy","band_gaps"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{"searchText":".*dojo-oncv.*"}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"f9910952-eca9-5a5f-ae03-a0060ae2fc78"},{"type":"execution","name":"gw_bands_plasmon_pole","head":false,"results":[{"name":"band_structure"},{"name":"fermi_energy"},{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"f9910952-eca9-5a5f-ae03-a0060ae2fc78","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"gw.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"gw.x","input":[{"name":"gw_bands_plasmon_pole.in"}],"monitors":["standard_output"],"results":["band_structure","fermi_energy","band_gaps"],"name":"gw_bands_plasmon_pole","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n\n ! the grid used for the linear response\n kpt_grid = {{ kgrid.dimensions|join(', ') }}\n qpt_grid = {{ qgrid.dimensions|join(', ') }}\n\n ! truncation (used for both correlation and exchange)\n truncation = '2d'\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of the Coulomb solver\n thres_coul = 1.0d-2\n\n ! configuration of W in the convolution\n model_coul = 'godby-needs'\n max_freq_coul = 120\n num_freq_coul = 35\n\n ! configuration of the Green solver\n thres_green = 1.0d-3\n max_iter_green = 300\n\n ! configuration for the correlation self energy\n ecut_corr = 5.0\n max_freq_corr = 100.0\n num_freq_corr = 11\n\n ! configuration for the exchange self energy\n ecut_exch = 20.0\n\n ! configuration for the output\n eta = 0.1\n min_freq_wind = -30.0\n max_freq_wind = 30.0\n num_freq_wind = 601\n/\n\n&gw_output\n/\n\nFREQUENCIES\n2\n 0.0 0.0\n 0.0 10.0\n/\n\nK_points\n{{ explicitKPath2PIBA.length }}\n{% for point in explicitKPath2PIBA -%}\n{% for coordinate in point.coordinates %}{{ coordinate }}{% endfor %}\n{% endfor %}\n/\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QGridFormDataManager"},{"name":"ExplicitKPath2PIBAFormDataManager"}],"executableName":"gw.x","name":"gw_bands_plasmon_pole.in","rendered":"&gw_input\n\n ! see http://www.sternheimergw.org for more information.\n\n ! config of the scf run\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n\n ! the grid used for the linear response\n kpt_grid = 2, 2, 2\n qpt_grid = 1, 1, 1\n\n ! truncation (used for both correlation and exchange)\n truncation = '2d'\n\n ! number of bands for which the GW correction is calculated\n num_band = 8\n\n ! configuration of the Coulomb solver\n thres_coul = 1.0d-2\n\n ! configuration of W in the convolution\n model_coul = 'godby-needs'\n max_freq_coul = 120\n num_freq_coul = 35\n\n ! configuration of the Green solver\n thres_green = 1.0d-3\n max_iter_green = 300\n\n ! configuration for the correlation self energy\n ecut_corr = 5.0\n max_freq_corr = 100.0\n num_freq_corr = 11\n\n ! configuration for the exchange self energy\n ecut_exch = 20.0\n\n ! configuration for the output\n eta = 0.1\n min_freq_wind = -30.0\n max_freq_wind = 30.0\n num_freq_wind = 601\n/\n\n&gw_output\n/\n\nFREQUENCIES\n2\n 0.0 0.0\n 0.0 10.0\n/\n\nK_points\n101\n 0.000000000 0.000000000 0.000000000\n 0.028867513 -0.040824829 0.050000000\n 0.057735027 -0.081649658 0.100000000\n 0.086602540 -0.122474487 0.150000000\n 0.115470054 -0.163299316 0.200000000\n 0.144337567 -0.204124145 0.250000000\n 0.173205081 -0.244948974 0.300000000\n 0.202072594 -0.285773803 0.350000000\n 0.230940108 -0.326598632 0.400000000\n 0.259807621 -0.367423461 0.450000000\n 0.288675135 -0.408248290 0.500000000\n 0.274241378 -0.387835876 0.525000000\n 0.259807621 -0.367423461 0.550000000\n 0.245373864 -0.347011047 0.575000000\n 0.230940108 -0.326598632 0.600000000\n 0.216506351 -0.306186218 0.625000000\n 0.202072594 -0.285773803 0.650000000\n 0.187638837 -0.265361389 0.675000000\n 0.173205081 -0.244948974 0.700000000\n 0.158771324 -0.224536560 0.725000000\n 0.144337567 -0.204124145 0.750000000\n 0.129903811 -0.183711731 0.750000000\n 0.115470054 -0.163299316 0.750000000\n 0.101036297 -0.142886902 0.750000000\n 0.086602540 -0.122474487 0.750000000\n 0.072168784 -0.102062073 0.750000000\n 0.057735027 -0.081649658 0.750000000\n 0.043301270 -0.061237244 0.750000000\n 0.028867513 -0.040824829 0.750000000\n 0.014433757 -0.020412415 0.750000000\n -0.000000000 -0.000000000 0.750000000\n -0.000000000 -0.000000000 0.675000000\n -0.000000000 -0.000000000 0.600000000\n -0.000000000 -0.000000000 0.525000000\n -0.000000000 -0.000000000 0.450000000\n -0.000000000 -0.000000000 0.375000000\n -0.000000000 -0.000000000 0.300000000\n -0.000000000 -0.000000000 0.225000000\n -0.000000000 -0.000000000 0.150000000\n -0.000000000 -0.000000000 0.075000000\n 0.000000000 0.000000000 0.000000000\n 0.028867513 0.020412415 0.050000000\n 0.057735027 0.040824829 0.100000000\n 0.086602540 0.061237244 0.150000000\n 0.115470054 0.081649658 0.200000000\n 0.144337567 0.102062073 0.250000000\n 0.173205081 0.122474487 0.300000000\n 0.202072594 0.142886902 0.350000000\n 0.230940108 0.163299316 0.400000000\n 0.259807621 0.183711731 0.450000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.339193283 -0.204124145 0.637500000\n 0.317542648 -0.204124145 0.650000000\n 0.295892013 -0.204124145 0.662500000\n 0.274241378 -0.204124145 0.675000000\n 0.252590743 -0.204124145 0.687500000\n 0.230940108 -0.204124145 0.700000000\n 0.209289473 -0.204124145 0.712500000\n 0.187638837 -0.204124145 0.725000000\n 0.165988202 -0.204124145 0.737500000\n 0.144337567 -0.204124145 0.750000000\n 0.158771324 -0.163299316 0.725000000\n 0.173205081 -0.122474487 0.700000000\n 0.187638837 -0.081649658 0.675000000\n 0.202072594 -0.040824829 0.650000000\n 0.216506351 -0.000000000 0.625000000\n 0.230940108 0.040824829 0.600000000\n 0.245373864 0.081649658 0.575000000\n 0.259807621 0.122474487 0.550000000\n 0.274241378 0.163299316 0.525000000\n 0.288675135 0.204124145 0.500000000\n 0.295892013 0.163299316 0.512500000\n 0.303108891 0.122474487 0.525000000\n 0.310325770 0.081649658 0.537500000\n 0.317542648 0.040824829 0.550000000\n 0.324759526 -0.000000000 0.562500000\n 0.331976405 -0.040824829 0.575000000\n 0.339193283 -0.081649658 0.587500000\n 0.346410162 -0.122474487 0.600000000\n 0.353627040 -0.163299316 0.612500000\n 0.360843918 -0.204124145 0.625000000\n 0.353627040 -0.224536560 0.612500000\n 0.346410162 -0.244948974 0.600000000\n 0.339193283 -0.265361389 0.587500000\n 0.331976405 -0.285773803 0.575000000\n 0.324759526 -0.306186218 0.562500000\n 0.317542648 -0.326598632 0.550000000\n 0.310325770 -0.347011047 0.537500000\n 0.303108891 -0.367423461 0.525000000\n 0.295892013 -0.387835876 0.512500000\n 0.288675135 -0.408248290 0.500000000\n\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/kpoint_convergence.json":{"_id":"ff6a8fbc-2202-5786-9a26-67c843417d0b","name":"K-point Convergence","application":{"name":"espresso"},"properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Init tolerance","type":"assignment","operand":"TOL","value":0.00001,"input":[],"flowchartId":"init-tolerance","status":"idle","statusTrack":[],"tags":[],"head":true,"next":"init-increment","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Init increment","type":"assignment","operand":"INC","value":1,"input":[],"flowchartId":"init-increment","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-result","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Init result","type":"assignment","operand":"PREV_RESULT","value":0,"input":[],"flowchartId":"init-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-parameter","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Init parameter","type":"assignment","operand":"PARAMETER","value":1,"input":[],"flowchartId":"init-parameter","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"pwscf-kpoint-convergence","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_scf_kpt_conv","head":false,"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"pwscf-kpoint-convergence","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf_kpt_conv.in"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor"],"name":"pw_scf_kpt_conv","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}} 0 0 0{% endraw %}\n","contextProviders":[{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf_kpt_conv.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}} 0 0 0\n","schemaVersion":"2022.8.16"}],"next":"store-result"},{"name":"store result","type":"assignment","operand":"RESULT","value":"total_energy","input":[{"name":"total_energy","scope":"pwscf-kpoint-convergence"}],"flowchartId":"store-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"check-convergence","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"check convergence","type":"condition","input":[],"results":[],"preProcessors":[],"postProcessors":[],"then":"convergence-is-reached","else":"update-result","statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","maxOccurrences":50,"flowchartId":"check-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"update-result","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"update result","type":"assignment","operand":"PREV_RESULT","value":"RESULT","input":[{"name":"RESULT","scope":"global"}],"flowchartId":"update-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"increment-parameter","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"increment parameter","type":"assignment","operand":"PREV_RESULT","value":"PARAMETER+INC","input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"flowchartId":"increment-parameter","next":"pwscf-kpoint-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"exit","type":"assignment","operand":"PARAMETER","value":"PARAMETER","input":[{"name":"PARAMETER","scope":"global"}],"flowchartId":"convergence-is-reached","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},"espresso/neb.json":{"isMultiMaterial":true,"_id":"c9034468-df28-5357-8912-02226f919042","name":"Nudged Elastic Band (NEB)","application":{"name":"espresso"},"properties":["reaction_energy_barrier","reaction_energy_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"neb","head":true,"results":[{"name":"reaction_energy_barrier"},{"name":"reaction_energy_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"9f273ca0-d240-5b1f-89a9-64dd579304ac","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"neb.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"neb.x","input":[{"name":"neb.in"}],"monitors":["standard_output"],"results":["reaction_energy_barrier","reaction_energy_profile"],"name":"neb","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"BEGIN\nBEGIN_PATH_INPUT\n&PATH\n restart_mode = 'from_scratch'\n string_method = 'neb',\n nstep_path = 50,\n ds = 2.D0,\n opt_scheme = \"broyden\",\n num_of_images = {{ 2 + (input.INTERMEDIATE_IMAGES.length or neb.nImages) }},\n k_max = 0.3D0,\n k_min = 0.2D0,\n CI_scheme = \"auto\",\n path_thr = 0.1D0,\n/\nEND_PATH_INPUT\nBEGIN_ENGINE_INPUT\n&CONTROL\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.03\n nspin = 2\n starting_magnetization = 0.5\n/\n&ELECTRONS\n conv_thr = 1.D-8\n mixing_beta = 0.3\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nBEGIN_POSITIONS\nFIRST_IMAGE\nATOMIC_POSITIONS crystal\n{{ input.FIRST_IMAGE }}\n{%- for IMAGE in input.INTERMEDIATE_IMAGES %}\nINTERMEDIATE_IMAGE\nATOMIC_POSITIONS crystal\n{{ IMAGE }}\n{%- endfor %}\nLAST_IMAGE\nATOMIC_POSITIONS crystal\n{{ input.LAST_IMAGE }}\nEND_POSITIONS\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\nEND_ENGINE_INPUT\nEND\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"NEBFormDataManager"},{"name":"QENEBInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"neb.x","name":"neb.in","rendered":"BEGIN\nBEGIN_PATH_INPUT\n&PATH\n restart_mode = 'from_scratch'\n string_method = 'neb',\n nstep_path = 50,\n ds = 2.D0,\n opt_scheme = \"broyden\",\n num_of_images = 3,\n k_max = 0.3D0,\n k_min = 0.2D0,\n CI_scheme = \"auto\",\n path_thr = 0.1D0,\n/\nEND_PATH_INPUT\nBEGIN_ENGINE_INPUT\n&CONTROL\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.03\n nspin = 2\n starting_magnetization = 0.5\n/\n&ELECTRONS\n conv_thr = 1.D-8\n mixing_beta = 0.3\n/\nATOMIC_SPECIES\nSi 28.0855 \nBEGIN_POSITIONS\nFIRST_IMAGE\nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nLAST_IMAGE\nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nEND_POSITIONS\nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \nEND_ENGINE_INPUT\nEND\n","schemaVersion":"2022.8.16"}]}]},"espresso/ph_init_qpoints.json":{"_id":"2f017bcb-f4ba-55b8-b939-1f780679a88e","name":"ph-init-qpoints","application":{"name":"espresso"},"properties":[],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"ph_init_qpoints","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"b8ea6a33-38f3-5434-b17e-b5eae8fff9fc","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_init_qpoints.in"}],"monitors":["standard_output"],"results":[],"name":"ph_init_qpoints","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .false.\n start_irr = 0\n last_irr = 0\n ldisp = .true.\n fildyn = 'dyn0'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_init_qpoints.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .false.\n start_irr = 0\n last_irr = 0\n ldisp = .true.\n fildyn = 'dyn0'\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/ph_single_irr_qpt.json":{"_id":"e68db280-8636-53e3-81a0-88396ba6147d","name":"ph-single-irr-qpt","application":{"name":"espresso"},"properties":[],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"ph_single_irr_qpt","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"8db9af08-d935-57a0-a824-e7db6d936de8","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_single_irr_qpt.in"}],"monitors":["standard_output"],"results":[],"name":"ph_single_irr_qpt","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n {% raw %}\n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n {% endraw %}\n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_SCRATCH_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_single_irr_qpt.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n \n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n \n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = '{{ JOB_SCRATCH_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/phonon_dispersions.json":{"_id":"bfb69b48-8fbf-5a0d-8949-448f20754766","name":"Phonon Dispersions","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos","phonon_dispersions"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"13bcafce-56ef-5b47-b079-317495eb6933"},{"type":"execution","name":"ph_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"ph_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"next":"3b4507a7-9244-540b-abe0-66bceab700f5"},{"type":"execution","name":"q2r","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"monitors":["standard_output"],"results":[],"name":"q2r","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"next":"a7fded20-889b-54fc-bbb0-456e82689ab1"},{"type":"execution","name":"matdyn_path","head":false,"results":[{"name":"phonon_dispersions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"monitors":["standard_output"],"results":["phonon_dispersions"],"name":"matdyn_path","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}]}]},"espresso/phonon_dos_dispersion.json":{"_id":"291d25cd-378a-5be7-9d85-c8013a4b165b","name":"Phonon Density of States + Dispersions","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos","phonon_dispersions"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"13bcafce-56ef-5b47-b079-317495eb6933"},{"type":"execution","name":"ph_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"ph_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"next":"3b4507a7-9244-540b-abe0-66bceab700f5"},{"type":"execution","name":"q2r","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"monitors":["standard_output"],"results":[],"name":"q2r","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"next":"8fe6a24b-c994-55a2-a448-88657292e8c2"},{"type":"execution","name":"matdyn_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"matdyn_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"next":"a7fded20-889b-54fc-bbb0-456e82689ab1"},{"type":"execution","name":"matdyn_path","head":false,"results":[{"name":"phonon_dispersions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"monitors":["standard_output"],"results":["phonon_dispersions"],"name":"matdyn_path","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}]}]},"espresso/phonon_dos.json":{"_id":"2232051b-9f2a-5a48-9b4d-6231eb6e8297","name":"Phonon Density of States","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","phonon_dos"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"13bcafce-56ef-5b47-b079-317495eb6933"},{"type":"execution","name":"ph_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"13bcafce-56ef-5b47-b079-317495eb6933","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"ph_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n ldisp = .true.\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n ldisp = .true.\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"next":"3b4507a7-9244-540b-abe0-66bceab700f5"},{"type":"execution","name":"q2r","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"monitors":["standard_output"],"results":[],"name":"q2r","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"next":"8fe6a24b-c994-55a2-a448-88657292e8c2"},{"type":"execution","name":"matdyn_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"matdyn_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}]}]},"espresso/phonon_reduce.json":{"_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","name":"reduce","application":{"name":"espresso"},"properties":["phonon_dos","phonon_dispersions"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"ph_grid_restart","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb206177-a4af-599a-81ba-6c88d24253b6","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid_restart.in"}],"monitors":["standard_output"],"results":[],"name":"ph_grid_restart","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid_restart.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"next":"3b4507a7-9244-540b-abe0-66bceab700f5"},{"type":"execution","name":"q2r","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"monitors":["standard_output"],"results":[],"name":"q2r","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"next":"8fe6a24b-c994-55a2-a448-88657292e8c2"},{"type":"execution","name":"matdyn_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"matdyn_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"next":"a7fded20-889b-54fc-bbb0-456e82689ab1"},{"type":"execution","name":"matdyn_path","head":false,"results":[{"name":"phonon_dispersions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"monitors":["standard_output"],"results":["phonon_dispersions"],"name":"matdyn_path","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}]}]},"espresso/plot_wavefunction.json":{"_id":"e4ec581f-1cb3-5036-b698-999a96711559","name":"Plot Wavefunction","application":{"name":"espresso"},"properties":["potential_profile","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"plot WFN","head":true,"results":[{"name":"potential_profile"},{"name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"57fca898-8e8b-5ef2-81a5-9d2b612bc18d","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"plot_wavefunction.py"},{"name":"requirements.txt","templateName":"requirements_plot_wavefunction.txt"}],"monitors":["standard_output"],"results":["potential_profile","file_content"],"name":"plot_wavefunction","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","schemaVersion":"2022.8.16"}]}]},"espresso/post_processor.json":{"_id":"7239fc3a-b343-513f-af35-e8687e1829da","name":"post-processor","application":{"name":"espresso"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_collect_dynmat.sh"}],"monitors":["standard_output"],"name":"espresso_collect_dynmat","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_collect_dynmat.sh","rendered":"\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n\n","schemaVersion":"2022.8.16"}]}]},"espresso/pp_wfn.json":{"_id":"7edc20aa-d533-57d8-b8a0-1e504ceb19fd","name":"PP Wavefunction","application":{"name":"espresso"},"properties":[],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pp_wfn","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"pp-wfn","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_wfn.in"}],"monitors":["standard_output"],"results":[],"name":"pp_wfn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {% raw %}{{ KBAND_VALUE }}{% endraw %},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_wfn.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {{ KBAND_VALUE }},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/pre_processor.json":{"_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","name":"pre-processor","application":{"name":"espresso"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_link_outdir_save.sh"}],"monitors":["standard_output"],"name":"espresso_link_outdir_save","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_link_outdir_save.sh","rendered":"\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n\n","schemaVersion":"2022.8.16"}]}]},"espresso/pw_scf.json":{"_id":"f52b8039-83d0-5485-a1f1-0bc37cb01ed3","name":"pw-scf","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"espresso/recalculate_bands.json":{"_id":"64551dfb-e529-5d8d-9092-ff268f4da134","name":"Recalculate Bands","application":{"name":"espresso"},"properties":["band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_bands","head":true,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]},"espresso/surface_energy.json":{"_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","name":"Surface Energy","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"io-slab","type":"io","subtype":"input","head":true,"results":[],"monitors":[],"flowchartId":"e463ef46-a36e-5168-87dd-e21eb980dfb8","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"materials","endpoint_options":{"params":{"query":"{'_id': MATERIAL_ID}","projection":"{}"}},"name":"DATA"}],"next":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"slab","type":"assignment","operand":"SLAB","value":"DATA[0]","input":[{"name":"DATA","scope":"e463ef46-a36e-5168-87dd-e21eb980dfb8"}],"head":false,"results":[],"monitors":[],"flowchartId":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","preProcessors":[],"postProcessors":[],"next":"44263820-0c80-5bd1-b854-9da8d198eac1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"io-bulk","type":"io","subtype":"input","head":false,"results":[],"monitors":[],"flowchartId":"44263820-0c80-5bd1-b854-9da8d198eac1","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"materials","endpoint_options":{"params":{"query":"{'_id': SLAB.metadata.bulkId}","projection":"{}"}},"name":"DATA"}],"next":"b70656f1-a394-57f4-b4de-00096969df4b","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"bulk","type":"assignment","operand":"BULK","value":"DATA[0] if DATA else None","input":[{"name":"DATA","scope":"44263820-0c80-5bd1-b854-9da8d198eac1"}],"head":false,"results":[],"monitors":[],"flowchartId":"b70656f1-a394-57f4-b4de-00096969df4b","preProcessors":[],"postProcessors":[],"next":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"assert-bulk","type":"assertion","statement":"BULK != None","errorMessage":"Bulk material does not exist!","head":false,"results":[],"monitors":[],"flowchartId":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","preProcessors":[],"postProcessors":[],"next":"490635e0-c593-5809-9eb2-c794b96cfed1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"io-e-bulk","type":"io","subtype":"input","head":false,"results":[],"monitors":[],"flowchartId":"490635e0-c593-5809-9eb2-c794b96cfed1","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"refined-properties","endpoint_options":{"params":{"query":"{ 'exabyteId': BULK.exabyteId, 'data.name': 'total_energy', 'group': {'$regex': ''.join((SUBWORKFLOW.application.shortName, ':'))} }","projection":"{'sort': {'precision.value': -1}, 'limit': 1}"}},"name":"DATA"}],"next":"bbe13b97-4243-5a85-8f61-a279d0b797aa","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"e-bulk","type":"assignment","operand":"E_BULK","value":"DATA[0].data.value if DATA else None","input":[{"name":"DATA","scope":"490635e0-c593-5809-9eb2-c794b96cfed1"}],"head":false,"results":[],"monitors":[],"flowchartId":"bbe13b97-4243-5a85-8f61-a279d0b797aa","preProcessors":[],"postProcessors":[],"next":"a06c9f43-7670-5fd0-ac42-7028a472235a","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"assert-e-bulk","type":"assertion","statement":"E_BULK != None","errorMessage":"E_BULK does not exist!","head":false,"results":[],"monitors":[],"flowchartId":"a06c9f43-7670-5fd0-ac42-7028a472235a","preProcessors":[],"postProcessors":[],"next":"cdf210be-26ed-585a-b4ac-d55795ba2975","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"surface","type":"assignment","operand":"A","value":"np.linalg.norm(np.cross(SLAB.lattice.vectors.a, SLAB.lattice.vectors.b))","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"cdf210be-26ed-585a-b4ac-d55795ba2975","preProcessors":[],"postProcessors":[],"next":"ffa8e43d-096a-555b-b8d0-6d283365ef47","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"n-bulk","type":"assignment","operand":"N_BULK","value":"len(BULK.basis.elements)","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"ffa8e43d-096a-555b-b8d0-6d283365ef47","preProcessors":[],"postProcessors":[],"next":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"n-slab","type":"assignment","operand":"N_SLAB","value":"len(SLAB.basis.elements)","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","preProcessors":[],"postProcessors":[],"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"fcd88119-817c-5ac1-a430-ba892ac743eb"},{"name":"e-slab","type":"assignment","operand":"E_SLAB","value":"total_energy","input":[{"name":"total_energy","scope":"9fc7a088-5533-5f70-bb33-f676ec65f565"}],"head":false,"results":[],"monitors":[],"flowchartId":"fcd88119-817c-5ac1-a430-ba892ac743eb","preProcessors":[],"postProcessors":[],"next":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"surface-energy","type":"assignment","operand":"SURFACE_ENERGY","value":"1 / (2 * A) * (E_SLAB - E_BULK * (N_SLAB/N_BULK))","input":[],"head":false,"results":[{"name":"surface_energy"}],"monitors":[],"flowchartId":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]}]},"espresso/total_energy_with_bands.json":{"_id":"109ac366-8f6d-56d5-9b45-6f665f13a511","name":"Total Energy with Bands","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"pw-scf-total-energy","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-total-energy"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-total-energy","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"18a26058-7d37-57ac-a685-335862dbf4db"},{"name":"assignment BS","type":"assignment","operand":"band_structure","value":"band_structure","input":[{"name":"band_structure","scope":"pw-bands-total-energy"}],"status":"idle","statusTrack":[],"flowchartId":"18a26058-7d37-57ac-a685-335862dbf4db","tags":[],"head":false,"next":"7d103bf9-40b8-5f90-8934-bbcb6c7b9802","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"assignment FE","type":"assignment","operand":"fermi_energy","value":"fermi_energy","input":[{"name":"fermi_energy","scope":"pw-scf-total-energy"}],"status":"idle","statusTrack":[],"flowchartId":"7d103bf9-40b8-5f90-8934-bbcb6c7b9802","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}],"tags":["wfn_plot"]},"espresso/total_energy.json":{"_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","name":"Total Energy","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}],"tags":["default"]},"espresso/valence_band_offset_calc_from_previous_esp_vbm.json":{"_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","name":"Calculate VBO","application":{"name":"espresso"},"properties":["valence_band_offset"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Difference of valence band maxima","type":"assignment","operand":"VBM_DIFF","value":"VBM_LEFT - VBM_RIGHT","input":[],"status":"idle","statusTrack":[],"flowchartId":"bd4eaa98-b001-5694-87ef-ec77540502ab","tags":[],"head":true,"next":"2626f7bb-d392-5fd4-ab71-329b508de347","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Difference of macroscopically averaged ESP in bulk","type":"assignment","operand":"AVG_ESP_DIFF","value":"AVG_ESP_LEFT[0] - AVG_ESP_RIGHT[0]","input":[],"status":"idle","statusTrack":[],"flowchartId":"2626f7bb-d392-5fd4-ab71-329b508de347","tags":[],"head":false,"next":"b7307787-53e2-599b-ad12-d627b04074b4","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Lineup of macroscopically averaged ESP in interface","type":"assignment","operand":"ESP_LINEUP","value":"np.abs(AVG_ESP_INTERFACE[0] - AVG_ESP_INTERFACE[1])","input":[],"status":"idle","statusTrack":[],"flowchartId":"b7307787-53e2-599b-ad12-d627b04074b4","tags":[],"head":false,"next":"197f4b4d-cb7b-57be-a885-d44cb1f61905","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Valence Band Offset","type":"assignment","operand":"VALENCE_BAND_OFFSET","value":"abs(VBM_DIFF - AVG_ESP_DIFF + (np.sign(AVG_ESP_DIFF) * ESP_LINEUP))","input":[],"results":[{"name":"valence_band_offset"}],"status":"idle","statusTrack":[],"flowchartId":"197f4b4d-cb7b-57be-a885-d44cb1f61905","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},"espresso/variable_cell_relaxation.json":{"systemName":"espresso-variable-cell-relaxation","_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","name":"Variable-cell Relaxation","application":{"name":"espresso"},"properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_vc-relax","head":true,"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"flowchartId":"e1bd0870-6245-5fc2-a50d-48cabc356ac8","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_vc_relax.in"}],"monitors":["standard_output","convergence_electronic","convergence_ionic"],"results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"name":"pw_vc-relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_vc_relax.in","rendered":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}],"tags":["variable-cell_relaxation"]},"espresso/zero_point_energy.json":{"_id":"151538cc-9e71-5269-8b9e-cb5977151227","name":"Zero Point Energy","application":{"name":"espresso"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"107595d1-490f-53a2-8432-7f8a12f14d96"},{"type":"execution","name":"ph_zpe","head":false,"results":[{"name":"zero_point_energy"}],"monitors":[{"name":"standard_output"}],"flowchartId":"107595d1-490f-53a2-8432-7f8a12f14d96","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_gamma.in"}],"monitors":["standard_output"],"results":["zero_point_energy"],"name":"ph_gamma","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n0 0 0\n","contextProviders":[],"executableName":"ph.x","name":"ph_gamma.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n0 0 0\n","schemaVersion":"2022.8.16"}]}]},"nwchem/total_energy.json":{"_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","name":"Total Energy","application":{"name":"nwchem"},"properties":["total_energy","total_energy_contributions"],"model":{"type":"dft","subtype":"gga","method":{"type":"localorbital","subtype":"pople","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"nwchem_total_energy","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"6f1eda0b-ebe1-5ccd-92dc-c2e55de5e0c7","preProcessors":[],"postProcessors":[],"application":{"name":"nwchem","shortName":"nwchem","summary":"NWChem","build":"GNU","isDefault":true,"version":"7.0.2","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":false,"isDefault":true,"monitors":["standard_output"],"postProcessors":["error_handler"],"name":"nwchem","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"nwchem","executableName":"nwchem","input":[{"name":"nwchem_total_energy.inp"}],"isDefault":true,"monitors":["standard_output"],"results":["total_energy","total_energy_contributions"],"name":"nwchem_total_energy","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"nwchem","content":" start nwchem\n title \"Test\"\n charge {{ input.CHARGE }}\n geometry units au noautosym\n {{ input.ATOMIC_POSITIONS }}\n end\n basis\n * library {{ input.BASIS }}\n end\n dft\n xc {{ input.FUNCTIONAL }}\n mult {{ input.MULT }}\n end\n task dft energy\n","contextProviders":[{"name":"NWChemInputDataManager"}],"executableName":"nwchem","name":"nwchem_total_energy.inp","rendered":" start nwchem\n title \"Test\"\n charge 0\n geometry units au noautosym\n Si 0.000000000 0.000000000 0.000000000 \nSi 1.116306745 0.789348070 1.933500000 \n end\n basis\n * library 6-31G\n end\n dft\n xc B3LYP\n mult 1\n end\n task dft energy\n","schemaVersion":"2022.8.16"}]}]},"python/extract_bands_fermi.json":{"_id":"1bb75a6a-4c8c-5336-a24c-1963e83825bc","name":"Extract Bands Near Fermi","application":{"name":"python"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"extract_bands_fermi","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"extract-band-fermi","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"extract_bands_fermi.py"},{"name":"requirements.txt","templateName":"requirements_bands_fermi.txt"}],"monitors":["standard_output"],"name":"extract_bands_fermi","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"extract_bands_fermi.py","rendered":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","schemaVersion":"2022.8.16"}],"next":"8771dc7f-878e-5f13-a840-a3a416854f1e"},{"name":"Store Band Below EF","type":"assignment","operand":"KBAND_VALUE_BELOW_EF","value":"json.loads(STDOUT)['band_below_fermi']","input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"status":"idle","statusTrack":[],"flowchartId":"8771dc7f-878e-5f13-a840-a3a416854f1e","tags":[],"head":false,"next":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Store Band Above EF","type":"assignment","operand":"KBAND_VALUE_ABOVE_EF","value":"json.loads(STDOUT)['band_above_fermi']","input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"status":"idle","statusTrack":[],"flowchartId":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","tags":[],"head":false,"next":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Select Band","type":"assignment","operand":"KBAND_VALUE","value":"KBAND_VALUE_BELOW_EF","input":[],"status":"idle","statusTrack":[],"flowchartId":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},"python/ml/classification_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:random_forest_classification:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"35436b4a-cd9c-5089-ab42-665c4f9ba049"},{"type":"execution","name":"ROC Curve Plot","head":false,"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:roc_curve:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]},"python/ml/clustering_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_k_means_clustering_sklearn.py","templateName":"model_k_means_clustering_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:k_means_clustering:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for k-means clustering. #\n# #\n# In k-means clustering, the labels are not provided ahead of #\n# time. Instead, one supplies the number of groups the #\n# algorithm should split the dataset into. Here, we set our #\n# own default of 4 groups (fewer than sklearn's default of 8). #\n# Otherwise, the default parameters of the clustering method #\n# are the same as in sklearn. #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.cluster\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Initialize the Model\n model = sklearn.cluster.KMeans(\n n_clusters=4,\n init=\"k-means++\",\n n_init=10,\n max_iter=300,\n tol=0.0001,\n copy_x=True,\n algorithm=\"auto\",\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors)\n context.save(model, \"k_means\")\n train_labels = model.predict(train_descriptors)\n test_labels = model.predict(test_descriptors)\n\n context.save(train_labels, \"train_labels\")\n context.save(test_labels, \"test_labels\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"k_means\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_k_means_clustering_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for k-means clustering. #\n# #\n# In k-means clustering, the labels are not provided ahead of #\n# time. Instead, one supplies the number of groups the #\n# algorithm should split the dataset into. Here, we set our #\n# own default of 4 groups (fewer than sklearn's default of 8). #\n# Otherwise, the default parameters of the clustering method #\n# are the same as in sklearn. #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.cluster\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Initialize the Model\n model = sklearn.cluster.KMeans(\n n_clusters=4,\n init=\"k-means++\",\n n_init=10,\n max_iter=300,\n tol=0.0001,\n copy_x=True,\n algorithm=\"auto\",\n verbose=0,\n )\n\n # Train the model and save\n model.fit(train_descriptors)\n context.save(model, \"k_means\")\n train_labels = model.predict(train_descriptors)\n test_labels = model.predict(test_descriptors)\n\n context.save(train_labels, \"train_labels\")\n context.save(test_labels, \"test_labels\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"k_means\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"9c95c27b-c8bd-5e8b-8829-d354611decef"},{"type":"execution","name":"2D PCA Clusters Plot","head":false,"results":[{"basename":"train_test_split.png","filetype":"image","name":"file_content"},{"basename":"train_clusters.png","filetype":"image","name":"file_content"},{"basename":"test_clusters.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"9c95c27b-c8bd-5e8b-8829-d354611decef","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_pca_2d_clusters_matplotlib.py","templateName":"post_processing_pca_2d_clusters_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:pca_2d_clusters:matplotlib","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Cluster Visualization #\n# #\n# This unit takes an N-dimensional feature space, and uses #\n# Principal-component Analysis (PCA) to project into a 2D space #\n# to facilitate plotting on a scatter plot. #\n# #\n# The 2D space we project into are the first two principal #\n# components identified in PCA, which are the two vectors with #\n# the highest variance. #\n# #\n# Wikipedia Article on PCA: #\n# https://en.wikipedia.org/wiki/Principal_component_analysis #\n# #\n# We then plot the labels assigned to the train an test set, #\n# and color by class. #\n# #\n# ----------------------------------------------------------------- #\n\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport settings\nimport sklearn.decomposition\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_labels = context.load(\"train_labels\")\n train_descriptors = context.load(\"train_descriptors\")\n test_labels = context.load(\"test_labels\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Unscale the descriptors\n descriptor_scaler = context.load(\"descriptor_scaler\")\n train_descriptors = descriptor_scaler.inverse_transform(train_descriptors)\n test_descriptors = descriptor_scaler.inverse_transform(test_descriptors)\n\n # We need at least 2 dimensions, exit if the dataset is 1D\n if train_descriptors.ndim < 2:\n raise ValueError(\"The train descriptors do not have enough dimensions to be plot in 2D\")\n\n # The data could be multidimensional. Let's do some PCA to get things into 2 dimensions.\n pca = sklearn.decomposition.PCA(n_components=2)\n train_descriptors = pca.fit_transform(train_descriptors)\n test_descriptors = pca.transform(test_descriptors)\n xlabel = \"Principle Component 1\"\n ylabel = \"Principle Component 2\"\n\n # Determine the labels we're going to be using, and generate their colors\n labels = set(train_labels)\n colors = {}\n for count, label in enumerate(labels):\n cm = matplotlib.cm.get_cmap('jet', len(labels))\n color = cm(count / len(labels))\n colors[label] = color\n train_colors = [colors[label] for label in train_labels]\n test_colors = [colors[label] for label in test_labels]\n\n # Train / Test Split Visualization\n plt.title(\"Train Test Split Visualization\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=\"#33548c\", marker=\"o\", label=\"Training Set\")\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=\"#F0B332\", marker=\"o\", label=\"Testing Set\")\n xmin, xmax, ymin, ymax = plt.axis()\n plt.legend()\n plt.tight_layout()\n plt.savefig(\"train_test_split.png\", dpi=600)\n plt.close()\n\n def clusters_legend(cluster_colors):\n \"\"\"\n Helper function that creates a legend, given the coloration by clusters.\n Args:\n cluster_colors: A dictionary of the form {cluster_number : color_value}\n\n Returns:\n None; just creates the legend and puts it on the plot\n \"\"\"\n legend_symbols = []\n for group, color in cluster_colors.items():\n label = f\"Cluster {group}\"\n legend_symbols.append(matplotlib.lines.Line2D([], [], color=color, marker=\"o\",\n linewidth=0, label=label))\n plt.legend(handles=legend_symbols)\n\n # Training Set Clusters\n plt.title(\"Training Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=train_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"train_clusters.png\", dpi=600)\n plt.close()\n\n # Testing Set Clusters\n plt.title(\"Testing Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=test_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"test_clusters.png\", dpi=600)\n plt.close()\n\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_pca_2d_clusters_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Cluster Visualization #\n# #\n# This unit takes an N-dimensional feature space, and uses #\n# Principal-component Analysis (PCA) to project into a 2D space #\n# to facilitate plotting on a scatter plot. #\n# #\n# The 2D space we project into are the first two principal #\n# components identified in PCA, which are the two vectors with #\n# the highest variance. #\n# #\n# Wikipedia Article on PCA: #\n# https://en.wikipedia.org/wiki/Principal_component_analysis #\n# #\n# We then plot the labels assigned to the train an test set, #\n# and color by class. #\n# #\n# ----------------------------------------------------------------- #\n\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport settings\nimport sklearn.decomposition\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_labels = context.load(\"train_labels\")\n train_descriptors = context.load(\"train_descriptors\")\n test_labels = context.load(\"test_labels\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Unscale the descriptors\n descriptor_scaler = context.load(\"descriptor_scaler\")\n train_descriptors = descriptor_scaler.inverse_transform(train_descriptors)\n test_descriptors = descriptor_scaler.inverse_transform(test_descriptors)\n\n # We need at least 2 dimensions, exit if the dataset is 1D\n if train_descriptors.ndim < 2:\n raise ValueError(\"The train descriptors do not have enough dimensions to be plot in 2D\")\n\n # The data could be multidimensional. Let's do some PCA to get things into 2 dimensions.\n pca = sklearn.decomposition.PCA(n_components=2)\n train_descriptors = pca.fit_transform(train_descriptors)\n test_descriptors = pca.transform(test_descriptors)\n xlabel = \"Principle Component 1\"\n ylabel = \"Principle Component 2\"\n\n # Determine the labels we're going to be using, and generate their colors\n labels = set(train_labels)\n colors = {}\n for count, label in enumerate(labels):\n cm = matplotlib.cm.get_cmap('jet', len(labels))\n color = cm(count / len(labels))\n colors[label] = color\n train_colors = [colors[label] for label in train_labels]\n test_colors = [colors[label] for label in test_labels]\n\n # Train / Test Split Visualization\n plt.title(\"Train Test Split Visualization\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=\"#33548c\", marker=\"o\", label=\"Training Set\")\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=\"#F0B332\", marker=\"o\", label=\"Testing Set\")\n xmin, xmax, ymin, ymax = plt.axis()\n plt.legend()\n plt.tight_layout()\n plt.savefig(\"train_test_split.png\", dpi=600)\n plt.close()\n\n def clusters_legend(cluster_colors):\n \"\"\"\n Helper function that creates a legend, given the coloration by clusters.\n Args:\n cluster_colors: A dictionary of the form {cluster_number : color_value}\n\n Returns:\n None; just creates the legend and puts it on the plot\n \"\"\"\n legend_symbols = []\n for group, color in cluster_colors.items():\n label = f\"Cluster {group}\"\n legend_symbols.append(matplotlib.lines.Line2D([], [], color=color, marker=\"o\",\n linewidth=0, label=label))\n plt.legend(handles=legend_symbols)\n\n # Training Set Clusters\n plt.title(\"Training Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(train_descriptors[:, 0], train_descriptors[:, 1], c=train_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"train_clusters.png\", dpi=600)\n plt.close()\n\n # Testing Set Clusters\n plt.title(\"Testing Set Clusters\")\n plt.xlabel(xlabel)\n plt.ylabel(ylabel)\n plt.xlim(xmin, xmax)\n plt.ylim(ymin, ymax)\n plt.scatter(test_descriptors[:, 0], test_descriptors[:, 1], c=test_colors)\n clusters_legend(colors)\n plt.tight_layout()\n plt.savefig(\"test_clusters.png\", dpi=600)\n plt.close()\n\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]},"python/ml/regression_tail.json":{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_mlp_sklearn.py","templateName":"model_mlp_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:multilayer_perceptron:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_mlp_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c"},{"type":"execution","name":"Parity Plot","head":false,"results":[{"basename":"my_parity_plot.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_parity_plot_matplotlib.py","templateName":"post_processing_parity_plot_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:parity_plot:matplotlib","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_parity_plot_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]},"python/ml/train_head.json":{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","name":"Set Up the Job","application":{"name":"python"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Set Workflow Mode","type":"assignment","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","value":"False","input":[],"flowchartId":"head-set-predict-status","tags":["pyml:workflow-type-setter"],"status":"idle","statusTrack":[],"head":true,"next":"head-fetch-training-data","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Dataset","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-training-data","input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"source":"object_storage","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-branch-on-predict-status","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Train or Predict?","type":"condition","input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"results":[],"preProcessors":[],"postProcessors":[],"then":"head-fetch-trained-model","else":"end-of-ml-train-head","statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","maxOccurrences":100,"flowchartId":"head-branch-on-predict-status","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-fetch-trained-model","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Trained Model as file","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-trained-model","input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"source":"object_storage","tags":["set-io-unit-filenames"],"status":"idle","statusTrack":[],"head":false,"next":"end-of-ml-train-head","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"End Setup","type":"assignment","operand":"IS_SETUP_COMPLETE","value":"True","input":[],"flowchartId":"end-of-ml-train-head","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},"python/plot_wavefunction.json":{"_id":"e4ec581f-1cb3-5036-b698-999a96711559","name":"Plot Wavefunction","application":{"name":"python"},"properties":["potential_profile","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"plot WFN","head":true,"results":[{"name":"potential_profile"},{"name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"57fca898-8e8b-5ef2-81a5-9d2b612bc18d","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"plot_wavefunction.py"},{"name":"requirements.txt","templateName":"requirements_plot_wavefunction.txt"}],"monitors":["standard_output"],"results":["potential_profile","file_content"],"name":"plot_wavefunction","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","schemaVersion":"2022.8.16"}]}]},"python/python_script.json":{"_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","name":"Python Script","application":{"name":"python"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"python","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"hello_world.py"},{"name":"requirements.txt"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","schemaVersion":"2022.8.16"}]}]},"shell/batch_espresso_pwscf.json":{"_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","name":"Shell Batch Job (Espresso PWSCF)","application":{"name":"shell"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"job_espresso_pw_scf.sh"}],"monitors":["standard_output"],"name":"job_espresso_pw_scf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","contextProviders":[],"executableName":"sh","name":"job_espresso_pw_scf.sh","rendered":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","schemaVersion":"2022.8.16"}]}]},"shell/hello_world.json":{"_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","name":"Shell Hello World","application":{"name":"shell"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"hello_world.sh"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","contextProviders":[],"executableName":"sh","name":"hello_world.sh","rendered":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","schemaVersion":"2022.8.16"}]}]},"vasp/band_gap.json":{"_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","name":"Band Gap","application":{"name":"vasp"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"f0d65517-9592-5bc8-948e-a0851a766cbb"},{"type":"execution","name":"vasp_nscf","head":false,"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"f0d65517-9592-5bc8-948e-a0851a766cbb","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic"],"results":["band_gaps","fermi_energy"],"name":"vasp_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/band_structure_dos.json":{"_id":"d38fea11-9781-5151-8dae-d705381498be","name":"Band Structure + Density of States","application":{"name":"vasp"},"properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"1e1de3be-f6e4-513e-afe2-c84e567a8108"},{"type":"execution","name":"vasp_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"monitors":["standard_output","convergence_electronic"],"results":["band_structure"],"name":"vasp_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/band_structure.json":{"_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","name":"Band Structure","application":{"name":"vasp"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"1e1de3be-f6e4-513e-afe2-c84e567a8108"},{"type":"execution","name":"vasp_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"monitors":["standard_output","convergence_electronic"],"results":["band_structure"],"name":"vasp_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/dos.json":{"_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","name":"Density of States","application":{"name":"vasp"},"properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/fixed_cell_relaxation.json":{"_id":"db6cc94b-2f26-5688-ba97-80b11567b549","name":"Fixed-cell Relaxation","application":{"name":"vasp"},"properties":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp_relax","head":true,"results":[{"name":"total_energy"},{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_force"},{"name":"final_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"flowchartId":"2f718a3d-5800-57e2-b707-075c1f1755c6","preProcessors":[],"postProcessors":[{"name":"prepare_restart"}],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_RELAX"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic","convergence_ionic"],"postProcessors":["prepare_restart"],"results":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"name":"vasp_relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/initial_final_total_energies.json":{"isMultiMaterial":true,"_id":"792e8c42-86ce-5f01-812a-66378ec4f379","name":"Initial/Final Total Energies","application":{"name":"vasp"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp_neb_initial","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"f969f010-9dae-5085-9ac5-86150ef78897","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_INITIAL"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_neb_initial","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.FIRST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"e65a17ce-10c8-5710-ad4d-fb3d42434091"},{"type":"execution","name":"vasp_neb_final","head":false,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"e65a17ce-10c8-5710-ad4d-fb3d42434091","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_FINAL"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_neb_final","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.LAST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},"vasp/kpoint_convergence.json":{"_id":"5d736d84-d616-538f-a09b-81a32ac0777c","name":"K-point Convergence","application":{"name":"vasp"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Init tolerance","type":"assignment","operand":"TOL","value":0.00001,"input":[],"flowchartId":"init-tolerance","status":"idle","statusTrack":[],"tags":[],"head":true,"next":"init-increment","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init increment","type":"assignment","operand":"INC","value":1,"input":[],"flowchartId":"init-increment","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-result","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init result","type":"assignment","operand":"PREV_RESULT","value":0,"input":[],"flowchartId":"init-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-parameter","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init parameter","type":"assignment","operand":"PARAMETER","value":1,"input":[],"flowchartId":"init-parameter","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"vasp-kpoint-convergence","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"type":"execution","name":"vasp_kpt_conv","head":false,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"vasp-kpoint-convergence","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR"},{"name":"KPOINTS","templateName":"KPOINTS_CONV"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_kpt_conv","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic Mesh\n0\nGamma\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}{% endraw %}\n0 0 0\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic Mesh\n0\nGamma\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}\n0 0 0\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"store-result"},{"name":"store result","type":"assignment","operand":"RESULT","value":"total_energy","input":[{"name":"total_energy","scope":"vasp-kpoint-convergence"}],"flowchartId":"store-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"check-convergence","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"check convergence","type":"condition","input":[],"results":[],"preProcessors":[],"postProcessors":[],"then":"convergence-is-reached","else":"update-result","statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","maxOccurrences":50,"flowchartId":"check-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"update-result","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"update result","type":"assignment","operand":"PREV_RESULT","value":"RESULT","input":[{"name":"RESULT","scope":"global"}],"flowchartId":"update-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"increment-parameter","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"increment parameter","type":"assignment","operand":"PREV_RESULT","value":"PARAMETER+INC","input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"flowchartId":"increment-parameter","next":"vasp-kpoint-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"exit","type":"assignment","operand":"PARAMETER","value":"PARAMETER","input":[{"name":"PARAMETER","scope":"global"}],"flowchartId":"convergence-is-reached","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}}]},"vasp/neb_subworkflow.json":{"isMultiMaterial":true,"_id":"e6215fb9-e60c-541b-b73e-b077d64b3a95","name":"Nudged Elastic Band (NEB)","application":{"name":"vasp"},"properties":["reaction_energy_barrier","reaction_energy_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp_neb","head":true,"results":[{"name":"reaction_energy_barrier"},{"name":"reaction_energy_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"9a1660ab-8067-5fad-9fb8-7c039f634636","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB"},{"name":"KPOINTS","templateName":"KPOINTS"}],"monitors":["standard_output"],"results":["reaction_energy_barrier","reaction_energy_profile"],"name":"vasp_neb","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISTART = 0\nIBRION = 1\nEDIFFG = -0.001\nENCUT = 500\nNELM = 100\nNSW = 100\nIMAGES = {{ input.INTERMEDIATE_IMAGES.length or neb.nImages }}\nSPRING = -5\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nIBRION = 1\nEDIFFG = -0.001\nENCUT = 500\nNELM = 100\nNSW = 100\nIMAGES = 1\nSPRING = -5\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"}]}]},"vasp/prepare_images.json":{"isMultiMaterial":true,"_id":"c9b7ad2a-5207-5e41-9b66-28474a8921f8","name":"Prepare Directories","application":{"name":"vasp"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"prepare-neb-images","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"dc397ead-54ad-513b-992e-aedd54576409","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"bash_vasp_prepare_neb_images.sh"}],"monitors":["standard_output"],"name":"bash_vasp_prepare_neb_images","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ------------------------------------------------------------------ #\n# This script prepares necessary directories to run VASP NEB\n# calculation. It puts initial POSCAR into directory 00, final into 0N\n# and intermediate images in 01 to 0(N-1). It is assumed that SCF\n# calculations for initial and final structures are already done in\n# previous subworkflows and their standard outputs are written into\n# \"vasp_neb_initial.out\" and \"vasp_neb_final.out\" files respectively.\n# These outputs are here copied into initial (00) and final (0N)\n# directories to calculate the reaction energy profile.\n# ------------------------------------------------------------------ #\n\n{% raw %}\ncd {{ JOB_WORK_DIR }}\n{% endraw %}\n\n# Prepare First Directory\nmkdir -p 00\ncat > 00/POSCAR < 0{{ input.INTERMEDIATE_IMAGES.length + 1 }}/POSCAR < 0{{ loop.index }}/POSCAR < 00/POSCAR < 01/POSCAR < avoid substituion below #}\n{% raw %}\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n{% endraw %}\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_xml_get_qpt_irr.py","rendered":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n\n\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","schemaVersion":"2022.8.16"}]},{"name":"assignment","type":"assignment","operand":"Q_POINTS","value":"json.loads(STDOUT)","input":[{"scope":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","name":"STDOUT"}],"status":"idle","statusTrack":[],"flowchartId":"d0fd8654-2106-546b-8792-7bb46272befc","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","name":"reduce","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["phonon_dos","phonon_dispersions"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"ph_grid_restart","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb206177-a4af-599a-81ba-6c88d24253b6","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid_restart.in"}],"monitors":["standard_output"],"results":[],"name":"ph_grid_restart","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid_restart.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"next":"3b4507a7-9244-540b-abe0-66bceab700f5"},{"type":"execution","name":"q2r","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"monitors":["standard_output"],"results":[],"name":"q2r","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"next":"8fe6a24b-c994-55a2-a448-88657292e8c2"},{"type":"execution","name":"matdyn_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"matdyn_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"next":"a7fded20-889b-54fc-bbb0-456e82689ab1"},{"type":"execution","name":"matdyn_path","head":false,"results":[{"name":"phonon_dispersions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"monitors":["standard_output"],"results":["phonon_dispersions"],"name":"matdyn_path","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Preliminary SCF Calculation","type":"subworkflow","_id":"79f2cb6a-7994-5369-8c85-af07c55ad26f","status":"idle","statusTrack":[],"flowchartId":"b6a2b27a-0fec-5e0e-8974-073ee9d2ad83","tags":[],"head":true,"next":"4bb74dfb-46a6-5bf4-a477-5d374dc2e271"},{"name":"ph-init-qpoints","type":"subworkflow","_id":"2f017bcb-f4ba-55b8-b939-1f780679a88e","status":"idle","statusTrack":[],"flowchartId":"4bb74dfb-46a6-5bf4-a477-5d374dc2e271","tags":[],"head":false,"next":"9894b91f-6e97-5ee6-af02-0bef26bd62c0"},{"name":"espresso-xml-get-qpt-irr","type":"subworkflow","_id":"e4b6b2e7-7d8f-5ae1-b6bd-ee81ecbca11a","status":"idle","statusTrack":[],"flowchartId":"9894b91f-6e97-5ee6-af02-0bef26bd62c0","tags":[],"head":false,"next":"24e3c1f0-8090-512e-9727-8770071d17c8"},{"name":"map","type":"map","workflowId":"731d3397-3278-516a-b28e-53626ef50f0a","input":{"target":"MAP_DATA","scope":"global","name":"Q_POINTS","values":[],"useValues":false},"status":"idle","statusTrack":[],"flowchartId":"24e3c1f0-8090-512e-9727-8770071d17c8","tags":[],"head":false,"next":"55a9e9fb-3545-5c4b-a1bb-b64a899b78c6"},{"name":"reduce","type":"subworkflow","_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","status":"idle","statusTrack":[],"flowchartId":"55a9e9fb-3545-5c4b-a1bb-b64a899b78c6","tags":[],"head":false}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"23b9058b-884c-52d4-82a8-ee162b9761e0","workflows":[{"name":"pre-processor","subworkflows":[{"_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","name":"pre-processor","application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_link_outdir_save.sh"}],"monitors":["standard_output"],"name":"espresso_link_outdir_save","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_link_outdir_save.sh","rendered":"\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n\n","schemaVersion":"2022.8.16"}]}]},{"_id":"e68db280-8636-53e3-81a0-88396ba6147d","name":"ph-single-irr-qpt","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"ph_single_irr_qpt","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"8db9af08-d935-57a0-a824-e7db6d936de8","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_single_irr_qpt.in"}],"monitors":["standard_output"],"results":[],"name":"ph_single_irr_qpt","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n {% raw %}\n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n {% endraw %}\n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_SCRATCH_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_single_irr_qpt.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n \n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n \n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = '{{ JOB_SCRATCH_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}]}]},{"_id":"7239fc3a-b343-513f-af35-e8687e1829da","name":"post-processor","application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_collect_dynmat.sh"}],"monitors":["standard_output"],"name":"espresso_collect_dynmat","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_collect_dynmat.sh","rendered":"\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"pre-processor","type":"subworkflow","_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","status":"idle","statusTrack":[],"flowchartId":"e9a790f4-dec6-52c1-b951-014f0ff01cb4","tags":[],"head":true,"next":"c2195045-7a5c-54d3-ab88-211c82de09f1"},{"name":"ph-single-irr-qpt","type":"subworkflow","_id":"e68db280-8636-53e3-81a0-88396ba6147d","status":"idle","statusTrack":[],"flowchartId":"c2195045-7a5c-54d3-ab88-211c82de09f1","tags":[],"head":false,"next":"e483c7fb-2a29-5e91-819a-7465ead70134"},{"name":"post-processor","type":"subworkflow","_id":"7239fc3a-b343-513f-af35-e8687e1829da","status":"idle","statusTrack":[],"flowchartId":"e483c7fb-2a29-5e91-819a-7465ead70134","tags":[],"head":false}],"properties":[],"_id":"731d3397-3278-516a-b28e-53626ef50f0a","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"compute":{"ppn":1,"nodes":1,"queue":"D","timeLimit":"01:00:00","notify":"n","cluster":{"fqdn":""}}}],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"espresso"}},"espresso/recalculate_bands.json":{"name":"Recalculate Bands","subworkflows":[{"_id":"64551dfb-e529-5d8d-9092-ff268f4da134","name":"Recalculate Bands","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_bands","head":true,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Recalculate Bands","type":"subworkflow","_id":"64551dfb-e529-5d8d-9092-ff268f4da134","status":"idle","statusTrack":[],"flowchartId":"e8b72a45-765e-565f-ab17-c91a21aec09d","tags":[],"head":true}],"properties":["band_structure"],"_id":"42b2b964-8ccc-5b36-9e33-41a954abc2ba","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"espresso"}},"espresso/surface_energy.json":{"name":"Surface Energy","subworkflows":[{"_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","name":"Surface Energy","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"io-slab","type":"io","subtype":"input","head":true,"results":[],"monitors":[],"flowchartId":"e463ef46-a36e-5168-87dd-e21eb980dfb8","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"materials","endpoint_options":{"params":{"query":"{'_id': MATERIAL_ID}","projection":"{}"}},"name":"DATA"}],"next":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"slab","type":"assignment","operand":"SLAB","value":"DATA[0]","input":[{"name":"DATA","scope":"e463ef46-a36e-5168-87dd-e21eb980dfb8"}],"head":false,"results":[],"monitors":[],"flowchartId":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","preProcessors":[],"postProcessors":[],"next":"44263820-0c80-5bd1-b854-9da8d198eac1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"io-bulk","type":"io","subtype":"input","head":false,"results":[],"monitors":[],"flowchartId":"44263820-0c80-5bd1-b854-9da8d198eac1","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"materials","endpoint_options":{"params":{"query":"{'_id': SLAB.metadata.bulkId}","projection":"{}"}},"name":"DATA"}],"next":"b70656f1-a394-57f4-b4de-00096969df4b","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"bulk","type":"assignment","operand":"BULK","value":"DATA[0] if DATA else None","input":[{"name":"DATA","scope":"44263820-0c80-5bd1-b854-9da8d198eac1"}],"head":false,"results":[],"monitors":[],"flowchartId":"b70656f1-a394-57f4-b4de-00096969df4b","preProcessors":[],"postProcessors":[],"next":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"assert-bulk","type":"assertion","statement":"BULK != None","errorMessage":"Bulk material does not exist!","head":false,"results":[],"monitors":[],"flowchartId":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","preProcessors":[],"postProcessors":[],"next":"490635e0-c593-5809-9eb2-c794b96cfed1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"io-e-bulk","type":"io","subtype":"input","head":false,"results":[],"monitors":[],"flowchartId":"490635e0-c593-5809-9eb2-c794b96cfed1","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"refined-properties","endpoint_options":{"params":{"query":"{ 'exabyteId': BULK.exabyteId, 'data.name': 'total_energy', 'group': {'$regex': ''.join((SUBWORKFLOW.application.shortName, ':'))} }","projection":"{'sort': {'precision.value': -1}, 'limit': 1}"}},"name":"DATA"}],"next":"bbe13b97-4243-5a85-8f61-a279d0b797aa","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"e-bulk","type":"assignment","operand":"E_BULK","value":"DATA[0].data.value if DATA else None","input":[{"name":"DATA","scope":"490635e0-c593-5809-9eb2-c794b96cfed1"}],"head":false,"results":[],"monitors":[],"flowchartId":"bbe13b97-4243-5a85-8f61-a279d0b797aa","preProcessors":[],"postProcessors":[],"next":"a06c9f43-7670-5fd0-ac42-7028a472235a","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"assert-e-bulk","type":"assertion","statement":"E_BULK != None","errorMessage":"E_BULK does not exist!","head":false,"results":[],"monitors":[],"flowchartId":"a06c9f43-7670-5fd0-ac42-7028a472235a","preProcessors":[],"postProcessors":[],"next":"cdf210be-26ed-585a-b4ac-d55795ba2975","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"surface","type":"assignment","operand":"A","value":"np.linalg.norm(np.cross(SLAB.lattice.vectors.a, SLAB.lattice.vectors.b))","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"cdf210be-26ed-585a-b4ac-d55795ba2975","preProcessors":[],"postProcessors":[],"next":"ffa8e43d-096a-555b-b8d0-6d283365ef47","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"n-bulk","type":"assignment","operand":"N_BULK","value":"len(BULK.basis.elements)","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"ffa8e43d-096a-555b-b8d0-6d283365ef47","preProcessors":[],"postProcessors":[],"next":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"n-slab","type":"assignment","operand":"N_SLAB","value":"len(SLAB.basis.elements)","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","preProcessors":[],"postProcessors":[],"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"fcd88119-817c-5ac1-a430-ba892ac743eb"},{"name":"e-slab","type":"assignment","operand":"E_SLAB","value":"total_energy","input":[{"name":"total_energy","scope":"9fc7a088-5533-5f70-bb33-f676ec65f565"}],"head":false,"results":[],"monitors":[],"flowchartId":"fcd88119-817c-5ac1-a430-ba892ac743eb","preProcessors":[],"postProcessors":[],"next":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"surface-energy","type":"assignment","operand":"SURFACE_ENERGY","value":"1 / (2 * A) * (E_SLAB - E_BULK * (N_SLAB/N_BULK))","input":[],"head":false,"results":[{"name":"surface_energy"}],"monitors":[],"flowchartId":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]}]}],"units":[{"name":"Surface Energy","type":"subworkflow","_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","status":"idle","statusTrack":[],"flowchartId":"d81dc9ce-bb50-5bc6-af1d-e5ede03bb0a6","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","surface_energy","total_energy","total_energy_contributions","total_force"],"_id":"68512987-de73-5614-bab2-0f8b575cffa3","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"espresso"}},"espresso/total_energy.json":{"name":"Total Energy","subworkflows":[{"_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","name":"Total Energy","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Total Energy","type":"subworkflow","_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","status":"idle","statusTrack":[],"flowchartId":"6059d61a-6a92-5657-9130-02208639aff8","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"4e36ca25-fa46-5628-a227-27d22dea8553","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"tags":["default"],"application":{"name":"espresso"}},"espresso/valence_band_offset.json":{"name":"Valence Band Offset (2D)","subworkflows":[{"isMultiMaterial":true,"_id":"9c65d03e-6a30-58f3-947a-f174342be0c3","name":"BS + Avg ESP (Interface)","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Set Material Index (Interface)","type":"assignment","operand":"MATERIAL_INDEX","value":"0","input":[],"status":"idle","statusTrack":[],"flowchartId":"0f21d8c4-ab32-53ba-b40d-fc9b6608e1b9","tags":[],"head":true,"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-calculate-band-gap"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-calculate-band-gap","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"a667d9fd-35d5-5897-be0e-fa0247233649"},{"name":"Select indirect band gap","type":"assignment","operand":"BAND_GAP_INDIRECT","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]","input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap"}],"status":"idle","statusTrack":[],"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","tags":[],"head":false,"next":"08819369-b541-5b51-8a40-0ee135039482","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Set Valence Band Maximum","type":"assignment","operand":"VBM","value":"BAND_GAP_INDIRECT['eigenvalueValence']","input":[],"status":"idle","statusTrack":[],"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","tags":[],"head":false,"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde"},{"type":"execution","name":"Electrostatic Potential (ESP)","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"monitors":["standard_output"],"results":[],"name":"pp_electrostatic_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"next":"average-electrostatic-potential"},{"type":"execution","name":"average ESP","head":false,"results":[{"name":"average_potential_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"average-electrostatic-potential","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"monitors":["standard_output"],"results":["average_potential_profile"],"name":"average_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"next":"c6c11873-91d7-5422-8302-3dcc1ce971e9"},{"name":"Set Macroscopically Averaged ESP Data","type":"assignment","operand":"array_from_context","value":"average_potential_profile['yDataSeries'][1]","input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential"}],"status":"idle","statusTrack":[],"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},{"_id":"ce26adc1-6a26-53ef-9626-5eb6a6b9ccb7","name":"Find ESP Values (Interface)","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Find Extrema","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"python-find-extrema","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d"},{"name":"Set Average ESP Value","type":"assignment","operand":"AVG_ESP_INTERFACE","value":"json.loads(STDOUT)['minima']","input":[{"name":"STDOUT","scope":"python-find-extrema"}],"status":"idle","statusTrack":[],"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"isMultiMaterial":true,"_id":"ba46d9b4-610f-537e-ae39-e39ce5240cda","name":"BS + Avg ESP (interface left)","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Set Material Index (Interface left)","type":"assignment","operand":"MATERIAL_INDEX","value":"1","input":[],"status":"idle","statusTrack":[],"flowchartId":"0bd31760-f6e4-5826-b282-882c06c97f94","tags":[],"head":true,"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-calculate-band-gap-left"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-calculate-band-gap-left","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"a667d9fd-35d5-5897-be0e-fa0247233649"},{"name":"Select indirect band gap","type":"assignment","operand":"BAND_GAP_INDIRECT","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]","input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap-left"}],"status":"idle","statusTrack":[],"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","tags":[],"head":false,"next":"08819369-b541-5b51-8a40-0ee135039482","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Set Valence Band Maximum","type":"assignment","operand":"VBM_LEFT","value":"BAND_GAP_INDIRECT['eigenvalueValence']","input":[],"status":"idle","statusTrack":[],"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","tags":[],"head":false,"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde"},{"type":"execution","name":"Electrostatic Potential (ESP)","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"monitors":["standard_output"],"results":[],"name":"pp_electrostatic_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"next":"average-electrostatic-potential-left"},{"type":"execution","name":"average ESP","head":false,"results":[{"name":"average_potential_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"average-electrostatic-potential-left","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"monitors":["standard_output"],"results":["average_potential_profile"],"name":"average_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"next":"c6c11873-91d7-5422-8302-3dcc1ce971e9"},{"name":"Set Macroscopically Averaged ESP Data","type":"assignment","operand":"array_from_context","value":"average_potential_profile['yDataSeries'][1]","input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential-left"}],"status":"idle","statusTrack":[],"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},{"_id":"6c303926-905c-5749-81d5-2d2964fdf09a","name":"Find ESP Value (Interface left)","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Find Extrema","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"python-find-extrema-left","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d"},{"name":"Set Average ESP Value","type":"assignment","operand":"AVG_ESP_LEFT","value":"json.loads(STDOUT)['minima']","input":[{"name":"STDOUT","scope":"python-find-extrema-left"}],"status":"idle","statusTrack":[],"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"isMultiMaterial":true,"_id":"aa611fe8-1e6a-5e5c-976a-f64bfaaaace9","name":"BS + Avg ESP (interface right)","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Set Material Index (Interface right)","type":"assignment","operand":"MATERIAL_INDEX","value":"2","input":[],"status":"idle","statusTrack":[],"flowchartId":"a05809d1-cc0d-5a0b-bf5e-d43b90a6ac4b","tags":[],"head":true,"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-calculate-band-gap-right"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-calculate-band-gap-right","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"a667d9fd-35d5-5897-be0e-fa0247233649"},{"name":"Select indirect band gap","type":"assignment","operand":"BAND_GAP_INDIRECT","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]","input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap-right"}],"status":"idle","statusTrack":[],"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","tags":[],"head":false,"next":"08819369-b541-5b51-8a40-0ee135039482","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Set Valence Band Maximum","type":"assignment","operand":"VBM_RIGHT","value":"BAND_GAP_INDIRECT['eigenvalueValence']","input":[],"status":"idle","statusTrack":[],"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","tags":[],"head":false,"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde"},{"type":"execution","name":"Electrostatic Potential (ESP)","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"monitors":["standard_output"],"results":[],"name":"pp_electrostatic_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"next":"average-electrostatic-potential-right"},{"type":"execution","name":"average ESP","head":false,"results":[{"name":"average_potential_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"average-electrostatic-potential-right","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"monitors":["standard_output"],"results":["average_potential_profile"],"name":"average_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"next":"c6c11873-91d7-5422-8302-3dcc1ce971e9"},{"name":"Set Macroscopically Averaged ESP Data","type":"assignment","operand":"array_from_context","value":"average_potential_profile['yDataSeries'][1]","input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential-right"}],"status":"idle","statusTrack":[],"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},{"_id":"736295e8-2ee0-5974-83bc-362061ac0688","name":"Find ESP Value (Interface right)","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Find Extrema","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"python-find-extrema-right","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d"},{"name":"Set Average ESP Value","type":"assignment","operand":"AVG_ESP_RIGHT","value":"json.loads(STDOUT)['minima']","input":[{"name":"STDOUT","scope":"python-find-extrema-right"}],"status":"idle","statusTrack":[],"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","name":"Calculate VBO","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":["valence_band_offset"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Difference of valence band maxima","type":"assignment","operand":"VBM_DIFF","value":"VBM_LEFT - VBM_RIGHT","input":[],"status":"idle","statusTrack":[],"flowchartId":"bd4eaa98-b001-5694-87ef-ec77540502ab","tags":[],"head":true,"next":"2626f7bb-d392-5fd4-ab71-329b508de347","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Difference of macroscopically averaged ESP in bulk","type":"assignment","operand":"AVG_ESP_DIFF","value":"AVG_ESP_LEFT[0] - AVG_ESP_RIGHT[0]","input":[],"status":"idle","statusTrack":[],"flowchartId":"2626f7bb-d392-5fd4-ab71-329b508de347","tags":[],"head":false,"next":"b7307787-53e2-599b-ad12-d627b04074b4","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Lineup of macroscopically averaged ESP in interface","type":"assignment","operand":"ESP_LINEUP","value":"np.abs(AVG_ESP_INTERFACE[0] - AVG_ESP_INTERFACE[1])","input":[],"status":"idle","statusTrack":[],"flowchartId":"b7307787-53e2-599b-ad12-d627b04074b4","tags":[],"head":false,"next":"197f4b4d-cb7b-57be-a885-d44cb1f61905","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Valence Band Offset","type":"assignment","operand":"VALENCE_BAND_OFFSET","value":"abs(VBM_DIFF - AVG_ESP_DIFF + (np.sign(AVG_ESP_DIFF) * ESP_LINEUP))","input":[],"results":[{"name":"valence_band_offset"}],"status":"idle","statusTrack":[],"flowchartId":"197f4b4d-cb7b-57be-a885-d44cb1f61905","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]}],"units":[{"name":"BS + Avg ESP (Interface)","type":"subworkflow","_id":"9c65d03e-6a30-58f3-947a-f174342be0c3","status":"idle","statusTrack":[],"flowchartId":"fd622b5c-5c02-594e-b582-b245c17ca9a4","tags":[],"head":true,"next":"ad3b1e4c-5965-5605-a067-dd0c59907c4b"},{"name":"Find ESP Values (Interface)","type":"subworkflow","_id":"ce26adc1-6a26-53ef-9626-5eb6a6b9ccb7","status":"idle","statusTrack":[],"flowchartId":"ad3b1e4c-5965-5605-a067-dd0c59907c4b","tags":[],"head":false,"next":"8d5b4734-edfd-55cc-ad80-aaa72487398d"},{"name":"BS + Avg ESP (interface left)","type":"subworkflow","_id":"ba46d9b4-610f-537e-ae39-e39ce5240cda","status":"idle","statusTrack":[],"flowchartId":"8d5b4734-edfd-55cc-ad80-aaa72487398d","tags":[],"head":false,"next":"102ec582-5b75-52f5-8b39-19ca725ed47a"},{"name":"Find ESP Value (Interface left)","type":"subworkflow","_id":"6c303926-905c-5749-81d5-2d2964fdf09a","status":"idle","statusTrack":[],"flowchartId":"102ec582-5b75-52f5-8b39-19ca725ed47a","tags":[],"head":false,"next":"603c45db-93aa-54ce-a7fe-6e9b65b0037d"},{"name":"BS + Avg ESP (interface right)","type":"subworkflow","_id":"aa611fe8-1e6a-5e5c-976a-f64bfaaaace9","status":"idle","statusTrack":[],"flowchartId":"603c45db-93aa-54ce-a7fe-6e9b65b0037d","tags":[],"head":false,"next":"e3444d35-cc41-59f5-8481-78d0c383b84e"},{"name":"Find ESP Value (Interface right)","type":"subworkflow","_id":"736295e8-2ee0-5974-83bc-362061ac0688","status":"idle","statusTrack":[],"flowchartId":"e3444d35-cc41-59f5-8481-78d0c383b84e","tags":[],"head":false,"next":"0e0b141a-39ca-52bc-9094-e5f96dc72f39"},{"name":"Calculate VBO","type":"subworkflow","_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","status":"idle","statusTrack":[],"flowchartId":"0e0b141a-39ca-52bc-9094-e5f96dc72f39","tags":[],"head":false}],"properties":["atomic_forces","average_potential_profile","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"d8e08cac-7747-50aa-b925-41f214d722c6","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"espresso"}},"espresso/variable_cell_relaxation.json":{"name":"Variable-cell Relaxation","subworkflows":[{"systemName":"espresso-variable-cell-relaxation","_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","name":"Variable-cell Relaxation","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_vc-relax","head":true,"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"flowchartId":"e1bd0870-6245-5fc2-a50d-48cabc356ac8","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_vc_relax.in"}],"monitors":["standard_output","convergence_electronic","convergence_ionic"],"results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"name":"pw_vc-relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_vc_relax.in","rendered":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Variable-cell Relaxation","type":"subworkflow","_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","status":"idle","statusTrack":[],"flowchartId":"8f6e9590-6a87-584b-abd7-1fb98253054c","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","final_structure","pressure","stress_tensor","total_energy","total_force"],"_id":"c45dcef1-d16b-59d1-9318-cedd0b1acf08","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"tags":["variable-cell_relaxation"],"application":{"name":"espresso"}},"espresso/zero_point_energy.json":{"name":"Zero Point Energy","subworkflows":[{"_id":"151538cc-9e71-5269-8b9e-cb5977151227","name":"Zero Point Energy","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"107595d1-490f-53a2-8432-7f8a12f14d96"},{"type":"execution","name":"ph_zpe","head":false,"results":[{"name":"zero_point_energy"}],"monitors":[{"name":"standard_output"}],"flowchartId":"107595d1-490f-53a2-8432-7f8a12f14d96","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_gamma.in"}],"monitors":["standard_output"],"results":["zero_point_energy"],"name":"ph_gamma","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n0 0 0\n","contextProviders":[],"executableName":"ph.x","name":"ph_gamma.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n0 0 0\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Zero Point Energy","type":"subworkflow","_id":"151538cc-9e71-5269-8b9e-cb5977151227","status":"idle","statusTrack":[],"flowchartId":"d906bd20-eb92-5a01-a0e2-c81a2d9b2a41","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"_id":"3158c78d-58bb-5675-8c7f-6f2337061015","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"espresso"}},"nwchem/total_energy.json":{"name":"Total Energy","subworkflows":[{"_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","name":"Total Energy","application":{"name":"nwchem","shortName":"nwchem","summary":"NWChem","build":"GNU","isDefault":true,"version":"7.0.2","schemaVersion":"2022.8.16"},"properties":["total_energy","total_energy_contributions"],"model":{"type":"dft","subtype":"gga","method":{"type":"localorbital","subtype":"pople","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"nwchem_total_energy","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"6f1eda0b-ebe1-5ccd-92dc-c2e55de5e0c7","preProcessors":[],"postProcessors":[],"application":{"name":"nwchem","shortName":"nwchem","summary":"NWChem","build":"GNU","isDefault":true,"version":"7.0.2","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":false,"isDefault":true,"monitors":["standard_output"],"postProcessors":["error_handler"],"name":"nwchem","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"nwchem","executableName":"nwchem","input":[{"name":"nwchem_total_energy.inp"}],"isDefault":true,"monitors":["standard_output"],"results":["total_energy","total_energy_contributions"],"name":"nwchem_total_energy","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"nwchem","content":" start nwchem\n title \"Test\"\n charge {{ input.CHARGE }}\n geometry units au noautosym\n {{ input.ATOMIC_POSITIONS }}\n end\n basis\n * library {{ input.BASIS }}\n end\n dft\n xc {{ input.FUNCTIONAL }}\n mult {{ input.MULT }}\n end\n task dft energy\n","contextProviders":[{"name":"NWChemInputDataManager"}],"executableName":"nwchem","name":"nwchem_total_energy.inp","rendered":" start nwchem\n title \"Test\"\n charge 0\n geometry units au noautosym\n Si 0.000000000 0.000000000 0.000000000 \nSi 1.116306745 0.789348070 1.933500000 \n end\n basis\n * library 6-31G\n end\n dft\n xc B3LYP\n mult 1\n end\n task dft energy\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Total Energy","type":"subworkflow","_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","status":"idle","statusTrack":[],"flowchartId":"6059d61a-6a92-5657-9130-02208639aff8","tags":[],"head":true}],"properties":["total_energy","total_energy_contributions"],"_id":"937fbac8-2dec-5fb1-a46f-b8a0cc3d3d05","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"nwchem"}},"python/ml/classification_workflow.json":{"name":"Python ML Train Classification","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","name":"Set Up the Job","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Set Workflow Mode","type":"assignment","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","value":"False","input":[],"flowchartId":"head-set-predict-status","tags":["pyml:workflow-type-setter"],"status":"idle","statusTrack":[],"head":true,"next":"head-fetch-training-data","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Dataset","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-training-data","input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"source":"object_storage","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-branch-on-predict-status","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Train or Predict?","type":"condition","input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"results":[],"preProcessors":[],"postProcessors":[],"then":"head-fetch-trained-model","else":"end-of-ml-train-head","statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","maxOccurrences":100,"flowchartId":"head-branch-on-predict-status","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-fetch-trained-model","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Trained Model as file","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-trained-model","input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"source":"object_storage","tags":["set-io-unit-filenames"],"status":"idle","statusTrack":[],"head":false,"next":"end-of-ml-train-head","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"End Setup","type":"assignment","operand":"IS_SETUP_COMPLETE","value":"True","input":[],"flowchartId":"end-of-ml-train-head","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:random_forest_classification:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"35436b4a-cd9c-5089-ab42-665c4f9ba049"},{"type":"execution","name":"ROC Curve Plot","head":false,"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:roc_curve:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Set Up the Job","type":"subworkflow","_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","status":"idle","statusTrack":[],"flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","tags":[],"head":true,"next":"90738aae-daac-599f-913f-29fb6acdff00"},{"name":"Machine Learning","type":"subworkflow","_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","status":"idle","statusTrack":[],"flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","tags":[],"head":false}],"properties":[],"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","workflows":[],"isUsingDataset":true,"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"python"}},"python/ml/clustering_workflow.json":{"name":"Python ML Train Clustering","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","name":"Set Up the Job","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Set Workflow Mode","type":"assignment","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","value":"False","input":[],"flowchartId":"head-set-predict-status","tags":["pyml:workflow-type-setter"],"status":"idle","statusTrack":[],"head":true,"next":"head-fetch-training-data","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Dataset","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-training-data","input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"source":"object_storage","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-branch-on-predict-status","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Train or Predict?","type":"condition","input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"results":[],"preProcessors":[],"postProcessors":[],"then":"head-fetch-trained-model","else":"end-of-ml-train-head","statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","maxOccurrences":100,"flowchartId":"head-branch-on-predict-status","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-fetch-trained-model","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Trained Model as file","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-trained-model","input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"source":"object_storage","tags":["set-io-unit-filenames"],"status":"idle","statusTrack":[],"head":false,"next":"end-of-ml-train-head","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"End Setup","type":"assignment","operand":"IS_SETUP_COMPLETE","value":"True","input":[],"flowchartId":"end-of-ml-train-head","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:random_forest_classification:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"35436b4a-cd9c-5089-ab42-665c4f9ba049"},{"type":"execution","name":"ROC Curve Plot","head":false,"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:roc_curve:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Set Up the Job","type":"subworkflow","_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","status":"idle","statusTrack":[],"flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","tags":[],"head":true,"next":"90738aae-daac-599f-913f-29fb6acdff00"},{"name":"Machine Learning","type":"subworkflow","_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","status":"idle","statusTrack":[],"flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","tags":[],"head":false}],"properties":[],"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","workflows":[],"isUsingDataset":true,"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"python"}},"python/ml/regression_workflow.json":{"name":"Python ML Train Regression","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","name":"Set Up the Job","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Set Workflow Mode","type":"assignment","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","value":"False","input":[],"flowchartId":"head-set-predict-status","tags":["pyml:workflow-type-setter"],"status":"idle","statusTrack":[],"head":true,"next":"head-fetch-training-data","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Dataset","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-training-data","input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"source":"object_storage","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-branch-on-predict-status","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Train or Predict?","type":"condition","input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"results":[],"preProcessors":[],"postProcessors":[],"then":"head-fetch-trained-model","else":"end-of-ml-train-head","statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","maxOccurrences":100,"flowchartId":"head-branch-on-predict-status","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-fetch-trained-model","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Trained Model as file","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-trained-model","input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"source":"object_storage","tags":["set-io-unit-filenames"],"status":"idle","statusTrack":[],"head":false,"next":"end-of-ml-train-head","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"End Setup","type":"assignment","operand":"IS_SETUP_COMPLETE","value":"True","input":[],"flowchartId":"end-of-ml-train-head","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_mlp_sklearn.py","templateName":"model_mlp_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:multilayer_perceptron:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_mlp_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c"},{"type":"execution","name":"Parity Plot","head":false,"results":[{"basename":"my_parity_plot.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_parity_plot_matplotlib.py","templateName":"post_processing_parity_plot_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:parity_plot:matplotlib","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_parity_plot_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Set Up the Job","type":"subworkflow","_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","status":"idle","statusTrack":[],"flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","tags":[],"head":true,"next":"90738aae-daac-599f-913f-29fb6acdff00"},{"name":"Machine Learning","type":"subworkflow","_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","status":"idle","statusTrack":[],"flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","tags":[],"head":false}],"properties":[],"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","workflows":[],"isUsingDataset":true,"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"python"}},"python/python_script.json":{"name":"Python Script","subworkflows":[{"_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","name":"Python Script","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"python","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"hello_world.py"},{"name":"requirements.txt"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Python Script","type":"subworkflow","_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","status":"idle","statusTrack":[],"flowchartId":"c50e28b2-a0c5-5324-8b6f-e99b5a546bd8","tags":[],"head":true}],"properties":[],"_id":"de816646-766b-5f97-b468-0937d4381440","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"python"}},"shell/batch_espresso_pwscf.json":{"name":"Shell Batch Job (Espresso PWSCF)","subworkflows":[{"_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","name":"Shell Batch Job (Espresso PWSCF)","application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"job_espresso_pw_scf.sh"}],"monitors":["standard_output"],"name":"job_espresso_pw_scf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","contextProviders":[],"executableName":"sh","name":"job_espresso_pw_scf.sh","rendered":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Shell Batch Job (Espresso PWSCF)","type":"subworkflow","_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","status":"idle","statusTrack":[],"flowchartId":"d884e8f7-7acf-5a03-bc9a-186903bdaa0e","tags":[],"head":true}],"properties":[],"_id":"e0046fb4-37db-5732-bf81-c48e13081a4c","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"shell"}},"shell/hello_world.json":{"name":"Shell Script","subworkflows":[{"_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","name":"Shell Hello World","application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"hello_world.sh"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","contextProviders":[],"executableName":"sh","name":"hello_world.sh","rendered":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Shell Hello World","type":"subworkflow","_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","status":"idle","statusTrack":[],"flowchartId":"319307c2-bf22-5bf2-b4e9-a4cdf671b786","tags":[],"head":true}],"properties":[],"_id":"d2fd444c-06b4-5d66-baeb-449c680ae1bf","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"shell"}},"vasp/band_gap.json":{"name":"Band Gap","subworkflows":[{"_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","name":"Band Gap","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"f0d65517-9592-5bc8-948e-a0851a766cbb"},{"type":"execution","name":"vasp_nscf","head":false,"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"f0d65517-9592-5bc8-948e-a0851a766cbb","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic"],"results":["band_gaps","fermi_energy"],"name":"vasp_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Band Gap","type":"subworkflow","_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","status":"idle","statusTrack":[],"flowchartId":"db3b83ea-0ef5-594c-89a8-bde38dbc6105","tags":[],"head":true}],"properties":["atomic_forces","band_gaps","fermi_energy","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"16ca0232-a570-53d1-a4d3-32bbd6f3f0a2","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/band_structure_dos.json":{"name":"Band Structure + Density of States","subworkflows":[{"_id":"d38fea11-9781-5151-8dae-d705381498be","name":"Band Structure + Density of States","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"1e1de3be-f6e4-513e-afe2-c84e567a8108"},{"type":"execution","name":"vasp_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"monitors":["standard_output","convergence_electronic"],"results":["band_structure"],"name":"vasp_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Band Structure + Density of States","type":"subworkflow","_id":"d38fea11-9781-5151-8dae-d705381498be","status":"idle","statusTrack":[],"flowchartId":"8a098bb9-73b1-5e84-bfc7-b783e02d0f53","tags":[],"head":true}],"properties":["atomic_forces","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"c8338d40-3c6e-5581-b03c-d7fb5cbb8df5","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/band_structure.json":{"name":"Band Structure","subworkflows":[{"_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","name":"Band Structure","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"1e1de3be-f6e4-513e-afe2-c84e567a8108"},{"type":"execution","name":"vasp_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"monitors":["standard_output","convergence_electronic"],"results":["band_structure"],"name":"vasp_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Band Structure","type":"subworkflow","_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","status":"idle","statusTrack":[],"flowchartId":"c573187f-a8bb-5084-9fcf-1560bf4a7786","tags":[],"head":true}],"properties":["atomic_forces","band_structure","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"25b0ad08-87bb-5400-bea4-acd5fe2163c0","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/dos.json":{"name":"Density of States","subworkflows":[{"_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","name":"Density of States","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Density of States","type":"subworkflow","_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","status":"idle","statusTrack":[],"flowchartId":"3e64fdb4-ab5b-52a0-a1d5-51343c49481c","tags":[],"head":true}],"properties":["atomic_forces","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"629a79fb-a03f-5e34-b2ce-9c735e8ef6c0","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/fixed_cell_relaxation.json":{"name":"Fixed-cell Relaxation","subworkflows":[{"_id":"db6cc94b-2f26-5688-ba97-80b11567b549","name":"Fixed-cell Relaxation","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp_relax","head":true,"results":[{"name":"total_energy"},{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_force"},{"name":"final_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"flowchartId":"2f718a3d-5800-57e2-b707-075c1f1755c6","preProcessors":[],"postProcessors":[{"name":"prepare_restart"}],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_RELAX"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic","convergence_ionic"],"postProcessors":["prepare_restart"],"results":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"name":"vasp_relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Fixed-cell Relaxation","type":"subworkflow","_id":"db6cc94b-2f26-5688-ba97-80b11567b549","status":"idle","statusTrack":[],"flowchartId":"0de8c4c8-b722-5cd2-ae68-b484262e0a01","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","final_structure","pressure","stress_tensor","total_energy","total_force"],"_id":"cb69418c-2f6c-551d-af81-0cf20ec1113d","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/kpoint_convergence.json":{"name":"K-point Convergence","subworkflows":[{"_id":"5d736d84-d616-538f-a09b-81a32ac0777c","name":"K-point Convergence","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Init tolerance","type":"assignment","operand":"TOL","value":0.00001,"input":[],"flowchartId":"init-tolerance","status":"idle","statusTrack":[],"tags":[],"head":true,"next":"init-increment","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init increment","type":"assignment","operand":"INC","value":1,"input":[],"flowchartId":"init-increment","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-result","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init result","type":"assignment","operand":"PREV_RESULT","value":0,"input":[],"flowchartId":"init-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-parameter","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init parameter","type":"assignment","operand":"PARAMETER","value":1,"input":[],"flowchartId":"init-parameter","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"vasp-kpoint-convergence","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"type":"execution","name":"vasp_kpt_conv","head":false,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"vasp-kpoint-convergence","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR"},{"name":"KPOINTS","templateName":"KPOINTS_CONV"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_kpt_conv","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic Mesh\n0\nGamma\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}{% endraw %}\n0 0 0\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic Mesh\n0\nGamma\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}\n0 0 0\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"store-result"},{"name":"store result","type":"assignment","operand":"RESULT","value":"total_energy","input":[{"name":"total_energy","scope":"vasp-kpoint-convergence"}],"flowchartId":"store-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"check-convergence","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"check convergence","type":"condition","input":[],"results":[],"preProcessors":[],"postProcessors":[],"then":"convergence-is-reached","else":"update-result","statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","maxOccurrences":50,"flowchartId":"check-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"update-result","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"update result","type":"assignment","operand":"PREV_RESULT","value":"RESULT","input":[{"name":"RESULT","scope":"global"}],"flowchartId":"update-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"increment-parameter","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"increment parameter","type":"assignment","operand":"PREV_RESULT","value":"PARAMETER+INC","input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"flowchartId":"increment-parameter","next":"vasp-kpoint-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"exit","type":"assignment","operand":"PARAMETER","value":"PARAMETER","input":[{"name":"PARAMETER","scope":"global"}],"flowchartId":"convergence-is-reached","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}}]}],"units":[{"name":"K-point Convergence","type":"subworkflow","_id":"5d736d84-d616-538f-a09b-81a32ac0777c","status":"idle","statusTrack":[],"flowchartId":"a34eec2c-cdb2-537d-88c0-ed1d7b205879","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"fcf105f9-5ae7-5c32-a6b3-e3579cbdf39a","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/neb.json":{"name":"Nudged Elastic Band (NEB)","subworkflows":[{"isMultiMaterial":true,"_id":"792e8c42-86ce-5f01-812a-66378ec4f379","name":"Initial/Final Total Energies","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp_neb_initial","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"f969f010-9dae-5085-9ac5-86150ef78897","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_INITIAL"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_neb_initial","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.FIRST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"e65a17ce-10c8-5710-ad4d-fb3d42434091"},{"type":"execution","name":"vasp_neb_final","head":false,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"e65a17ce-10c8-5710-ad4d-fb3d42434091","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_FINAL"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_neb_final","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.LAST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},{"isMultiMaterial":true,"_id":"c9b7ad2a-5207-5e41-9b66-28474a8921f8","name":"Prepare Directories","application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"prepare-neb-images","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"dc397ead-54ad-513b-992e-aedd54576409","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"bash_vasp_prepare_neb_images.sh"}],"monitors":["standard_output"],"name":"bash_vasp_prepare_neb_images","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ------------------------------------------------------------------ #\n# This script prepares necessary directories to run VASP NEB\n# calculation. It puts initial POSCAR into directory 00, final into 0N\n# and intermediate images in 01 to 0(N-1). It is assumed that SCF\n# calculations for initial and final structures are already done in\n# previous subworkflows and their standard outputs are written into\n# \"vasp_neb_initial.out\" and \"vasp_neb_final.out\" files respectively.\n# These outputs are here copied into initial (00) and final (0N)\n# directories to calculate the reaction energy profile.\n# ------------------------------------------------------------------ #\n\n{% raw %}\ncd {{ JOB_WORK_DIR }}\n{% endraw %}\n\n# Prepare First Directory\nmkdir -p 00\ncat > 00/POSCAR < 0{{ input.INTERMEDIATE_IMAGES.length + 1 }}/POSCAR < 0{{ loop.index }}/POSCAR < 00/POSCAR < 01/POSCAR < avoid substituion below #}\n{% raw %}\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n{% endraw %}\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","contextProviders":[],"executableName":"python","name":"espresso_xml_get_qpt_irr.py","rendered":"# ---------------------------------------------------------- #\n# #\n# This script extracts q-points and irreducible #\n# representations from Quantum ESPRESSO xml data. #\n# #\n# Expects control_ph.xml and patterns.?.xml files to exist #\n# #\n# ---------------------------------------------------------- #\nfrom __future__ import print_function\n\nimport json\nfrom xml.dom import minidom\n\n\n\nCONTROL_PH_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/control_ph.xml\"\nPATTERNS_FILENAME = \"{{JOB_WORK_DIR}}/outdir/_ph0/__prefix__.phsave/patterns.{}.xml\"\n\n\n# get integer content of an xml tag in a document\ndef get_int_by_tag_name(doc, tag_name):\n element = doc.getElementsByTagName(tag_name)\n return int(element[0].firstChild.nodeValue)\n\nvalues = []\n\n# get number of q-points and cycle through them\nxmldoc = minidom.parse(CONTROL_PH_FILENAME)\nnumber_of_qpoints = get_int_by_tag_name(xmldoc, \"NUMBER_OF_Q_POINTS\")\n\nfor i in range(number_of_qpoints):\n # get number of irreducible representations per qpoint\n xmldoc = minidom.parse(PATTERNS_FILENAME.format(i+1))\n number_of_irr_per_qpoint = get_int_by_tag_name(xmldoc, \"NUMBER_IRR_REP\")\n # add each distinct combination of qpoint and irr as a separate entry\n for j in range(number_of_irr_per_qpoint):\n values.append({\n \"qpoint\": i + 1,\n \"irr\": j + 1\n })\n\n# store final values in standard output (STDOUT)\nprint(json.dumps(values, indent=4))\n","schemaVersion":"2022.8.16"}]},{"name":"assignment","type":"assignment","operand":"Q_POINTS","value":"json.loads(STDOUT)","input":[{"scope":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","name":"STDOUT"}],"status":"idle","statusTrack":[],"flowchartId":"d0fd8654-2106-546b-8792-7bb46272befc","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","name":"reduce","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["phonon_dos","phonon_dispersions"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"ph_grid_restart","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb206177-a4af-599a-81ba-6c88d24253b6","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_grid_restart.in"}],"monitors":["standard_output"],"results":[],"name":"ph_grid_restart","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n fildyn = 'dyn'\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_grid_restart.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18,\n recover = .true.\n ldisp = .true.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n fildyn = 'dyn'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}],"next":"3b4507a7-9244-540b-abe0-66bceab700f5"},{"type":"execution","name":"q2r","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"3b4507a7-9244-540b-abe0-66bceab700f5","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"q2r.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"q2r.x","input":[{"name":"q2r.in"}],"monitors":["standard_output"],"results":[],"name":"q2r","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","contextProviders":[],"executableName":"q2r.x","name":"q2r.in","rendered":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","schemaVersion":"2022.8.16"}],"next":"8fe6a24b-c994-55a2-a448-88657292e8c2"},{"type":"execution","name":"matdyn_grid","head":false,"results":[{"name":"phonon_dos"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8fe6a24b-c994-55a2-a448-88657292e8c2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_grid.in"}],"monitors":["standard_output"],"results":["phonon_dos"],"name":"matdyn_grid","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n {% for d in igrid.dimensions -%}\n nk{{loop.index}} = {{d}}\n {% endfor %}\n /\n","contextProviders":[{"name":"IGridFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_grid.in","rendered":"&INPUT\n asr = 'simple'\n flfrc = 'force_constants.fc'\n flfrq = 'frequencies.freq'\n dos = .true.\n fldos = 'phonon_dos.out'\n deltaE = 1.d0\n nk1 = 3\n nk2 = 3\n nk3 = 3\n \n /\n","schemaVersion":"2022.8.16"}],"next":"a7fded20-889b-54fc-bbb0-456e82689ab1"},{"type":"execution","name":"matdyn_path","head":false,"results":[{"name":"phonon_dispersions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"a7fded20-889b-54fc-bbb0-456e82689ab1","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"matdyn.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"matdyn.x","input":[{"name":"matdyn_path.in"}],"monitors":["standard_output"],"results":["phonon_dispersions"],"name":"matdyn_path","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n{{ipath.length}}\n{% for point in ipath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"IPathFormDataManager"}],"executableName":"matdyn.x","name":"matdyn_path.in","rendered":"&INPUT\n asr = 'simple'\n flfrc ='force_constants.fc'\n flfrq ='frequencies.freq'\n flvec ='normal_modes.out'\n q_in_band_form = .true.\n /\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Preliminary SCF Calculation","type":"subworkflow","_id":"79f2cb6a-7994-5369-8c85-af07c55ad26f","status":"idle","statusTrack":[],"flowchartId":"b6a2b27a-0fec-5e0e-8974-073ee9d2ad83","tags":[],"head":true,"next":"4bb74dfb-46a6-5bf4-a477-5d374dc2e271"},{"name":"ph-init-qpoints","type":"subworkflow","_id":"2f017bcb-f4ba-55b8-b939-1f780679a88e","status":"idle","statusTrack":[],"flowchartId":"4bb74dfb-46a6-5bf4-a477-5d374dc2e271","tags":[],"head":false,"next":"9894b91f-6e97-5ee6-af02-0bef26bd62c0"},{"name":"espresso-xml-get-qpt-irr","type":"subworkflow","_id":"e4b6b2e7-7d8f-5ae1-b6bd-ee81ecbca11a","status":"idle","statusTrack":[],"flowchartId":"9894b91f-6e97-5ee6-af02-0bef26bd62c0","tags":[],"head":false,"next":"24e3c1f0-8090-512e-9727-8770071d17c8"},{"name":"map","type":"map","workflowId":"731d3397-3278-516a-b28e-53626ef50f0a","input":{"target":"MAP_DATA","scope":"global","name":"Q_POINTS","values":[],"useValues":false},"status":"idle","statusTrack":[],"flowchartId":"24e3c1f0-8090-512e-9727-8770071d17c8","tags":[],"head":false,"next":"55a9e9fb-3545-5c4b-a1bb-b64a899b78c6"},{"name":"reduce","type":"subworkflow","_id":"545a66e2-dfbe-513e-acaf-d79d0d139b9c","status":"idle","statusTrack":[],"flowchartId":"55a9e9fb-3545-5c4b-a1bb-b64a899b78c6","tags":[],"head":false}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"23b9058b-884c-52d4-82a8-ee162b9761e0","workflows":[{"name":"pre-processor","subworkflows":[{"_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","name":"pre-processor","application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_link_outdir_save.sh"}],"monitors":["standard_output"],"name":"espresso_link_outdir_save","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_link_outdir_save.sh","rendered":"\n#!/bin/bash\n\nmkdir -p {{ JOB_SCRATCH_DIR }}/outdir/_ph0\ncd {{ JOB_SCRATCH_DIR }}/outdir\ncp -r {{ JOB_WORK_DIR }}/../outdir/__prefix__.* .\n\n","schemaVersion":"2022.8.16"}]}]},{"_id":"e68db280-8636-53e3-81a0-88396ba6147d","name":"ph-single-irr-qpt","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"ph_single_irr_qpt","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"8db9af08-d935-57a0-a824-e7db6d936de8","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_single_irr_qpt.in"}],"monitors":["standard_output"],"results":[],"name":"ph_single_irr_qpt","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n {% raw %}\n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n {% endraw %}\n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_SCRATCH_DIR }}/outdir'{% endraw %}\n {% for d in qgrid.dimensions -%}\n nq{{loop.index}} = {{d}}\n {% endfor %}\n/\n","contextProviders":[{"name":"QGridFormDataManager"}],"executableName":"ph.x","name":"ph_single_irr_qpt.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-18\n ldisp = .true.\n \n start_q = {{MAP_DATA.qpoint}}\n last_q = {{MAP_DATA.qpoint}}\n start_irr = {{MAP_DATA.irr}}\n last_irr= {{MAP_DATA.irr}}\n \n recover = .true.\n fildyn = 'dyn'\n prefix = '__prefix__'\n outdir = '{{ JOB_SCRATCH_DIR }}/outdir'\n nq1 = 1\n nq2 = 1\n nq3 = 1\n \n/\n","schemaVersion":"2022.8.16"}]}]},{"_id":"7239fc3a-b343-513f-af35-e8687e1829da","name":"post-processor","application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"espresso_collect_dynmat.sh"}],"monitors":["standard_output"],"name":"espresso_collect_dynmat","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"{% raw %}\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n{% endraw %}\n","contextProviders":[],"executableName":"sh","name":"espresso_collect_dynmat.sh","rendered":"\n#!/bin/bash\n\ncp {{ JOB_SCRATCH_DIR }}/outdir/_ph0/__prefix__.phsave/dynmat* {{ JOB_WORK_DIR }}/../outdir/_ph0/__prefix__.phsave\n\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"pre-processor","type":"subworkflow","_id":"03f3a8a3-1fd0-5007-925f-fba78be63a51","status":"idle","statusTrack":[],"flowchartId":"e9a790f4-dec6-52c1-b951-014f0ff01cb4","tags":[],"head":true,"next":"c2195045-7a5c-54d3-ab88-211c82de09f1"},{"name":"ph-single-irr-qpt","type":"subworkflow","_id":"e68db280-8636-53e3-81a0-88396ba6147d","status":"idle","statusTrack":[],"flowchartId":"c2195045-7a5c-54d3-ab88-211c82de09f1","tags":[],"head":false,"next":"e483c7fb-2a29-5e91-819a-7465ead70134"},{"name":"post-processor","type":"subworkflow","_id":"7239fc3a-b343-513f-af35-e8687e1829da","status":"idle","statusTrack":[],"flowchartId":"e483c7fb-2a29-5e91-819a-7465ead70134","tags":[],"head":false}],"properties":[],"_id":"731d3397-3278-516a-b28e-53626ef50f0a","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"compute":{"ppn":1,"nodes":1,"queue":"D","timeLimit":"01:00:00","notify":"n","cluster":{"fqdn":""}}}],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"espresso"}},"espresso/recalculate_bands.json":{"name":"Recalculate Bands","subworkflows":[{"_id":"64551dfb-e529-5d8d-9092-ff268f4da134","name":"Recalculate Bands","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_bands","head":true,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"d618df45-5af3-5da5-8882-d74a27e00b04","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2"},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Recalculate Bands","type":"subworkflow","_id":"64551dfb-e529-5d8d-9092-ff268f4da134","status":"idle","statusTrack":[],"flowchartId":"e8b72a45-765e-565f-ab17-c91a21aec09d","tags":[],"head":true}],"properties":["band_structure"],"_id":"42b2b964-8ccc-5b36-9e33-41a954abc2ba","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"espresso"}},"espresso/surface_energy.json":{"name":"Surface Energy","subworkflows":[{"_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","name":"Surface Energy","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"io-slab","type":"io","subtype":"input","head":true,"results":[],"monitors":[],"flowchartId":"e463ef46-a36e-5168-87dd-e21eb980dfb8","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"materials","endpoint_options":{"params":{"query":"{'_id': MATERIAL_ID}","projection":"{}"}},"name":"DATA"}],"next":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"slab","type":"assignment","operand":"SLAB","value":"DATA[0]","input":[{"name":"DATA","scope":"e463ef46-a36e-5168-87dd-e21eb980dfb8"}],"head":false,"results":[],"monitors":[],"flowchartId":"ee7abb4e-7848-5aeb-960d-0d441909e2d1","preProcessors":[],"postProcessors":[],"next":"44263820-0c80-5bd1-b854-9da8d198eac1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"io-bulk","type":"io","subtype":"input","head":false,"results":[],"monitors":[],"flowchartId":"44263820-0c80-5bd1-b854-9da8d198eac1","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"materials","endpoint_options":{"params":{"query":"{'_id': SLAB.metadata.bulkId}","projection":"{}"}},"name":"DATA"}],"next":"b70656f1-a394-57f4-b4de-00096969df4b","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"bulk","type":"assignment","operand":"BULK","value":"DATA[0] if DATA else None","input":[{"name":"DATA","scope":"44263820-0c80-5bd1-b854-9da8d198eac1"}],"head":false,"results":[],"monitors":[],"flowchartId":"b70656f1-a394-57f4-b4de-00096969df4b","preProcessors":[],"postProcessors":[],"next":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"assert-bulk","type":"assertion","statement":"BULK != None","errorMessage":"Bulk material does not exist!","head":false,"results":[],"monitors":[],"flowchartId":"6ca4006a-e3ae-56ea-91a1-06b9790b5f7e","preProcessors":[],"postProcessors":[],"next":"490635e0-c593-5809-9eb2-c794b96cfed1","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"io-e-bulk","type":"io","subtype":"input","head":false,"results":[],"monitors":[],"flowchartId":"490635e0-c593-5809-9eb2-c794b96cfed1","preProcessors":[],"postProcessors":[],"source":"api","input":[{"endpoint":"refined-properties","endpoint_options":{"params":{"query":"{ 'exabyteId': BULK.exabyteId, 'data.name': 'total_energy', 'group': {'$regex': ''.join((SUBWORKFLOW.application.shortName, ':'))} }","projection":"{'sort': {'precision.value': -1}, 'limit': 1}"}},"name":"DATA"}],"next":"bbe13b97-4243-5a85-8f61-a279d0b797aa","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"e-bulk","type":"assignment","operand":"E_BULK","value":"DATA[0].data.value if DATA else None","input":[{"name":"DATA","scope":"490635e0-c593-5809-9eb2-c794b96cfed1"}],"head":false,"results":[],"monitors":[],"flowchartId":"bbe13b97-4243-5a85-8f61-a279d0b797aa","preProcessors":[],"postProcessors":[],"next":"a06c9f43-7670-5fd0-ac42-7028a472235a","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"assert-e-bulk","type":"assertion","statement":"E_BULK != None","errorMessage":"E_BULK does not exist!","head":false,"results":[],"monitors":[],"flowchartId":"a06c9f43-7670-5fd0-ac42-7028a472235a","preProcessors":[],"postProcessors":[],"next":"cdf210be-26ed-585a-b4ac-d55795ba2975","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"surface","type":"assignment","operand":"A","value":"np.linalg.norm(np.cross(SLAB.lattice.vectors.a, SLAB.lattice.vectors.b))","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"cdf210be-26ed-585a-b4ac-d55795ba2975","preProcessors":[],"postProcessors":[],"next":"ffa8e43d-096a-555b-b8d0-6d283365ef47","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"n-bulk","type":"assignment","operand":"N_BULK","value":"len(BULK.basis.elements)","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"ffa8e43d-096a-555b-b8d0-6d283365ef47","preProcessors":[],"postProcessors":[],"next":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"n-slab","type":"assignment","operand":"N_SLAB","value":"len(SLAB.basis.elements)","input":[],"head":false,"results":[],"monitors":[],"flowchartId":"a0336ec5-a6da-5e4c-bb48-82b70cf5245f","preProcessors":[],"postProcessors":[],"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"fcd88119-817c-5ac1-a430-ba892ac743eb"},{"name":"e-slab","type":"assignment","operand":"E_SLAB","value":"total_energy","input":[{"name":"total_energy","scope":"9fc7a088-5533-5f70-bb33-f676ec65f565"}],"head":false,"results":[],"monitors":[],"flowchartId":"fcd88119-817c-5ac1-a430-ba892ac743eb","preProcessors":[],"postProcessors":[],"next":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]},{"name":"surface-energy","type":"assignment","operand":"SURFACE_ENERGY","value":"1 / (2 * A) * (E_SLAB - E_BULK * (N_SLAB/N_BULK))","input":[],"head":false,"results":[{"name":"surface_energy"}],"monitors":[],"flowchartId":"542ea9ad-8a07-5a76-b233-f72fb27c4fc6","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[]}]}],"units":[{"name":"Surface Energy","type":"subworkflow","_id":"3e05a2b5-4171-54a2-9d2d-9e46118a56bf","status":"idle","statusTrack":[],"flowchartId":"d81dc9ce-bb50-5bc6-af1d-e5ede03bb0a6","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","surface_energy","total_energy","total_energy_contributions","total_force"],"_id":"68512987-de73-5614-bab2-0f8b575cffa3","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"espresso"}},"espresso/total_energy.json":{"name":"Total Energy","subworkflows":[{"_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","name":"Total Energy","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Total Energy","type":"subworkflow","_id":"a16677f9-bb5b-54b5-9f97-c2af8c073184","status":"idle","statusTrack":[],"flowchartId":"6059d61a-6a92-5657-9130-02208639aff8","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"4e36ca25-fa46-5628-a227-27d22dea8553","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"tags":["default"],"application":{"name":"espresso"}},"espresso/valence_band_offset.json":{"name":"Valence Band Offset (2D)","subworkflows":[{"isMultiMaterial":true,"_id":"9c65d03e-6a30-58f3-947a-f174342be0c3","name":"BS + Avg ESP (Interface)","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Set Material Index (Interface)","type":"assignment","operand":"MATERIAL_INDEX","value":"0","input":[],"status":"idle","statusTrack":[],"flowchartId":"0f21d8c4-ab32-53ba-b40d-fc9b6608e1b9","tags":[],"head":true,"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-calculate-band-gap"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-calculate-band-gap","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"a667d9fd-35d5-5897-be0e-fa0247233649"},{"name":"Select indirect band gap","type":"assignment","operand":"BAND_GAP_INDIRECT","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]","input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap"}],"status":"idle","statusTrack":[],"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","tags":[],"head":false,"next":"08819369-b541-5b51-8a40-0ee135039482","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Set Valence Band Maximum","type":"assignment","operand":"VBM","value":"BAND_GAP_INDIRECT['eigenvalueValence']","input":[],"status":"idle","statusTrack":[],"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","tags":[],"head":false,"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde"},{"type":"execution","name":"Electrostatic Potential (ESP)","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"monitors":["standard_output"],"results":[],"name":"pp_electrostatic_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"next":"average-electrostatic-potential"},{"type":"execution","name":"average ESP","head":false,"results":[{"name":"average_potential_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"average-electrostatic-potential","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"monitors":["standard_output"],"results":["average_potential_profile"],"name":"average_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"next":"c6c11873-91d7-5422-8302-3dcc1ce971e9"},{"name":"Set Macroscopically Averaged ESP Data","type":"assignment","operand":"array_from_context","value":"average_potential_profile['yDataSeries'][1]","input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential"}],"status":"idle","statusTrack":[],"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},{"_id":"ce26adc1-6a26-53ef-9626-5eb6a6b9ccb7","name":"Find ESP Values (Interface)","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Find Extrema","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"python-find-extrema","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d"},{"name":"Set Average ESP Value","type":"assignment","operand":"AVG_ESP_INTERFACE","value":"json.loads(STDOUT)['minima']","input":[{"name":"STDOUT","scope":"python-find-extrema"}],"status":"idle","statusTrack":[],"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"isMultiMaterial":true,"_id":"ba46d9b4-610f-537e-ae39-e39ce5240cda","name":"BS + Avg ESP (interface left)","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Set Material Index (Interface left)","type":"assignment","operand":"MATERIAL_INDEX","value":"1","input":[],"status":"idle","statusTrack":[],"flowchartId":"0bd31760-f6e4-5826-b282-882c06c97f94","tags":[],"head":true,"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-calculate-band-gap-left"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-calculate-band-gap-left","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"a667d9fd-35d5-5897-be0e-fa0247233649"},{"name":"Select indirect band gap","type":"assignment","operand":"BAND_GAP_INDIRECT","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]","input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap-left"}],"status":"idle","statusTrack":[],"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","tags":[],"head":false,"next":"08819369-b541-5b51-8a40-0ee135039482","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Set Valence Band Maximum","type":"assignment","operand":"VBM_LEFT","value":"BAND_GAP_INDIRECT['eigenvalueValence']","input":[],"status":"idle","statusTrack":[],"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","tags":[],"head":false,"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde"},{"type":"execution","name":"Electrostatic Potential (ESP)","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"monitors":["standard_output"],"results":[],"name":"pp_electrostatic_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"next":"average-electrostatic-potential-left"},{"type":"execution","name":"average ESP","head":false,"results":[{"name":"average_potential_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"average-electrostatic-potential-left","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"monitors":["standard_output"],"results":["average_potential_profile"],"name":"average_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"next":"c6c11873-91d7-5422-8302-3dcc1ce971e9"},{"name":"Set Macroscopically Averaged ESP Data","type":"assignment","operand":"array_from_context","value":"average_potential_profile['yDataSeries'][1]","input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential-left"}],"status":"idle","statusTrack":[],"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},{"_id":"6c303926-905c-5749-81d5-2d2964fdf09a","name":"Find ESP Value (Interface left)","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Find Extrema","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"python-find-extrema-left","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d"},{"name":"Set Average ESP Value","type":"assignment","operand":"AVG_ESP_LEFT","value":"json.loads(STDOUT)['minima']","input":[{"name":"STDOUT","scope":"python-find-extrema-left"}],"status":"idle","statusTrack":[],"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"isMultiMaterial":true,"_id":"aa611fe8-1e6a-5e5c-976a-f64bfaaaace9","name":"BS + Avg ESP (interface right)","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_gaps","average_potential_profile"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Set Material Index (Interface right)","type":"assignment","operand":"MATERIAL_INDEX","value":"2","input":[],"status":"idle","statusTrack":[],"flowchartId":"a05809d1-cc0d-5a0b-bf5e-d43b90a6ac4b","tags":[],"head":true,"next":"9fc7a088-5533-5f70-bb33-f676ec65f565","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"pw_scf","head":false,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-calculate-band-gap-right"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_gaps"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-calculate-band-gap-right","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"a667d9fd-35d5-5897-be0e-fa0247233649"},{"name":"Select indirect band gap","type":"assignment","operand":"BAND_GAP_INDIRECT","value":"[bandgap for bandgap in band_gaps['values'] if bandgap['type'] == 'indirect'][0]","input":[{"name":"band_gaps","scope":"pw-bands-calculate-band-gap-right"}],"status":"idle","statusTrack":[],"flowchartId":"a667d9fd-35d5-5897-be0e-fa0247233649","tags":[],"head":false,"next":"08819369-b541-5b51-8a40-0ee135039482","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"Set Valence Band Maximum","type":"assignment","operand":"VBM_RIGHT","value":"BAND_GAP_INDIRECT['eigenvalueValence']","input":[],"status":"idle","statusTrack":[],"flowchartId":"08819369-b541-5b51-8a40-0ee135039482","tags":[],"head":false,"next":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"type":"execution","name":"bands","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"771fbb40-ea80-5ba4-ae3f-6cd9a56c26e2","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"bands.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"bands.x","input":[{"name":"bands.in"}],"monitors":["standard_output"],"name":"bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&BANDS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n filband = {% raw %}'{{ JOB_WORK_DIR }}/bands.dat'{% endraw %}\n no_overlap = .true.\n/\n","contextProviders":[],"executableName":"bands.x","name":"bands.in","rendered":"&BANDS\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n filband = '{{ JOB_WORK_DIR }}/bands.dat'\n no_overlap = .true.\n/\n","schemaVersion":"2022.8.16"}],"next":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde"},{"type":"execution","name":"Electrostatic Potential (ESP)","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9ed927b1-3d84-5730-a6a8-1b1cfba39bde","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_electrostatic_potential.in"}],"monitors":["standard_output"],"results":[],"name":"pp_electrostatic_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_electrostatic_potential.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","schemaVersion":"2022.8.16"}],"next":"average-electrostatic-potential-right"},{"type":"execution","name":"average ESP","head":false,"results":[{"name":"average_potential_profile"}],"monitors":[{"name":"standard_output"}],"flowchartId":"average-electrostatic-potential-right","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"average.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"average.x","input":[{"name":"average.in"}],"monitors":["standard_output"],"results":["average_potential_profile"],"name":"average_potential","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","contextProviders":[],"executableName":"average.x","name":"average.in","rendered":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","schemaVersion":"2022.8.16"}],"next":"c6c11873-91d7-5422-8302-3dcc1ce971e9"},{"name":"Set Macroscopically Averaged ESP Data","type":"assignment","operand":"array_from_context","value":"average_potential_profile['yDataSeries'][1]","input":[{"name":"average_potential_profile","scope":"average-electrostatic-potential-right"}],"status":"idle","statusTrack":[],"flowchartId":"c6c11873-91d7-5422-8302-3dcc1ce971e9","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},{"_id":"736295e8-2ee0-5974-83bc-362061ac0688","name":"Find ESP Value (Interface right)","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Find Extrema","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"python-find-extrema-right","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"find_extrema.py","templateName":"find_extrema.py"},{"name":"requirements.txt","templateName":"processing_requirements.txt"}],"monitors":["standard_output"],"name":"generic:processing:find_extrema:scipy","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\n{% raw %}Y = np.array({{array_from_context}}){% endraw %}\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"find_extrema.py","rendered":"# ----------------------------------------------------------- #\n# This script aims to determine extrema for a given array. #\n# Please adjust the parameters according to your data. #\n# Note: This template expects the array to be defined in the #\n# context as 'array_from_context' (see details below). #\n# ----------------------------------------------------------- #\nimport json\n\nimport numpy as np\nfrom munch import Munch\nfrom scipy.signal import find_peaks\n\n# Data From Context\n# -----------------\n# The array 'array_from_context' is a 1D list (float or int) that has to be defined in\n# a preceding assignment unit in order to be extracted from the context.\n# Example: [0.0, 1.0, 4.0, 3.0]\n# Upon rendering the following Jinja template the extracted array will be inserted.\nY = np.array({{array_from_context}})\n\n# Settings\n# --------\nprominence = 0.3 # required prominence in the unit of the data array\n\n# Find Extrema\n# ------------\nmax_indices, _ = find_peaks(Y, prominence=prominence)\nmin_indices, _ = find_peaks(-1 * Y, prominence=prominence)\n\nresult = {\n \"maxima\": Y[max_indices].tolist(),\n \"minima\": Y[min_indices].tolist(),\n}\n\n# print final values to standard output (STDOUT),\n# so that they can be read by a subsequent assignment unit (using value=STDOUT)\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\n\nmunch==2.5.0\nnumpy>=1.19.5\nscipy>=1.5.4\nmatplotlib>=3.0.0\n","schemaVersion":"2022.8.16"}],"next":"8fce780b-5555-5b73-b3d1-1bb24a4c759d"},{"name":"Set Average ESP Value","type":"assignment","operand":"AVG_ESP_RIGHT","value":"json.loads(STDOUT)['minima']","input":[{"name":"STDOUT","scope":"python-find-extrema-right"}],"status":"idle","statusTrack":[],"flowchartId":"8fce780b-5555-5b73-b3d1-1bb24a4c759d","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","name":"Calculate VBO","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":["valence_band_offset"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Difference of valence band maxima","type":"assignment","operand":"VBM_DIFF","value":"VBM_LEFT - VBM_RIGHT","input":[],"status":"idle","statusTrack":[],"flowchartId":"bd4eaa98-b001-5694-87ef-ec77540502ab","tags":[],"head":true,"next":"2626f7bb-d392-5fd4-ab71-329b508de347","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Difference of macroscopically averaged ESP in bulk","type":"assignment","operand":"AVG_ESP_DIFF","value":"AVG_ESP_LEFT[0] - AVG_ESP_RIGHT[0]","input":[],"status":"idle","statusTrack":[],"flowchartId":"2626f7bb-d392-5fd4-ab71-329b508de347","tags":[],"head":false,"next":"b7307787-53e2-599b-ad12-d627b04074b4","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Lineup of macroscopically averaged ESP in interface","type":"assignment","operand":"ESP_LINEUP","value":"np.abs(AVG_ESP_INTERFACE[0] - AVG_ESP_INTERFACE[1])","input":[],"status":"idle","statusTrack":[],"flowchartId":"b7307787-53e2-599b-ad12-d627b04074b4","tags":[],"head":false,"next":"197f4b4d-cb7b-57be-a885-d44cb1f61905","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Valence Band Offset","type":"assignment","operand":"VALENCE_BAND_OFFSET","value":"abs(VBM_DIFF - AVG_ESP_DIFF + (np.sign(AVG_ESP_DIFF) * ESP_LINEUP))","input":[],"results":[{"name":"valence_band_offset"}],"status":"idle","statusTrack":[],"flowchartId":"197f4b4d-cb7b-57be-a885-d44cb1f61905","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]}],"units":[{"name":"BS + Avg ESP (Interface)","type":"subworkflow","_id":"9c65d03e-6a30-58f3-947a-f174342be0c3","status":"idle","statusTrack":[],"flowchartId":"fd622b5c-5c02-594e-b582-b245c17ca9a4","tags":[],"head":true,"next":"ad3b1e4c-5965-5605-a067-dd0c59907c4b"},{"name":"Find ESP Values (Interface)","type":"subworkflow","_id":"ce26adc1-6a26-53ef-9626-5eb6a6b9ccb7","status":"idle","statusTrack":[],"flowchartId":"ad3b1e4c-5965-5605-a067-dd0c59907c4b","tags":[],"head":false,"next":"8d5b4734-edfd-55cc-ad80-aaa72487398d"},{"name":"BS + Avg ESP (interface left)","type":"subworkflow","_id":"ba46d9b4-610f-537e-ae39-e39ce5240cda","status":"idle","statusTrack":[],"flowchartId":"8d5b4734-edfd-55cc-ad80-aaa72487398d","tags":[],"head":false,"next":"102ec582-5b75-52f5-8b39-19ca725ed47a"},{"name":"Find ESP Value (Interface left)","type":"subworkflow","_id":"6c303926-905c-5749-81d5-2d2964fdf09a","status":"idle","statusTrack":[],"flowchartId":"102ec582-5b75-52f5-8b39-19ca725ed47a","tags":[],"head":false,"next":"603c45db-93aa-54ce-a7fe-6e9b65b0037d"},{"name":"BS + Avg ESP (interface right)","type":"subworkflow","_id":"aa611fe8-1e6a-5e5c-976a-f64bfaaaace9","status":"idle","statusTrack":[],"flowchartId":"603c45db-93aa-54ce-a7fe-6e9b65b0037d","tags":[],"head":false,"next":"e3444d35-cc41-59f5-8481-78d0c383b84e"},{"name":"Find ESP Value (Interface right)","type":"subworkflow","_id":"736295e8-2ee0-5974-83bc-362061ac0688","status":"idle","statusTrack":[],"flowchartId":"e3444d35-cc41-59f5-8481-78d0c383b84e","tags":[],"head":false,"next":"0e0b141a-39ca-52bc-9094-e5f96dc72f39"},{"name":"Calculate VBO","type":"subworkflow","_id":"1b70e606-a7ee-599e-89e0-91a7dc5faa4a","status":"idle","statusTrack":[],"flowchartId":"0e0b141a-39ca-52bc-9094-e5f96dc72f39","tags":[],"head":false}],"properties":["atomic_forces","average_potential_profile","band_gaps","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"d8e08cac-7747-50aa-b925-41f214d722c6","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"espresso"}},"espresso/variable_cell_relaxation.json":{"name":"Variable-cell Relaxation","subworkflows":[{"systemName":"espresso-variable-cell-relaxation","_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","name":"Variable-cell Relaxation","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_vc-relax","head":true,"results":[{"name":"total_energy"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"},{"name":"final_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"flowchartId":"e1bd0870-6245-5fc2-a50d-48cabc356ac8","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_vc_relax.in"}],"monitors":["standard_output","convergence_electronic","convergence_ionic"],"results":["total_energy","fermi_energy","pressure","atomic_forces","total_force","stress_tensor","final_structure"],"name":"pw_vc-relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_vc_relax.in","rendered":"&CONTROL\n calculation = 'vc-relax'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Variable-cell Relaxation","type":"subworkflow","_id":"58709c44-47f6-5fbf-bf2e-358b9d98f75d","status":"idle","statusTrack":[],"flowchartId":"8f6e9590-6a87-584b-abd7-1fb98253054c","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","final_structure","pressure","stress_tensor","total_energy","total_force"],"_id":"c45dcef1-d16b-59d1-9318-cedd0b1acf08","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"tags":["variable-cell_relaxation"],"application":{"name":"espresso"}},"espresso/wavefunction_plot.json":{"name":"Wavefunction Plot","subworkflows":[{"_id":"109ac366-8f6d-56d5-9b45-6f665f13a511","name":"Total Energy with Bands","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"pw-scf-total-energy","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"pw-bands-total-energy"},{"type":"execution","name":"pw_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"}],"flowchartId":"pw-bands-total-energy","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_bands.in"}],"monitors":["standard_output"],"results":["band_structure"],"name":"pw_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = '{{input.RESTART_MODE}}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS crystal_b\n{{kpath.length}}\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_bands.in","rendered":"&CONTROL\n calculation = 'bands'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS crystal_b\n11\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"}],"next":"18a26058-7d37-57ac-a685-335862dbf4db"},{"name":"assignment BS","type":"assignment","operand":"band_structure","value":"band_structure","input":[{"name":"band_structure","scope":"pw-bands-total-energy"}],"status":"idle","statusTrack":[],"flowchartId":"18a26058-7d37-57ac-a685-335862dbf4db","tags":[],"head":false,"next":"7d103bf9-40b8-5f90-8934-bbcb6c7b9802","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}},{"name":"assignment FE","type":"assignment","operand":"fermi_energy","value":"fermi_energy","input":[{"name":"fermi_energy","scope":"pw-scf-total-energy"}],"status":"idle","statusTrack":[],"flowchartId":"7d103bf9-40b8-5f90-8934-bbcb6c7b9802","tags":[],"head":false,"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"}}]},{"unitConfigs":[{"index":0,"type":"executionBuilder","config":{"attributes":{"input":[{"name":"band_structure","scope":"total_energy_with_bands"},{"name":"fermi_energy","scope":"total_energy_with_bands"}]}}},{"index":3,"type":"assignment","config":{"attributes":{"input":[{"name":"KBAND_VALUE_BELOW_EF"},{"name":"KBAND_VALUE_ABOVE_EF"}]}}}],"_id":"1bb75a6a-4c8c-5336-a24c-1963e83825bc","name":"Extract Bands Near Fermi","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"extract_bands_fermi","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"extract-band-fermi","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"extract_bands_fermi.py"},{"name":"requirements.txt","templateName":"requirements_bands_fermi.txt"}],"monitors":["standard_output"],"name":"extract_bands_fermi","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\n{% raw %}fermi_energy_value = {{ fermi_energy }}{% endraw %}\n{% raw %}band_structure_data = {{ band_structure }}{% endraw %}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","contextProviders":[],"executableName":"python","name":"extract_bands_fermi.py","rendered":"# ---------------------------------------------------------------- #\n# Extract band indices near Fermi energy from band_structure #\n# This script expects fermi_energy and band_structure results #\n# ---------------------------------------------------------------- #\nimport json\n\nfrom munch import Munch\n\n# Data From Context\n# -----------------\n# fermi_energy: float (in eV) - from pw_scf result\n# band_structure: Munch object with band energies - from pw_bands result\n\nfermi_energy_value = {{ fermi_energy }}\nband_structure_data = {{ band_structure }}\n\n# Extract band energies at Gamma point (first k-point)\n# band_structure format from QE parser:\n# {\n# \"name\": \"band_structure\",\n# \"xDataArray\": [[kx, ky, kz], ...], # k-points\n# \"yDataSeries\": [[e1_k1, e1_k2, ...], [e2_k1, e2_k2, ...], ...] # energies per band\n# }\n# yDataSeries[band_index][kpoint_index] = energy\n\n# Get energies at first k-point (Gamma, index 0) for all bands\ny_data = band_structure_data.get('yDataSeries', [])\nband_energies = [band_data[0] for band_data in y_data] if y_data else []\n\n# Find bands near Fermi energy (1-based indices as QE expects)\nvalence_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e <= fermi_energy_value]\nconduction_bands = [(i + 1, e) for i, e in enumerate(band_energies) if e > fermi_energy_value]\n\nif valence_bands:\n valence_index, valence_energy = max(valence_bands, key=lambda x: x[1])\nelse:\n valence_index = 1\n valence_energy = band_energies[0] if band_energies else 0.0\n\nif conduction_bands:\n conduction_index, conduction_energy = min(conduction_bands, key=lambda x: x[1])\nelse:\n conduction_index = len(band_energies)\n conduction_energy = band_energies[-1] if band_energies else 0.0\n\nresult = {\n \"band_below_fermi\": valence_index,\n \"band_above_fermi\": conduction_index,\n \"fermi_energy\": fermi_energy_value,\n \"valence_energy\": valence_energy,\n \"conduction_energy\": conduction_energy,\n \"total_bands\": len(band_energies)\n}\n\n# Print to STDOUT for subsequent assignment unit\nprint(json.dumps(result, indent=4))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for extract_bands_fermi unit #\n# #\n# ------------------------------------------------------------------ #\n\nmunch==2.5.0\n","schemaVersion":"2022.8.16"}],"next":"8771dc7f-878e-5f13-a840-a3a416854f1e"},{"name":"Store Band Below EF","type":"assignment","operand":"KBAND_VALUE_BELOW_EF","value":"json.loads(STDOUT)['band_below_fermi']","input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"status":"idle","statusTrack":[],"flowchartId":"8771dc7f-878e-5f13-a840-a3a416854f1e","tags":[],"head":false,"next":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Store Band Above EF","type":"assignment","operand":"KBAND_VALUE_ABOVE_EF","value":"json.loads(STDOUT)['band_above_fermi']","input":[{"name":"STDOUT","scope":"extract-band-fermi"}],"status":"idle","statusTrack":[],"flowchartId":"91e1328f-39dd-5c24-83f9-d49bfe5c620e","tags":[],"head":false,"next":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Select Band","type":"assignment","operand":"KBAND_VALUE","value":"KBAND_VALUE_BELOW_EF","input":[],"status":"idle","statusTrack":[],"flowchartId":"57a07d7d-3f68-5f31-97ad-ebe8c5593cd2","tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"unitConfigs":[{"index":0,"type":"executionBuilder","config":{"attributes":{"input":[{"name":"KBAND_VALUE","scope":"extract_bands_fermi"}]}}}],"_id":"7edc20aa-d533-57d8-b8a0-1e504ceb19fd","name":"PP Wavefunction","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pp_wfn","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"pp-wfn","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"pp.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"pp.x","input":[{"name":"pp_wfn.in"}],"monitors":["standard_output"],"results":[],"name":"pp_wfn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {% raw %}{{ KBAND_VALUE }}{% endraw %},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n","contextProviders":[],"executableName":"pp.x","name":"pp_wfn.in","rendered":"&INPUTPP\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n plot_num = 7,\n kpoint = 1,\n kband = {{ KBAND_VALUE }},\n lsign = .true.,\n !spin_component = 1\n/\n&PLOT\n iflag = 1, ! 1D line (not 2D plane)\n fileout = 'wf_r.dat',\n output_format = 0, ! gnuplot 1D\n x0(1)=0.0, x0(2)=0.0, x0(3)=0.0, ! line origin (alat units)\n e1(1)=0.0, e1(2)=0.0, e1(3)=1.0, ! direction along z (alat units)\n nx = 200 ! samples along the line\n/\n","schemaVersion":"2022.8.16"}]}]},{"_id":"e4ec581f-1cb3-5036-b698-999a96711559","name":"Plot Wavefunction","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":["potential_profile","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"plot WFN","head":true,"results":[{"name":"potential_profile"},{"name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"57fca898-8e8b-5ef2-81a5-9d2b612bc18d","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"plot_wavefunction.py"},{"name":"requirements.txt","templateName":"requirements_plot_wavefunction.txt"}],"monitors":["standard_output"],"results":["potential_profile","file_content"],"name":"plot_wavefunction","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# Generate wavefunction plot from pp.x output #\n# Outputs potential_profile JSON to STDOUT for platform rendering #\n# Also saves static PNG as fallback #\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\n# Create potential_profile JSON for platform rendering\nwavefunction_data = {\n \"name\": \"potential_profile\",\n \"xAxis\": {\n \"label\": \"Position\",\n \"units\": \"angstrom\"\n },\n \"xDataArray\": z.tolist(),\n \"yAxis\": {\n \"label\": \"Wavefunction Amplitude\",\n \"units\": \"a.u.\"\n },\n \"yDataSeries\": [psi_amplitude.tolist()]\n}\n\n# Print JSON to STDOUT (will be captured as potential_profile result)\nprint(json.dumps(wavefunction_data, indent=2))\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ------------------------------------------------------------------ #\n# #\n# Python package requirements for plot_wavefunction unit #\n# #\n# ------------------------------------------------------------------ #\n\nnumpy<2\nmatplotlib\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Total Energy with Bands","type":"subworkflow","_id":"109ac366-8f6d-56d5-9b45-6f665f13a511","status":"idle","statusTrack":[],"flowchartId":"84f1102e-5cbf-54ce-bc09-48bced817f9f","tags":[],"head":true,"next":"8c691f3c-556e-5f4c-8db4-46d6f08d6c9b"},{"name":"Extract Bands Near Fermi","type":"subworkflow","_id":"1bb75a6a-4c8c-5336-a24c-1963e83825bc","status":"idle","statusTrack":[],"flowchartId":"8c691f3c-556e-5f4c-8db4-46d6f08d6c9b","tags":[],"head":false,"next":"b26bb41f-0237-51db-9e59-16c157c8dd03"},{"name":"PP Wavefunction","type":"subworkflow","_id":"7edc20aa-d533-57d8-b8a0-1e504ceb19fd","status":"idle","statusTrack":[],"flowchartId":"b26bb41f-0237-51db-9e59-16c157c8dd03","tags":[],"head":false,"next":"4ce49281-e731-550e-af66-6d2408db8237"},{"name":"Plot Wavefunction","type":"subworkflow","_id":"e4ec581f-1cb3-5036-b698-999a96711559","status":"idle","statusTrack":[],"flowchartId":"4ce49281-e731-550e-af66-6d2408db8237","tags":[],"head":false}],"properties":["atomic_forces","band_structure","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"9f523214-605f-5eed-8b58-2e2d8fbc18e3","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"tags":["wfn_plot"],"application":{"name":"espresso"}},"espresso/zero_point_energy.json":{"name":"Zero Point Energy","subworkflows":[{"_id":"151538cc-9e71-5269-8b9e-cb5977151227","name":"Zero Point Energy","application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9fc7a088-5533-5f70-bb33-f676ec65f565","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":true,"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["remove_non_zero_weight_kpoints"],"name":"pw.x","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"espresso","executableName":"pw.x","input":[{"name":"pw_scf.in"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw_scf","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"executableName":"pw.x","name":"pw_scf.in","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 \n","schemaVersion":"2022.8.16"}],"next":"107595d1-490f-53a2-8432-7f8a12f14d96"},{"type":"execution","name":"ph_zpe","head":false,"results":[{"name":"zero_point_energy"}],"monitors":[{"name":"standard_output"}],"flowchartId":"107595d1-490f-53a2-8432-7f8a12f14d96","preProcessors":[],"postProcessors":[],"application":{"name":"espresso","shortName":"qe","summary":"Quantum ESPRESSO","build":"GNU","hasAdvancedComputeOptions":true,"isDefault":true,"version":"6.3","schemaVersion":"2022.8.16"},"executable":{"monitors":["standard_output"],"name":"ph.x","schemaVersion":"2022.8.16","isDefault":false},"flavor":{"applicationName":"espresso","executableName":"ph.x","input":[{"name":"ph_gamma.in"}],"monitors":["standard_output"],"results":["zero_point_energy"],"name":"ph_gamma","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"espresso","content":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n/\n0 0 0\n","contextProviders":[],"executableName":"ph.x","name":"ph_gamma.in","rendered":"&INPUTPH\n tr2_ph = 1.0d-12\n asr = .true.\n search_sym = .false.\n prefix = '__prefix__'\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n/\n0 0 0\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Zero Point Energy","type":"subworkflow","_id":"151538cc-9e71-5269-8b9e-cb5977151227","status":"idle","statusTrack":[],"flowchartId":"d906bd20-eb92-5a01-a0e2-c81a2d9b2a41","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy"],"_id":"3158c78d-58bb-5675-8c7f-6f2337061015","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"espresso"}},"nwchem/total_energy.json":{"name":"Total Energy","subworkflows":[{"_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","name":"Total Energy","application":{"name":"nwchem","shortName":"nwchem","summary":"NWChem","build":"GNU","isDefault":true,"version":"7.0.2","schemaVersion":"2022.8.16"},"properties":["total_energy","total_energy_contributions"],"model":{"type":"dft","subtype":"gga","method":{"type":"localorbital","subtype":"pople","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"nwchem_total_energy","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"}],"monitors":[{"name":"standard_output"}],"flowchartId":"6f1eda0b-ebe1-5ccd-92dc-c2e55de5e0c7","preProcessors":[],"postProcessors":[],"application":{"name":"nwchem","shortName":"nwchem","summary":"NWChem","build":"GNU","isDefault":true,"version":"7.0.2","schemaVersion":"2022.8.16"},"executable":{"hasAdvancedComputeOptions":false,"isDefault":true,"monitors":["standard_output"],"postProcessors":["error_handler"],"name":"nwchem","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"nwchem","executableName":"nwchem","input":[{"name":"nwchem_total_energy.inp"}],"isDefault":true,"monitors":["standard_output"],"results":["total_energy","total_energy_contributions"],"name":"nwchem_total_energy","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"nwchem","content":" start nwchem\n title \"Test\"\n charge {{ input.CHARGE }}\n geometry units au noautosym\n {{ input.ATOMIC_POSITIONS }}\n end\n basis\n * library {{ input.BASIS }}\n end\n dft\n xc {{ input.FUNCTIONAL }}\n mult {{ input.MULT }}\n end\n task dft energy\n","contextProviders":[{"name":"NWChemInputDataManager"}],"executableName":"nwchem","name":"nwchem_total_energy.inp","rendered":" start nwchem\n title \"Test\"\n charge 0\n geometry units au noautosym\n Si 0.000000000 0.000000000 0.000000000 \nSi 1.116306745 0.789348070 1.933500000 \n end\n basis\n * library 6-31G\n end\n dft\n xc B3LYP\n mult 1\n end\n task dft energy\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Total Energy","type":"subworkflow","_id":"9e7a15b7-0b7d-5a8e-be7f-b8fcacd5cc13","status":"idle","statusTrack":[],"flowchartId":"6059d61a-6a92-5657-9130-02208639aff8","tags":[],"head":true}],"properties":["total_energy","total_energy_contributions"],"_id":"937fbac8-2dec-5fb1-a46f-b8a0cc3d3d05","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"nwchem"}},"python/ml/classification_workflow.json":{"name":"Python ML Train Classification","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","name":"Set Up the Job","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Set Workflow Mode","type":"assignment","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","value":"False","input":[],"flowchartId":"head-set-predict-status","tags":["pyml:workflow-type-setter"],"status":"idle","statusTrack":[],"head":true,"next":"head-fetch-training-data","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Dataset","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-training-data","input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"source":"object_storage","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-branch-on-predict-status","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Train or Predict?","type":"condition","input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"results":[],"preProcessors":[],"postProcessors":[],"then":"head-fetch-trained-model","else":"end-of-ml-train-head","statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","maxOccurrences":100,"flowchartId":"head-branch-on-predict-status","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-fetch-trained-model","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Trained Model as file","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-trained-model","input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"source":"object_storage","tags":["set-io-unit-filenames"],"status":"idle","statusTrack":[],"head":false,"next":"end-of-ml-train-head","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"End Setup","type":"assignment","operand":"IS_SETUP_COMPLETE","value":"True","input":[],"flowchartId":"end-of-ml-train-head","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:random_forest_classification:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"35436b4a-cd9c-5089-ab42-665c4f9ba049"},{"type":"execution","name":"ROC Curve Plot","head":false,"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:roc_curve:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Set Up the Job","type":"subworkflow","_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","status":"idle","statusTrack":[],"flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","tags":[],"head":true,"next":"90738aae-daac-599f-913f-29fb6acdff00"},{"name":"Machine Learning","type":"subworkflow","_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","status":"idle","statusTrack":[],"flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","tags":[],"head":false}],"properties":[],"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","workflows":[],"isUsingDataset":true,"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"python"}},"python/ml/clustering_workflow.json":{"name":"Python ML Train Clustering","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","name":"Set Up the Job","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Set Workflow Mode","type":"assignment","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","value":"False","input":[],"flowchartId":"head-set-predict-status","tags":["pyml:workflow-type-setter"],"status":"idle","statusTrack":[],"head":true,"next":"head-fetch-training-data","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Dataset","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-training-data","input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"source":"object_storage","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-branch-on-predict-status","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Train or Predict?","type":"condition","input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"results":[],"preProcessors":[],"postProcessors":[],"then":"head-fetch-trained-model","else":"end-of-ml-train-head","statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","maxOccurrences":100,"flowchartId":"head-branch-on-predict-status","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-fetch-trained-model","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Trained Model as file","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-trained-model","input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"source":"object_storage","tags":["set-io-unit-filenames"],"status":"idle","statusTrack":[],"head":false,"next":"end-of-ml-train-head","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"End Setup","type":"assignment","operand":"IS_SETUP_COMPLETE","value":"True","input":[],"flowchartId":"end-of-ml-train-head","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_random_forest_classification_sklearn.py","templateName":"model_random_forest_classification_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:random_forest_classification:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_random_forest_classification_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit for a random forest classification model with #\n# Scikit-Learn. Parameters derived from Scikit-Learn's #\n# defaults. #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the confusion matrix. When #\n# the workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a filee named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.ensemble\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.ensemble.RandomForestClassifier(\n n_estimators=100,\n criterion=\"gini\",\n max_depth=None,\n min_samples_split=2,\n min_samples_leaf=1,\n min_weight_fraction_leaf=0.0,\n max_features=\"auto\",\n max_leaf_nodes=None,\n min_impurity_decrease=0.0,\n bootstrap=True,\n oob_score=False,\n verbose=0,\n class_weight=None,\n ccp_alpha=0.0,\n max_samples=None,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"random_forest\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Save the probabilities of the model\n test_probabilities = model.predict_proba(test_descriptors)\n context.save(test_probabilities, \"test_probabilities\")\n\n # Print some information to the screen for the regression problem\n confusion_matrix = sklearn.metrics.confusion_matrix(test_target, test_predictions)\n print(\"Confusion Matrix:\")\n print(confusion_matrix)\n context.save(confusion_matrix, \"confusion_matrix\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"random_forest\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Transform predictions back to their original labels\n label_encoder: sklearn.preprocessing.LabelEncoder = context.load(\"label_encoder\")\n predictions = label_encoder.inverse_transform(predictions)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"35436b4a-cd9c-5089-ab42-665c4f9ba049"},{"type":"execution","name":"ROC Curve Plot","head":false,"results":[{"basename":"my_roc_plot.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"35436b4a-cd9c-5089-ab42-665c4f9ba049","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_roc_curve_sklearn.py","templateName":"post_processing_roc_curve_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:roc_curve:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_roc_curve_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# ROC Curve Generator #\n# #\n# Computes and displays the Receiver Operating Characteristic #\n# (ROC) curve. This is restricted to binary classification tasks. #\n# #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.collections\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport settings\nimport sklearn.metrics\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n test_target = context.load(\"test_target\").flatten()\n # Slice the first column because Sklearn's ROC curve prefers probabilities for the positive class\n test_probabilities = context.load(\"test_probabilities\")[:, 1]\n\n # Exit if there's more than one label in the predictions\n if len(set(test_target)) > 2:\n exit()\n\n # ROC curve function in sklearn prefers the positive class\n false_positive_rate, true_positive_rate, thresholds = sklearn.metrics.roc_curve(test_target, test_probabilities,\n pos_label=1)\n thresholds[0] -= 1 # Sklearn arbitrarily adds 1 to the first threshold\n roc_auc = np.round(sklearn.metrics.auc(false_positive_rate, true_positive_rate), 3)\n\n # Plot the curve\n fig, ax = plt.subplots()\n points = np.array([false_positive_rate, true_positive_rate]).T.reshape(-1, 1, 2)\n segments = np.concatenate([points[:-1], points[1:]], axis=1)\n norm = plt.Normalize(thresholds.min(), thresholds.max())\n lc = matplotlib.collections.LineCollection(segments, cmap='jet', norm=norm, linewidths=2)\n lc.set_array(thresholds)\n line = ax.add_collection(lc)\n fig.colorbar(line, ax=ax).set_label('Threshold')\n\n # Padding to ensure we see the line\n ax.margins(0.01)\n\n plt.title(f\"ROC curve, AUC={roc_auc}\")\n plt.xlabel(\"False Positive Rate\")\n plt.ylabel(\"True Positive Rate\")\n plt.tight_layout()\n plt.savefig(\"my_roc_curve.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Set Up the Job","type":"subworkflow","_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","status":"idle","statusTrack":[],"flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","tags":[],"head":true,"next":"90738aae-daac-599f-913f-29fb6acdff00"},{"name":"Machine Learning","type":"subworkflow","_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","status":"idle","statusTrack":[],"flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","tags":[],"head":false}],"properties":[],"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","workflows":[],"isUsingDataset":true,"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"python"}},"python/ml/regression_workflow.json":{"name":"Python ML Train Regression","subworkflows":[{"_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","name":"Set Up the Job","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"name":"Set Workflow Mode","type":"assignment","operand":"IS_WORKFLOW_RUNNING_TO_PREDICT","value":"False","input":[],"flowchartId":"head-set-predict-status","tags":["pyml:workflow-type-setter"],"status":"idle","statusTrack":[],"head":true,"next":"head-fetch-training-data","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Dataset","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-training-data","input":[{"basename":"{{DATASET_BASENAME}}","objectData":{"CONTAINER":"","NAME":"{{DATASET_FILEPATH}}","PROVIDER":"","REGION":""}}],"source":"object_storage","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-branch-on-predict-status","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Train or Predict?","type":"condition","input":[{"name":"IS_WORKFLOW_RUNNING_TO_PREDICT","scope":"global"}],"results":[],"preProcessors":[],"postProcessors":[],"then":"head-fetch-trained-model","else":"end-of-ml-train-head","statement":"IS_WORKFLOW_RUNNING_TO_PREDICT","maxOccurrences":100,"flowchartId":"head-branch-on-predict-status","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"head-fetch-trained-model","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"Fetch Trained Model as file","type":"io","subtype":"input","enableRender":true,"flowchartId":"head-fetch-trained-model","input":[{"basename":"","objectData":{"CONTAINER":"","NAME":"","PROVIDER":"","REGION":""}}],"source":"object_storage","tags":["set-io-unit-filenames"],"status":"idle","statusTrack":[],"head":false,"next":"end-of-ml-train-head","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}},{"name":"End Setup","type":"assignment","operand":"IS_SETUP_COMPLETE","value":"True","input":[],"flowchartId":"end-of-ml-train-head","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"}}]},{"_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","name":"Machine Learning","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":["workflow:pyml_predict","file_content"],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"Setup Variables and Packages","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"c3608488-0259-5ff4-8b90-11c6e60d6c85","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"settings.py","templateName":"pyml_settings.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:setup_variables_packages","schemaVersion":"2022.8.16","isDefault":false},"enableRender":true,"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"{{ mlSettings.target_column_name }}\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"{{ mlSettings.problem_category }}\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {% raw %}{{IS_WORKFLOW_RUNNING_TO_PREDICT}}{% endraw %}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\nelse:\n datafile = \"{% raw %}{{DATASET_BASENAME}}{% endraw %}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{% raw %}{{ CONTEXT_DIR_RELATIVE_PATH }}{% endraw %}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","contextProviders":[{"name":"MLSettingsDataManager"}],"executableName":"python","name":"settings.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# General settings for PythonML jobs on the Exabyte.io Platform #\n# #\n# This file generally shouldn't be modified directly by users. #\n# The \"datafile\" and \"is_workflow_running_to_predict\" variables #\n# are defined in the head subworkflow, and are templated into #\n# this file. This helps facilitate the workflow's behavior #\n# differing whether it is in a \"train\" or \"predict\" mode. #\n# #\n# Also in this file is the \"Context\" object, which helps maintain #\n# certain Python objects between workflow units, and between #\n# predict runs. #\n# #\n# Whenever a python object needs to be stored for subsequent runs #\n# (such as in the case of a trained model), context.save() can be #\n# called to save it. The object can then be loaded again by using #\n# context.load(). #\n# ----------------------------------------------------------------- #\n\n\nimport os\nimport pickle\n\n# ==================================================\n# Variables modified in the Important Settings menu\n# ==================================================\n# Variables in this section can (and oftentimes need to) be modified by the user in the \"Important Settings\" tab\n# of a workflow.\n\n# Target_column_name is used during training to identify the variable the model is traing to predict.\n# For example, consider a CSV containing three columns, \"Y\", \"X1\", and \"X2\". If the goal is to train a model\n# that will predict the value of \"Y,\" then target_column_name would be set to \"Y\"\ntarget_column_name = \"target\"\n\n# The type of ML problem being performed. Can be either \"regression\", \"classification,\" or \"clustering.\"\nproblem_category = \"regression\"\n\n# =============================\n# Non user-modifiable variables\n# =============================\n# Variables in this section generally do not need to be modified.\n\n# The problem category, regression or classification or clustering. In regression, the target (predicted) variable\n# is continues. In classification, it is categorical. In clustering, there is no target - a set of labels is\n# automatically generated.\nis_regression = is_classification = is_clustering = False\nif problem_category.lower() == \"regression\":\n is_regression = True\nelif problem_category.lower() == \"classification\":\n is_classification = True\nelif problem_category.lower() == \"clustering\":\n is_clustering = True\nelse:\n raise ValueError(\n \"Variable 'problem_category' must be either 'regression', 'classification', or 'clustering'. Check settings.py\")\n\n# The variables \"is_workflow_running_to_predict\" and \"is_workflow_running_to_train\" are used to control whether\n# the workflow is in a \"training\" mode or a \"prediction\" mode. The \"IS_WORKFLOW_RUNNING_TO_PREDICT\" variable is set by\n# an assignment unit in the \"Set Up the Job\" subworkflow that executes at the start of the job. It is automatically\n# changed when the predict workflow is generated, so users should not need to modify this variable.\nis_workflow_running_to_predict = {{IS_WORKFLOW_RUNNING_TO_PREDICT}}\nis_workflow_running_to_train = not is_workflow_running_to_predict\n\n# Sets the datafile variable. The \"datafile\" is the data that will be read in, and will be used by subsequent\n# workflow units for either training or prediction, depending on the workflow mode.\nif is_workflow_running_to_predict:\n datafile = \"{{DATASET_BASENAME}}\"\nelse:\n datafile = \"{{DATASET_BASENAME}}\"\n\n# The \"Context\" class allows for data to be saved and loaded between units, and between train and predict runs.\n# Variables which have been saved using the \"Save\" method are written to disk, and the predict workflow is automatically\n# configured to obtain these files when it starts.\n#\n# IMPORTANT NOTE: Do *not* adjust the value of \"context_dir_pathname\" in the Context object. If the value is changed, then\n# files will not be correctly copied into the generated predict workflow. This will cause the predict workflow to be\n# generated in a broken state, and it will not be able to make any predictions.\nclass Context(object):\n \"\"\"\n Saves and loads objects from the disk, useful for preserving data between workflow units\n\n Attributes:\n context_paths (dict): Dictionary of the format {variable_name: path}, that governs where\n pickle saves files.\n\n Methods:\n save: Used to save objects to the context directory\n load: Used to load objects from the context directory\n \"\"\"\n\n def __init__(self, context_file_basename=\"workflow_context_file_mapping\"):\n \"\"\"\n Constructor for Context objects\n\n Args:\n context_file_basename (str): Name of the file to store context paths in\n \"\"\"\n\n # Warning: DO NOT modify the context_dir_pathname variable below\n # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n context_dir_pathname = \"{{ CONTEXT_DIR_RELATIVE_PATH }}\"\n # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n self._context_dir_pathname = context_dir_pathname\n self._context_file = os.path.join(context_dir_pathname, context_file_basename)\n\n # Make context dir if it does not exist\n if not os.path.exists(context_dir_pathname):\n os.makedirs(context_dir_pathname)\n\n # Read in the context sources dictionary, if it exists\n if os.path.exists(self._context_file):\n with open(self._context_file, \"rb\") as file_handle:\n self.context_paths: dict = pickle.load(file_handle)\n else:\n # Items is a dictionary of {varname: path}\n self.context_paths = {}\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, traceback):\n self._update_context()\n\n def __contains__(self, item):\n return item in self.context_paths\n\n def _update_context(self):\n with open(self._context_file, \"wb\") as file_handle:\n pickle.dump(self.context_paths, file_handle)\n\n def load(self, name: str):\n \"\"\"\n Returns a contextd object\n\n Args:\n name (str): The name in self.context_paths of the object\n \"\"\"\n path = self.context_paths[name]\n with open(path, \"rb\") as file_handle:\n obj = pickle.load(file_handle)\n return obj\n\n def save(self, obj: object, name: str):\n \"\"\"\n Saves an object to disk using pickle\n\n Args:\n name (str): Friendly name for the object, used for lookup in load() method\n obj (object): Object to store on disk\n \"\"\"\n path = os.path.join(self._context_dir_pathname, f\"{name}.pkl\")\n self.context_paths[name] = path\n with open(path, \"wb\") as file_handle:\n pickle.dump(obj, file_handle)\n self._update_context()\n\n# Generate a context object, so that the \"with settings.context\" can be used by other units in this workflow.\ncontext = Context()\n\nis_using_train_test_split = \"is_using_train_test_split\" in context and (context.load(\"is_using_train_test_split\"))\n\n# Create a Class for a DummyScaler()\nclass DummyScaler:\n \"\"\"\n This class is a 'DummyScaler' which trivially acts on data by returning it unchanged.\n \"\"\"\n\n def fit(self, X):\n return self\n\n def transform(self, X):\n return X\n\n def fit_transform(self, X):\n return X\n\n def inverse_transform(self, X):\n return X\n\nif 'target_scaler' not in context:\n context.save(DummyScaler(), 'target_scaler')\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3"},{"type":"execution","name":"Data Input","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"cb69ea2a-7efc-56b4-8bbe-0de1e70c49e3","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_read_csv_pandas.py","templateName":"data_input_read_csv_pandas.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:read_csv:pandas","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"data_input_read_csv_pandas.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to read in data for the ML workflow. #\n# #\n# Also showcased here is the concept of branching based on #\n# whether the workflow is in \"train\" or \"predict\" mode. #\n# #\n# If the workflow is in \"training\" mode, it will read in the data #\n# before converting it to a Numpy array and save it for use #\n# later. During training, we already have values for the output, #\n# and this gets saved to \"target.\" #\n# #\n# Finally, whether the workflow is in training or predict mode, #\n# it will always read in a set of descriptors from a datafile #\n# defined in settings.py #\n# ----------------------------------------------------------------- #\n\n\nimport pandas\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n data = pandas.read_csv(settings.datafile)\n\n # Train\n # By default, we don't do train/test splitting: the train and test represent the same dataset at first.\n # Other units (such as a train/test splitter) down the line can adjust this as-needed.\n if settings.is_workflow_running_to_train:\n\n # Handle the case where we are clustering\n if settings.is_clustering:\n target = data.to_numpy()[:, 0] # Just get the first column, it's not going to get used anyway\n else:\n target = data.pop(settings.target_column_name).to_numpy()\n\n # Handle the case where we are classifying. In this case, we must convert any labels provided to be categorical.\n # Specifically, labels are encoded with values between 0 and (N_Classes - 1)\n if settings.is_classification:\n label_encoder = sklearn.preprocessing.LabelEncoder()\n target = label_encoder.fit_transform(target)\n context.save(label_encoder, \"label_encoder\")\n\n target = target.reshape(-1, 1) # Reshape array from a row vector into a column vector\n\n context.save(target, \"train_target\")\n context.save(target, \"test_target\")\n\n descriptors = data.to_numpy()\n\n context.save(descriptors, \"train_descriptors\")\n context.save(descriptors, \"test_descriptors\")\n\n else:\n descriptors = data.to_numpy()\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"7fff5212-6c6d-586b-9997-4d4485e09383"},{"type":"execution","name":"Train Test Split","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"7fff5212-6c6d-586b-9997-4d4485e09383","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"data_input_train_test_split_sklearn.py","templateName":"data_input_train_test_split_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:data_input:train_test_split:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = {{ mlTrainTestSplit.fraction_held_as_test_set }}\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"executableName":"python","name":"data_input_train_test_split_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Workflow Unit to perform a train/test split #\n# #\n# Splits the dataset into a training and testing set. The #\n# variable `percent_held_as_test` controls how much of the #\n# input dataset is removed for use as a testing set. By default, #\n# this unit puts 20% of the dataset into the testing set, and #\n# places the remaining 80% into the training set. #\n# #\n# Does nothing in the case of predictions. #\n# #\n# ----------------------------------------------------------------- #\n\nimport numpy as np\nimport settings\nimport sklearn.model_selection\n\n# `percent_held_as_test` is the amount of the dataset held out as the testing set. If it is set to 0.2,\n# then 20% of the dataset is held out as a testing set. The remaining 80% is the training set.\npercent_held_as_test = 0.2\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Load training data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n\n # Combine datasets to facilitate train/test split\n\n # Do train/test split\n train_descriptors, test_descriptors, train_target, test_target = sklearn.model_selection.train_test_split(\n train_descriptors, train_target, test_size=percent_held_as_test)\n\n # Set the flag for using a train/test split\n context.save(True, \"is_using_train_test_split\")\n\n # Save training data\n context.save(train_target, \"train_target\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_target, \"test_target\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Predict\n else:\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"799de7dc-9394-571b-8e0d-3ff876a3df02"},{"type":"execution","name":"Data Standardize","head":false,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"799de7dc-9394-571b-8e0d-3ff876a3df02","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"pre_processing_standardization_sklearn.py","templateName":"pre_processing_standardization_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"name":"pyml:pre_processing:standardization:sklearn","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","contextProviders":[],"executableName":"python","name":"pre_processing_standardization_sklearn.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Sklearn Standard Scaler workflow unit #\n# #\n# This workflow unit scales the data such that it a mean of 0 and #\n# a standard deviation of 1. It then saves the data for use #\n# further down the road in the workflow, for use in #\n# un-transforming the data. #\n# #\n# It is important that new predictions are made by scaling the #\n# new inputs using the mean and variance of the original training #\n# set. As a result, the scaler gets saved in the Training phase. #\n# #\n# During a predict workflow, the scaler is loaded, and the #\n# new examples are scaled using the stored scaler. #\n# ----------------------------------------------------------------- #\n\n\nimport settings\nimport sklearn.preprocessing\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_target = context.load(\"test_target\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Descriptor Scaler\n scaler = sklearn.preprocessing.StandardScaler\n descriptor_scaler = scaler()\n train_descriptors = descriptor_scaler.fit_transform(train_descriptors)\n test_descriptors = descriptor_scaler.transform(test_descriptors)\n context.save(descriptor_scaler, \"descriptor_scaler\")\n context.save(train_descriptors, \"train_descriptors\")\n context.save(test_descriptors, \"test_descriptors\")\n\n # Our target is only continuous if it's a regression problem\n if settings.is_regression:\n target_scaler = scaler()\n train_target = target_scaler.fit_transform(train_target)\n test_target = target_scaler.transform(test_target)\n context.save(target_scaler, \"target_scaler\")\n context.save(train_target, \"train_target\")\n context.save(test_target, \"test_target\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Get the scaler\n descriptor_scaler = context.load(\"descriptor_scaler\")\n\n # Scale the data\n descriptors = descriptor_scaler.transform(descriptors)\n\n # Store the data\n context.save(descriptors, \"descriptors\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"8dfc61c3-067d-5ea8-bd26-7296628d707a"},{"type":"execution","name":"Model Train and Predict","head":false,"results":[{"name":"workflow:pyml_predict"}],"monitors":[{"name":"standard_output"}],"flowchartId":"8dfc61c3-067d-5ea8-bd26-7296628d707a","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"model_mlp_sklearn.py","templateName":"model_mlp_sklearn.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["workflow:pyml_predict"],"name":"pyml:model:multilayer_perceptron:sklearn","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results","creates-predictions-csv-during-predict-phase"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","contextProviders":[],"executableName":"python","name":"model_mlp_sklearn.py","rendered":"# ------------------------------------------------------------ #\n# Workflow unit to train a simple feedforward neural network #\n# model on a regression problem using scikit-learn. In this #\n# template, we use the default values for hidden_layer_sizes, #\n# activation, solver, and learning rate. Other parameters are #\n# available (consult the sklearn docs), but in this case, we #\n# only include those relevant to the Adam optimizer. Sklearn #\n# Docs: Sklearn docs:http://scikit-learn.org/stable/modules/ge #\n# nerated/sklearn.neural_network.MLPRegressor.html #\n# #\n# When then workflow is in Training mode, the model is trained #\n# and then it is saved, along with the RMSE and some #\n# predictions made using the training data (e.g. for use in a #\n# parity plot or calculation of other error metrics). When the #\n# workflow is run in Predict mode, the model is loaded, #\n# predictions are made, they are un-transformed using the #\n# trained scaler from the training run, and they are written #\n# to a file named \"predictions.csv\" #\n# ------------------------------------------------------------ #\n\n\nimport numpy as np\nimport settings\nimport sklearn.metrics\nimport sklearn.neural_network\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n test_target = context.load(\"test_target\")\n train_descriptors = context.load(\"train_descriptors\")\n test_descriptors = context.load(\"test_descriptors\")\n\n # Flatten the targets\n train_target = train_target.flatten()\n test_target = test_target.flatten()\n\n # Initialize the Model\n model = sklearn.neural_network.MLPRegressor(\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver=\"adam\",\n max_iter=300,\n early_stopping=False,\n validation_fraction=0.1,\n )\n\n # Train the model and save\n model.fit(train_descriptors, train_target)\n context.save(model, \"multilayer_perceptron\")\n train_predictions = model.predict(train_descriptors)\n test_predictions = model.predict(test_descriptors)\n\n # Scale predictions so they have the same shape as the saved target\n train_predictions = train_predictions.reshape(-1, 1)\n test_predictions = test_predictions.reshape(-1, 1)\n\n # Scale for RMSE calc on the test set\n target_scaler = context.load(\"target_scaler\")\n\n # Unflatten the target\n test_target = test_target.reshape(-1, 1)\n y_true = target_scaler.inverse_transform(test_target)\n y_pred = target_scaler.inverse_transform(test_predictions)\n\n # RMSE\n mse = sklearn.metrics.mean_squared_error(y_true, y_pred)\n rmse = np.sqrt(mse)\n print(f\"RMSE = {rmse}\")\n context.save(rmse, \"RMSE\")\n\n context.save(train_predictions, \"train_predictions\")\n context.save(test_predictions, \"test_predictions\")\n\n # Predict\n else:\n # Restore data\n descriptors = context.load(\"descriptors\")\n\n # Restore model\n model = context.load(\"multilayer_perceptron\")\n\n # Make some predictions\n predictions = model.predict(descriptors)\n\n # Save the predictions to file\n np.savetxt(\"predictions.csv\", predictions, header=\"prediction\", comments=\"\", fmt=\"%s\")\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}],"next":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c"},{"type":"execution","name":"Parity Plot","head":false,"results":[{"basename":"my_parity_plot.png","filetype":"image","name":"file_content"}],"monitors":[{"name":"standard_output"}],"flowchartId":"1ca76a49-a3c7-5fa2-b693-538b599ecd7c","preProcessors":[],"postProcessors":[{"name":"remove_virtual_environment"}],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"post_processing_parity_plot_matplotlib.py","templateName":"post_processing_parity_plot_matplotlib.py"},{"name":"requirements.txt","templateName":"pyml_requirements.txt"}],"monitors":["standard_output"],"results":["file_content"],"name":"pyml:post_processing:parity_plot:matplotlib","schemaVersion":"2022.8.16","isDefault":false},"tags":["remove-all-results"],"status":"idle","statusTrack":[],"input":[{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","contextProviders":[],"executableName":"python","name":"post_processing_parity_plot_matplotlib.py","rendered":"# ----------------------------------------------------------------- #\n# #\n# Parity plot generation unit #\n# #\n# This unit generates a parity plot based on the known values #\n# in the training data, and the predicted values generated #\n# using the training data. #\n# #\n# Because this metric compares predictions versus a ground truth, #\n# it doesn't make sense to generate the plot when a predict #\n# workflow is being run (because in that case, we generally don't #\n# know the ground truth for the values being predicted). Hence, #\n# this unit does nothing if the workflow is in \"predict\" mode. #\n# ----------------------------------------------------------------- #\n\n\nimport matplotlib.pyplot as plt\nimport settings\n\nwith settings.context as context:\n # Train\n if settings.is_workflow_running_to_train:\n # Restore the data\n train_target = context.load(\"train_target\")\n train_predictions = context.load(\"train_predictions\")\n test_target = context.load(\"test_target\")\n test_predictions = context.load(\"test_predictions\")\n\n # Un-transform the data\n target_scaler = context.load(\"target_scaler\")\n train_target = target_scaler.inverse_transform(train_target)\n train_predictions = target_scaler.inverse_transform(train_predictions)\n test_target = target_scaler.inverse_transform(test_target)\n test_predictions = target_scaler.inverse_transform(test_predictions)\n\n # Plot the data\n plt.scatter(train_target, train_predictions, c=\"#203d78\", label=\"Training Set\")\n if settings.is_using_train_test_split:\n plt.scatter(test_target, test_predictions, c=\"#67ac5b\", label=\"Testing Set\")\n plt.xlabel(\"Actual Value\")\n plt.ylabel(\"Predicted Value\")\n\n # Scale the plot\n target_range = (min(min(train_target), min(test_target)),\n max(max(train_target), max(test_target)))\n predictions_range = (min(min(train_predictions), min(test_predictions)),\n max(max(train_predictions), max(test_predictions)))\n\n limits = (min(min(target_range), min(target_range)),\n max(max(predictions_range), max(predictions_range)))\n plt.xlim = (limits[0], limits[1])\n plt.ylim = (limits[0], limits[1])\n\n # Draw a parity line, as a guide to the eye\n plt.plot((limits[0], limits[1]), (limits[0], limits[1]), c=\"black\", linestyle=\"dotted\", label=\"Parity\")\n plt.legend()\n\n # Save the figure\n plt.tight_layout()\n plt.savefig(\"my_parity_plot.png\", dpi=600)\n\n # Predict\n else:\n # It might not make as much sense to draw a plot when predicting...\n pass\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# ----------------------------------------------------------------- #\n\nmatplotlib\nnumpy\nscikit-learn\nxgboost\npandas\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Set Up the Job","type":"subworkflow","_id":"03e3f15b-2b22-5bb4-8bfd-6839d28a1ba9","status":"idle","statusTrack":[],"flowchartId":"5b51df93-15dd-5440-90fd-a3ffa264b7d8","tags":[],"head":true,"next":"90738aae-daac-599f-913f-29fb6acdff00"},{"name":"Machine Learning","type":"subworkflow","_id":"30acc5cd-54e6-5f05-aafd-413ee8a69aa1","status":"idle","statusTrack":[],"flowchartId":"90738aae-daac-599f-913f-29fb6acdff00","tags":[],"head":false}],"properties":[],"_id":"f447c6df-3b7b-5b8e-a0cc-1a743847ceed","workflows":[],"isUsingDataset":true,"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"python"}},"python/python_script.json":{"name":"Python Script","subworkflows":[{"_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","name":"Python Script","application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"python","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"9b8a495e-1ac1-56a7-b2e0-af1b405a1219","preProcessors":[],"postProcessors":[],"application":{"name":"python","shortName":"py","summary":"Python Script","build":"GNU","isDefault":true,"version":"3.10.13","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"python","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"python","executableName":"python","input":[{"name":"script.py","templateName":"hello_world.py"},{"name":"requirements.txt"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"python","content":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","contextProviders":[],"executableName":"python","name":"script.py","rendered":"# ---------------------------------------------------------------- #\n# #\n# Example python script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. runtime directory for this calculation is created #\n# 2. requirements.txt is used to create a virtual environment #\n# 3. virtual environment is activated #\n# 4. python process running this script is started #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\nimport numpy as np\n\npi_value = np.pi\nprint(pi_value)\n","schemaVersion":"2022.8.16"},{"applicationName":"python","content":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","contextProviders":[],"executableName":"python","name":"requirements.txt","rendered":"# ----------------------------------------------------------------- #\n# #\n# Example Python package requirements for the Mat3ra platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Adjust the list to include your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\nnumpy<2\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Python Script","type":"subworkflow","_id":"64a079ba-7a12-57b7-ac06-310b2bf8d354","status":"idle","statusTrack":[],"flowchartId":"c50e28b2-a0c5-5324-8b6f-e99b5a546bd8","tags":[],"head":true}],"properties":[],"_id":"de816646-766b-5f97-b468-0937d4381440","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"python"}},"shell/batch_espresso_pwscf.json":{"name":"Shell Batch Job (Espresso PWSCF)","subworkflows":[{"_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","name":"Shell Batch Job (Espresso PWSCF)","application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"job_espresso_pw_scf.sh"}],"monitors":["standard_output"],"name":"job_espresso_pw_scf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","contextProviders":[],"executableName":"sh","name":"job_espresso_pw_scf.sh","rendered":"#!/bin/bash\n\n# ---------------------------------------------------------------- #\n# #\n# Example job submission script for Exabyte.io platform #\n# #\n# Shows resource manager directives for: #\n# #\n# 1. the name of the job (-N) #\n# 2. the number of nodes to be used (-l nodes=) #\n# 3. the number of processors per node (-l ppn=) #\n# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #\n# 5. queue (-q) D, OR, OF, SR, SF #\n# 6. merging standard output and error (-j oe) #\n# 7. email about job abort, begin, end (-m abe) #\n# 8. email address to use (-M) #\n# #\n# For more information visit https://docs.mat3ra.com/cli/jobs #\n# ---------------------------------------------------------------- #\n\n#PBS -N ESPRESSO-TEST\n#PBS -j oe\n#PBS -l nodes=1\n#PBS -l ppn=1\n#PBS -l walltime=00:00:10:00\n#PBS -q D\n#PBS -m abe\n#PBS -M info@mat3ra.com\n\n# load module\nmodule add espresso\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Shell Batch Job (Espresso PWSCF)","type":"subworkflow","_id":"f0775c7b-214a-5245-b921-5b4eb53d15a9","status":"idle","statusTrack":[],"flowchartId":"d884e8f7-7acf-5a03-bc9a-186903bdaa0e","tags":[],"head":true}],"properties":[],"_id":"e0046fb4-37db-5732-bf81-c48e13081a4c","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"shell"}},"shell/hello_world.json":{"name":"Shell Script","subworkflows":[{"_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","name":"Shell Hello World","application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"shell","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"99304304-e873-5c89-ae83-91e61a7f629c","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"hello_world.sh"}],"isDefault":true,"monitors":["standard_output"],"name":"hello_world","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","contextProviders":[],"executableName":"sh","name":"hello_world.sh","rendered":"#!/bin/bash\n# ---------------------------------------------------------------- #\n# #\n# Example shell script for Exabyte.io platform. #\n# #\n# Will be used as follows: #\n# #\n# 1. shebang line is read from the first line above #\n# 2. based on shebang one of the shell types is selected: #\n# - /bin/bash #\n# - /bin/csh #\n# - /bin/tclsh #\n# - /bin/tcsh #\n# - /bin/zsh #\n# 3. runtime directory for this calculation is created #\n# 4. the content of the script is executed #\n# #\n# Adjust the content below to include your code. #\n# #\n# ---------------------------------------------------------------- #\n\necho \"Hello world!\"\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Shell Hello World","type":"subworkflow","_id":"ce33d4cf-e0d2-5020-854d-9ea1fe5c8512","status":"idle","statusTrack":[],"flowchartId":"319307c2-bf22-5bf2-b4e9-a4cdf671b786","tags":[],"head":true}],"properties":[],"_id":"d2fd444c-06b4-5d66-baeb-449c680ae1bf","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"shell"}},"vasp/band_gap.json":{"name":"Band Gap","subworkflows":[{"_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","name":"Band Gap","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"f0d65517-9592-5bc8-948e-a0851a766cbb"},{"type":"execution","name":"vasp_nscf","head":false,"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"f0d65517-9592-5bc8-948e-a0851a766cbb","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic"],"results":["band_gaps","fermi_energy"],"name":"vasp_nscf","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Band Gap","type":"subworkflow","_id":"e65f2461-5f5c-5a51-8c48-88ad37bff100","status":"idle","statusTrack":[],"flowchartId":"db3b83ea-0ef5-594c-89a8-bde38dbc6105","tags":[],"head":true}],"properties":["atomic_forces","band_gaps","fermi_energy","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"16ca0232-a570-53d1-a4d3-32bbd6f3f0a2","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/band_structure_dos.json":{"name":"Band Structure + Density of States","subworkflows":[{"_id":"d38fea11-9781-5151-8dae-d705381498be","name":"Band Structure + Density of States","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"1e1de3be-f6e4-513e-afe2-c84e567a8108"},{"type":"execution","name":"vasp_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"monitors":["standard_output","convergence_electronic"],"results":["band_structure"],"name":"vasp_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Band Structure + Density of States","type":"subworkflow","_id":"d38fea11-9781-5151-8dae-d705381498be","status":"idle","statusTrack":[],"flowchartId":"8a098bb9-73b1-5e84-bfc7-b783e02d0f53","tags":[],"head":true}],"properties":["atomic_forces","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"c8338d40-3c6e-5581-b03c-d7fb5cbb8df5","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/band_structure.json":{"name":"Band Structure","subworkflows":[{"_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","name":"Band Structure","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"1e1de3be-f6e4-513e-afe2-c84e567a8108"},{"type":"execution","name":"vasp_bands","head":false,"results":[{"name":"band_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"1e1de3be-f6e4-513e-afe2-c84e567a8108","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS_BANDS"},{"name":"POSCAR","templateName":""}],"monitors":["standard_output","convergence_electronic"],"results":["band_structure"],"name":"vasp_bands","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"kpoints path\n{{kpath.length}}\nreciprocal\n{% for point in kpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor -%}{{point.steps}}\n{% endfor %}\n","contextProviders":[{"name":"KPathFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"kpoints path\n11\nreciprocal\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.000000000 0.500000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.375000000 0.375000000 0.750000000 10\n 0.000000000 0.000000000 0.000000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.250000000 0.750000000 10\n 0.500000000 0.500000000 0.500000000 10\n 0.625000000 0.250000000 0.625000000 10\n 0.500000000 0.000000000 0.500000000 10\n\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Band Structure","type":"subworkflow","_id":"cd6e3d59-5544-56ac-878b-fd8716a09768","status":"idle","statusTrack":[],"flowchartId":"c573187f-a8bb-5084-9fcf-1560bf4a7786","tags":[],"head":true}],"properties":["atomic_forces","band_structure","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"25b0ad08-87bb-5400-bea4-acd5fe2163c0","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/dos.json":{"name":"Density of States","subworkflows":[{"_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","name":"Density of States","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["density_of_states","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"density_of_states"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9cb87769-bf20-56bf-a8b3-5a164e3bf541","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"isDefault":true,"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp","schemaVersion":"2022.8.16"},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Density of States","type":"subworkflow","_id":"4897ca33-b023-5a8d-9a5d-9e74df0f00ad","status":"idle","statusTrack":[],"flowchartId":"3e64fdb4-ab5b-52a0-a1d5-51343c49481c","tags":[],"head":true}],"properties":["atomic_forces","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"629a79fb-a03f-5e34-b2ce-9c735e8ef6c0","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/fixed_cell_relaxation.json":{"name":"Fixed-cell Relaxation","subworkflows":[{"_id":"db6cc94b-2f26-5688-ba97-80b11567b549","name":"Fixed-cell Relaxation","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp_relax","head":true,"results":[{"name":"total_energy"},{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_force"},{"name":"final_structure"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"},{"name":"convergence_ionic"}],"flowchartId":"2f718a3d-5800-57e2-b707-075c1f1755c6","preProcessors":[],"postProcessors":[{"name":"prepare_restart"}],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_RELAX"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic","convergence_ionic"],"postProcessors":["prepare_restart"],"results":["total_energy","atomic_forces","fermi_energy","pressure","stress_tensor","total_force","final_structure"],"name":"vasp_relax","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISIF = 2\nIBRION = 2\nNSW = 300\nLWAVE = .FALSE.\nLCHARG = .FALSE.\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]}],"units":[{"name":"Fixed-cell Relaxation","type":"subworkflow","_id":"db6cc94b-2f26-5688-ba97-80b11567b549","status":"idle","statusTrack":[],"flowchartId":"0de8c4c8-b722-5cd2-ae68-b484262e0a01","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","final_structure","pressure","stress_tensor","total_energy","total_force"],"_id":"cb69418c-2f6c-551d-af81-0cf20ec1113d","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/kpoint_convergence.json":{"name":"K-point Convergence","subworkflows":[{"_id":"5d736d84-d616-538f-a09b-81a32ac0777c","name":"K-point Convergence","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"name":"Init tolerance","type":"assignment","operand":"TOL","value":0.00001,"input":[],"flowchartId":"init-tolerance","status":"idle","statusTrack":[],"tags":[],"head":true,"next":"init-increment","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init increment","type":"assignment","operand":"INC","value":1,"input":[],"flowchartId":"init-increment","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-result","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init result","type":"assignment","operand":"PREV_RESULT","value":0,"input":[],"flowchartId":"init-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"init-parameter","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"Init parameter","type":"assignment","operand":"PARAMETER","value":1,"input":[],"flowchartId":"init-parameter","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"vasp-kpoint-convergence","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"type":"execution","name":"vasp_kpt_conv","head":false,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"vasp-kpoint-convergence","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR"},{"name":"KPOINTS","templateName":"KPOINTS_CONV"},{"name":"POSCAR","templateName":"POSCAR"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_kpt_conv","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic Mesh\n0\nGamma\n{% raw %}{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}{% endraw %}\n0 0 0\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic Mesh\n0\nGamma\n{{PARAMETER | default('1')}} {{PARAMETER | default('1')}} {{PARAMETER | default('1')}}\n0 0 0\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.POSCAR }}\n","contextProviders":[{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"store-result"},{"name":"store result","type":"assignment","operand":"RESULT","value":"total_energy","input":[{"name":"total_energy","scope":"vasp-kpoint-convergence"}],"flowchartId":"store-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"check-convergence","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"check convergence","type":"condition","input":[],"results":[],"preProcessors":[],"postProcessors":[],"then":"convergence-is-reached","else":"update-result","statement":"abs((PREV_RESULT-RESULT)/RESULT) < TOL","maxOccurrences":50,"flowchartId":"check-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"update-result","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"update result","type":"assignment","operand":"PREV_RESULT","value":"RESULT","input":[{"name":"RESULT","scope":"global"}],"flowchartId":"update-result","status":"idle","statusTrack":[],"tags":[],"head":false,"next":"increment-parameter","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"increment parameter","type":"assignment","operand":"PREV_RESULT","value":"PARAMETER+INC","input":[{"name":"INC","scope":"global"},{"name":"PARAMETER","scope":"global"}],"flowchartId":"increment-parameter","next":"vasp-kpoint-convergence","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}},{"name":"exit","type":"assignment","operand":"PARAMETER","value":"PARAMETER","input":[{"name":"PARAMETER","scope":"global"}],"flowchartId":"convergence-is-reached","status":"idle","statusTrack":[],"tags":[],"head":false,"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"}}]}],"units":[{"name":"K-point Convergence","type":"subworkflow","_id":"5d736d84-d616-538f-a09b-81a32ac0777c","status":"idle","statusTrack":[],"flowchartId":"a34eec2c-cdb2-537d-88c0-ed1d7b205879","tags":[],"head":true}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"_id":"fcf105f9-5ae7-5c32-a6b3-e3579cbdf39a","workflows":[],"schemaVersion":"2022.8.16","isDefault":false,"application":{"name":"vasp"}},"vasp/neb.json":{"name":"Nudged Elastic Band (NEB)","subworkflows":[{"isMultiMaterial":true,"_id":"792e8c42-86ce-5f01-812a-66378ec4f379","name":"Initial/Final Total Energies","application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"paw","data":{}},"functional":{"slug":"pbe"},"refiners":[],"modifiers":[]},"units":[{"type":"execution","name":"vasp_neb_initial","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"f969f010-9dae-5085-9ac5-86150ef78897","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_INITIAL"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_neb_initial","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.FIRST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}],"next":"e65a17ce-10c8-5710-ad4d-fb3d42434091"},{"type":"execution","name":"vasp_neb_final","head":false,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"e65a17ce-10c8-5710-ad4d-fb3d42434091","preProcessors":[],"postProcessors":[],"application":{"isLicensed":true,"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","build":"GNU","isDefault":true,"version":"5.4.4","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output","convergence_ionic","convergence_electronic"],"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"name":"vasp","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"vasp","executableName":"vasp","input":[{"name":"INCAR","templateName":"INCAR_NEB_INITIAL_FINAL"},{"name":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR_NEB_FINAL"}],"monitors":["standard_output","convergence_electronic"],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"name":"vasp_neb_final","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"vasp","content":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"INCAR","rendered":"ISTART = 0\nENCUT = 500\nISPIN = 2\n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}\n","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"executableName":"vasp","name":"KPOINTS","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 \n","schemaVersion":"2022.8.16"},{"applicationName":"vasp","content":"{{ input.LAST_IMAGE }}\n","contextProviders":[{"name":"NEBFormDataManager"},{"name":"VASPNEBInputDataManager"}],"executableName":"vasp","name":"POSCAR","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si\n","schemaVersion":"2022.8.16"}]}]},{"isMultiMaterial":true,"_id":"c9b7ad2a-5207-5e41-9b66-28474a8921f8","name":"Prepare Directories","application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"properties":[],"model":{"type":"unknown","subtype":"unknown","method":{"type":"unknown","subtype":"unknown","data":{}}},"units":[{"type":"execution","name":"prepare-neb-images","head":true,"results":[],"monitors":[{"name":"standard_output"}],"flowchartId":"dc397ead-54ad-513b-992e-aedd54576409","preProcessors":[],"postProcessors":[],"application":{"name":"shell","shortName":"sh","summary":"Shell Script","build":"GNU","isDefault":true,"version":"5.1.8","schemaVersion":"2022.8.16"},"executable":{"isDefault":true,"monitors":["standard_output"],"name":"sh","schemaVersion":"2022.8.16"},"flavor":{"applicationName":"shell","executableName":"sh","input":[{"name":"bash_vasp_prepare_neb_images.sh"}],"monitors":["standard_output"],"name":"bash_vasp_prepare_neb_images","schemaVersion":"2022.8.16","isDefault":false},"status":"idle","statusTrack":[],"tags":[],"input":[{"applicationName":"shell","content":"#!/bin/bash\n\n# ------------------------------------------------------------------ #\n# This script prepares necessary directories to run VASP NEB\n# calculation. It puts initial POSCAR into directory 00, final into 0N\n# and intermediate images in 01 to 0(N-1). It is assumed that SCF\n# calculations for initial and final structures are already done in\n# previous subworkflows and their standard outputs are written into\n# \"vasp_neb_initial.out\" and \"vasp_neb_final.out\" files respectively.\n# These outputs are here copied into initial (00) and final (0N)\n# directories to calculate the reaction energy profile.\n# ------------------------------------------------------------------ #\n\n{% raw %}\ncd {{ JOB_WORK_DIR }}\n{% endraw %}\n\n# Prepare First Directory\nmkdir -p 00\ncat > 00/POSCAR < 0{{ input.INTERMEDIATE_IMAGES.length + 1 }}/POSCAR < 0{{ loop.index }}/POSCAR < 00/POSCAR < 01/POSCAR <