From 308e82429a1215e40a88d28324045d6f1f90f271 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 1 Aug 2023 12:24:00 -0700 Subject: [PATCH 01/52] chore: rename directory assets -> templates --- {assets => templates}/espresso/average.j2.in | 0 {assets => templates}/espresso/bands.j2.in | 0 {assets => templates}/espresso/dos.j2.in | 0 {assets => templates}/espresso/gw_bands_full_frequency.j2.in | 0 {assets => templates}/espresso/gw_bands_plasmon_pole.j2.in | 0 {assets => templates}/espresso/matdyn_grid.j2.in | 0 {assets => templates}/espresso/matdyn_path.j2.in | 0 {assets => templates}/espresso/neb.j2.in | 0 {assets => templates}/espresso/ph_gamma.j2.in | 0 {assets => templates}/espresso/ph_grid.j2.in | 0 {assets => templates}/espresso/ph_grid_restart.j2.in | 0 {assets => templates}/espresso/ph_init_qpoints.j2.in | 0 {assets => templates}/espresso/ph_path.j2.in | 0 {assets => templates}/espresso/ph_single_irr_qpt.j2.in | 0 {assets => templates}/espresso/pp_density.j2.in | 0 {assets => templates}/espresso/pp_electrostatic_potential.j2.in | 0 {assets => templates}/espresso/projwfc.j2.in | 0 {assets => templates}/espresso/pw_bands.j2.in | 0 {assets => templates}/espresso/pw_esm.j2.in | 0 {assets => templates}/espresso/pw_esm_relax.j2.in | 0 {assets => templates}/espresso/pw_nscf.j2.in | 0 {assets => templates}/espresso/pw_relax.j2.in | 0 {assets => templates}/espresso/pw_scf.j2.in | 0 {assets => templates}/espresso/pw_scf_bands_hse.j2.in | 0 {assets => templates}/espresso/pw_scf_hse.j2.in | 0 {assets => templates}/espresso/pw_scf_kpt_conv.j2.in | 0 {assets => templates}/espresso/pw_vc_relax.j2.in | 0 {assets => templates}/espresso/pw_vc_relax_conv.j2.in | 0 {assets => templates}/espresso/q2r.j2.in | 0 {assets => templates}/jupyterLab/requirements303.j2.txt | 0 {assets => templates}/nwchem/nwchem_total_energy.j2.inp | 0 {assets => templates}/python/espresso_extract_kpoints.pyi | 0 {assets => templates}/python/espresso_xml_get_qpt_irr.pyi | 0 .../python/generic/post_processing:plot:matplotlib.pyi | 0 {assets => templates}/python/generic/processing:find_extrema.pyi | 0 {assets => templates}/python/generic/requirements.j2.txt | 0 {assets => templates}/python/hello_world.pyi | 0 {assets => templates}/python/ml/generation/README.md | 0 {assets => templates}/python/ml/generation/config.yaml | 0 {assets => templates}/python/ml/generation/model.yaml | 0 {assets => templates}/python/ml/generation/render_templates.py | 0 {assets => templates}/python/ml/generation/templates/model.pyi | 0 {assets => templates}/python/ml/pyml:custom.pyi | 0 .../python/ml/pyml:data_input:read_csv:pandas.pyi | 0 .../python/ml/pyml:data_input:train_test_split:sklearn.pyi | 0 .../python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi | 0 .../python/ml/pyml:model:bagged_trees_regression:sklearn.pyi | 0 ...yml:model:extreme_gradboosted_trees_classification:sklearn.pyi | 0 .../pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi | 0 .../ml/pyml:model:gradboosted_trees_classification:sklearn.pyi | 0 .../python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi | 0 .../python/ml/pyml:model:k_means_clustering:sklearn.pyi | 0 .../python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi | 0 .../python/ml/pyml:model:lasso_regression:sklearn.pyi | 0 .../ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi | 0 .../python/ml/pyml:model:random_forest_classification:sklearn.pyi | 0 .../python/ml/pyml:model:random_forest_regression:sklearn.pyi | 0 .../python/ml/pyml:model:ridge_regression:sklearn.pyi | 0 .../python/ml/pyml:post_processing:parity_plot:matplotlib.pyi | 0 .../python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi | 0 .../python/ml/pyml:post_processing:roc_curve:sklearn.pyi | 0 .../python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi | 0 .../python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi | 0 .../python/ml/pyml:pre_processing:remove_missing:pandas.pyi | 0 .../python/ml/pyml:pre_processing:standardization:sklearn.pyi | 0 {assets => templates}/python/ml/pyml:setup_variables_packages.pyi | 0 {assets => templates}/python/ml/requirements.j2.txt | 0 {assets => templates}/python/requirements.j2.txt | 0 {assets => templates}/python/requirements_empty.j2.txt | 0 {assets => templates}/shell/bash_espresso_collect_dynmat.j2.sh | 0 {assets => templates}/shell/bash_espresso_link_outdir_save.j2.sh | 0 {assets => templates}/shell/bash_hello_world.j2.sh | 0 {assets => templates}/shell/bash_job_espresso_pw_scf.j2.sh | 0 {assets => templates}/shell/bash_vasp_prepare_neb_images.j2.sh | 0 {assets => templates}/vasp/INCAR.j2 | 0 {assets => templates}/vasp/INCAR_bands.j2 | 0 {assets => templates}/vasp/INCAR_neb.j2 | 0 {assets => templates}/vasp/INCAR_neb_initial_final.j2 | 0 {assets => templates}/vasp/INCAR_relax.j2 | 0 {assets => templates}/vasp/INCAR_vc_relax.j2 | 0 {assets => templates}/vasp/INCAR_zpe.j2 | 0 {assets => templates}/vasp/KPOINTS.j2 | 0 {assets => templates}/vasp/KPOINTS_bands.j2 | 0 {assets => templates}/vasp/KPOINTS_conv.j2 | 0 {assets => templates}/vasp/POSCAR.j2 | 0 {assets => templates}/vasp/POSCAR_NEB_final.j2 | 0 {assets => templates}/vasp/POSCAR_NEB_initial.j2 | 0 {assets => templates}/vasp/_MIXIN_INCAR_hse.j2 | 0 88 files changed, 0 insertions(+), 0 deletions(-) rename {assets => templates}/espresso/average.j2.in (100%) rename {assets => templates}/espresso/bands.j2.in (100%) rename {assets => templates}/espresso/dos.j2.in (100%) rename {assets => templates}/espresso/gw_bands_full_frequency.j2.in (100%) rename {assets => templates}/espresso/gw_bands_plasmon_pole.j2.in (100%) rename {assets => templates}/espresso/matdyn_grid.j2.in (100%) rename {assets => templates}/espresso/matdyn_path.j2.in (100%) rename {assets => templates}/espresso/neb.j2.in (100%) rename {assets => templates}/espresso/ph_gamma.j2.in (100%) rename {assets => templates}/espresso/ph_grid.j2.in (100%) rename {assets => templates}/espresso/ph_grid_restart.j2.in (100%) rename {assets => templates}/espresso/ph_init_qpoints.j2.in (100%) rename {assets => templates}/espresso/ph_path.j2.in (100%) rename {assets => templates}/espresso/ph_single_irr_qpt.j2.in (100%) rename {assets => templates}/espresso/pp_density.j2.in (100%) rename {assets => templates}/espresso/pp_electrostatic_potential.j2.in (100%) rename {assets => templates}/espresso/projwfc.j2.in (100%) rename {assets => templates}/espresso/pw_bands.j2.in (100%) rename {assets => templates}/espresso/pw_esm.j2.in (100%) rename {assets => templates}/espresso/pw_esm_relax.j2.in (100%) rename {assets => templates}/espresso/pw_nscf.j2.in (100%) rename {assets => templates}/espresso/pw_relax.j2.in (100%) rename {assets => templates}/espresso/pw_scf.j2.in (100%) rename {assets => templates}/espresso/pw_scf_bands_hse.j2.in (100%) rename {assets => templates}/espresso/pw_scf_hse.j2.in (100%) rename {assets => templates}/espresso/pw_scf_kpt_conv.j2.in (100%) rename {assets => templates}/espresso/pw_vc_relax.j2.in (100%) rename {assets => templates}/espresso/pw_vc_relax_conv.j2.in (100%) rename {assets => templates}/espresso/q2r.j2.in (100%) rename {assets => templates}/jupyterLab/requirements303.j2.txt (100%) rename {assets => templates}/nwchem/nwchem_total_energy.j2.inp (100%) rename {assets => templates}/python/espresso_extract_kpoints.pyi (100%) rename {assets => templates}/python/espresso_xml_get_qpt_irr.pyi (100%) rename {assets => templates}/python/generic/post_processing:plot:matplotlib.pyi (100%) rename {assets => templates}/python/generic/processing:find_extrema.pyi (100%) rename {assets => templates}/python/generic/requirements.j2.txt (100%) rename {assets => templates}/python/hello_world.pyi (100%) rename {assets => templates}/python/ml/generation/README.md (100%) rename {assets => templates}/python/ml/generation/config.yaml (100%) rename {assets => templates}/python/ml/generation/model.yaml (100%) rename {assets => templates}/python/ml/generation/render_templates.py (100%) rename {assets => templates}/python/ml/generation/templates/model.pyi (100%) rename {assets => templates}/python/ml/pyml:custom.pyi (100%) rename {assets => templates}/python/ml/pyml:data_input:read_csv:pandas.pyi (100%) rename {assets => templates}/python/ml/pyml:data_input:train_test_split:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:k_means_clustering:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:lasso_regression:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:random_forest_classification:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:random_forest_regression:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:model:ridge_regression:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi (100%) rename {assets => templates}/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi (100%) rename {assets => templates}/python/ml/pyml:post_processing:roc_curve:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi (100%) rename {assets => templates}/python/ml/pyml:pre_processing:remove_missing:pandas.pyi (100%) rename {assets => templates}/python/ml/pyml:pre_processing:standardization:sklearn.pyi (100%) rename {assets => templates}/python/ml/pyml:setup_variables_packages.pyi (100%) rename {assets => templates}/python/ml/requirements.j2.txt (100%) rename {assets => templates}/python/requirements.j2.txt (100%) rename {assets => templates}/python/requirements_empty.j2.txt (100%) rename {assets => templates}/shell/bash_espresso_collect_dynmat.j2.sh (100%) rename {assets => templates}/shell/bash_espresso_link_outdir_save.j2.sh (100%) rename {assets => templates}/shell/bash_hello_world.j2.sh (100%) rename {assets => templates}/shell/bash_job_espresso_pw_scf.j2.sh (100%) rename {assets => templates}/shell/bash_vasp_prepare_neb_images.j2.sh (100%) rename {assets => templates}/vasp/INCAR.j2 (100%) rename {assets => templates}/vasp/INCAR_bands.j2 (100%) rename {assets => templates}/vasp/INCAR_neb.j2 (100%) rename {assets => templates}/vasp/INCAR_neb_initial_final.j2 (100%) rename {assets => templates}/vasp/INCAR_relax.j2 (100%) rename {assets => templates}/vasp/INCAR_vc_relax.j2 (100%) rename {assets => templates}/vasp/INCAR_zpe.j2 (100%) rename {assets => templates}/vasp/KPOINTS.j2 (100%) rename {assets => templates}/vasp/KPOINTS_bands.j2 (100%) rename {assets => templates}/vasp/KPOINTS_conv.j2 (100%) rename {assets => templates}/vasp/POSCAR.j2 (100%) rename {assets => templates}/vasp/POSCAR_NEB_final.j2 (100%) rename {assets => templates}/vasp/POSCAR_NEB_initial.j2 (100%) rename {assets => templates}/vasp/_MIXIN_INCAR_hse.j2 (100%) diff --git a/assets/espresso/average.j2.in b/templates/espresso/average.j2.in similarity index 100% rename from assets/espresso/average.j2.in rename to templates/espresso/average.j2.in diff --git a/assets/espresso/bands.j2.in b/templates/espresso/bands.j2.in similarity index 100% rename from assets/espresso/bands.j2.in rename to templates/espresso/bands.j2.in diff --git a/assets/espresso/dos.j2.in b/templates/espresso/dos.j2.in similarity index 100% rename from assets/espresso/dos.j2.in rename to templates/espresso/dos.j2.in diff --git a/assets/espresso/gw_bands_full_frequency.j2.in b/templates/espresso/gw_bands_full_frequency.j2.in similarity index 100% rename from assets/espresso/gw_bands_full_frequency.j2.in rename to templates/espresso/gw_bands_full_frequency.j2.in diff --git a/assets/espresso/gw_bands_plasmon_pole.j2.in b/templates/espresso/gw_bands_plasmon_pole.j2.in similarity index 100% rename from assets/espresso/gw_bands_plasmon_pole.j2.in rename to templates/espresso/gw_bands_plasmon_pole.j2.in diff --git a/assets/espresso/matdyn_grid.j2.in b/templates/espresso/matdyn_grid.j2.in similarity index 100% rename from assets/espresso/matdyn_grid.j2.in rename to templates/espresso/matdyn_grid.j2.in diff --git a/assets/espresso/matdyn_path.j2.in b/templates/espresso/matdyn_path.j2.in similarity index 100% rename from assets/espresso/matdyn_path.j2.in rename to templates/espresso/matdyn_path.j2.in diff --git a/assets/espresso/neb.j2.in b/templates/espresso/neb.j2.in similarity index 100% rename from assets/espresso/neb.j2.in rename to templates/espresso/neb.j2.in diff --git a/assets/espresso/ph_gamma.j2.in b/templates/espresso/ph_gamma.j2.in similarity index 100% rename from assets/espresso/ph_gamma.j2.in rename to templates/espresso/ph_gamma.j2.in diff --git a/assets/espresso/ph_grid.j2.in b/templates/espresso/ph_grid.j2.in similarity index 100% rename from assets/espresso/ph_grid.j2.in rename to templates/espresso/ph_grid.j2.in diff --git a/assets/espresso/ph_grid_restart.j2.in b/templates/espresso/ph_grid_restart.j2.in similarity index 100% rename from assets/espresso/ph_grid_restart.j2.in rename to templates/espresso/ph_grid_restart.j2.in diff --git a/assets/espresso/ph_init_qpoints.j2.in b/templates/espresso/ph_init_qpoints.j2.in similarity index 100% rename from assets/espresso/ph_init_qpoints.j2.in rename to templates/espresso/ph_init_qpoints.j2.in diff --git a/assets/espresso/ph_path.j2.in b/templates/espresso/ph_path.j2.in similarity index 100% rename from assets/espresso/ph_path.j2.in rename to templates/espresso/ph_path.j2.in diff --git a/assets/espresso/ph_single_irr_qpt.j2.in b/templates/espresso/ph_single_irr_qpt.j2.in similarity index 100% rename from assets/espresso/ph_single_irr_qpt.j2.in rename to templates/espresso/ph_single_irr_qpt.j2.in diff --git a/assets/espresso/pp_density.j2.in b/templates/espresso/pp_density.j2.in similarity index 100% rename from assets/espresso/pp_density.j2.in rename to templates/espresso/pp_density.j2.in diff --git a/assets/espresso/pp_electrostatic_potential.j2.in b/templates/espresso/pp_electrostatic_potential.j2.in similarity index 100% rename from assets/espresso/pp_electrostatic_potential.j2.in rename to templates/espresso/pp_electrostatic_potential.j2.in diff --git a/assets/espresso/projwfc.j2.in b/templates/espresso/projwfc.j2.in similarity index 100% rename from assets/espresso/projwfc.j2.in rename to templates/espresso/projwfc.j2.in diff --git a/assets/espresso/pw_bands.j2.in b/templates/espresso/pw_bands.j2.in similarity index 100% rename from assets/espresso/pw_bands.j2.in rename to templates/espresso/pw_bands.j2.in diff --git a/assets/espresso/pw_esm.j2.in b/templates/espresso/pw_esm.j2.in similarity index 100% rename from assets/espresso/pw_esm.j2.in rename to templates/espresso/pw_esm.j2.in diff --git a/assets/espresso/pw_esm_relax.j2.in b/templates/espresso/pw_esm_relax.j2.in similarity index 100% rename from assets/espresso/pw_esm_relax.j2.in rename to templates/espresso/pw_esm_relax.j2.in diff --git a/assets/espresso/pw_nscf.j2.in b/templates/espresso/pw_nscf.j2.in similarity index 100% rename from assets/espresso/pw_nscf.j2.in rename to templates/espresso/pw_nscf.j2.in diff --git a/assets/espresso/pw_relax.j2.in b/templates/espresso/pw_relax.j2.in similarity index 100% rename from assets/espresso/pw_relax.j2.in rename to templates/espresso/pw_relax.j2.in diff --git a/assets/espresso/pw_scf.j2.in b/templates/espresso/pw_scf.j2.in similarity index 100% rename from assets/espresso/pw_scf.j2.in rename to templates/espresso/pw_scf.j2.in diff --git a/assets/espresso/pw_scf_bands_hse.j2.in b/templates/espresso/pw_scf_bands_hse.j2.in similarity index 100% rename from assets/espresso/pw_scf_bands_hse.j2.in rename to templates/espresso/pw_scf_bands_hse.j2.in diff --git a/assets/espresso/pw_scf_hse.j2.in b/templates/espresso/pw_scf_hse.j2.in similarity index 100% rename from assets/espresso/pw_scf_hse.j2.in rename to templates/espresso/pw_scf_hse.j2.in diff --git a/assets/espresso/pw_scf_kpt_conv.j2.in b/templates/espresso/pw_scf_kpt_conv.j2.in similarity index 100% rename from assets/espresso/pw_scf_kpt_conv.j2.in rename to templates/espresso/pw_scf_kpt_conv.j2.in diff --git a/assets/espresso/pw_vc_relax.j2.in b/templates/espresso/pw_vc_relax.j2.in similarity index 100% rename from assets/espresso/pw_vc_relax.j2.in rename to templates/espresso/pw_vc_relax.j2.in diff --git a/assets/espresso/pw_vc_relax_conv.j2.in b/templates/espresso/pw_vc_relax_conv.j2.in similarity index 100% rename from assets/espresso/pw_vc_relax_conv.j2.in rename to templates/espresso/pw_vc_relax_conv.j2.in diff --git a/assets/espresso/q2r.j2.in b/templates/espresso/q2r.j2.in similarity index 100% rename from assets/espresso/q2r.j2.in rename to templates/espresso/q2r.j2.in diff --git a/assets/jupyterLab/requirements303.j2.txt b/templates/jupyterLab/requirements303.j2.txt similarity index 100% rename from assets/jupyterLab/requirements303.j2.txt rename to templates/jupyterLab/requirements303.j2.txt diff --git a/assets/nwchem/nwchem_total_energy.j2.inp b/templates/nwchem/nwchem_total_energy.j2.inp similarity index 100% rename from assets/nwchem/nwchem_total_energy.j2.inp rename to templates/nwchem/nwchem_total_energy.j2.inp diff --git a/assets/python/espresso_extract_kpoints.pyi b/templates/python/espresso_extract_kpoints.pyi similarity index 100% rename from assets/python/espresso_extract_kpoints.pyi rename to templates/python/espresso_extract_kpoints.pyi diff --git a/assets/python/espresso_xml_get_qpt_irr.pyi b/templates/python/espresso_xml_get_qpt_irr.pyi similarity index 100% rename from assets/python/espresso_xml_get_qpt_irr.pyi rename to templates/python/espresso_xml_get_qpt_irr.pyi diff --git a/assets/python/generic/post_processing:plot:matplotlib.pyi b/templates/python/generic/post_processing:plot:matplotlib.pyi similarity index 100% rename from assets/python/generic/post_processing:plot:matplotlib.pyi rename to templates/python/generic/post_processing:plot:matplotlib.pyi diff --git a/assets/python/generic/processing:find_extrema.pyi b/templates/python/generic/processing:find_extrema.pyi similarity index 100% rename from assets/python/generic/processing:find_extrema.pyi rename to templates/python/generic/processing:find_extrema.pyi diff --git a/assets/python/generic/requirements.j2.txt b/templates/python/generic/requirements.j2.txt similarity index 100% rename from assets/python/generic/requirements.j2.txt rename to templates/python/generic/requirements.j2.txt diff --git a/assets/python/hello_world.pyi b/templates/python/hello_world.pyi similarity index 100% rename from assets/python/hello_world.pyi rename to templates/python/hello_world.pyi diff --git a/assets/python/ml/generation/README.md b/templates/python/ml/generation/README.md similarity index 100% rename from assets/python/ml/generation/README.md rename to templates/python/ml/generation/README.md diff --git a/assets/python/ml/generation/config.yaml b/templates/python/ml/generation/config.yaml similarity index 100% rename from assets/python/ml/generation/config.yaml rename to templates/python/ml/generation/config.yaml diff --git a/assets/python/ml/generation/model.yaml b/templates/python/ml/generation/model.yaml similarity index 100% rename from assets/python/ml/generation/model.yaml rename to templates/python/ml/generation/model.yaml diff --git a/assets/python/ml/generation/render_templates.py b/templates/python/ml/generation/render_templates.py similarity index 100% rename from assets/python/ml/generation/render_templates.py rename to templates/python/ml/generation/render_templates.py diff --git a/assets/python/ml/generation/templates/model.pyi b/templates/python/ml/generation/templates/model.pyi similarity index 100% rename from assets/python/ml/generation/templates/model.pyi rename to templates/python/ml/generation/templates/model.pyi diff --git a/assets/python/ml/pyml:custom.pyi b/templates/python/ml/pyml:custom.pyi similarity index 100% rename from assets/python/ml/pyml:custom.pyi rename to templates/python/ml/pyml:custom.pyi diff --git a/assets/python/ml/pyml:data_input:read_csv:pandas.pyi b/templates/python/ml/pyml:data_input:read_csv:pandas.pyi similarity index 100% rename from assets/python/ml/pyml:data_input:read_csv:pandas.pyi rename to templates/python/ml/pyml:data_input:read_csv:pandas.pyi diff --git a/assets/python/ml/pyml:data_input:train_test_split:sklearn.pyi b/templates/python/ml/pyml:data_input:train_test_split:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:data_input:train_test_split:sklearn.pyi rename to templates/python/ml/pyml:data_input:train_test_split:sklearn.pyi diff --git a/assets/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi b/templates/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi rename to templates/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi diff --git a/assets/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi b/templates/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi rename to templates/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi diff --git a/assets/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi b/templates/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi rename to templates/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi diff --git a/assets/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi b/templates/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi rename to templates/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi diff --git a/assets/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi b/templates/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi rename to templates/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi diff --git a/assets/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi b/templates/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi rename to templates/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi diff --git a/assets/python/ml/pyml:model:k_means_clustering:sklearn.pyi b/templates/python/ml/pyml:model:k_means_clustering:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:k_means_clustering:sklearn.pyi rename to templates/python/ml/pyml:model:k_means_clustering:sklearn.pyi diff --git a/assets/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi b/templates/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi rename to templates/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi diff --git a/assets/python/ml/pyml:model:lasso_regression:sklearn.pyi b/templates/python/ml/pyml:model:lasso_regression:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:lasso_regression:sklearn.pyi rename to templates/python/ml/pyml:model:lasso_regression:sklearn.pyi diff --git a/assets/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi b/templates/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi rename to templates/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi diff --git a/assets/python/ml/pyml:model:random_forest_classification:sklearn.pyi b/templates/python/ml/pyml:model:random_forest_classification:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:random_forest_classification:sklearn.pyi rename to templates/python/ml/pyml:model:random_forest_classification:sklearn.pyi diff --git a/assets/python/ml/pyml:model:random_forest_regression:sklearn.pyi b/templates/python/ml/pyml:model:random_forest_regression:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:random_forest_regression:sklearn.pyi rename to templates/python/ml/pyml:model:random_forest_regression:sklearn.pyi diff --git a/assets/python/ml/pyml:model:ridge_regression:sklearn.pyi b/templates/python/ml/pyml:model:ridge_regression:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:model:ridge_regression:sklearn.pyi rename to templates/python/ml/pyml:model:ridge_regression:sklearn.pyi diff --git a/assets/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi b/templates/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi similarity index 100% rename from assets/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi rename to templates/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi diff --git a/assets/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi b/templates/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi similarity index 100% rename from assets/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi rename to templates/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi diff --git a/assets/python/ml/pyml:post_processing:roc_curve:sklearn.pyi b/templates/python/ml/pyml:post_processing:roc_curve:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:post_processing:roc_curve:sklearn.pyi rename to templates/python/ml/pyml:post_processing:roc_curve:sklearn.pyi diff --git a/assets/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi b/templates/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi rename to templates/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi diff --git a/assets/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi b/templates/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi similarity index 100% rename from assets/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi rename to templates/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi diff --git a/assets/python/ml/pyml:pre_processing:remove_missing:pandas.pyi b/templates/python/ml/pyml:pre_processing:remove_missing:pandas.pyi similarity index 100% rename from assets/python/ml/pyml:pre_processing:remove_missing:pandas.pyi rename to templates/python/ml/pyml:pre_processing:remove_missing:pandas.pyi diff --git a/assets/python/ml/pyml:pre_processing:standardization:sklearn.pyi b/templates/python/ml/pyml:pre_processing:standardization:sklearn.pyi similarity index 100% rename from assets/python/ml/pyml:pre_processing:standardization:sklearn.pyi rename to templates/python/ml/pyml:pre_processing:standardization:sklearn.pyi diff --git a/assets/python/ml/pyml:setup_variables_packages.pyi b/templates/python/ml/pyml:setup_variables_packages.pyi similarity index 100% rename from assets/python/ml/pyml:setup_variables_packages.pyi rename to templates/python/ml/pyml:setup_variables_packages.pyi diff --git a/assets/python/ml/requirements.j2.txt b/templates/python/ml/requirements.j2.txt similarity index 100% rename from assets/python/ml/requirements.j2.txt rename to templates/python/ml/requirements.j2.txt diff --git a/assets/python/requirements.j2.txt b/templates/python/requirements.j2.txt similarity index 100% rename from assets/python/requirements.j2.txt rename to templates/python/requirements.j2.txt diff --git a/assets/python/requirements_empty.j2.txt b/templates/python/requirements_empty.j2.txt similarity index 100% rename from assets/python/requirements_empty.j2.txt rename to templates/python/requirements_empty.j2.txt diff --git a/assets/shell/bash_espresso_collect_dynmat.j2.sh b/templates/shell/bash_espresso_collect_dynmat.j2.sh similarity index 100% rename from assets/shell/bash_espresso_collect_dynmat.j2.sh rename to templates/shell/bash_espresso_collect_dynmat.j2.sh diff --git a/assets/shell/bash_espresso_link_outdir_save.j2.sh b/templates/shell/bash_espresso_link_outdir_save.j2.sh similarity index 100% rename from assets/shell/bash_espresso_link_outdir_save.j2.sh rename to templates/shell/bash_espresso_link_outdir_save.j2.sh diff --git a/assets/shell/bash_hello_world.j2.sh b/templates/shell/bash_hello_world.j2.sh similarity index 100% rename from assets/shell/bash_hello_world.j2.sh rename to templates/shell/bash_hello_world.j2.sh diff --git a/assets/shell/bash_job_espresso_pw_scf.j2.sh b/templates/shell/bash_job_espresso_pw_scf.j2.sh similarity index 100% rename from assets/shell/bash_job_espresso_pw_scf.j2.sh rename to templates/shell/bash_job_espresso_pw_scf.j2.sh diff --git a/assets/shell/bash_vasp_prepare_neb_images.j2.sh b/templates/shell/bash_vasp_prepare_neb_images.j2.sh similarity index 100% rename from assets/shell/bash_vasp_prepare_neb_images.j2.sh rename to templates/shell/bash_vasp_prepare_neb_images.j2.sh diff --git a/assets/vasp/INCAR.j2 b/templates/vasp/INCAR.j2 similarity index 100% rename from assets/vasp/INCAR.j2 rename to templates/vasp/INCAR.j2 diff --git a/assets/vasp/INCAR_bands.j2 b/templates/vasp/INCAR_bands.j2 similarity index 100% rename from assets/vasp/INCAR_bands.j2 rename to templates/vasp/INCAR_bands.j2 diff --git a/assets/vasp/INCAR_neb.j2 b/templates/vasp/INCAR_neb.j2 similarity index 100% rename from assets/vasp/INCAR_neb.j2 rename to templates/vasp/INCAR_neb.j2 diff --git a/assets/vasp/INCAR_neb_initial_final.j2 b/templates/vasp/INCAR_neb_initial_final.j2 similarity index 100% rename from assets/vasp/INCAR_neb_initial_final.j2 rename to templates/vasp/INCAR_neb_initial_final.j2 diff --git a/assets/vasp/INCAR_relax.j2 b/templates/vasp/INCAR_relax.j2 similarity index 100% rename from assets/vasp/INCAR_relax.j2 rename to templates/vasp/INCAR_relax.j2 diff --git a/assets/vasp/INCAR_vc_relax.j2 b/templates/vasp/INCAR_vc_relax.j2 similarity index 100% rename from assets/vasp/INCAR_vc_relax.j2 rename to templates/vasp/INCAR_vc_relax.j2 diff --git a/assets/vasp/INCAR_zpe.j2 b/templates/vasp/INCAR_zpe.j2 similarity index 100% rename from assets/vasp/INCAR_zpe.j2 rename to templates/vasp/INCAR_zpe.j2 diff --git a/assets/vasp/KPOINTS.j2 b/templates/vasp/KPOINTS.j2 similarity index 100% rename from assets/vasp/KPOINTS.j2 rename to templates/vasp/KPOINTS.j2 diff --git a/assets/vasp/KPOINTS_bands.j2 b/templates/vasp/KPOINTS_bands.j2 similarity index 100% rename from assets/vasp/KPOINTS_bands.j2 rename to templates/vasp/KPOINTS_bands.j2 diff --git a/assets/vasp/KPOINTS_conv.j2 b/templates/vasp/KPOINTS_conv.j2 similarity index 100% rename from assets/vasp/KPOINTS_conv.j2 rename to templates/vasp/KPOINTS_conv.j2 diff --git a/assets/vasp/POSCAR.j2 b/templates/vasp/POSCAR.j2 similarity index 100% rename from assets/vasp/POSCAR.j2 rename to templates/vasp/POSCAR.j2 diff --git a/assets/vasp/POSCAR_NEB_final.j2 b/templates/vasp/POSCAR_NEB_final.j2 similarity index 100% rename from assets/vasp/POSCAR_NEB_final.j2 rename to templates/vasp/POSCAR_NEB_final.j2 diff --git a/assets/vasp/POSCAR_NEB_initial.j2 b/templates/vasp/POSCAR_NEB_initial.j2 similarity index 100% rename from assets/vasp/POSCAR_NEB_initial.j2 rename to templates/vasp/POSCAR_NEB_initial.j2 diff --git a/assets/vasp/_MIXIN_INCAR_hse.j2 b/templates/vasp/_MIXIN_INCAR_hse.j2 similarity index 100% rename from assets/vasp/_MIXIN_INCAR_hse.j2 rename to templates/vasp/_MIXIN_INCAR_hse.j2 From 41d2778ce6b160ec9dc9d30612efe09d5b5643e8 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 1 Aug 2023 15:43:15 -0700 Subject: [PATCH 02/52] chore: move application data to Yaml --- applications/espresso.yml | 93 +++++++++++++++++++++++++++++++++++++ applications/jupyterLab.yml | 10 ++++ applications/ml.yml | 7 +++ applications/nwchem.yml | 8 ++++ applications/python.yml | 11 +++++ applications/shell.yml | 7 +++ applications/vasp.yml | 33 +++++++++++++ 7 files changed, 169 insertions(+) create mode 100644 applications/espresso.yml create mode 100644 applications/jupyterLab.yml create mode 100644 applications/ml.yml create mode 100644 applications/nwchem.yml create mode 100644 applications/python.yml create mode 100644 applications/shell.yml create mode 100644 applications/vasp.yml diff --git a/applications/espresso.yml b/applications/espresso.yml new file mode 100644 index 00000000..f2eb9a44 --- /dev/null +++ b/applications/espresso.yml @@ -0,0 +1,93 @@ +name: espresso +shortName: qe +summary: Quantum Espresso +defaultVersion: "5.4.0" +versions: +# version 5.2.1 + - version: "5.2.1" + isDefault: true + hasAdvancedComputeOptions: true + - version: "5.2.1" + isDefault: false + build: GNU + hasAdvancedComputeOptions: true + - version: "5.2.1" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true +# version 5.4.0 + - version: "5.4.0" + isDefault: true + hasAdvancedComputeOptions: true + - version: "5.4.0" + isDefault: false + build: GNU + hasAdvancedComputeOptions: true + - version: "5.4.0" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true +# version 6.0.0 + - version: "6.0.0" + isDefault: true + hasAdvancedComputeOptions: true + - version: "6.0.0" + isDefault: false + build: GNU + hasAdvancedComputeOptions: true + - version: "6.0.0" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true +# version 6.3 + - version: "6.3" + isDefault: true + hasAdvancedComputeOptions: true + - version: "6.3" + isDefault: false + build: GNU + hasAdvancedComputeOptions: true + - version: "6.3" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true +# version 6.4.1 + - version: "6.4.1" + isDefault: true + hasAdvancedComputeOptions: true +# version 6.5.0 + - version: "6.5.0" + isDefault: true + hasAdvancedComputeOptions: true +# version 6.6.0 + - version: "6.6.0" + isDefault: true + hasAdvancedComputeOptions: true +# version 6.7.0 + - version: "6.7.0" + isDefault: true + hasAdvancedComputeOptions: true +# version 6.8.0 + - version: "6.8.0" + isDefault: true + hasAdvancedComputeOptions: true +# version 7.0 + - version: "7.0" + isDefault: true + hasAdvancedComputeOptions: true + - version: "7.0" + isDefault: false + build: GNU + hasAdvancedComputeOptions: true + - version: "7.0" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true +# version 7.2 + - version: "7.2" + isDefault: true + hasAdvancedComputeOptions: true + - version: "7.2" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true diff --git a/applications/jupyterLab.yml b/applications/jupyterLab.yml new file mode 100644 index 00000000..d8ea2115 --- /dev/null +++ b/applications/jupyterLab.yml @@ -0,0 +1,10 @@ +name: jupyterLab +shortName: jl +summary: JupyterLab +defaultVersion: "3.0.3" +versions: + - version: "3.0.3" + isDefault: true + - version: "3.0.3" + isDefault: false + build: with-pre-installed-packages diff --git a/applications/ml.yml b/applications/ml.yml new file mode 100644 index 00000000..112a4893 --- /dev/null +++ b/applications/ml.yml @@ -0,0 +1,7 @@ +name: exabyteml +shortName: ml +summary: Exabyte Machine Learning Engine +defaultVersion: "0.2.0" +versions: + - version: "0.2.0" + isDefault: true diff --git a/applications/nwchem.yml b/applications/nwchem.yml new file mode 100644 index 00000000..ae762ab8 --- /dev/null +++ b/applications/nwchem.yml @@ -0,0 +1,8 @@ +name: nwchem +shortName: nwchem +summary: NWChem +defaultVersion: "7.0.2" +versions: + - version: "7.0.2" + isDefault: true + - version: "6.6" diff --git a/applications/python.yml b/applications/python.yml new file mode 100644 index 00000000..5b6dfe88 --- /dev/null +++ b/applications/python.yml @@ -0,0 +1,11 @@ +name: python +shortName: py +summary: Python Script +defaultVersion: "3.8.6" +versions: + - version: "3.6.12" + - version: "3.7.9" + - version: "3.8.6" + isDefault: true + - version: "3.9.1" + - version: "anaconda3-5.2.0" diff --git a/applications/shell.yml b/applications/shell.yml new file mode 100644 index 00000000..c6480c52 --- /dev/null +++ b/applications/shell.yml @@ -0,0 +1,7 @@ +name: shell +shortName: sh +summary: Shell Script +defaultVersion: "4.2.46" +versions: + - version: "4.2.46" + isDefault: true diff --git a/applications/vasp.yml b/applications/vasp.yml new file mode 100644 index 00000000..b8a74e10 --- /dev/null +++ b/applications/vasp.yml @@ -0,0 +1,33 @@ +name: vasp +shortName: vasp +summary: Vienna Ab-initio Simulation Package +defaultVersion: "5.3.5" +isLicensed: true +versions: +# version 5.3.5 + - version: "5.3.5" + isDefault: true + - version: "5.3.5" + isDefault: false + build: Non-collinear + - version: "5.3.5" + isDefault: false + build: VTST +# version 5.4.4 + - version: "5.4.4" + isDefault: true + - version: "5.4.4" + isDefault: false + build: Gamma + - version: "5.4.4" + isDefault: false + build: Non-collinear + - version: "5.4.4" + isDefault: false + build: VTST + - version: "5.4.4" + isDefault: false + build: VTST-Gamma + - version: "5.4.4" + isDefault: false + build: VTST-Non-collinear From d54e9f2e552607ba13abc93d8ec27e09d40fa4cd Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 1 Aug 2023 18:11:25 -0700 Subject: [PATCH 03/52] chore: move assets.js to Yaml --- assets/espresso/average.x.yml | 5 + assets/espresso/bands.x.yml | 5 + assets/espresso/dos.x.yml | 5 + assets/espresso/dynmat.x.yml | 6 + assets/espresso/matdyn.x.yml | 13 ++ assets/espresso/neb.x.yml | 9 ++ assets/espresso/ph.x.yml | 40 ++++++ assets/espresso/pp.x.yml | 11 ++ assets/espresso/projwfc.x.yml | 5 + assets/espresso/pw.x.yml | 91 +++++++++++++ assets/espresso/q2r.x.yml | 5 + assets/espresso/sternheimer_gw.yml | 17 +++ assets/jupyterLab/jupyter.yml | 5 + assets/nwchem/nwchem.yml | 6 + assets/python/python.yml | 199 +++++++++++++++++++++++++++++ assets/shell/sh.yml | 30 +++++ assets/vasp/vasp.yml | 115 +++++++++++++++++ 17 files changed, 567 insertions(+) create mode 100644 assets/espresso/average.x.yml create mode 100644 assets/espresso/bands.x.yml create mode 100644 assets/espresso/dos.x.yml create mode 100644 assets/espresso/dynmat.x.yml create mode 100644 assets/espresso/matdyn.x.yml create mode 100644 assets/espresso/neb.x.yml create mode 100644 assets/espresso/ph.x.yml create mode 100644 assets/espresso/pp.x.yml create mode 100644 assets/espresso/projwfc.x.yml create mode 100644 assets/espresso/pw.x.yml create mode 100644 assets/espresso/q2r.x.yml create mode 100644 assets/espresso/sternheimer_gw.yml create mode 100644 assets/jupyterLab/jupyter.yml create mode 100644 assets/nwchem/nwchem.yml create mode 100644 assets/python/python.yml create mode 100644 assets/shell/sh.yml create mode 100644 assets/vasp/vasp.yml diff --git a/assets/espresso/average.x.yml b/assets/espresso/average.x.yml new file mode 100644 index 00000000..3870cde1 --- /dev/null +++ b/assets/espresso/average.x.yml @@ -0,0 +1,5 @@ +- content: !readFile "templates/espresso/average.j2.in" + name: average.in + contextProviders: [] + applicationName: espresso + executableName: average.x diff --git a/assets/espresso/bands.x.yml b/assets/espresso/bands.x.yml new file mode 100644 index 00000000..b55934a5 --- /dev/null +++ b/assets/espresso/bands.x.yml @@ -0,0 +1,5 @@ +- content: !readFile "templates/espresso/bands.j2.in" + name: bands.in + contextProviders: [] + applicationName: espresso + executableName: bands.x diff --git a/assets/espresso/dos.x.yml b/assets/espresso/dos.x.yml new file mode 100644 index 00000000..030f9466 --- /dev/null +++ b/assets/espresso/dos.x.yml @@ -0,0 +1,5 @@ +- content: !readFile "templates/espresso/dos.j2.in" + name: dos.in + contextProviders: [] + applicationName: espresso + executableName: dos.x diff --git a/assets/espresso/dynmat.x.yml b/assets/espresso/dynmat.x.yml new file mode 100644 index 00000000..729f8fbe --- /dev/null +++ b/assets/espresso/dynmat.x.yml @@ -0,0 +1,6 @@ +- content: !readFile "templates/espresso/matdyn_grid.j2.in" + name: dynmat_grid.in + contextProviders: + - name: IGridFormDataManager + applicationName: espresso + executableName: dynmat.x diff --git a/assets/espresso/matdyn.x.yml b/assets/espresso/matdyn.x.yml new file mode 100644 index 00000000..5c17cf28 --- /dev/null +++ b/assets/espresso/matdyn.x.yml @@ -0,0 +1,13 @@ +- content: !readFile "templates/espresso/matdyn_grid.j2.in" + name: matdyn_grid.in + contextProviders: + - name: IGridFormDataManager + applicationName: espresso + executableName: matdyn.x + +- content: !readFile "templates/espresso/matdyn_path.j2.in" + name: matdyn_path.in + contextProviders: + - name: IPathFormDataManager + applicationName: espresso + executableName: matdyn.x diff --git a/assets/espresso/neb.x.yml b/assets/espresso/neb.x.yml new file mode 100644 index 00000000..bbcfad1b --- /dev/null +++ b/assets/espresso/neb.x.yml @@ -0,0 +1,9 @@ +- content: !readFile "templates/espresso/neb.j2.in" + name: neb.in + contextProviders: + - name: KGridFormDataManager + - name: NEBFormDataManager + - name: QENEBInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: neb.x diff --git a/assets/espresso/ph.x.yml b/assets/espresso/ph.x.yml new file mode 100644 index 00000000..30e17f9b --- /dev/null +++ b/assets/espresso/ph.x.yml @@ -0,0 +1,40 @@ +- content: !readFile "templates/espresso/ph_grid.j2.in" + name: ph_grid.in + contextProviders: + - name: QGridFormDataManager + applicationName: espresso + executableName: ph.x + +- content: !readFile "templates/espresso/ph_path.j2.in" + name: ph_path.in + contextProviders: + - name: QPathFormDataManager + applicationName: espresso + executableName: ph.x + +- content: !readFile "templates/espresso/ph_gamma.j2.in" + name: ph_gamma.in + contextProviders: [] + applicationName: espresso + executableName: ph.x + +- content: !readFile "templates/espresso/ph_init_qpoints.j2.in" + name: ph_init_qpoints.in + contextProviders: + - name: QGridFormDataManager + applicationName: espresso + executableName: ph.x + +- content: !readFile "templates/espresso/ph_grid_restart.j2.in" + name: ph_grid_restart.in + contextProviders: + - name: QGridFormDataManager + applicationName: espresso + executableName: ph.x + +- content: !readFile "templates/espresso/ph_single_irr_qpt.j2.in" + name: ph_single_irr_qpt.in + contextProviders: + - name: QGridFormDataManager + applicationName: espresso + executableName: ph.x diff --git a/assets/espresso/pp.x.yml b/assets/espresso/pp.x.yml new file mode 100644 index 00000000..5c2bae24 --- /dev/null +++ b/assets/espresso/pp.x.yml @@ -0,0 +1,11 @@ +- content: !readFile "templates/espresso/pp_density.j2.in" + name: pp_density.in + contextProviders: [] + applicationName: espresso + executableName: pp.x + +- content: !readFile "templates/espresso/pp_electrostatic_potential.j2.in" + name: pp_electrostatic_potential.in + contextProviders: [] + applicationName: espresso + executableName: pp.x diff --git a/assets/espresso/projwfc.x.yml b/assets/espresso/projwfc.x.yml new file mode 100644 index 00000000..73009ed3 --- /dev/null +++ b/assets/espresso/projwfc.x.yml @@ -0,0 +1,5 @@ +- content: !readFile "templates/espresso/projwfc.j2.in" + name: projwfc.in + contextProviders: [] + applicationName: espresso + executableName: projwfc.x diff --git a/assets/espresso/pw.x.yml b/assets/espresso/pw.x.yml new file mode 100644 index 00000000..195c7878 --- /dev/null +++ b/assets/espresso/pw.x.yml @@ -0,0 +1,91 @@ +- content: !readFile "templates/espresso/pw_scf.j2.in" + name: pw_scf.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x + +- content: !readFile "templates/espresso/pw_scf_bands_hse.j2.in" + name: pw_scf_bands_hse.in + contextProviders: + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + - name: QGridFormDataManager + - name: ExplicitKPathFormDataManager + applicationName: espresso + executableName: pw.x + +- content: !readFile "templates/espresso/pw_esm.j2.in" + name: pw_esm.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + - name: BoundaryConditionsFormDataManager + applicationName: espresso + executableName: pw.x + +- content: !readFile "templates/espresso/pw_esm_relax.j2.in" + name: pw_esm_relax.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + - name: BoundaryConditionsFormDataManager + applicationName: espresso + executableName: pw.x + +- content: !readFile "templates/espresso/pw_scf_kpt_conv.j2.in" + name: pw_scf_kpt_conv.in + contextProviders: + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x + +- content: !readFile "templates/espresso/pw_nscf.j2.in" + name: pw_nscf.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x + +- content: !readFile "templates/espresso/pw_relax.j2.in" + name: pw_relax.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x + +- content: !readFile "templates/espresso/pw_vc_relax.j2.in" + name: pw_vc_relax.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x + +- content: !readFile "templates/espresso/pw_bands.j2.in" + name: pw_bands.in + contextProviders: + - name: KPathFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x + +- content: !readFile "templates/espresso/pw_scf_hse.j2.in" + name: pw_scf_hse.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x diff --git a/assets/espresso/q2r.x.yml b/assets/espresso/q2r.x.yml new file mode 100644 index 00000000..3f8120ea --- /dev/null +++ b/assets/espresso/q2r.x.yml @@ -0,0 +1,5 @@ +- content: !readFile "templates/espresso/q2r.j2.in" + name: q2r.in + contextProviders: [] + applicationName: espresso + executableName: q2r.x diff --git a/assets/espresso/sternheimer_gw.yml b/assets/espresso/sternheimer_gw.yml new file mode 100644 index 00000000..1945758d --- /dev/null +++ b/assets/espresso/sternheimer_gw.yml @@ -0,0 +1,17 @@ +- content: !readFile "templates/espresso/gw_bands_plasmon_pole.j2.in" + name: gw_bands_plasmon_pole.in + contextProviders: + - name: KGridFormDataManager + - name: QGridFormDataManager + - name: ExplicitKPath2PIBAFormDataManager + applicationName: espresso + executableName: gw.x + +- content: !readFile "templates/espresso/gw_bands_full_frequency.j2.in" + name: gw_bands_full_frequency.in + contextProviders: + - name: KGridFormDataManager + - name: QGridFormDataManager + - name: ExplicitKPath2PIBAFormDataManager + applicationName: espresso + executableName: gw.x diff --git a/assets/jupyterLab/jupyter.yml b/assets/jupyterLab/jupyter.yml new file mode 100644 index 00000000..0f365806 --- /dev/null +++ b/assets/jupyterLab/jupyter.yml @@ -0,0 +1,5 @@ +- content: !readFile "templates/jupyterLab/requirements303.j2.txt" + name: requirements.txt + contextProviders: [] + applicationName: jupyterLab + executableName: jupyter diff --git a/assets/nwchem/nwchem.yml b/assets/nwchem/nwchem.yml new file mode 100644 index 00000000..90483bea --- /dev/null +++ b/assets/nwchem/nwchem.yml @@ -0,0 +1,6 @@ +- content: !readFile "templates/nwchem/nwchem_total_energy.j2.inp" + name: nwchem_total_energy.inp + contextProviders: + - name: NWChemInputDataManager + applicationName: nwchem + executableName: nwchem diff --git a/assets/python/python.yml b/assets/python/python.yml new file mode 100644 index 00000000..b5f36013 --- /dev/null +++ b/assets/python/python.yml @@ -0,0 +1,199 @@ +- content: !readFile "templates/python/hello_world.pyi" + name: hello_world.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/requirements.j2.txt" + name: requirements.txt + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/requirements_empty.j2.txt" + name: requirements_empty.txt + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/generic/post_processing:plot:matplotlib.pyi" + name: matplotlib_basic.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/espresso_xml_get_qpt_irr.pyi" + name: espresso_xml_get_qpt_irr.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/espresso_extract_kpoints.pyi" + name: espresso_extract_kpoints.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/generic/processing:find_extrema.pyi" + name: find_extrema.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/generic/requirements.j2.txt" + name: processing_requirements.txt + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/requirements.j2.txt" + name: pyml_requirements.txt + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:setup_variables_packages.pyi" + name: pyml_settings.py + contextProviders: + - name: MLSettingsDataManager + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:custom.pyi" + name: pyml_custom.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:data_input:read_csv:pandas.pyi" + name: data_input_read_csv_pandas.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:data_input:train_test_split:sklearn.pyi" + name: data_input_train_test_split_sklearn.py + contextProviders: + - name: MLTrainTestSplitDataManager + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi" + name: pre_processing_min_max_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi" + name: pre_processing_remove_duplicates_pandas.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:pre_processing:remove_missing:pandas.pyi" + name: pre_processing_remove_missing_pandas.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:pre_processing:standardization:sklearn.pyi" + name: pre_processing_standardization_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi" + name: model_adaboosted_trees_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi" + name: model_bagged_trees_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi" + name: model_gradboosted_trees_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi" + name: model_extreme_gradboosted_trees_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:k_means_clustering:sklearn.pyi" + name: model_k_means_clustering_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi" + name: model_kernel_ridge_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:lasso_regression:sklearn.pyi" + name: model_lasso_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi" + name: model_mlp_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:random_forest_classification:sklearn.pyi" + name: model_random_forest_classification_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi" + name: model_gradboosted_trees_classification_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi" + name: model_extreme_gradboosted_trees_classification_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:random_forest_regression:sklearn.pyi" + name: model_random_forest_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:model:ridge_regression:sklearn.pyi" + name: model_ridge_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi" + name: post_processing_parity_plot_matplotlib.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi" + name: post_processing_pca_2d_clusters_matplotlib.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile "templates/python/ml/pyml:post_processing:roc_curve:sklearn.pyi" + name: post_processing_roc_curve_sklearn.py + contextProviders: [] + applicationName: python + executableName: python diff --git a/assets/shell/sh.yml b/assets/shell/sh.yml new file mode 100644 index 00000000..d03e826e --- /dev/null +++ b/assets/shell/sh.yml @@ -0,0 +1,30 @@ +- content: !readFile "templates/shell/bash_hello_world.j2.sh" + name: hello_world.sh + contextProviders: [] + applicationName: shell + executableName: sh + +- content: !readFile "templates/shell/bash_job_espresso_pw_scf.j2.sh" + name: job_espresso_pw_scf.sh + contextProviders: [] + applicationName: shell + executableName: sh + +- content: !readFile "templates/shell/bash_espresso_link_outdir_save.j2.sh" + name: espresso_link_outdir_save.sh + contextProviders: [] + applicationName: shell + executableName: sh + +- content: !readFile "templates/shell/bash_espresso_collect_dynmat.j2.sh" + name: espresso_collect_dynmat.sh + contextProviders: [] + applicationName: shell + executableName: sh + +- content: !readFile "templates/shell/bash_vasp_prepare_neb_images.j2.sh" + name: bash_vasp_prepare_neb_images.sh + contextProviders: + - name: VASPNEBInputDataManager + applicationName: shell + executableName: sh diff --git a/assets/vasp/vasp.yml b/assets/vasp/vasp.yml new file mode 100644 index 00000000..ba59287e --- /dev/null +++ b/assets/vasp/vasp.yml @@ -0,0 +1,115 @@ +- content: !readFile "templates/vasp/INCAR.j2" + name: INCAR + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/INCAR_bands.j2" + name: INCAR_BANDS + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/INCAR_zpe.j2" + name: INCAR_ZPE + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/INCAR_relax.j2" + name: INCAR_RELAX + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/INCAR_vc_relax.j2" + name: INCAR_VC_RELAX + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !concatString + - !readFile "templates/vasp/INCAR.j2" + - !readFile "templates/vasp/_MIXIN_INCAR_hse.j2" + name: INCAR_HSE + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !concatString + - !readFile "templates/vasp/INCAR_bands.j2" + - !readFile "templates/vasp/_MIXIN_INCAR_hse.j2" + name: INCAR_BANDS_HSE + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/KPOINTS.j2" + name: KPOINTS + contextProviders: + - name: KGridFormDataManager + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/KPOINTS_bands.j2" + name: KPOINTS_BANDS + contextProviders: + - name: KPathFormDataManager + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/KPOINTS_conv.j2" + name: KPOINTS_CONV + contextProviders: + - name: KGridFormDataManager + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/POSCAR.j2" + name: POSCAR + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/INCAR_neb.j2" + name: INCAR_NEB + contextProviders: + - name: NEBFormDataManager + - name: VASPNEBInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/INCAR_neb_initial_final.j2" + name: INCAR_NEB_INITIAL_FINAL + contextProviders: + - name: NEBFormDataManager + - name: VASPNEBInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/POSCAR_NEB_initial.j2" + name: POSCAR_NEB_INITIAL + contextProviders: + - name: NEBFormDataManager + - name: VASPNEBInputDataManager + applicationName: vasp + executableName: vasp + +- content: !readFile "templates/vasp/POSCAR_NEB_final.j2" + name: POSCAR_NEB_FINAL + contextProviders: + - name: NEBFormDataManager + - name: VASPNEBInputDataManager + applicationName: vasp + executableName: vasp From 3f23543c20eed395d6dad614cdfb861394b649da Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 1 Aug 2023 18:12:07 -0700 Subject: [PATCH 04/52] codejs++: extend Yaml types --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e4d4914..c2a93dee 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "homepage": "https://github.com/Exabyte-io/exabyte-application-flavors", "devDependencies": { "@exabyte-io/eslint-config": "^2022.11.17-0", - "@exabyte-io/code.js": "2023.7.11-0", + "@exabyte-io/code.js": "git+https://github.com/Exabyte-io/code.js.git#1a0884db8d778d146c91d31234291221788c5881", "chai": "^4.3.4", "eslint": "^7.32.0", "eslint-config-airbnb": "^19.0.2", From d0357798e7871192155bff0f28ce36c23f77b2c9 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Wed, 2 Aug 2023 14:52:20 -0700 Subject: [PATCH 05/52] chore: rename sternheimer_gw -> gw.x --- assets/espresso/{sternheimer_gw.yml => gw.x.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename assets/espresso/{sternheimer_gw.yml => gw.x.yml} (100%) diff --git a/assets/espresso/sternheimer_gw.yml b/assets/espresso/gw.x.yml similarity index 100% rename from assets/espresso/sternheimer_gw.yml rename to assets/espresso/gw.x.yml From 6f5fef683bbc73be0837af5657971613a56b7f4c Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Wed, 2 Aug 2023 17:55:43 -0700 Subject: [PATCH 06/52] feat: move executables tree to Yaml --- executables/espresso/average.x.yml | 23 ++ executables/espresso/bands.x.yml | 14 ++ executables/espresso/dos.x.yml | 14 ++ executables/espresso/dynmat.x.yml | 12 + executables/espresso/gw.x.yml | 30 +++ executables/espresso/matdyn.x.yml | 25 ++ executables/espresso/neb.x.yml | 17 ++ executables/espresso/ph.x.yml | 63 +++++ executables/espresso/pp.x.yml | 21 ++ executables/espresso/projwfc.x.yml | 14 ++ executables/espresso/pw.x.yml | 186 +++++++++++++++ executables/espresso/q2r.x.yml | 12 + executables/exabyteml/score.yml | 13 ++ executables/exabyteml/train.yml | 13 ++ executables/jupyterLab/jupyter.yml | 16 ++ executables/nwchem/nwchem.yml | 21 ++ executables/python/python.yml | 353 +++++++++++++++++++++++++++++ executables/shell/sh.yml | 65 ++++++ executables/tree.yml | 26 +++ executables/vasp/vasp.yml | 314 +++++++++++++++++++++++++ 20 files changed, 1252 insertions(+) create mode 100644 executables/espresso/average.x.yml create mode 100644 executables/espresso/bands.x.yml create mode 100644 executables/espresso/dos.x.yml create mode 100644 executables/espresso/dynmat.x.yml create mode 100644 executables/espresso/gw.x.yml create mode 100644 executables/espresso/matdyn.x.yml create mode 100644 executables/espresso/neb.x.yml create mode 100644 executables/espresso/ph.x.yml create mode 100644 executables/espresso/pp.x.yml create mode 100644 executables/espresso/projwfc.x.yml create mode 100644 executables/espresso/pw.x.yml create mode 100644 executables/espresso/q2r.x.yml create mode 100644 executables/exabyteml/score.yml create mode 100644 executables/exabyteml/train.yml create mode 100644 executables/jupyterLab/jupyter.yml create mode 100644 executables/nwchem/nwchem.yml create mode 100644 executables/python/python.yml create mode 100644 executables/shell/sh.yml create mode 100644 executables/tree.yml create mode 100644 executables/vasp/vasp.yml diff --git a/executables/espresso/average.x.yml b/executables/espresso/average.x.yml new file mode 100644 index 00000000..097115f7 --- /dev/null +++ b/executables/espresso/average.x.yml @@ -0,0 +1,23 @@ +monitors: + - standard_output +results: + - average_potential_profile +flavors: + average: + input: + - name: average.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: average.x + + average_potential: + input: + - name: average.in + results: + - average_potential_profile + monitors: + - standard_output + applicationName: espresso + executableName: average.x diff --git a/executables/espresso/bands.x.yml b/executables/espresso/bands.x.yml new file mode 100644 index 00000000..f2805113 --- /dev/null +++ b/executables/espresso/bands.x.yml @@ -0,0 +1,14 @@ +monitors: + - standard_output +results: + - band_structure +flavors: + bands: + input: + - name: bands.in + results: + - band_structure + monitors: + - standard_output + applicationName: espresso + executableName: bands.x diff --git a/executables/espresso/dos.x.yml b/executables/espresso/dos.x.yml new file mode 100644 index 00000000..953d76c5 --- /dev/null +++ b/executables/espresso/dos.x.yml @@ -0,0 +1,14 @@ +monitors: + - standard_output +results: + - density_of_states +flavors: + dos: + input: + - name: dos.in + results: + - density_of_states + monitors: + - standard_output + applicationName: espresso + executableName: dos.x diff --git a/executables/espresso/dynmat.x.yml b/executables/espresso/dynmat.x.yml new file mode 100644 index 00000000..46ab296d --- /dev/null +++ b/executables/espresso/dynmat.x.yml @@ -0,0 +1,12 @@ +monitors: + - standard_output +results: [] +flavors: + dynmat: + input: + - name: dynmat_grid.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: dynmat.x diff --git a/executables/espresso/gw.x.yml b/executables/espresso/gw.x.yml new file mode 100644 index 00000000..43fd7340 --- /dev/null +++ b/executables/espresso/gw.x.yml @@ -0,0 +1,30 @@ +monitors: + - standard_output +results: + - band_structure + - fermi_energy + - band_gaps +flavors: + gw_bands_plasmon_pole: + input: + - name: gw_bands_plasmon_pole.in + results: + - band_structure + - fermi_energy + - band_gaps + monitors: + - standard_output + applicationName: espresso + executableName: gw.x + + gw_bands_full_frequency: + input: + - name: gw_bands_full_frequency.in + results: + - band_structure + - fermi_energy + - band_gaps + monitors: + - standard_output + applicationName: espresso + executableName: gw.x diff --git a/executables/espresso/matdyn.x.yml b/executables/espresso/matdyn.x.yml new file mode 100644 index 00000000..82e01db8 --- /dev/null +++ b/executables/espresso/matdyn.x.yml @@ -0,0 +1,25 @@ +monitors: + - standard_output +results: + - phonon_dos + - phonon_dispersions +flavors: + matdyn_grid: + input: + - name: matdyn_grid.in + monitors: + - standard_output + results: + - phonon_dos + applicationName: espresso + executableName: matdyn.x + + matdyn_path: + input: + - name: matdyn_path.in + monitors: + - standard_output + results: + - phonon_dispersions + applicationName: espresso + executableName: matdyn.x diff --git a/executables/espresso/neb.x.yml b/executables/espresso/neb.x.yml new file mode 100644 index 00000000..3e1b129a --- /dev/null +++ b/executables/espresso/neb.x.yml @@ -0,0 +1,17 @@ +monitors: + - standard_output +results: + - reaction_energy_barrier + - reaction_energy_profile +flavors: + neb: + isMultiMaterial: true + input: + - name: neb.in + results: + - reaction_energy_barrier + - reaction_energy_profile + monitors: + - standard_output + applicationName: espresso + executableName: neb.x diff --git a/executables/espresso/ph.x.yml b/executables/espresso/ph.x.yml new file mode 100644 index 00000000..20947888 --- /dev/null +++ b/executables/espresso/ph.x.yml @@ -0,0 +1,63 @@ +monitors: + - standard_output +results: + - phonon_dos + - phonon_dispersions + - zero_point_energy +flavors: + ph_path: + input: + - name: ph_path.in + results: + - phonon_dispersions + monitors: + - standard_output + applicationName: espresso + executableName: ph.x + + ph_grid: + input: + - name: ph_grid.in + results: + - phonon_dos + monitors: + - standard_output + applicationName: espresso + executableName: ph.x + + ph_gamma: + input: + - name: ph_gamma.in + results: + - zero_point_energy + monitors: + - standard_output + applicationName: espresso + executableName: ph.x + + ph_init_qpoints: + input: + - name: ph_init_qpoints.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: ph.x + + ph_grid_restart: + input: + - name: ph_grid_restart.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: ph.x + + ph_single_irr_qpt: + input: + - name: ph_single_irr_qpt.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: ph.x diff --git a/executables/espresso/pp.x.yml b/executables/espresso/pp.x.yml new file mode 100644 index 00000000..8c7edab5 --- /dev/null +++ b/executables/espresso/pp.x.yml @@ -0,0 +1,21 @@ +monitors: + - standard_output +results: [] +flavors: + pp_density: + input: + - name: pp_density.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: pp.x + + pp_electrostatic_potential: + input: + - name: pp_electrostatic_potential.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: pp.x diff --git a/executables/espresso/projwfc.x.yml b/executables/espresso/projwfc.x.yml new file mode 100644 index 00000000..813d3cb8 --- /dev/null +++ b/executables/espresso/projwfc.x.yml @@ -0,0 +1,14 @@ +monitors: + - standard_output +results: + - density_of_states +flavors: + projwfc: + input: + - name: projwfc.in + results: + - density_of_states + monitors: + - standard_output + applicationName: espresso + executableName: projwfc.x diff --git a/executables/espresso/pw.x.yml b/executables/espresso/pw.x.yml new file mode 100644 index 00000000..2aa9569f --- /dev/null +++ b/executables/espresso/pw.x.yml @@ -0,0 +1,186 @@ +isDefault: true +hasAdvancedComputeOptions: true +postProcessors: + - remove_non_zero_weight_kpoints +monitors: + - standard_output" + - convergence_ionic" + - convergence_electronic" +results: + - atomic_forces + - band_gaps + - charge_density_profile + - density_of_states + - fermi_energy + - final_structure + - magnetic_moments + - potential_profile + - pressure + - reaction_energy_barrier + - reaction_energy_profile + - stress_tensor + - total_energy + - total_energy_contributions + - total_force +flavors: + pw_scf: + isDefault: true + input: + - name: pw_scf.in + results: + - atomic_forces + - fermi_energy + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x + + pw_scf_bands_hse: + input: + - name: pw_scf_bands_hse.in + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x + + pw_scf_hse: + input: + - name: pw_scf_hse.in + results: + - atomic_forces + - band_gaps + - fermi_energy + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x + + pw_esm: + input: + - name: pw_esm.in + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + - potential_profile + - charge_density_profile + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x + + pw_esm_relax: + input: + - name: pw_esm_relax.in + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + - potential_profile + - charge_density_profile + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x + + pw_nscf: + input: + - name: pw_nscf.in + results: + - fermi_energy + - band_gaps + monitors: + - standard_output + applicationName: espresso + executableName: pw.x + + pw_bands: + input: + - name: pw_bands.in + monitors: + - standard_output + applicationName: espresso + executableName: pw.x + + pw_relax: + 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 + applicationName: espresso + executableName: pw.x + + pw_vc-relax: + 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 + applicationName: espresso + executableName: pw.x + + pw_scf_kpt_conv: + input: + - name: pw_scf_kpt_conv.in + results: + - total_energy + - fermi_energy + - pressure + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x diff --git a/executables/espresso/q2r.x.yml b/executables/espresso/q2r.x.yml new file mode 100644 index 00000000..3e1d5a3c --- /dev/null +++ b/executables/espresso/q2r.x.yml @@ -0,0 +1,12 @@ +monitors: + - standard_output +results: [] +flavors: + q2r: + input: + - name: q2r.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: q2r.x diff --git a/executables/exabyteml/score.yml b/executables/exabyteml/score.yml new file mode 100644 index 00000000..6de59c0a --- /dev/null +++ b/executables/exabyteml/score.yml @@ -0,0 +1,13 @@ +isDefault: false +monitors: + - standard_output +results: + - predicted_properties +flavors: + score: + isDefault: true + input: [] + monitors: + - standard_output + applicationName: exabyteml + executableName: score diff --git a/executables/exabyteml/train.yml b/executables/exabyteml/train.yml new file mode 100644 index 00000000..8c2aa85c --- /dev/null +++ b/executables/exabyteml/train.yml @@ -0,0 +1,13 @@ +isDefault: true +monitors: + - standard_output +results: + - "workflow:ml_predict" +flavors: + train: + isDefault: true + input: [] + monitors: + - standard_output + applicationName: exabyteml + executableName: train diff --git a/executables/jupyterLab/jupyter.yml b/executables/jupyterLab/jupyter.yml new file mode 100644 index 00000000..42dfc2eb --- /dev/null +++ b/executables/jupyterLab/jupyter.yml @@ -0,0 +1,16 @@ +isDefault: true +monitors: + - standard_output + - jupyterNotebookEndpoint +results: [] +flavors: + notebook: + isDefault: true + input: + - name: requirements.txt + templateName: requirements.txt + monitors: + - standard_output + - jupyterNotebookEndpoint + applicationName: jupyerLab + executableName: jupyter diff --git a/executables/nwchem/nwchem.yml b/executables/nwchem/nwchem.yml new file mode 100644 index 00000000..09b38376 --- /dev/null +++ b/executables/nwchem/nwchem.yml @@ -0,0 +1,21 @@ +isDefault: true +hasAdvancedComputeOptions: false +postProcessors: + - error_handler +monitors: + - standard_output +results: + - total_energy + - total_energy_contributions +flavors: + nwchem_total_energy: + isDefault: true + input: + - name: nwchem_total_energy.inp + results: + - total_energy + - total_energy_contributions + monitors: + - standard_output + applicationName: nwchem + executableName: nwchem diff --git a/executables/python/python.yml b/executables/python/python.yml new file mode 100644 index 00000000..c0d203d7 --- /dev/null +++ b/executables/python/python.yml @@ -0,0 +1,353 @@ +isDefault: true +monitors: + - standard_output +results: + - file_content + - "workflow:pyml_predict" +flavors: + hello_world: + isDefault: true + input: + - name: script.py + templateName: hello_world.py + - name: requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python + + espresso_xml_get_qpt_irr: + input: + - name: espresso_xml_get_qpt_irr.py + monitors: + - standard_output + applicationName: python + executableName: python + + espresso_extract_kpoints: + input: + - name: espresso_extract_kpoints.py + - name: requirements.txt + templateName: requirements_empty.txt + monitors: + - standard_output + applicationName: python + executableName: python + + "generic:post_processing:plot:matplotlib": + input: + - name: plot.py + templateName: matplotlib_basic.py + - name: requirements.txt + templateName: processing_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python + + "generic:processing:find_extrema:scipy": + input: + - name: find_extrema.py + templateName: find_extrema.py + - name: requirements.txt + templateName: processing_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:setup_variables_packages": + input: + - name: settings.py + templateName: pyml_settings.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:custom": + input: + - name: pyml_custom.py + templateName: pyml_custom.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:data_input:read_csv:pandas": + 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 + applicationName: python + executableName: python + + "pyml:data_input:train_test_split:sklearn": + 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 + applicationName: python + executableName: python + + "pyml:pre_processing:min_max_scaler:sklearn": + input: + - name: pre_processing_min_max_sklearn.py + templateName: pre_processing_min_max_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:pre_processing:remove_duplicates:pandas": + input: + - name: pre_processing_remove_duplicates_pandas.py + templateName: pre_processing_remove_duplicates_pandas.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:pre_processing:remove_missing:pandas": + input: + - name: pre_processing_remove_missing_pandas.py + templateName: pre_processing_remove_missing_pandas.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:pre_processing:standardization:sklearn": + input: + - name: pre_processing_standardization_sklearn.py + templateName: pre_processing_standardization_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:adaboosted_trees_regression:sklearn": + input: + - name: model_adaboosted_trees_regression_sklearn.py + templateName: model_adaboosted_trees_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + results: + - "workflow:pyml_predict" + applicationName: python + executableName: python + + "pyml:model:bagged_trees_regression:sklearn": + input: + - name: model_bagged_trees_regression_sklearn.py + templateName: model_bagged_trees_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:gradboosted_trees_regression:sklearn": + input: + - name: model_gradboosted_trees_regression_sklearn.py + templateName: model_gradboosted_trees_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:extreme_gradboosted_trees_regression:sklearn": + input: + - name: model_extreme_gradboosted_trees_regression_sklearn.py + templateName: model_extreme_gradboosted_trees_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:k_means_clustering:sklearn": + input: + - name: model_k_means_clustering_sklearn.py + templateName: model_k_means_clustering_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:kernel_ridge_regression:sklearn": + input: + - name: model_kernel_ridge_regression_sklearn.py + templateName: model_kernel_ridge_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:lasso_regression:sklearn": + input: + - name: model_lasso_regression_sklearn.py + templateName: model_lasso_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:multilayer_perceptron:sklearn": + input: + - name: model_mlp_sklearn.py + templateName: model_mlp_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:random_forest_classification:sklearn": + input: + - name: model_random_forest_classification_sklearn.py + templateName: model_random_forest_classification_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:gradboosted_trees_classification:sklearn": + input: + - name: model_gradboosted_trees_classification_sklearn.py + templateName: model_gradboosted_trees_classification_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:extreme_gradboosted_trees_classification:sklearn": + input: + - name: model_extreme_gradboosted_trees_classification_sklearn.py + templateName: model_extreme_gradboosted_trees_classification_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:random_forest_regression:sklearn": + input: + - name: model_random_forest_regression_sklearn.py + templateName: model_random_forest_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:model:ridge_regression:sklearn": + input: + - name: model_ridge_regression_sklearn.py + templateName: model_ridge_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:post_processing:parity_plot:matplotlib": + input: + - name: post_processing_parity_plot_matplotlib.py + templateName: post_processing_parity_plot_matplotlib.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - file_content + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:post_processing:pca_2d_clusters:matplotlib": + input: + - name: post_processing_pca_2d_clusters_matplotlib.py + templateName: post_processing_pca_2d_clusters_matplotlib.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - file_content + monitors: + - standard_output + applicationName: python + executableName: python + + "pyml:post_processing:roc_curve:sklearn": + input: + - name: post_processing_roc_curve_sklearn.py + templateName: post_processing_roc_curve_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - file_content + monitors: + - standard_output + applicationName: python + executableName: python diff --git a/executables/shell/sh.yml b/executables/shell/sh.yml new file mode 100644 index 00000000..2fd83384 --- /dev/null +++ b/executables/shell/sh.yml @@ -0,0 +1,65 @@ +isDefault: true +monitors: + - standard_output +results: + - atomic_forces + - band_gaps + - band_structure + - density_of_states + - fermi_energy + - phonon_dispersions + - phonon_dos + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + - zero_point_energy + - final_structure + - magnetic_moments + - reaction_energy_barrier + - reaction_energy_profile + - potential_profile + - charge_density_profile +flavors: + hello_world: + isDefault: true + input: + - name: hello_world.sh + monitors: + - standard_output + applicationName: shell + executableName: sh + + job_espresso_pw_scf: + input: + - name: job_espresso_pw_scf.sh + monitors: + - standard_output + applicationName: shell + executableName: sh + + espresso_link_outdir_save: + input: + - name: espresso_link_outdir_save.sh + monitors: + - standard_output + applicationName: shell + executableName: sh + + espresso_collect_dynmat: + input: + - name: espresso_collect_dynmat.sh + monitors: + - standard_output + applicationName: shell + executableName: sh + + bash_vasp_prepare_neb_images: + isMultiMaterial: true + input: + - name: bash_vasp_prepare_neb_images.sh + monitors: + - standard_output + applicationName: shell + executableName: sh diff --git a/executables/tree.yml b/executables/tree.yml new file mode 100644 index 00000000..2605f322 --- /dev/null +++ b/executables/tree.yml @@ -0,0 +1,26 @@ +espresso: + average.x: !include "executables/espresso/average.x.yml" + bands.x: !include "executables/espresso/bands.x.yml" + dos.x: !include "executables/espresso/dos.x.yml" + dynmat.x: !include "executables/espresso/dynmat.x.yml" + gw.x: !include "executables/espresso/gw.x.yml" + matdyn.x: !include "executables/espresso/matdyn.x.yml" + neb.x: !include "executables/espresso/neb.x.yml" + ph.x: !include "executables/espresso/ph.x.yml" + pp.x: !include "executables/espresso/pp.x.yml" + projwfc.x: !include "executables/espresso/projwfc.x.yml" + pw.x: !include "executables/espresso/pw.x.yml" + q2r.x: !include "executables/espresso/q2r.x.yml" +jupyterLab: + jupyter: !include "executables/jupyterLab/jupyter.yml" +exabyteml: + score: !include "executables/exabyteml/score.yml" + train: !include "executables/exabyteml/train.yml" +nwchem: + nwchem: !include "executables/nwchem/nwchem.yml" +python: + python: !include "executables/python/python.yml" +shell: + sh: !include "executables/shell/sh.yml" +vasp: + vasp: !include "executables/vasp/vasp.yml" diff --git a/executables/vasp/vasp.yml b/executables/vasp/vasp.yml new file mode 100644 index 00000000..69e2262c --- /dev/null +++ b/executables/vasp/vasp.yml @@ -0,0 +1,314 @@ +isDefault: true +postProcessors: + - error_handler + - prepare_restart + - remove_non_zero_weight_kpoints +monitors: + - standard_output + - convergence_ionic + - convergence_electronic +results: + - atomic_forces + - band_gaps + - band_structure + - density_of_states + - fermi_energy + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + - zero_point_energy + - final_structure + - magnetic_moments + - reaction_energy_barrier + - reaction_energy_profile + - potential_profile + - charge_density_profile +flavors: + vasp: + isDefault: true + input: + - name: INCAR + - name: KPOINTS + - name: POSCAR + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp + + vasp_bands: + input: + - name: INCAR + templateName: INCAR_BANDS + - name: KPOINTS + templateName: KPOINTS_BANDS + - name: POSCAR + templateName: "" + results: + - band_structure + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp + + vasp_nscf: + input: + - name: INCAR + templateName: INCAR_BANDS + - name: KPOINTS + templateName: KPOINTS + - name: POSCAR + templateName: POSCAR + results: + - band_gaps + - fermi_energy + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp + + vasp_hse: + isDefault: false + input: + - name: INCAR + templateName: INCAR_HSE + - name: KPOINTS + - name: POSCAR + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp + + vasp_bands_hse: + isDefault: false + input: + - name: INCAR + templateName: INCAR_BANDS_HSE + - name: KPOINTS + templateName: KPOINTS_BANDS + - name: POSCAR + templateName: "" + results: + - band_structure + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp + + vasp_nscf_hse: + isDefault: false + input: + - name: INCAR + templateName: INCAR_BANDS_HSE + - name: KPOINTS + templateName: KPOINTS + - name: POSCAR + templateName: POSCAR + results: + - band_gaps + - fermi_energy + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp + + vasp_relax: + input: + - name: INCAR + templateName: INCAR_RELAX + - name: KPOINTS + templateName: KPOINTS + - name: POSCAR + templateName: POSCAR + results: + - total_energy + - atomic_forces + - fermi_energy + - pressure + - stress_tensor + - total_force + - final_structure + monitors: + - standard_output + - convergence_electronic + - convergence_ionic + postProcessors: + - prepare_restart + applicationName: vasp + executableName: vasp + + vasp_vc_relax: + input: + - name: INCAR + templateName: INCAR_VC_RELAX + - name: KPOINTS + templateName: KPOINTS + - name: POSCAR + templateName: POSCAR + results: + - total_energy + - atomic_forces + - fermi_energy + - pressure + - stress_tensor + - total_force + - final_structure + monitors: + - standard_output + - convergence_electronic + - convergence_ionic + postProcessors: + - prepare_restart + applicationName: vasp + executableName: vasp + + vasp_zpe: + input: + - name: INCAR + templateName: INCAR_ZPE + - name: KPOINTS + templateName: KPOINTS + - name: POSCAR + templateName: POSCAR + results: + - total_energy + - fermi_energy + - pressure + - atomic_forces + - stress_tensor + - total_force + - zero_point_energy + monitors: + - standard_output + - convergence_electronic + - convergence_ionic + applicationName: vasp + executableName: vasp + + vasp_kpt_conv: + # kpoint convergence => not including kgrid mixin + input: + - name: INCAR + templateName: INCAR + - name: KPOINTS + templateName: KPOINTS_CONV + - name: POSCAR + templateName: POSCAR + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp + + vasp_vc_relax_conv: + input: + - name: INCAR + templateName: INCAR_VC_RELAX + - name: KPOINTS + templateName: KPOINTS_CONV + - name: POSCAR + templateName: POSCAR + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + - convergence_ionic + applicationName: vasp + executableName: vasp + + vasp_neb: + isMultiMaterial: true + input: + - name: INCAR + templateName: INCAR_NEB + - name: KPOINTS + templateName: KPOINTS + results: + - reaction_energy_barrier + - reaction_energy_profile + monitors: + - standard_output + applicationName: vasp + executableName: vasp + + vasp_neb_initial: + isMultiMaterial: true + input: + - name: INCAR + templateName: INCAR_NEB_INITIAL_FINAL + - name: KPOINTS + - name: POSCAR + templateName: POSCAR_NEB_INITIAL + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp + + vasp_neb_final: + isMultiMaterial: true + input: + - name: INCAR + templateName: INCAR_NEB_INITIAL_FINAL + - name: KPOINTS + - name: POSCAR + templateName: POSCAR_NEB_FINAL + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp From 1fb9f3f89efdaa9611444a7117ac552349b3818a Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 3 Aug 2023 17:34:11 -0700 Subject: [PATCH 07/52] chore: rename assets <-> templates --- {templates => assets}/espresso/average.j2.in | 0 {templates => assets}/espresso/bands.j2.in | 0 {templates => assets}/espresso/dos.j2.in | 0 .../espresso/gw_bands_full_frequency.j2.in | 0 .../espresso/gw_bands_plasmon_pole.j2.in | 0 .../espresso/matdyn_grid.j2.in | 0 .../espresso/matdyn_path.j2.in | 0 {templates => assets}/espresso/neb.j2.in | 0 {templates => assets}/espresso/ph_gamma.j2.in | 0 {templates => assets}/espresso/ph_grid.j2.in | 0 .../espresso/ph_grid_restart.j2.in | 0 .../espresso/ph_init_qpoints.j2.in | 0 {templates => assets}/espresso/ph_path.j2.in | 0 .../espresso/ph_single_irr_qpt.j2.in | 0 .../espresso/pp_density.j2.in | 0 .../espresso/pp_electrostatic_potential.j2.in | 0 {templates => assets}/espresso/projwfc.j2.in | 0 {templates => assets}/espresso/pw_bands.j2.in | 0 {templates => assets}/espresso/pw_esm.j2.in | 0 .../espresso/pw_esm_relax.j2.in | 0 {templates => assets}/espresso/pw_nscf.j2.in | 0 {templates => assets}/espresso/pw_relax.j2.in | 0 {templates => assets}/espresso/pw_scf.j2.in | 0 .../espresso/pw_scf_bands_hse.j2.in | 0 .../espresso/pw_scf_hse.j2.in | 0 .../espresso/pw_scf_kpt_conv.j2.in | 0 .../espresso/pw_vc_relax.j2.in | 0 .../espresso/pw_vc_relax_conv.j2.in | 0 {templates => assets}/espresso/q2r.j2.in | 0 .../jupyterLab/requirements303.j2.txt | 0 .../nwchem/nwchem_total_energy.j2.inp | 0 .../python/espresso_extract_kpoints.pyi | 0 .../python/espresso_xml_get_qpt_irr.pyi | 0 .../post_processing:plot:matplotlib.pyi | 0 .../generic/processing:find_extrema.pyi | 0 .../python/generic/requirements.j2.txt | 0 {templates => assets}/python/hello_world.pyi | 0 .../python/ml/generation/README.md | 0 .../python/ml/generation/config.yaml | 0 .../python/ml/generation/model.yaml | 0 .../python/ml/generation/render_templates.py | 0 .../python/ml/generation/templates/model.pyi | 0 .../python/ml/pyml:custom.pyi | 0 .../ml/pyml:data_input:read_csv:pandas.pyi | 0 ...ml:data_input:train_test_split:sklearn.pyi | 0 ...el:adaboosted_trees_regression:sklearn.pyi | 0 ...:model:bagged_trees_regression:sklearn.pyi | 0 ...adboosted_trees_classification:sklearn.pyi | 0 ...e_gradboosted_trees_regression:sklearn.pyi | 0 ...adboosted_trees_classification:sklearn.pyi | 0 ...l:gradboosted_trees_regression:sklearn.pyi | 0 .../pyml:model:k_means_clustering:sklearn.pyi | 0 ...:model:kernel_ridge_regression:sklearn.pyi | 0 .../pyml:model:lasso_regression:sklearn.pyi | 0 ...ltilayer_perceptron_regression:sklearn.pyi | 0 ...l:random_forest_classification:sklearn.pyi | 0 ...model:random_forest_regression:sklearn.pyi | 0 .../pyml:model:ridge_regression:sklearn.pyi | 0 ...post_processing:parity_plot:matplotlib.pyi | 0 ..._processing:pca_2d_clusters:matplotlib.pyi | 0 ...pyml:post_processing:roc_curve:sklearn.pyi | 0 ...:pre_processing:min_max_scaler:sklearn.pyi | 0 ...re_processing:remove_duplicates:pandas.pyi | 0 ...l:pre_processing:remove_missing:pandas.pyi | 0 ...pre_processing:standardization:sklearn.pyi | 0 .../ml/pyml:setup_variables_packages.pyi | 0 .../python/ml/requirements.j2.txt | 0 .../python/requirements.j2.txt | 0 .../python/requirements_empty.j2.txt | 0 .../shell/bash_espresso_collect_dynmat.j2.sh | 0 .../bash_espresso_link_outdir_save.j2.sh | 0 .../shell/bash_hello_world.j2.sh | 0 .../shell/bash_job_espresso_pw_scf.j2.sh | 0 .../shell/bash_vasp_prepare_neb_images.j2.sh | 0 {templates => assets}/vasp/INCAR.j2 | 0 {templates => assets}/vasp/INCAR_bands.j2 | 0 {templates => assets}/vasp/INCAR_neb.j2 | 0 .../vasp/INCAR_neb_initial_final.j2 | 0 {templates => assets}/vasp/INCAR_relax.j2 | 0 {templates => assets}/vasp/INCAR_vc_relax.j2 | 0 {templates => assets}/vasp/INCAR_zpe.j2 | 0 {templates => assets}/vasp/KPOINTS.j2 | 0 {templates => assets}/vasp/KPOINTS_bands.j2 | 0 {templates => assets}/vasp/KPOINTS_conv.j2 | 0 {templates => assets}/vasp/POSCAR.j2 | 0 .../vasp/POSCAR_NEB_final.j2 | 0 .../vasp/POSCAR_NEB_initial.j2 | 0 .../vasp/_MIXIN_INCAR_hse.j2 | 0 {assets => templates}/espresso/average.x.yml | 2 +- {assets => templates}/espresso/bands.x.yml | 2 +- {assets => templates}/espresso/dos.x.yml | 2 +- {assets => templates}/espresso/dynmat.x.yml | 2 +- {assets => templates}/espresso/gw.x.yml | 4 +- {assets => templates}/espresso/matdyn.x.yml | 4 +- {assets => templates}/espresso/neb.x.yml | 2 +- {assets => templates}/espresso/ph.x.yml | 12 ++-- {assets => templates}/espresso/pp.x.yml | 4 +- {assets => templates}/espresso/projwfc.x.yml | 2 +- {assets => templates}/espresso/pw.x.yml | 20 +++--- {assets => templates}/espresso/q2r.x.yml | 2 +- {assets => templates}/jupyterLab/jupyter.yml | 2 +- {assets => templates}/nwchem/nwchem.yml | 2 +- {assets => templates}/python/python.yml | 66 +++++++++---------- {assets => templates}/shell/sh.yml | 10 +-- {assets => templates}/vasp/vasp.yml | 34 +++++----- 105 files changed, 86 insertions(+), 86 deletions(-) rename {templates => assets}/espresso/average.j2.in (100%) rename {templates => assets}/espresso/bands.j2.in (100%) rename {templates => assets}/espresso/dos.j2.in (100%) rename {templates => assets}/espresso/gw_bands_full_frequency.j2.in (100%) rename {templates => assets}/espresso/gw_bands_plasmon_pole.j2.in (100%) rename {templates => assets}/espresso/matdyn_grid.j2.in (100%) rename {templates => assets}/espresso/matdyn_path.j2.in (100%) rename {templates => assets}/espresso/neb.j2.in (100%) rename {templates => assets}/espresso/ph_gamma.j2.in (100%) rename {templates => assets}/espresso/ph_grid.j2.in (100%) rename {templates => assets}/espresso/ph_grid_restart.j2.in (100%) rename {templates => assets}/espresso/ph_init_qpoints.j2.in (100%) rename {templates => assets}/espresso/ph_path.j2.in (100%) rename {templates => assets}/espresso/ph_single_irr_qpt.j2.in (100%) rename {templates => assets}/espresso/pp_density.j2.in (100%) rename {templates => assets}/espresso/pp_electrostatic_potential.j2.in (100%) rename {templates => assets}/espresso/projwfc.j2.in (100%) rename {templates => assets}/espresso/pw_bands.j2.in (100%) rename {templates => assets}/espresso/pw_esm.j2.in (100%) rename {templates => assets}/espresso/pw_esm_relax.j2.in (100%) rename {templates => assets}/espresso/pw_nscf.j2.in (100%) rename {templates => assets}/espresso/pw_relax.j2.in (100%) rename {templates => assets}/espresso/pw_scf.j2.in (100%) rename {templates => assets}/espresso/pw_scf_bands_hse.j2.in (100%) rename {templates => assets}/espresso/pw_scf_hse.j2.in (100%) rename {templates => assets}/espresso/pw_scf_kpt_conv.j2.in (100%) rename {templates => assets}/espresso/pw_vc_relax.j2.in (100%) rename {templates => assets}/espresso/pw_vc_relax_conv.j2.in (100%) rename {templates => assets}/espresso/q2r.j2.in (100%) rename {templates => assets}/jupyterLab/requirements303.j2.txt (100%) rename {templates => assets}/nwchem/nwchem_total_energy.j2.inp (100%) rename {templates => assets}/python/espresso_extract_kpoints.pyi (100%) rename {templates => assets}/python/espresso_xml_get_qpt_irr.pyi (100%) rename {templates => assets}/python/generic/post_processing:plot:matplotlib.pyi (100%) rename {templates => assets}/python/generic/processing:find_extrema.pyi (100%) rename {templates => assets}/python/generic/requirements.j2.txt (100%) rename {templates => assets}/python/hello_world.pyi (100%) rename {templates => assets}/python/ml/generation/README.md (100%) rename {templates => assets}/python/ml/generation/config.yaml (100%) rename {templates => assets}/python/ml/generation/model.yaml (100%) rename {templates => assets}/python/ml/generation/render_templates.py (100%) rename {templates => assets}/python/ml/generation/templates/model.pyi (100%) rename {templates => assets}/python/ml/pyml:custom.pyi (100%) rename {templates => assets}/python/ml/pyml:data_input:read_csv:pandas.pyi (100%) rename {templates => assets}/python/ml/pyml:data_input:train_test_split:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:k_means_clustering:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:lasso_regression:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:random_forest_classification:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:random_forest_regression:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:model:ridge_regression:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi (100%) rename {templates => assets}/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi (100%) rename {templates => assets}/python/ml/pyml:post_processing:roc_curve:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi (100%) rename {templates => assets}/python/ml/pyml:pre_processing:remove_missing:pandas.pyi (100%) rename {templates => assets}/python/ml/pyml:pre_processing:standardization:sklearn.pyi (100%) rename {templates => assets}/python/ml/pyml:setup_variables_packages.pyi (100%) rename {templates => assets}/python/ml/requirements.j2.txt (100%) rename {templates => assets}/python/requirements.j2.txt (100%) rename {templates => assets}/python/requirements_empty.j2.txt (100%) rename {templates => assets}/shell/bash_espresso_collect_dynmat.j2.sh (100%) rename {templates => assets}/shell/bash_espresso_link_outdir_save.j2.sh (100%) rename {templates => assets}/shell/bash_hello_world.j2.sh (100%) rename {templates => assets}/shell/bash_job_espresso_pw_scf.j2.sh (100%) rename {templates => assets}/shell/bash_vasp_prepare_neb_images.j2.sh (100%) rename {templates => assets}/vasp/INCAR.j2 (100%) rename {templates => assets}/vasp/INCAR_bands.j2 (100%) rename {templates => assets}/vasp/INCAR_neb.j2 (100%) rename {templates => assets}/vasp/INCAR_neb_initial_final.j2 (100%) rename {templates => assets}/vasp/INCAR_relax.j2 (100%) rename {templates => assets}/vasp/INCAR_vc_relax.j2 (100%) rename {templates => assets}/vasp/INCAR_zpe.j2 (100%) rename {templates => assets}/vasp/KPOINTS.j2 (100%) rename {templates => assets}/vasp/KPOINTS_bands.j2 (100%) rename {templates => assets}/vasp/KPOINTS_conv.j2 (100%) rename {templates => assets}/vasp/POSCAR.j2 (100%) rename {templates => assets}/vasp/POSCAR_NEB_final.j2 (100%) rename {templates => assets}/vasp/POSCAR_NEB_initial.j2 (100%) rename {templates => assets}/vasp/_MIXIN_INCAR_hse.j2 (100%) rename {assets => templates}/espresso/average.x.yml (64%) rename {assets => templates}/espresso/bands.x.yml (64%) rename {assets => templates}/espresso/dos.x.yml (64%) rename {assets => templates}/espresso/dynmat.x.yml (70%) rename {assets => templates}/espresso/gw.x.yml (76%) rename {assets => templates}/espresso/matdyn.x.yml (70%) rename {assets => templates}/espresso/neb.x.yml (82%) rename {assets => templates}/espresso/ph.x.yml (68%) rename {assets => templates}/espresso/pp.x.yml (61%) rename {assets => templates}/espresso/projwfc.x.yml (64%) rename {assets => templates}/espresso/pw.x.yml (79%) rename {assets => templates}/espresso/q2r.x.yml (64%) rename {assets => templates}/jupyterLab/jupyter.yml (61%) rename {assets => templates}/nwchem/nwchem.yml (68%) rename {assets => templates}/python/python.yml (59%) rename {assets => templates}/shell/sh.yml (61%) rename {assets => templates}/vasp/vasp.yml (71%) diff --git a/templates/espresso/average.j2.in b/assets/espresso/average.j2.in similarity index 100% rename from templates/espresso/average.j2.in rename to assets/espresso/average.j2.in diff --git a/templates/espresso/bands.j2.in b/assets/espresso/bands.j2.in similarity index 100% rename from templates/espresso/bands.j2.in rename to assets/espresso/bands.j2.in diff --git a/templates/espresso/dos.j2.in b/assets/espresso/dos.j2.in similarity index 100% rename from templates/espresso/dos.j2.in rename to assets/espresso/dos.j2.in diff --git a/templates/espresso/gw_bands_full_frequency.j2.in b/assets/espresso/gw_bands_full_frequency.j2.in similarity index 100% rename from templates/espresso/gw_bands_full_frequency.j2.in rename to assets/espresso/gw_bands_full_frequency.j2.in diff --git a/templates/espresso/gw_bands_plasmon_pole.j2.in b/assets/espresso/gw_bands_plasmon_pole.j2.in similarity index 100% rename from templates/espresso/gw_bands_plasmon_pole.j2.in rename to assets/espresso/gw_bands_plasmon_pole.j2.in diff --git a/templates/espresso/matdyn_grid.j2.in b/assets/espresso/matdyn_grid.j2.in similarity index 100% rename from templates/espresso/matdyn_grid.j2.in rename to assets/espresso/matdyn_grid.j2.in diff --git a/templates/espresso/matdyn_path.j2.in b/assets/espresso/matdyn_path.j2.in similarity index 100% rename from templates/espresso/matdyn_path.j2.in rename to assets/espresso/matdyn_path.j2.in diff --git a/templates/espresso/neb.j2.in b/assets/espresso/neb.j2.in similarity index 100% rename from templates/espresso/neb.j2.in rename to assets/espresso/neb.j2.in diff --git a/templates/espresso/ph_gamma.j2.in b/assets/espresso/ph_gamma.j2.in similarity index 100% rename from templates/espresso/ph_gamma.j2.in rename to assets/espresso/ph_gamma.j2.in diff --git a/templates/espresso/ph_grid.j2.in b/assets/espresso/ph_grid.j2.in similarity index 100% rename from templates/espresso/ph_grid.j2.in rename to assets/espresso/ph_grid.j2.in diff --git a/templates/espresso/ph_grid_restart.j2.in b/assets/espresso/ph_grid_restart.j2.in similarity index 100% rename from templates/espresso/ph_grid_restart.j2.in rename to assets/espresso/ph_grid_restart.j2.in diff --git a/templates/espresso/ph_init_qpoints.j2.in b/assets/espresso/ph_init_qpoints.j2.in similarity index 100% rename from templates/espresso/ph_init_qpoints.j2.in rename to assets/espresso/ph_init_qpoints.j2.in diff --git a/templates/espresso/ph_path.j2.in b/assets/espresso/ph_path.j2.in similarity index 100% rename from templates/espresso/ph_path.j2.in rename to assets/espresso/ph_path.j2.in diff --git a/templates/espresso/ph_single_irr_qpt.j2.in b/assets/espresso/ph_single_irr_qpt.j2.in similarity index 100% rename from templates/espresso/ph_single_irr_qpt.j2.in rename to assets/espresso/ph_single_irr_qpt.j2.in diff --git a/templates/espresso/pp_density.j2.in b/assets/espresso/pp_density.j2.in similarity index 100% rename from templates/espresso/pp_density.j2.in rename to assets/espresso/pp_density.j2.in diff --git a/templates/espresso/pp_electrostatic_potential.j2.in b/assets/espresso/pp_electrostatic_potential.j2.in similarity index 100% rename from templates/espresso/pp_electrostatic_potential.j2.in rename to assets/espresso/pp_electrostatic_potential.j2.in diff --git a/templates/espresso/projwfc.j2.in b/assets/espresso/projwfc.j2.in similarity index 100% rename from templates/espresso/projwfc.j2.in rename to assets/espresso/projwfc.j2.in diff --git a/templates/espresso/pw_bands.j2.in b/assets/espresso/pw_bands.j2.in similarity index 100% rename from templates/espresso/pw_bands.j2.in rename to assets/espresso/pw_bands.j2.in diff --git a/templates/espresso/pw_esm.j2.in b/assets/espresso/pw_esm.j2.in similarity index 100% rename from templates/espresso/pw_esm.j2.in rename to assets/espresso/pw_esm.j2.in diff --git a/templates/espresso/pw_esm_relax.j2.in b/assets/espresso/pw_esm_relax.j2.in similarity index 100% rename from templates/espresso/pw_esm_relax.j2.in rename to assets/espresso/pw_esm_relax.j2.in diff --git a/templates/espresso/pw_nscf.j2.in b/assets/espresso/pw_nscf.j2.in similarity index 100% rename from templates/espresso/pw_nscf.j2.in rename to assets/espresso/pw_nscf.j2.in diff --git a/templates/espresso/pw_relax.j2.in b/assets/espresso/pw_relax.j2.in similarity index 100% rename from templates/espresso/pw_relax.j2.in rename to assets/espresso/pw_relax.j2.in diff --git a/templates/espresso/pw_scf.j2.in b/assets/espresso/pw_scf.j2.in similarity index 100% rename from templates/espresso/pw_scf.j2.in rename to assets/espresso/pw_scf.j2.in diff --git a/templates/espresso/pw_scf_bands_hse.j2.in b/assets/espresso/pw_scf_bands_hse.j2.in similarity index 100% rename from templates/espresso/pw_scf_bands_hse.j2.in rename to assets/espresso/pw_scf_bands_hse.j2.in diff --git a/templates/espresso/pw_scf_hse.j2.in b/assets/espresso/pw_scf_hse.j2.in similarity index 100% rename from templates/espresso/pw_scf_hse.j2.in rename to assets/espresso/pw_scf_hse.j2.in diff --git a/templates/espresso/pw_scf_kpt_conv.j2.in b/assets/espresso/pw_scf_kpt_conv.j2.in similarity index 100% rename from templates/espresso/pw_scf_kpt_conv.j2.in rename to assets/espresso/pw_scf_kpt_conv.j2.in diff --git a/templates/espresso/pw_vc_relax.j2.in b/assets/espresso/pw_vc_relax.j2.in similarity index 100% rename from templates/espresso/pw_vc_relax.j2.in rename to assets/espresso/pw_vc_relax.j2.in diff --git a/templates/espresso/pw_vc_relax_conv.j2.in b/assets/espresso/pw_vc_relax_conv.j2.in similarity index 100% rename from templates/espresso/pw_vc_relax_conv.j2.in rename to assets/espresso/pw_vc_relax_conv.j2.in diff --git a/templates/espresso/q2r.j2.in b/assets/espresso/q2r.j2.in similarity index 100% rename from templates/espresso/q2r.j2.in rename to assets/espresso/q2r.j2.in diff --git a/templates/jupyterLab/requirements303.j2.txt b/assets/jupyterLab/requirements303.j2.txt similarity index 100% rename from templates/jupyterLab/requirements303.j2.txt rename to assets/jupyterLab/requirements303.j2.txt diff --git a/templates/nwchem/nwchem_total_energy.j2.inp b/assets/nwchem/nwchem_total_energy.j2.inp similarity index 100% rename from templates/nwchem/nwchem_total_energy.j2.inp rename to assets/nwchem/nwchem_total_energy.j2.inp diff --git a/templates/python/espresso_extract_kpoints.pyi b/assets/python/espresso_extract_kpoints.pyi similarity index 100% rename from templates/python/espresso_extract_kpoints.pyi rename to assets/python/espresso_extract_kpoints.pyi diff --git a/templates/python/espresso_xml_get_qpt_irr.pyi b/assets/python/espresso_xml_get_qpt_irr.pyi similarity index 100% rename from templates/python/espresso_xml_get_qpt_irr.pyi rename to assets/python/espresso_xml_get_qpt_irr.pyi diff --git a/templates/python/generic/post_processing:plot:matplotlib.pyi b/assets/python/generic/post_processing:plot:matplotlib.pyi similarity index 100% rename from templates/python/generic/post_processing:plot:matplotlib.pyi rename to assets/python/generic/post_processing:plot:matplotlib.pyi diff --git a/templates/python/generic/processing:find_extrema.pyi b/assets/python/generic/processing:find_extrema.pyi similarity index 100% rename from templates/python/generic/processing:find_extrema.pyi rename to assets/python/generic/processing:find_extrema.pyi diff --git a/templates/python/generic/requirements.j2.txt b/assets/python/generic/requirements.j2.txt similarity index 100% rename from templates/python/generic/requirements.j2.txt rename to assets/python/generic/requirements.j2.txt diff --git a/templates/python/hello_world.pyi b/assets/python/hello_world.pyi similarity index 100% rename from templates/python/hello_world.pyi rename to assets/python/hello_world.pyi diff --git a/templates/python/ml/generation/README.md b/assets/python/ml/generation/README.md similarity index 100% rename from templates/python/ml/generation/README.md rename to assets/python/ml/generation/README.md diff --git a/templates/python/ml/generation/config.yaml b/assets/python/ml/generation/config.yaml similarity index 100% rename from templates/python/ml/generation/config.yaml rename to assets/python/ml/generation/config.yaml diff --git a/templates/python/ml/generation/model.yaml b/assets/python/ml/generation/model.yaml similarity index 100% rename from templates/python/ml/generation/model.yaml rename to assets/python/ml/generation/model.yaml diff --git a/templates/python/ml/generation/render_templates.py b/assets/python/ml/generation/render_templates.py similarity index 100% rename from templates/python/ml/generation/render_templates.py rename to assets/python/ml/generation/render_templates.py diff --git a/templates/python/ml/generation/templates/model.pyi b/assets/python/ml/generation/templates/model.pyi similarity index 100% rename from templates/python/ml/generation/templates/model.pyi rename to assets/python/ml/generation/templates/model.pyi diff --git a/templates/python/ml/pyml:custom.pyi b/assets/python/ml/pyml:custom.pyi similarity index 100% rename from templates/python/ml/pyml:custom.pyi rename to assets/python/ml/pyml:custom.pyi diff --git a/templates/python/ml/pyml:data_input:read_csv:pandas.pyi b/assets/python/ml/pyml:data_input:read_csv:pandas.pyi similarity index 100% rename from templates/python/ml/pyml:data_input:read_csv:pandas.pyi rename to assets/python/ml/pyml:data_input:read_csv:pandas.pyi diff --git a/templates/python/ml/pyml:data_input:train_test_split:sklearn.pyi b/assets/python/ml/pyml:data_input:train_test_split:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:data_input:train_test_split:sklearn.pyi rename to assets/python/ml/pyml:data_input:train_test_split:sklearn.pyi diff --git a/templates/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi b/assets/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi rename to assets/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi diff --git a/templates/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi b/assets/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi rename to assets/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi diff --git a/templates/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi b/assets/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi rename to assets/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi diff --git a/templates/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi b/assets/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi rename to assets/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi diff --git a/templates/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi b/assets/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi rename to assets/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi diff --git a/templates/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi b/assets/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi rename to assets/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi diff --git a/templates/python/ml/pyml:model:k_means_clustering:sklearn.pyi b/assets/python/ml/pyml:model:k_means_clustering:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:k_means_clustering:sklearn.pyi rename to assets/python/ml/pyml:model:k_means_clustering:sklearn.pyi diff --git a/templates/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi b/assets/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi rename to assets/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi diff --git a/templates/python/ml/pyml:model:lasso_regression:sklearn.pyi b/assets/python/ml/pyml:model:lasso_regression:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:lasso_regression:sklearn.pyi rename to assets/python/ml/pyml:model:lasso_regression:sklearn.pyi diff --git a/templates/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi b/assets/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi rename to assets/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi diff --git a/templates/python/ml/pyml:model:random_forest_classification:sklearn.pyi b/assets/python/ml/pyml:model:random_forest_classification:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:random_forest_classification:sklearn.pyi rename to assets/python/ml/pyml:model:random_forest_classification:sklearn.pyi diff --git a/templates/python/ml/pyml:model:random_forest_regression:sklearn.pyi b/assets/python/ml/pyml:model:random_forest_regression:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:random_forest_regression:sklearn.pyi rename to assets/python/ml/pyml:model:random_forest_regression:sklearn.pyi diff --git a/templates/python/ml/pyml:model:ridge_regression:sklearn.pyi b/assets/python/ml/pyml:model:ridge_regression:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:model:ridge_regression:sklearn.pyi rename to assets/python/ml/pyml:model:ridge_regression:sklearn.pyi diff --git a/templates/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi b/assets/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi similarity index 100% rename from templates/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi rename to assets/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi diff --git a/templates/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi b/assets/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi similarity index 100% rename from templates/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi rename to assets/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi diff --git a/templates/python/ml/pyml:post_processing:roc_curve:sklearn.pyi b/assets/python/ml/pyml:post_processing:roc_curve:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:post_processing:roc_curve:sklearn.pyi rename to assets/python/ml/pyml:post_processing:roc_curve:sklearn.pyi diff --git a/templates/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi b/assets/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi rename to assets/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi diff --git a/templates/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi b/assets/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi similarity index 100% rename from templates/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi rename to assets/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi diff --git a/templates/python/ml/pyml:pre_processing:remove_missing:pandas.pyi b/assets/python/ml/pyml:pre_processing:remove_missing:pandas.pyi similarity index 100% rename from templates/python/ml/pyml:pre_processing:remove_missing:pandas.pyi rename to assets/python/ml/pyml:pre_processing:remove_missing:pandas.pyi diff --git a/templates/python/ml/pyml:pre_processing:standardization:sklearn.pyi b/assets/python/ml/pyml:pre_processing:standardization:sklearn.pyi similarity index 100% rename from templates/python/ml/pyml:pre_processing:standardization:sklearn.pyi rename to assets/python/ml/pyml:pre_processing:standardization:sklearn.pyi diff --git a/templates/python/ml/pyml:setup_variables_packages.pyi b/assets/python/ml/pyml:setup_variables_packages.pyi similarity index 100% rename from templates/python/ml/pyml:setup_variables_packages.pyi rename to assets/python/ml/pyml:setup_variables_packages.pyi diff --git a/templates/python/ml/requirements.j2.txt b/assets/python/ml/requirements.j2.txt similarity index 100% rename from templates/python/ml/requirements.j2.txt rename to assets/python/ml/requirements.j2.txt diff --git a/templates/python/requirements.j2.txt b/assets/python/requirements.j2.txt similarity index 100% rename from templates/python/requirements.j2.txt rename to assets/python/requirements.j2.txt diff --git a/templates/python/requirements_empty.j2.txt b/assets/python/requirements_empty.j2.txt similarity index 100% rename from templates/python/requirements_empty.j2.txt rename to assets/python/requirements_empty.j2.txt diff --git a/templates/shell/bash_espresso_collect_dynmat.j2.sh b/assets/shell/bash_espresso_collect_dynmat.j2.sh similarity index 100% rename from templates/shell/bash_espresso_collect_dynmat.j2.sh rename to assets/shell/bash_espresso_collect_dynmat.j2.sh diff --git a/templates/shell/bash_espresso_link_outdir_save.j2.sh b/assets/shell/bash_espresso_link_outdir_save.j2.sh similarity index 100% rename from templates/shell/bash_espresso_link_outdir_save.j2.sh rename to assets/shell/bash_espresso_link_outdir_save.j2.sh diff --git a/templates/shell/bash_hello_world.j2.sh b/assets/shell/bash_hello_world.j2.sh similarity index 100% rename from templates/shell/bash_hello_world.j2.sh rename to assets/shell/bash_hello_world.j2.sh diff --git a/templates/shell/bash_job_espresso_pw_scf.j2.sh b/assets/shell/bash_job_espresso_pw_scf.j2.sh similarity index 100% rename from templates/shell/bash_job_espresso_pw_scf.j2.sh rename to assets/shell/bash_job_espresso_pw_scf.j2.sh diff --git a/templates/shell/bash_vasp_prepare_neb_images.j2.sh b/assets/shell/bash_vasp_prepare_neb_images.j2.sh similarity index 100% rename from templates/shell/bash_vasp_prepare_neb_images.j2.sh rename to assets/shell/bash_vasp_prepare_neb_images.j2.sh diff --git a/templates/vasp/INCAR.j2 b/assets/vasp/INCAR.j2 similarity index 100% rename from templates/vasp/INCAR.j2 rename to assets/vasp/INCAR.j2 diff --git a/templates/vasp/INCAR_bands.j2 b/assets/vasp/INCAR_bands.j2 similarity index 100% rename from templates/vasp/INCAR_bands.j2 rename to assets/vasp/INCAR_bands.j2 diff --git a/templates/vasp/INCAR_neb.j2 b/assets/vasp/INCAR_neb.j2 similarity index 100% rename from templates/vasp/INCAR_neb.j2 rename to assets/vasp/INCAR_neb.j2 diff --git a/templates/vasp/INCAR_neb_initial_final.j2 b/assets/vasp/INCAR_neb_initial_final.j2 similarity index 100% rename from templates/vasp/INCAR_neb_initial_final.j2 rename to assets/vasp/INCAR_neb_initial_final.j2 diff --git a/templates/vasp/INCAR_relax.j2 b/assets/vasp/INCAR_relax.j2 similarity index 100% rename from templates/vasp/INCAR_relax.j2 rename to assets/vasp/INCAR_relax.j2 diff --git a/templates/vasp/INCAR_vc_relax.j2 b/assets/vasp/INCAR_vc_relax.j2 similarity index 100% rename from templates/vasp/INCAR_vc_relax.j2 rename to assets/vasp/INCAR_vc_relax.j2 diff --git a/templates/vasp/INCAR_zpe.j2 b/assets/vasp/INCAR_zpe.j2 similarity index 100% rename from templates/vasp/INCAR_zpe.j2 rename to assets/vasp/INCAR_zpe.j2 diff --git a/templates/vasp/KPOINTS.j2 b/assets/vasp/KPOINTS.j2 similarity index 100% rename from templates/vasp/KPOINTS.j2 rename to assets/vasp/KPOINTS.j2 diff --git a/templates/vasp/KPOINTS_bands.j2 b/assets/vasp/KPOINTS_bands.j2 similarity index 100% rename from templates/vasp/KPOINTS_bands.j2 rename to assets/vasp/KPOINTS_bands.j2 diff --git a/templates/vasp/KPOINTS_conv.j2 b/assets/vasp/KPOINTS_conv.j2 similarity index 100% rename from templates/vasp/KPOINTS_conv.j2 rename to assets/vasp/KPOINTS_conv.j2 diff --git a/templates/vasp/POSCAR.j2 b/assets/vasp/POSCAR.j2 similarity index 100% rename from templates/vasp/POSCAR.j2 rename to assets/vasp/POSCAR.j2 diff --git a/templates/vasp/POSCAR_NEB_final.j2 b/assets/vasp/POSCAR_NEB_final.j2 similarity index 100% rename from templates/vasp/POSCAR_NEB_final.j2 rename to assets/vasp/POSCAR_NEB_final.j2 diff --git a/templates/vasp/POSCAR_NEB_initial.j2 b/assets/vasp/POSCAR_NEB_initial.j2 similarity index 100% rename from templates/vasp/POSCAR_NEB_initial.j2 rename to assets/vasp/POSCAR_NEB_initial.j2 diff --git a/templates/vasp/_MIXIN_INCAR_hse.j2 b/assets/vasp/_MIXIN_INCAR_hse.j2 similarity index 100% rename from templates/vasp/_MIXIN_INCAR_hse.j2 rename to assets/vasp/_MIXIN_INCAR_hse.j2 diff --git a/assets/espresso/average.x.yml b/templates/espresso/average.x.yml similarity index 64% rename from assets/espresso/average.x.yml rename to templates/espresso/average.x.yml index 3870cde1..ca6b37be 100644 --- a/assets/espresso/average.x.yml +++ b/templates/espresso/average.x.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/espresso/average.j2.in" +- content: !readFile "assets/espresso/average.j2.in" name: average.in contextProviders: [] applicationName: espresso diff --git a/assets/espresso/bands.x.yml b/templates/espresso/bands.x.yml similarity index 64% rename from assets/espresso/bands.x.yml rename to templates/espresso/bands.x.yml index b55934a5..5fad74e8 100644 --- a/assets/espresso/bands.x.yml +++ b/templates/espresso/bands.x.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/espresso/bands.j2.in" +- content: !readFile "assets/espresso/bands.j2.in" name: bands.in contextProviders: [] applicationName: espresso diff --git a/assets/espresso/dos.x.yml b/templates/espresso/dos.x.yml similarity index 64% rename from assets/espresso/dos.x.yml rename to templates/espresso/dos.x.yml index 030f9466..f689780f 100644 --- a/assets/espresso/dos.x.yml +++ b/templates/espresso/dos.x.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/espresso/dos.j2.in" +- content: !readFile "assets/espresso/dos.j2.in" name: dos.in contextProviders: [] applicationName: espresso diff --git a/assets/espresso/dynmat.x.yml b/templates/espresso/dynmat.x.yml similarity index 70% rename from assets/espresso/dynmat.x.yml rename to templates/espresso/dynmat.x.yml index 729f8fbe..d4641e2c 100644 --- a/assets/espresso/dynmat.x.yml +++ b/templates/espresso/dynmat.x.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/espresso/matdyn_grid.j2.in" +- content: !readFile "assets/espresso/matdyn_grid.j2.in" name: dynmat_grid.in contextProviders: - name: IGridFormDataManager diff --git a/assets/espresso/gw.x.yml b/templates/espresso/gw.x.yml similarity index 76% rename from assets/espresso/gw.x.yml rename to templates/espresso/gw.x.yml index 1945758d..9b2d8271 100644 --- a/assets/espresso/gw.x.yml +++ b/templates/espresso/gw.x.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/espresso/gw_bands_plasmon_pole.j2.in" +- content: !readFile "assets/espresso/gw_bands_plasmon_pole.j2.in" name: gw_bands_plasmon_pole.in contextProviders: - name: KGridFormDataManager @@ -7,7 +7,7 @@ applicationName: espresso executableName: gw.x -- content: !readFile "templates/espresso/gw_bands_full_frequency.j2.in" +- content: !readFile "assets/espresso/gw_bands_full_frequency.j2.in" name: gw_bands_full_frequency.in contextProviders: - name: KGridFormDataManager diff --git a/assets/espresso/matdyn.x.yml b/templates/espresso/matdyn.x.yml similarity index 70% rename from assets/espresso/matdyn.x.yml rename to templates/espresso/matdyn.x.yml index 5c17cf28..a96ecb2b 100644 --- a/assets/espresso/matdyn.x.yml +++ b/templates/espresso/matdyn.x.yml @@ -1,11 +1,11 @@ -- content: !readFile "templates/espresso/matdyn_grid.j2.in" +- content: !readFile "assets/espresso/matdyn_grid.j2.in" name: matdyn_grid.in contextProviders: - name: IGridFormDataManager applicationName: espresso executableName: matdyn.x -- content: !readFile "templates/espresso/matdyn_path.j2.in" +- content: !readFile "assets/espresso/matdyn_path.j2.in" name: matdyn_path.in contextProviders: - name: IPathFormDataManager diff --git a/assets/espresso/neb.x.yml b/templates/espresso/neb.x.yml similarity index 82% rename from assets/espresso/neb.x.yml rename to templates/espresso/neb.x.yml index bbcfad1b..9721399a 100644 --- a/assets/espresso/neb.x.yml +++ b/templates/espresso/neb.x.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/espresso/neb.j2.in" +- content: !readFile "assets/espresso/neb.j2.in" name: neb.in contextProviders: - name: KGridFormDataManager diff --git a/assets/espresso/ph.x.yml b/templates/espresso/ph.x.yml similarity index 68% rename from assets/espresso/ph.x.yml rename to templates/espresso/ph.x.yml index 30e17f9b..d25898cf 100644 --- a/assets/espresso/ph.x.yml +++ b/templates/espresso/ph.x.yml @@ -1,38 +1,38 @@ -- content: !readFile "templates/espresso/ph_grid.j2.in" +- content: !readFile "assets/espresso/ph_grid.j2.in" name: ph_grid.in contextProviders: - name: QGridFormDataManager applicationName: espresso executableName: ph.x -- content: !readFile "templates/espresso/ph_path.j2.in" +- content: !readFile "assets/espresso/ph_path.j2.in" name: ph_path.in contextProviders: - name: QPathFormDataManager applicationName: espresso executableName: ph.x -- content: !readFile "templates/espresso/ph_gamma.j2.in" +- content: !readFile "assets/espresso/ph_gamma.j2.in" name: ph_gamma.in contextProviders: [] applicationName: espresso executableName: ph.x -- content: !readFile "templates/espresso/ph_init_qpoints.j2.in" +- content: !readFile "assets/espresso/ph_init_qpoints.j2.in" name: ph_init_qpoints.in contextProviders: - name: QGridFormDataManager applicationName: espresso executableName: ph.x -- content: !readFile "templates/espresso/ph_grid_restart.j2.in" +- content: !readFile "assets/espresso/ph_grid_restart.j2.in" name: ph_grid_restart.in contextProviders: - name: QGridFormDataManager applicationName: espresso executableName: ph.x -- content: !readFile "templates/espresso/ph_single_irr_qpt.j2.in" +- content: !readFile "assets/espresso/ph_single_irr_qpt.j2.in" name: ph_single_irr_qpt.in contextProviders: - name: QGridFormDataManager diff --git a/assets/espresso/pp.x.yml b/templates/espresso/pp.x.yml similarity index 61% rename from assets/espresso/pp.x.yml rename to templates/espresso/pp.x.yml index 5c2bae24..75b07539 100644 --- a/assets/espresso/pp.x.yml +++ b/templates/espresso/pp.x.yml @@ -1,10 +1,10 @@ -- content: !readFile "templates/espresso/pp_density.j2.in" +- content: !readFile "assets/espresso/pp_density.j2.in" name: pp_density.in contextProviders: [] applicationName: espresso executableName: pp.x -- content: !readFile "templates/espresso/pp_electrostatic_potential.j2.in" +- content: !readFile "assets/espresso/pp_electrostatic_potential.j2.in" name: pp_electrostatic_potential.in contextProviders: [] applicationName: espresso diff --git a/assets/espresso/projwfc.x.yml b/templates/espresso/projwfc.x.yml similarity index 64% rename from assets/espresso/projwfc.x.yml rename to templates/espresso/projwfc.x.yml index 73009ed3..82129ea5 100644 --- a/assets/espresso/projwfc.x.yml +++ b/templates/espresso/projwfc.x.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/espresso/projwfc.j2.in" +- content: !readFile "assets/espresso/projwfc.j2.in" name: projwfc.in contextProviders: [] applicationName: espresso diff --git a/assets/espresso/pw.x.yml b/templates/espresso/pw.x.yml similarity index 79% rename from assets/espresso/pw.x.yml rename to templates/espresso/pw.x.yml index 195c7878..15065d5e 100644 --- a/assets/espresso/pw.x.yml +++ b/templates/espresso/pw.x.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/espresso/pw_scf.j2.in" +- content: !readFile "assets/espresso/pw_scf.j2.in" name: pw_scf.in contextProviders: - name: KGridFormDataManager @@ -7,7 +7,7 @@ applicationName: espresso executableName: pw.x -- content: !readFile "templates/espresso/pw_scf_bands_hse.j2.in" +- content: !readFile "assets/espresso/pw_scf_bands_hse.j2.in" name: pw_scf_bands_hse.in contextProviders: - name: QEPWXInputDataManager @@ -17,7 +17,7 @@ applicationName: espresso executableName: pw.x -- content: !readFile "templates/espresso/pw_esm.j2.in" +- content: !readFile "assets/espresso/pw_esm.j2.in" name: pw_esm.in contextProviders: - name: KGridFormDataManager @@ -27,7 +27,7 @@ applicationName: espresso executableName: pw.x -- content: !readFile "templates/espresso/pw_esm_relax.j2.in" +- content: !readFile "assets/espresso/pw_esm_relax.j2.in" name: pw_esm_relax.in contextProviders: - name: KGridFormDataManager @@ -37,7 +37,7 @@ applicationName: espresso executableName: pw.x -- content: !readFile "templates/espresso/pw_scf_kpt_conv.j2.in" +- content: !readFile "assets/espresso/pw_scf_kpt_conv.j2.in" name: pw_scf_kpt_conv.in contextProviders: - name: QEPWXInputDataManager @@ -45,7 +45,7 @@ applicationName: espresso executableName: pw.x -- content: !readFile "templates/espresso/pw_nscf.j2.in" +- content: !readFile "assets/espresso/pw_nscf.j2.in" name: pw_nscf.in contextProviders: - name: KGridFormDataManager @@ -54,7 +54,7 @@ applicationName: espresso executableName: pw.x -- content: !readFile "templates/espresso/pw_relax.j2.in" +- content: !readFile "assets/espresso/pw_relax.j2.in" name: pw_relax.in contextProviders: - name: KGridFormDataManager @@ -63,7 +63,7 @@ applicationName: espresso executableName: pw.x -- content: !readFile "templates/espresso/pw_vc_relax.j2.in" +- content: !readFile "assets/espresso/pw_vc_relax.j2.in" name: pw_vc_relax.in contextProviders: - name: KGridFormDataManager @@ -72,7 +72,7 @@ applicationName: espresso executableName: pw.x -- content: !readFile "templates/espresso/pw_bands.j2.in" +- content: !readFile "assets/espresso/pw_bands.j2.in" name: pw_bands.in contextProviders: - name: KPathFormDataManager @@ -81,7 +81,7 @@ applicationName: espresso executableName: pw.x -- content: !readFile "templates/espresso/pw_scf_hse.j2.in" +- content: !readFile "assets/espresso/pw_scf_hse.j2.in" name: pw_scf_hse.in contextProviders: - name: KGridFormDataManager diff --git a/assets/espresso/q2r.x.yml b/templates/espresso/q2r.x.yml similarity index 64% rename from assets/espresso/q2r.x.yml rename to templates/espresso/q2r.x.yml index 3f8120ea..8fed753f 100644 --- a/assets/espresso/q2r.x.yml +++ b/templates/espresso/q2r.x.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/espresso/q2r.j2.in" +- content: !readFile "assets/espresso/q2r.j2.in" name: q2r.in contextProviders: [] applicationName: espresso diff --git a/assets/jupyterLab/jupyter.yml b/templates/jupyterLab/jupyter.yml similarity index 61% rename from assets/jupyterLab/jupyter.yml rename to templates/jupyterLab/jupyter.yml index 0f365806..19315d7f 100644 --- a/assets/jupyterLab/jupyter.yml +++ b/templates/jupyterLab/jupyter.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/jupyterLab/requirements303.j2.txt" +- content: !readFile "assets/jupyterLab/requirements303.j2.txt" name: requirements.txt contextProviders: [] applicationName: jupyterLab diff --git a/assets/nwchem/nwchem.yml b/templates/nwchem/nwchem.yml similarity index 68% rename from assets/nwchem/nwchem.yml rename to templates/nwchem/nwchem.yml index 90483bea..07275a83 100644 --- a/assets/nwchem/nwchem.yml +++ b/templates/nwchem/nwchem.yml @@ -1,4 +1,4 @@ -- content: !readFile "templates/nwchem/nwchem_total_energy.j2.inp" +- content: !readFile "assets/nwchem/nwchem_total_energy.j2.inp" name: nwchem_total_energy.inp contextProviders: - name: NWChemInputDataManager diff --git a/assets/python/python.yml b/templates/python/python.yml similarity index 59% rename from assets/python/python.yml rename to templates/python/python.yml index b5f36013..a21bad99 100644 --- a/assets/python/python.yml +++ b/templates/python/python.yml @@ -1,198 +1,198 @@ -- content: !readFile "templates/python/hello_world.pyi" +- content: !readFile "assets/python/hello_world.pyi" name: hello_world.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/requirements.j2.txt" +- content: !readFile "assets/python/requirements.j2.txt" name: requirements.txt contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/requirements_empty.j2.txt" +- content: !readFile "assets/python/requirements_empty.j2.txt" name: requirements_empty.txt contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/generic/post_processing:plot:matplotlib.pyi" +- content: !readFile "assets/python/generic/post_processing:plot:matplotlib.pyi" name: matplotlib_basic.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/espresso_xml_get_qpt_irr.pyi" +- content: !readFile "assets/python/espresso_xml_get_qpt_irr.pyi" name: espresso_xml_get_qpt_irr.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/espresso_extract_kpoints.pyi" +- content: !readFile "assets/python/espresso_extract_kpoints.pyi" name: espresso_extract_kpoints.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/generic/processing:find_extrema.pyi" +- content: !readFile "assets/python/generic/processing:find_extrema.pyi" name: find_extrema.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/generic/requirements.j2.txt" +- content: !readFile "assets/python/generic/requirements.j2.txt" name: processing_requirements.txt contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/requirements.j2.txt" +- content: !readFile "assets/python/ml/requirements.j2.txt" name: pyml_requirements.txt contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:setup_variables_packages.pyi" +- content: !readFile "assets/python/ml/pyml:setup_variables_packages.pyi" name: pyml_settings.py contextProviders: - name: MLSettingsDataManager applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:custom.pyi" +- content: !readFile "assets/python/ml/pyml:custom.pyi" name: pyml_custom.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:data_input:read_csv:pandas.pyi" +- content: !readFile "assets/python/ml/pyml:data_input:read_csv:pandas.pyi" name: data_input_read_csv_pandas.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:data_input:train_test_split:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:data_input:train_test_split:sklearn.pyi" name: data_input_train_test_split_sklearn.py contextProviders: - name: MLTrainTestSplitDataManager applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi" name: pre_processing_min_max_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi" +- content: !readFile "assets/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi" name: pre_processing_remove_duplicates_pandas.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:pre_processing:remove_missing:pandas.pyi" +- content: !readFile "assets/python/ml/pyml:pre_processing:remove_missing:pandas.pyi" name: pre_processing_remove_missing_pandas.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:pre_processing:standardization:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:pre_processing:standardization:sklearn.pyi" name: pre_processing_standardization_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi" name: model_adaboosted_trees_regression_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi" name: model_bagged_trees_regression_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi" name: model_gradboosted_trees_regression_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi" name: model_extreme_gradboosted_trees_regression_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:k_means_clustering:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:k_means_clustering:sklearn.pyi" name: model_k_means_clustering_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi" name: model_kernel_ridge_regression_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:lasso_regression:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:lasso_regression:sklearn.pyi" name: model_lasso_regression_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi" name: model_mlp_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:random_forest_classification:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:random_forest_classification:sklearn.pyi" name: model_random_forest_classification_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi" name: model_gradboosted_trees_classification_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi" name: model_extreme_gradboosted_trees_classification_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:random_forest_regression:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:random_forest_regression:sklearn.pyi" name: model_random_forest_regression_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:model:ridge_regression:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:model:ridge_regression:sklearn.pyi" name: model_ridge_regression_sklearn.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi" +- content: !readFile "assets/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi" name: post_processing_parity_plot_matplotlib.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi" +- content: !readFile "assets/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi" name: post_processing_pca_2d_clusters_matplotlib.py contextProviders: [] applicationName: python executableName: python -- content: !readFile "templates/python/ml/pyml:post_processing:roc_curve:sklearn.pyi" +- content: !readFile "assets/python/ml/pyml:post_processing:roc_curve:sklearn.pyi" name: post_processing_roc_curve_sklearn.py contextProviders: [] applicationName: python diff --git a/assets/shell/sh.yml b/templates/shell/sh.yml similarity index 61% rename from assets/shell/sh.yml rename to templates/shell/sh.yml index d03e826e..555375ee 100644 --- a/assets/shell/sh.yml +++ b/templates/shell/sh.yml @@ -1,28 +1,28 @@ -- content: !readFile "templates/shell/bash_hello_world.j2.sh" +- content: !readFile "assets/shell/bash_hello_world.j2.sh" name: hello_world.sh contextProviders: [] applicationName: shell executableName: sh -- content: !readFile "templates/shell/bash_job_espresso_pw_scf.j2.sh" +- content: !readFile "assets/shell/bash_job_espresso_pw_scf.j2.sh" name: job_espresso_pw_scf.sh contextProviders: [] applicationName: shell executableName: sh -- content: !readFile "templates/shell/bash_espresso_link_outdir_save.j2.sh" +- content: !readFile "assets/shell/bash_espresso_link_outdir_save.j2.sh" name: espresso_link_outdir_save.sh contextProviders: [] applicationName: shell executableName: sh -- content: !readFile "templates/shell/bash_espresso_collect_dynmat.j2.sh" +- content: !readFile "assets/shell/bash_espresso_collect_dynmat.j2.sh" name: espresso_collect_dynmat.sh contextProviders: [] applicationName: shell executableName: sh -- content: !readFile "templates/shell/bash_vasp_prepare_neb_images.j2.sh" +- content: !readFile "assets/shell/bash_vasp_prepare_neb_images.j2.sh" name: bash_vasp_prepare_neb_images.sh contextProviders: - name: VASPNEBInputDataManager diff --git a/assets/vasp/vasp.yml b/templates/vasp/vasp.yml similarity index 71% rename from assets/vasp/vasp.yml rename to templates/vasp/vasp.yml index ba59287e..807010cd 100644 --- a/assets/vasp/vasp.yml +++ b/templates/vasp/vasp.yml @@ -1,32 +1,32 @@ -- content: !readFile "templates/vasp/INCAR.j2" +- content: !readFile "assets/vasp/INCAR.j2" name: INCAR contextProviders: - name: VASPInputDataManager applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/INCAR_bands.j2" +- content: !readFile "assets/vasp/INCAR_bands.j2" name: INCAR_BANDS contextProviders: - name: VASPInputDataManager applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/INCAR_zpe.j2" +- content: !readFile "assets/vasp/INCAR_zpe.j2" name: INCAR_ZPE contextProviders: - name: VASPInputDataManager applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/INCAR_relax.j2" +- content: !readFile "assets/vasp/INCAR_relax.j2" name: INCAR_RELAX contextProviders: - name: VASPInputDataManager applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/INCAR_vc_relax.j2" +- content: !readFile "assets/vasp/INCAR_vc_relax.j2" name: INCAR_VC_RELAX contextProviders: - name: VASPInputDataManager @@ -34,8 +34,8 @@ executableName: vasp - content: !concatString - - !readFile "templates/vasp/INCAR.j2" - - !readFile "templates/vasp/_MIXIN_INCAR_hse.j2" + - !readFile "assets/vasp/INCAR.j2" + - !readFile "assets/vasp/_MIXIN_INCAR_hse.j2" name: INCAR_HSE contextProviders: - name: VASPInputDataManager @@ -43,15 +43,15 @@ executableName: vasp - content: !concatString - - !readFile "templates/vasp/INCAR_bands.j2" - - !readFile "templates/vasp/_MIXIN_INCAR_hse.j2" + - !readFile "assets/vasp/INCAR_bands.j2" + - !readFile "assets/vasp/_MIXIN_INCAR_hse.j2" name: INCAR_BANDS_HSE contextProviders: - name: VASPInputDataManager applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/KPOINTS.j2" +- content: !readFile "assets/vasp/KPOINTS.j2" name: KPOINTS contextProviders: - name: KGridFormDataManager @@ -59,7 +59,7 @@ applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/KPOINTS_bands.j2" +- content: !readFile "assets/vasp/KPOINTS_bands.j2" name: KPOINTS_BANDS contextProviders: - name: KPathFormDataManager @@ -67,7 +67,7 @@ applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/KPOINTS_conv.j2" +- content: !readFile "assets/vasp/KPOINTS_conv.j2" name: KPOINTS_CONV contextProviders: - name: KGridFormDataManager @@ -75,14 +75,14 @@ applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/POSCAR.j2" +- content: !readFile "assets/vasp/POSCAR.j2" name: POSCAR contextProviders: - name: VASPInputDataManager applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/INCAR_neb.j2" +- content: !readFile "assets/vasp/INCAR_neb.j2" name: INCAR_NEB contextProviders: - name: NEBFormDataManager @@ -90,7 +90,7 @@ applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/INCAR_neb_initial_final.j2" +- content: !readFile "assets/vasp/INCAR_neb_initial_final.j2" name: INCAR_NEB_INITIAL_FINAL contextProviders: - name: NEBFormDataManager @@ -98,7 +98,7 @@ applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/POSCAR_NEB_initial.j2" +- content: !readFile "assets/vasp/POSCAR_NEB_initial.j2" name: POSCAR_NEB_INITIAL contextProviders: - name: NEBFormDataManager @@ -106,7 +106,7 @@ applicationName: vasp executableName: vasp -- content: !readFile "templates/vasp/POSCAR_NEB_final.j2" +- content: !readFile "assets/vasp/POSCAR_NEB_final.j2" name: POSCAR_NEB_FINAL contextProviders: - name: NEBFormDataManager From 8f2267d6903d5127c8c634f8aa6ad31a1557855b Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 3 Aug 2023 17:34:30 -0700 Subject: [PATCH 08/52] chore: add template main asset --- templates/templates.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 templates/templates.yml diff --git a/templates/templates.yml b/templates/templates.yml new file mode 100644 index 00000000..81a5db3a --- /dev/null +++ b/templates/templates.yml @@ -0,0 +1,23 @@ +!flatten + - !include "templates/espresso/average.x.yml" + - !include "templates/espresso/bands.x.yml" + - !include "templates/espresso/dos.x.yml" + - !include "templates/espresso/dynmat.x.yml" + - !include "templates/espresso/gw.x.yml" + - !include "templates/espresso/matdyn.x.yml" + - !include "templates/espresso/neb.x.yml" + - !include "templates/espresso/ph.x.yml" + - !include "templates/espresso/pp.x.yml" + - !include "templates/espresso/projwfc.x.yml" + - !include "templates/espresso/pw.x.yml" + - !include "templates/espresso/q2r.x.yml" +# jupyterLab + - !include "templates/jupyterLab/jupyter.yml" +# nwchem + - !include "templates/nwchem/nwchem.yml" +# python + - !include "templates/python/python.yml" +# shell + - !include "templates/shell/sh.yml" +# vasp + - !include "templates/vasp/vasp.yml" From 85ece51fb98ff6e2a7cc3eb46c62b2ac1257ac06 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 3 Aug 2023 17:35:03 -0700 Subject: [PATCH 09/52] chore: rename ml.yml -> exabyteml.yml --- applications/{ml.yml => exabyteml.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename applications/{ml.yml => exabyteml.yml} (100%) diff --git a/applications/ml.yml b/applications/exabyteml.yml similarity index 100% rename from applications/ml.yml rename to applications/exabyteml.yml From d5606f728dd6460b5f2465059e0d5bef74065c7e Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 3 Aug 2023 17:35:26 -0700 Subject: [PATCH 10/52] chore: add main application data asset --- applications/application_data.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 applications/application_data.yml diff --git a/applications/application_data.yml b/applications/application_data.yml new file mode 100644 index 00000000..e8e7accf --- /dev/null +++ b/applications/application_data.yml @@ -0,0 +1,7 @@ +espresso: !include "applications/espresso.yml" +exabyteml: !include "applications/exabyteml.yml" +jupyterLab: !include "applications/jupterLab.yml" +nwchem: !include "applications/nwchem.yml" +python: !include "applications/python.yml" +shell: !include "applications/shell.yml" +vasp: !include "applications/vasp.yml" From 9e439526eb6411f4639cfc615edad16b6c343f31 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 3 Aug 2023 18:26:52 -0700 Subject: [PATCH 11/52] chore: move empty module files to data dir --- src/js/data/application_data.js | 5 +++++ src/js/{ => data}/templates.js | 2 +- src/js/data/tree.js | 5 +++++ src/js/index.js | 4 +++- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 src/js/data/application_data.js rename src/js/{ => data}/templates.js (80%) create mode 100644 src/js/data/tree.js diff --git a/src/js/data/application_data.js b/src/js/data/application_data.js new file mode 100644 index 00000000..1ae79235 --- /dev/null +++ b/src/js/data/application_data.js @@ -0,0 +1,5 @@ +/** + * Empty module file which will get populated at build time + * by build_assets.js + */ +export const applicationData = {}; diff --git a/src/js/templates.js b/src/js/data/templates.js similarity index 80% rename from src/js/templates.js rename to src/js/data/templates.js index 6e6e8ebb..cc9d434e 100644 --- a/src/js/templates.js +++ b/src/js/data/templates.js @@ -1,5 +1,5 @@ /** * Empty module file which will get populated at build time - * by build_templates.js + * by build_assets.js */ export const allTemplates = []; diff --git a/src/js/data/tree.js b/src/js/data/tree.js new file mode 100644 index 00000000..cc5e0ec8 --- /dev/null +++ b/src/js/data/tree.js @@ -0,0 +1,5 @@ +/** + * Empty module file which will get populated at build time + * by build_assets.js + */ +export const applicationTree = {}; diff --git a/src/js/index.js b/src/js/index.js index 37e6515b..9f86d7a2 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1,7 +1,9 @@ export { getAllAppTemplates } from "./assets"; export { getAppTree } from "./tree"; export { getAppData } from "./data"; -export { allTemplates } from "./templates"; +export { allTemplates } from "./data/templates"; +export { applicationData } from "./data/application_data"; +export { applicationTree } from "./data/tree"; export allowedResults from "./allowed_results"; export allowedMonitors from "./allowed_monitors"; export { filterModelsByApplicationParameters } from "./models"; From 8d712961221223f5f2ed90ac3e985d5fbd205c0c Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 3 Aug 2023 18:28:18 -0700 Subject: [PATCH 12/52] refactor: build all assets + write to data dir --- build_templates.js | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/build_templates.js b/build_templates.js index 83dd7adb..6927bd65 100644 --- a/build_templates.js +++ b/build_templates.js @@ -4,13 +4,34 @@ * downstream consumption to avoid FS calls in the browser. */ const fs = require("fs"); -const flavors = require("./lib/js/assets"); -const obj = flavors.getAllAppTemplates(); -fs.writeFileSync("./lib/js/templates.js", "module.exports = {allTemplates: " + JSON.stringify(obj) + "}", "utf8"); +const yaml = require("js-yaml"); +const utils = require("@exabyte-io/code.js/dist/utils"); -// Verify contents -// const templates = require("./lib/js/templates"); -// console.log(templates); +function buildAsset({ assetPath, targetPath, dataKey = "" }) { + const fileContent = fs.readFileSync(assetPath); + const obj = yaml.load(fileContent, { schema: utils.JsYamlAllSchemas }); + fs.writeFileSync( + targetPath, + `module.exports = {${dataKey}: ` + JSON.stringify(obj) + "}", + "utf8", + ); + console.log(`Written asset "${assetPath}" to "${targetPath}"`); +} -// Downstream usage of compiled templates -// import { allTemplates } from "@exabyte-io/application-flavors/templates"; +buildAsset({ + assetPath: "./templates/templates.yml", + targetPath: "./lib/js/data/templates.js", + dataKey: "allTemplates", +}); + +buildAsset({ + assetPath: "./applications/application_data.yml", + targetPath: "./lib/js/data/applications.js", + dataKey: "applicationData", +}); + +buildAsset({ + assetPath: "./executables/tree.yml", + targetPath: "./lib/js/data/tree.js", + dataKey: "applicationTree", +}); From 6ffe26745e21c67c19ae74c609377900066ff39a Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 3 Aug 2023 18:29:11 -0700 Subject: [PATCH 13/52] refactor: use assets for getAllAppTemplates --- src/js/assets.js | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/src/js/assets.js b/src/js/assets.js index cbbe3f62..7269302f 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -1,20 +1,8 @@ -import ESPRESSO_INPUT_TEMPLATES from "./espresso/assets"; -import JUPYTER_INPUT_TEMPLATES from "./jupyterLab/assets"; -import NWCHEM_INPUT_TEMPLATES from "./nwchem/assets"; -import PYTHON_INPUT_TEMPLATES from "./python/assets"; -import SHELL_INPUT_TEMPLATES from "./shell/assets"; -import VASP_INPUT_TEMPLATES from "./vasp/assets"; +import { JsYamlAllSchemas } from "@exabyte-io/code.js/dist/utils"; +import fs from "fs"; +import yaml from "js-yaml"; export function getAllAppTemplates() { - return [].concat.apply( - [], - [ - ESPRESSO_INPUT_TEMPLATES(), - SHELL_INPUT_TEMPLATES(), - PYTHON_INPUT_TEMPLATES(), - VASP_INPUT_TEMPLATES(), - JUPYTER_INPUT_TEMPLATES(), - NWCHEM_INPUT_TEMPLATES(), - ], - ); + const fileContent = fs.readFileSync("./templates/templates.yml"); + return yaml.load(fileContent, { schema: JsYamlAllSchemas }); } From 2ed3a09f2ef68f9c354507f93bde31ba9f3ea542 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 3 Aug 2023 18:30:15 -0700 Subject: [PATCH 14/52] chore: use assets to read appData and tree --- src/js/assets.js | 10 ++++++++++ src/js/index.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/js/assets.js b/src/js/assets.js index 7269302f..9f33ff27 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -6,3 +6,13 @@ export function getAllAppTemplates() { const fileContent = fs.readFileSync("./templates/templates.yml"); return yaml.load(fileContent, { schema: JsYamlAllSchemas }); } + +export function getAllAppData() { + const fileContent = fs.readFileSync("./applications/application_data.yml"); + return yaml.load(fileContent, { schema: JsYamlAllSchemas }); +} + +export function getAllAppTree() { + const fileContent = fs.readFileSync("./executables/tree.yml"); + return yaml.load(fileContent, { schema: JsYamlAllSchemas }); +} diff --git a/src/js/index.js b/src/js/index.js index 9f86d7a2..f00ab90d 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1,4 +1,4 @@ -export { getAllAppTemplates } from "./assets"; +export { getAllAppTemplates, getAllAppData, getAllAppTree } from "./assets"; export { getAppTree } from "./tree"; export { getAppData } from "./data"; export { allTemplates } from "./data/templates"; From b34fcf30f7680c33449cd2fd213291487d545512 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 3 Aug 2023 18:32:09 -0700 Subject: [PATCH 15/52] refactor: read tree from generated file at runtime --- src/js/tree.js | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/src/js/tree.js b/src/js/tree.js index 8fc6edcc..de9a49c3 100644 --- a/src/js/tree.js +++ b/src/js/tree.js @@ -1,22 +1,4 @@ -import ESPRESSO_TREE from "./espresso/tree"; -import JUPYTERLAB_TREE from "./jupyterLab/tree"; -import ML_TREE from "./ml/tree"; -import NWCHEM_TREE from "./nwchem/tree"; -import PYTHON_TREE from "./python/tree"; -import SHELL_TREE from "./shell/tree"; -import VASP_TREE from "./vasp/tree"; - -const APP_TREES = { - espresso: ESPRESSO_TREE, - jupyterLab: JUPYTERLAB_TREE, - exabyteml: ML_TREE, - nwchem: NWCHEM_TREE, - python: PYTHON_TREE, - shell: SHELL_TREE, - vasp: VASP_TREE, -}; - -const _expanded = {}; +import { applicationTree as APP_TREES } from "./data/tree"; /** * @summary Given an application name, return the applications's tree. @@ -28,18 +10,6 @@ export function getAppTree(appName) { if (!(appName in APP_TREES)) { throw new Error(`${appName} is not a known application with a tree.`); } - if (Object.keys(_expanded).includes(appName)) { - return _expanded[appName]; - } - const executables = APP_TREES[appName]; - Object.keys(executables).forEach((execName) => { - const exec = executables[execName]; - Object.keys(exec.flavors).forEach((flavorName) => { - const flavor = exec.flavors[flavorName]; - flavor.applicationName = appName; - flavor.executableName = execName; - }); - }); - _expanded[appName] = executables; - return executables; + + return APP_TREES[appName]; } From e36a650d1ed03c53594e86a964b4fc04304b8aae Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 3 Aug 2023 18:33:14 -0700 Subject: [PATCH 16/52] test: objects created from assets --- tests/test.js | 59 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/tests/test.js b/tests/test.js index c9600c5e..8d059fa8 100644 --- a/tests/test.js +++ b/tests/test.js @@ -4,7 +4,9 @@ import { expect } from "chai"; import { allowedMonitors, allowedResults, + getAllAppData, getAllAppTemplates, + getAllAppTree, getAppData, getAppTree, } from "../src/js/index"; @@ -37,11 +39,18 @@ describe("ALL_INPUT_TEMPLATES", () => { }); }); -describe("getAppTree", () => { - it("returns results", () => { - const tree = getAppTree("nwchem"); - assert("nwchem" in tree); +describe("getAllAppTree", () => { + let APP_TREE; + before(() => { + APP_TREE = getAllAppTree(); + }); + + it("returns valid tree", () => { + assert("nwchem" in APP_TREE); }); +}); + +describe("getAppTree", () => { it("raises on unknown application", () => { expect(() => { getAppTree("unknown_app"); @@ -49,12 +58,15 @@ describe("getAppTree", () => { }); }); -describe("getAppData", () => { +describe("getAllAppData", () => { it("returns results", () => { - const data = getAppData("nwchem"); - assert("name" in data); - assert(data.name === "nwchem"); + const { nwchem } = getAllAppData(); + assert("name" in nwchem); + assert(nwchem.name === "nwchem"); }); +}); + +describe("getAppData", () => { it("raises on unknown application", () => { expect(() => { getAppData("unknown_app"); @@ -63,9 +75,14 @@ describe("getAppData", () => { }); describe("assets for all executables", () => { + let APP_TREE, templates; + before(() => { + APP_TREE = getAllAppTree(); + templates = getAllAppTemplates(); + }); + it("exists at least 1 asset for each tree entry for espresso tree", () => { - const tree = getAppTree("espresso"); - const templates = getAllAppTemplates(); + const tree = APP_TREE.espresso; Object.keys(tree).forEach((treeItemName) => { const treeItemTemplates = templates.filter( @@ -77,8 +94,7 @@ describe("assets for all executables", () => { }); it("exists at least 1 asset for each tree entry for jupyterLab tree", () => { - const tree = getAppTree("jupyterLab"); - const templates = getAllAppTemplates(); + const tree = APP_TREE.jupyterLab; Object.keys(tree).forEach((treeItemName) => { const treeItemTemplates = templates.filter( @@ -89,9 +105,10 @@ describe("assets for all executables", () => { }); }); - it.skip("exists at least 1 asset for each tree entry for ml tree", () => { - const tree = getAppTree("ml"); - const templates = getAllAppTemplates(); + // skip as there are no template assets for exabyteml + it.skip("exists at least 1 asset for each tree entry for exabyteml tree", () => { + const tree = APP_TREE.exabyteml; + console.log(JSON.stringify(tree, null, 4)); Object.keys(tree).forEach((treeItemName) => { const treeItemTemplates = templates.filter( @@ -103,8 +120,7 @@ describe("assets for all executables", () => { }); it("exists at least 1 asset for each tree entry for nwchem tree", () => { - const tree = getAppTree("nwchem"); - const templates = getAllAppTemplates(); + const tree = APP_TREE.nwchem; Object.keys(tree).forEach((treeItemName) => { const treeItemTemplates = templates.filter( @@ -116,8 +132,7 @@ describe("assets for all executables", () => { }); it("exists at least 1 asset for each tree entry for python tree", () => { - const tree = getAppTree("python"); - const templates = getAllAppTemplates(); + const tree = APP_TREE.python; Object.keys(tree).forEach((treeItemName) => { const treeItemTemplates = templates.filter( @@ -129,8 +144,7 @@ describe("assets for all executables", () => { }); it("exists at least 1 asset for each tree entry for shell tree", () => { - const tree = getAppTree("shell"); - const templates = getAllAppTemplates(); + const tree = APP_TREE.shell; Object.keys(tree).forEach((treeItemName) => { const treeItemTemplates = templates.filter( @@ -142,8 +156,7 @@ describe("assets for all executables", () => { }); it("exists at least 1 asset for each tree entry for vasp tree", () => { - const tree = getAppTree("vasp"); - const templates = getAllAppTemplates(); + const tree = APP_TREE.vasp; Object.keys(tree).forEach((treeItemName) => { const treeItemTemplates = templates.filter( From d5ab377a0fe664ea94ded4ec83195b88983c7b3c Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 08:43:02 -0700 Subject: [PATCH 17/52] chore: fix path -> application_data --- build_templates.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_templates.js b/build_templates.js index 6927bd65..08b045be 100644 --- a/build_templates.js +++ b/build_templates.js @@ -26,7 +26,7 @@ buildAsset({ buildAsset({ assetPath: "./applications/application_data.yml", - targetPath: "./lib/js/data/applications.js", + targetPath: "./lib/js/data/application_data.js", dataKey: "applicationData", }); From a5639edec6f4d405c68ffea8c8eacc55e962ae48 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 08:45:05 -0700 Subject: [PATCH 18/52] refactor: use generated js file for getAppData --- src/js/data.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/js/data.js b/src/js/data.js index fcc13dd7..b0cec3ad 100644 --- a/src/js/data.js +++ b/src/js/data.js @@ -1,20 +1,4 @@ -import ESPRESSO_DATA from "./espresso/data"; -import JUPYTERLAB_DATA from "./jupyterLab/data"; -import ML_DATA from "./ml/data"; -import NWCHEM_DATA from "./nwchem/data"; -import PYTHON_DATA from "./python/data"; -import SHELL_DATA from "./shell/data"; -import VASP_DATA from "./vasp/data"; - -const APP_DATA = { - espresso: ESPRESSO_DATA, - jupyterLab: JUPYTERLAB_DATA, - exabyteml: ML_DATA, - nwchem: NWCHEM_DATA, - python: PYTHON_DATA, - shell: SHELL_DATA, - vasp: VASP_DATA, -}; +import { applicationData as APP_DATA } from "./data/application_data"; /** * Given an application name, return the applications's data. From 6d8b162bf19b736e372647804ae3395b796d40e7 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 08:46:28 -0700 Subject: [PATCH 19/52] refactor: remove JS files + use Yaml assets --- src/js/espresso/assets.js | 315 ------------------------- src/js/espresso/data.js | 129 ---------- src/js/espresso/tree.js | 453 ------------------------------------ src/js/jupyterLab/assets.js | 20 -- src/js/jupyterLab/data.js | 17 -- src/js/jupyterLab/tree.js | 21 -- src/js/ml/data.js | 12 - src/js/ml/tree.js | 28 --- src/js/nwchem/assets.js | 20 -- src/js/nwchem/data.js | 15 -- src/js/nwchem/tree.js | 50 ---- src/js/python/assets.js | 271 --------------------- src/js/python/data.js | 24 -- src/js/python/tree.js | 398 ------------------------------- src/js/shell/assets.js | 51 ---- src/js/shell/data.js | 12 - src/js/shell/tree.js | 54 ----- src/js/vasp/assets.js | 127 ---------- src/js/vasp/data.js | 52 ----- src/js/vasp/tree.js | 333 -------------------------- 20 files changed, 2402 deletions(-) delete mode 100644 src/js/espresso/assets.js delete mode 100644 src/js/espresso/data.js delete mode 100644 src/js/espresso/tree.js delete mode 100644 src/js/jupyterLab/assets.js delete mode 100644 src/js/jupyterLab/data.js delete mode 100644 src/js/jupyterLab/tree.js delete mode 100644 src/js/ml/data.js delete mode 100644 src/js/ml/tree.js delete mode 100644 src/js/nwchem/assets.js delete mode 100644 src/js/nwchem/data.js delete mode 100644 src/js/nwchem/tree.js delete mode 100644 src/js/python/assets.js delete mode 100644 src/js/python/data.js delete mode 100644 src/js/python/tree.js delete mode 100644 src/js/shell/assets.js delete mode 100644 src/js/shell/data.js delete mode 100644 src/js/shell/tree.js delete mode 100644 src/js/vasp/assets.js delete mode 100644 src/js/vasp/data.js delete mode 100644 src/js/vasp/tree.js diff --git a/src/js/espresso/assets.js b/src/js/espresso/assets.js deleted file mode 100644 index 5a01c4e1..00000000 --- a/src/js/espresso/assets.js +++ /dev/null @@ -1,315 +0,0 @@ -import { makeObjectsFromContextProviderNames, readAssetFile } from "../utils"; - -const applicationName = "espresso"; - -// Here, we're returning a delayed-evaluation lambda, to avoid loading the asset files in scenarios where they're not -// available, like on the client. -export default () => { - const allAssets = [ - /* - * PW.X - */ - { - content: readAssetFile(applicationName, "pw_scf.j2.in"), - name: "pw_scf.in", - contextProviders: [ - "KGridFormDataManager", - "QEPWXInputDataManager", - "PlanewaveCutoffDataManager", - ], - applicationName, - executableName: "pw.x", - }, - { - content: readAssetFile(applicationName, "pw_scf_bands_hse.j2.in"), - name: "pw_scf_bands_hse.in", - contextProviders: [ - "QEPWXInputDataManager", - "PlanewaveCutoffDataManager", - "QGridFormDataManager", - "ExplicitKPathFormDataManager", - ], - applicationName, - executableName: "pw.x", - }, - { - content: readAssetFile(applicationName, "pw_esm.j2.in"), - name: "pw_esm.in", - contextProviders: [ - "KGridFormDataManager", - "QEPWXInputDataManager", - "PlanewaveCutoffDataManager", - "BoundaryConditionsFormDataManager", - ], - applicationName, - executableName: "pw.x", - }, - { - content: readAssetFile(applicationName, "pw_esm_relax.j2.in"), - name: "pw_esm_relax.in", - contextProviders: [ - "KGridFormDataManager", - "QEPWXInputDataManager", - "PlanewaveCutoffDataManager", - "BoundaryConditionsFormDataManager", - ], - applicationName, - executableName: "pw.x", - }, - - { - content: readAssetFile(applicationName, "pw_scf_kpt_conv.j2.in"), - name: "pw_scf_kpt_conv.in", - contextProviders: ["QEPWXInputDataManager", "PlanewaveCutoffDataManager"], - applicationName, - executableName: "pw.x", - }, - { - content: readAssetFile(applicationName, "pw_nscf.j2.in"), - name: "pw_nscf.in", - contextProviders: [ - "KGridFormDataManager", - "QEPWXInputDataManager", - "PlanewaveCutoffDataManager", - ], - applicationName, - executableName: "pw.x", - }, - { - content: readAssetFile(applicationName, "pw_relax.j2.in"), - name: "pw_relax.in", - contextProviders: [ - "KGridFormDataManager", - "QEPWXInputDataManager", - "PlanewaveCutoffDataManager", - ], - applicationName, - executableName: "pw.x", - }, - { - content: readAssetFile(applicationName, "pw_vc_relax.j2.in"), - name: "pw_vc_relax.in", - contextProviders: [ - "KGridFormDataManager", - "QEPWXInputDataManager", - "PlanewaveCutoffDataManager", - ], - applicationName, - executableName: "pw.x", - }, - { - content: readAssetFile(applicationName, "pw_bands.j2.in"), - name: "pw_bands.in", - contextProviders: [ - "KPathFormDataManager", - "QEPWXInputDataManager", - "PlanewaveCutoffDataManager", - ], - applicationName, - executableName: "pw.x", - }, - { - content: readAssetFile(applicationName, "pw_scf_hse.j2.in"), - name: "pw_scf_hse.in", - contextProviders: [ - "KGridFormDataManager", - "QEPWXInputDataManager", - "PlanewaveCutoffDataManager", - ], - applicationName, - executableName: "pw.x", - }, - - /* - * PH.X - */ - { - content: readAssetFile(applicationName, "ph_grid.j2.in"), - name: "ph_grid.in", - contextProviders: ["QGridFormDataManager"], - applicationName, - executableName: "ph.x", - }, - { - content: readAssetFile(applicationName, "ph_path.j2.in"), - name: "ph_path.in", - contextProviders: ["QPathFormDataManager"], - applicationName, - executableName: "ph.x", - }, - { - content: readAssetFile(applicationName, "ph_gamma.j2.in"), - name: "ph_gamma.in", - contextProviders: [], - applicationName, - executableName: "ph.x", - }, - { - content: readAssetFile(applicationName, "ph_init_qpoints.j2.in"), - name: "ph_init_qpoints.in", - contextProviders: ["QGridFormDataManager"], - applicationName, - executableName: "ph.x", - }, - { - content: readAssetFile(applicationName, "ph_grid_restart.j2.in"), - name: "ph_grid_restart.in", - contextProviders: ["QGridFormDataManager"], - applicationName, - executableName: "ph.x", - }, - { - content: readAssetFile(applicationName, "ph_single_irr_qpt.j2.in"), - name: "ph_single_irr_qpt.in", - contextProviders: ["QGridFormDataManager"], - applicationName, - executableName: "ph.x", - }, - - /* - * MATDYN.X - */ - { - content: readAssetFile(applicationName, "matdyn_grid.j2.in"), - name: "matdyn_grid.in", - contextProviders: ["IGridFormDataManager"], - applicationName, - executableName: "matdyn.x", - }, - { - content: readAssetFile(applicationName, "matdyn_path.j2.in"), - name: "matdyn_path.in", - contextProviders: ["IPathFormDataManager"], - applicationName, - executableName: "matdyn.x", - }, - - /* - * DYNMAT.X - */ - { - content: readAssetFile(applicationName, "matdyn_grid.j2.in"), - name: "dynmat_grid.in", - contextProviders: ["IGridFormDataManager"], - applicationName, - executableName: "dynmat.x", - }, - - /* - * BANDS.X - */ - { - content: readAssetFile(applicationName, "bands.j2.in"), - name: "bands.in", - contextProviders: [], - applicationName, - executableName: "bands.x", - }, - - /* - * Q2R.X - */ - { - content: readAssetFile(applicationName, "q2r.j2.in"), - name: "q2r.in", - contextProviders: [], - applicationName, - executableName: "q2r.x", - }, - - /* - * PROJWFC.X - */ - { - content: readAssetFile(applicationName, "projwfc.j2.in"), - name: "projwfc.in", - contextProviders: [], - applicationName, - executableName: "projwfc.x", - }, - - /* - * DOS.X - */ - { - content: readAssetFile(applicationName, "dos.j2.in"), - name: "dos.in", - contextProviders: [], - applicationName, - executableName: "dos.x", - }, - - /* - * PP.X - */ - { - content: readAssetFile(applicationName, "pp_density.j2.in"), - name: "pp_density.in", - contextProviders: [], - applicationName, - executableName: "pp.x", - }, - { - content: readAssetFile(applicationName, "pp_electrostatic_potential.j2.in"), - name: "pp_electrostatic_potential.in", - contextProviders: [], - applicationName, - executableName: "pp.x", - }, - - /* - * NEB.X - */ - { - content: readAssetFile(applicationName, "neb.j2.in"), - name: "neb.in", - contextProviders: [ - "KGridFormDataManager", - "NEBFormDataManager", - "QENEBInputDataManager", - "PlanewaveCutoffDataManager", - ], - applicationName, - executableName: "neb.x", - }, - - /* - * Sternheimer GW - */ - { - content: readAssetFile(applicationName, "gw_bands_plasmon_pole.j2.in"), - name: "gw_bands_plasmon_pole.in", - contextProviders: [ - "KGridFormDataManager", - "QGridFormDataManager", - "ExplicitKPath2PIBAFormDataManager", - ], - applicationName, - executableName: "gw.x", - }, - { - content: readAssetFile(applicationName, "gw_bands_full_frequency.j2.in"), - name: "gw_bands_full_frequency.in", - contextProviders: [ - "KGridFormDataManager", - "QGridFormDataManager", - "ExplicitKPath2PIBAFormDataManager", - ], - applicationName, - executableName: "gw.x", - }, - - /* - * AVERAGE.X - */ - { - content: readAssetFile(applicationName, "average.j2.in"), - name: "average.in", - contextProviders: [], - applicationName, - executableName: "average.x", - }, - ]; - - return allAssets.map((a) => makeObjectsFromContextProviderNames(a)); -}; diff --git a/src/js/espresso/data.js b/src/js/espresso/data.js deleted file mode 100644 index d3e88694..00000000 --- a/src/js/espresso/data.js +++ /dev/null @@ -1,129 +0,0 @@ -export default { - name: "espresso", - shortName: "qe", - summary: "Quantum Espresso", - defaultVersion: "5.4.0", - versions: [ - { - version: "5.2.1", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "5.2.1", - isDefault: false, - build: "GNU", - hasAdvancedComputeOptions: true, - }, - { - version: "5.2.1", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - { - version: "5.4.0", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "5.4.0", - isDefault: false, - build: "GNU", - hasAdvancedComputeOptions: true, - }, - { - version: "5.4.0", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - { - version: "6.0.0", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "6.0.0", - isDefault: false, - build: "GNU", - hasAdvancedComputeOptions: true, - }, - { - version: "6.0.0", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - { - version: "6.3", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "6.3", - isDefault: false, - build: "GNU", - hasAdvancedComputeOptions: true, - }, - { - version: "6.3", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - { - version: "6.4.1", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "6.5.0", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "6.6.0", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "6.7.0", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "6.8.0", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "7.0", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "7.0", - isDefault: false, - build: "GNU", - hasAdvancedComputeOptions: true, - }, - { - version: "7.0", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - { - version: "7.2", - isDefault: true, - hasAdvancedComputeOptions: true, - }, - { - version: "7.2", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - ], -}; diff --git a/src/js/espresso/tree.js b/src/js/espresso/tree.js deleted file mode 100644 index 86fe02de..00000000 --- a/src/js/espresso/tree.js +++ /dev/null @@ -1,453 +0,0 @@ -import _ from "underscore"; - -import monitors from "../allowed_monitors"; -import postProcessors from "../allowed_post-processors"; -import allowedResults from "../allowed_results"; - -const allowedMonitors = [ - monitors.standard_output, - monitors.convergence_ionic, - monitors.convergence_electronic, -]; - -// import postProcessors from "../allowed_post-processors"; -const allowedPostProcessors = [ - /* restart logic is handled by restart flag within a (Sub)workflow */ - // postProcessors.prepare_restart, - postProcessors.remove_non_zero_weight_kpoints, -]; - -export default { - "pw.x": { - isDefault: true, - hasAdvancedComputeOptions: true, - postProcessors: allowedPostProcessors, - monitors: allowedMonitors, - results: _.without( - allowedResults, - "phonon_dos", - "phonon_dispersions", - "zero_point_energy", - "band_structure", - ), - flavors: { - pw_scf: { - isDefault: true, - input: [ - { - name: "pw_scf.in", - }, - ], - results: [ - "total_energy", - "total_energy_contributions", - "pressure", - "fermi_energy", - "atomic_forces", - "total_force", - "stress_tensor", - ], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - pw_scf_bands_hse: { - input: [ - { - name: "pw_scf_bands_hse.in", - }, - ], - results: [ - "total_energy", - "total_energy_contributions", - "pressure", - "fermi_energy", - "atomic_forces", - "total_force", - "stress_tensor", - ], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - pw_scf_hse: { - input: [ - { - name: "pw_scf_hse.in", - }, - ], - results: [ - "atomic_forces", - "band_gaps", - "fermi_energy", - "pressure", - "stress_tensor", - "total_energy", - "total_energy_contributions", - "total_force", - ], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - pw_esm: { - input: [ - { - name: "pw_esm.in", - }, - ], - results: [ - "total_energy", - "total_energy_contributions", - "pressure", - "fermi_energy", - "atomic_forces", - "total_force", - "stress_tensor", - "potential_profile", - "charge_density_profile", - ], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - pw_esm_relax: { - input: [ - { - name: "pw_esm_relax.in", - }, - ], - results: [ - "total_energy", - "total_energy_contributions", - "pressure", - "fermi_energy", - "atomic_forces", - "total_force", - "stress_tensor", - "potential_profile", - "charge_density_profile", - ], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - pw_nscf: { - input: [ - { - name: "pw_nscf.in", - }, - ], - results: ["fermi_energy", "band_gaps"], - monitors: [monitors.standard_output], - }, - pw_bands: { - input: [ - { - name: "pw_bands.in", - }, - ], - monitors: [monitors.standard_output], - }, - pw_relax: { - input: [ - { - name: "pw_relax.in", - }, - ], - monitors: [ - monitors.standard_output, - monitors.convergence_electronic, - monitors.convergence_ionic, - ], - results: [ - "total_energy", - "fermi_energy", - "pressure", - "atomic_forces", - "total_force", - "stress_tensor", - "final_structure", - ], - }, - "pw_vc-relax": { - input: [ - { - name: "pw_vc_relax.in", - }, - ], - monitors: [ - monitors.standard_output, - monitors.convergence_electronic, - monitors.convergence_ionic, - ], - results: [ - "total_energy", - "fermi_energy", - "pressure", - "atomic_forces", - "total_force", - "stress_tensor", - "final_structure", - ], - }, - pw_scf_kpt_conv: { - input: [ - { - name: "pw_scf_kpt_conv.in", - }, - ], - results: [ - 'total_energy', - 'fermi_energy', - 'pressure', - 'atomic_forces', - 'total_force', - 'stress_tensor', - ], - monitors: [ - monitors.standard_output, - monitors.convergence_electronic, - ], - }, - }, - }, - "ph.x": { - monitors: [monitors.standard_output], - results: ["phonon_dos", "phonon_dispersions", "zero_point_energy"], - flavors: { - ph_path: { - input: [ - { - name: "ph_path.in", - }, - ], - results: ["phonon_dispersions"], - monitors: [monitors.standard_output], - }, - ph_grid: { - input: [ - { - name: "ph_grid.in", - }, - ], - results: ["phonon_dos"], - monitors: [monitors.standard_output], - }, - ph_gamma: { - input: [ - { - name: "ph_gamma.in", - }, - ], - results: ["zero_point_energy"], - monitors: [monitors.standard_output], - }, - ph_init_qpoints: { - input: [ - { - name: "ph_init_qpoints.in", - }, - ], - results: [], - monitors: [monitors.standard_output], - }, - ph_grid_restart: { - input: [ - { - name: "ph_grid_restart.in", - }, - ], - results: [], - monitors: [monitors.standard_output], - }, - ph_single_irr_qpt: { - input: [ - { - name: "ph_single_irr_qpt.in", - }, - ], - results: [], - monitors: [monitors.standard_output], - }, - }, - }, - - "bands.x": { - monitors: [monitors.standard_output], - results: ["band_structure"], - flavors: { - bands: { - input: [ - { - name: "bands.in", - }, - ], - results: ["band_structure"], - monitors: [monitors.standard_output], - }, - }, - }, - "projwfc.x": { - monitors: [monitors.standard_output], - results: ["density_of_states"], - flavors: { - projwfc: { - input: [ - { - name: "projwfc.in", - }, - ], - results: ["density_of_states"], - monitors: [monitors.standard_output], - }, - }, - }, - "dos.x": { - monitors: [monitors.standard_output], - results: ["density_of_states"], - flavors: { - dos: { - input: [ - { - name: "dos.in", - }, - ], - results: ["density_of_states"], - monitors: [monitors.standard_output], - }, - }, - }, - "pp.x": { - monitors: [monitors.standard_output], - results: [], - flavors: { - pp_density: { - input: [ - { - name: "pp_density.in", - }, - ], - results: [], - monitors: [monitors.standard_output], - }, - pp_electrostatic_potential: { - input: [ - { - name: "pp_electrostatic_potential.in", - }, - ], - results: [], - monitors: [monitors.standard_output], - }, - }, - }, - "q2r.x": { - monitors: [monitors.standard_output], - results: [], - flavors: { - q2r: { - input: [ - { - name: "q2r.in", - }, - ], - results: [], - monitors: [monitors.standard_output], - }, - }, - }, - "dynmat.x": { - monitors: [monitors.standard_output], - results: [], - flavors: { - dynmat: { - input: [ - { - name: "dynmat_grid.in", - }, - ], - results: [], - monitors: [monitors.standard_output], - }, - }, - }, - "matdyn.x": { - monitors: [monitors.standard_output], - results: ["phonon_dos", "phonon_dispersions"], - flavors: { - matdyn_grid: { - input: [ - { - name: "matdyn_grid.in", - }, - ], - monitors: [monitors.standard_output], - results: ["phonon_dos"], - }, - matdyn_path: { - input: [ - { - name: "matdyn_path.in", - }, - ], - monitors: [monitors.standard_output], - results: ["phonon_dispersions"], - }, - }, - }, - "neb.x": { - monitors: [monitors.standard_output], - results: ["reaction_energy_barrier", "reaction_energy_profile"], - flavors: { - neb: { - isMultiMaterial: true, - input: [ - { - name: "neb.in", - }, - ], - results: ["reaction_energy_barrier", "reaction_energy_profile"], - monitors: [monitors.standard_output], - }, - }, - }, - "gw.x": { - monitors: [monitors.standard_output], - results: ["band_structure", "fermi_energy", "band_gaps"], - flavors: { - gw_bands_plasmon_pole: { - input: [ - { - name: "gw_bands_plasmon_pole.in", - }, - ], - results: ["band_structure", "fermi_energy", "band_gaps"], - monitors: [monitors.standard_output], - }, - gw_bands_full_frequency: { - input: [ - { - name: "gw_bands_full_frequency.in", - }, - ], - results: ["band_structure", "fermi_energy", "band_gaps"], - monitors: [monitors.standard_output], - }, - }, - }, - "average.x": { - monitors: [monitors.standard_output], - results: ["average_potential_profile"], - flavors: { - average: { - input: [ - { - name: "average.in", - }, - ], - results: [], - monitors: [monitors.standard_output], - }, - average_potential: { - input: [ - { - name: "average.in", - }, - ], - results: ["average_potential_profile"], - monitors: [monitors.standard_output], - }, - }, - }, -}; diff --git a/src/js/jupyterLab/assets.js b/src/js/jupyterLab/assets.js deleted file mode 100644 index 08c77c66..00000000 --- a/src/js/jupyterLab/assets.js +++ /dev/null @@ -1,20 +0,0 @@ -import { makeObjectsFromContextProviderNames, readAssetFile } from "../utils"; - -const applicationName = "jupyterLab"; -const executableName = "jupyter"; - -// Here, we're returning a delayed-evaluation lambda, to avoid loading the asset files in scenarios where they're not -// available, like on the client. -export default () => { - const allAssets = [ - { - content: readAssetFile(applicationName, "requirements303.j2.txt"), - name: "requirements.txt", - contextProviders: [], - applicationName, - executableName, - }, - ]; - - return allAssets.map((a) => makeObjectsFromContextProviderNames(a)); -}; diff --git a/src/js/jupyterLab/data.js b/src/js/jupyterLab/data.js deleted file mode 100644 index 9dcbcfec..00000000 --- a/src/js/jupyterLab/data.js +++ /dev/null @@ -1,17 +0,0 @@ -export default { - name: "jupyterLab", - shortName: "jl", - summary: "JupyterLab", - defaultVersion: "3.0.3", - versions: [ - { - version: "3.0.3", - isDefault: true, - }, - { - version: "3.0.3", - isDefault: false, - build: "with-pre-installed-packages", - }, - ], -}; diff --git a/src/js/jupyterLab/tree.js b/src/js/jupyterLab/tree.js deleted file mode 100644 index 11aeb153..00000000 --- a/src/js/jupyterLab/tree.js +++ /dev/null @@ -1,21 +0,0 @@ -import monitors from "../allowed_monitors"; - -export default { - jupyter: { - isDefault: true, - monitors: [monitors.standard_output, monitors.jupyterNotebookEndpoint], - results: [], - flavors: { - notebook: { - isDefault: true, - input: [ - { - name: "requirements.txt", - templateName: "requirements.txt", - }, - ], - monitors: [monitors.standard_output, monitors.jupyterNotebookEndpoint], - }, - }, - }, -}; diff --git a/src/js/ml/data.js b/src/js/ml/data.js deleted file mode 100644 index ac95b6dd..00000000 --- a/src/js/ml/data.js +++ /dev/null @@ -1,12 +0,0 @@ -export default { - name: "exabyteml", - shortName: "ml", - summary: "Exabyte Machine Learning Engine", - defaultVersion: "0.2.0", - versions: [ - { - version: "0.2.0", - isDefault: true, - }, - ], -}; diff --git a/src/js/ml/tree.js b/src/js/ml/tree.js deleted file mode 100644 index 4be7c16a..00000000 --- a/src/js/ml/tree.js +++ /dev/null @@ -1,28 +0,0 @@ -import monitors from "../allowed_monitors"; - -export default { - train: { - isDefault: true, - monitors: [monitors.standard_output], - results: ["workflow:ml_predict"], - flavors: { - train: { - isDefault: true, - input: [], - monitors: [monitors.standard_output], - }, - }, - }, - score: { - isDefault: false, - monitors: [monitors.standard_output], - results: ["predicted_properties"], - flavors: { - score: { - isDefault: true, - input: [], - monitors: [monitors.standard_output], - }, - }, - }, -}; diff --git a/src/js/nwchem/assets.js b/src/js/nwchem/assets.js deleted file mode 100644 index d0997093..00000000 --- a/src/js/nwchem/assets.js +++ /dev/null @@ -1,20 +0,0 @@ -import { makeObjectsFromContextProviderNames, readAssetFile } from "../utils"; - -const applicationName = "nwchem"; -const executableName = "nwchem"; - -// Here, we're returning a delayed-evaluation lambda, to avoid loading the asset files in scenarios where they're not -// available, like on the client. -export default () => { - const allAssets = [ - { - content: readAssetFile(applicationName, "nwchem_total_energy.j2.inp"), - name: "nwchem_total_energy.inp", - contextProviders: ["NWChemInputDataManager"], - applicationName, - executableName, - }, - ]; - - return allAssets.map((a) => makeObjectsFromContextProviderNames(a)); -}; diff --git a/src/js/nwchem/data.js b/src/js/nwchem/data.js deleted file mode 100644 index db544e1c..00000000 --- a/src/js/nwchem/data.js +++ /dev/null @@ -1,15 +0,0 @@ -export default { - name: "nwchem", - shortName: "nwchem", - summary: "NWChem", - defaultVersion: "7.0.2", - versions: [ - { - version: "7.0.2", - isDefault: true, - }, - { - version: "6.6", - }, - ], -}; diff --git a/src/js/nwchem/tree.js b/src/js/nwchem/tree.js deleted file mode 100644 index 4f192d4e..00000000 --- a/src/js/nwchem/tree.js +++ /dev/null @@ -1,50 +0,0 @@ -import _ from "underscore"; - -import monitors from "../allowed_monitors"; -import postProcessors from "../allowed_post-processors"; -import results from "../allowed_results"; - -const allowedMonitors = [monitors.standard_output]; -const allowedPostProcessors = [postProcessors.error_handler]; -const allowedResults = results; - -export default { - nwchem: { - isDefault: true, - hasAdvancedComputeOptions: false, - postProcessors: allowedPostProcessors, - monitors: allowedMonitors, - results: _.without( - allowedResults, - "atomic_forces", - "band_gaps", - "band_structure", - "density_of_states", - "fermi_energy", - "phonon_dispersions", - "phonon_dos", - "pressure", - "stress_tensor", - "total_force", - "zero_point_energy", - "final_structure", - "magnetic_moments", - "reaction_energy_barrier", - "reaction_energy_profile", - "potential_profile", - "charge_density_profile", - ), - flavors: { - nwchem_total_energy: { - isDefault: true, - input: [ - { - name: "nwchem_total_energy.inp", - }, - ], - results: ["total_energy", "total_energy_contributions"], - monitors: allowedMonitors, - }, - }, - }, -}; diff --git a/src/js/python/assets.js b/src/js/python/assets.js deleted file mode 100644 index 243c630b..00000000 --- a/src/js/python/assets.js +++ /dev/null @@ -1,271 +0,0 @@ -import { makeObjectsFromContextProviderNames, readAssetFile } from "../utils"; - -const applicationName = "python"; -const executableName = "python"; - -// Here, we're returning a delayed-evaluation lambda, to avoid loading the asset files in scenarios where they're not -// available, like on the client. -export default () => { - const allAssets = [ - /* - * PYTHON - */ - { - content: readAssetFile(applicationName, "hello_world.pyi"), - name: "hello_world.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "requirements.j2.txt"), - name: "requirements.txt", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "requirements_empty.j2.txt"), - name: "requirements_empty.txt", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/generic", "post_processing:plot:matplotlib.pyi"), - name: "matplotlib_basic.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "espresso_xml_get_qpt_irr.pyi"), - name: "espresso_xml_get_qpt_irr.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "espresso_extract_kpoints.pyi"), - name: "espresso_extract_kpoints.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/generic", "processing:find_extrema.pyi"), - name: "find_extrema.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/generic", "requirements.j2.txt"), - name: "processing_requirements.txt", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "requirements.j2.txt"), - name: "pyml_requirements.txt", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:setup_variables_packages.pyi"), - name: "pyml_settings.py", - contextProviders: ["MLSettingsDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:custom.pyi"), - name: "pyml_custom.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:data_input:read_csv:pandas.pyi"), - name: "data_input_read_csv_pandas.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:data_input:train_test_split:sklearn.pyi"), - name: "data_input_train_test_split_sklearn.py", - contextProviders: ["MLTrainTestSplitDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:pre_processing:min_max_scaler:sklearn.pyi"), - name: "pre_processing_min_max_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:pre_processing:remove_duplicates:pandas.pyi"), - name: "pre_processing_remove_duplicates_pandas.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:pre_processing:remove_missing:pandas.pyi"), - name: "pre_processing_remove_missing_pandas.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:pre_processing:standardization:sklearn.pyi"), - name: "pre_processing_standardization_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile( - "python/ml", - "pyml:model:adaboosted_trees_regression:sklearn.pyi", - ), - name: "model_adaboosted_trees_regression_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:model:bagged_trees_regression:sklearn.pyi"), - name: "model_bagged_trees_regression_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile( - "python/ml", - "pyml:model:gradboosted_trees_regression:sklearn.pyi", - ), - name: "model_gradboosted_trees_regression_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile( - "python/ml", - "pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi", - ), - name: "model_extreme_gradboosted_trees_regression_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:model:k_means_clustering:sklearn.pyi"), - name: "model_k_means_clustering_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:model:kernel_ridge_regression:sklearn.pyi"), - name: "model_kernel_ridge_regression_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:model:lasso_regression:sklearn.pyi"), - name: "model_lasso_regression_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile( - "python/ml", - "pyml:model:multilayer_perceptron_regression:sklearn.pyi", - ), - name: "model_mlp_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile( - "python/ml", - "pyml:model:random_forest_classification:sklearn.pyi", - ), - name: "model_random_forest_classification_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile( - "python/ml", - "pyml:model:gradboosted_trees_classification:sklearn.pyi", - ), - name: "model_gradboosted_trees_classification_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile( - "python/ml", - "pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi", - ), - name: "model_extreme_gradboosted_trees_classification_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:model:random_forest_regression:sklearn.pyi"), - name: "model_random_forest_regression_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:model:ridge_regression:sklearn.pyi"), - name: "model_ridge_regression_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:post_processing:parity_plot:matplotlib.pyi"), - name: "post_processing_parity_plot_matplotlib.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile( - "python/ml", - "pyml:post_processing:pca_2d_clusters:matplotlib.pyi", - ), - name: "post_processing_pca_2d_clusters_matplotlib.py", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile("python/ml", "pyml:post_processing:roc_curve:sklearn.pyi"), - name: "post_processing_roc_curve_sklearn.py", - contextProviders: [], - applicationName, - executableName, - }, - ]; - - return allAssets.map((a) => makeObjectsFromContextProviderNames(a)); -}; diff --git a/src/js/python/data.js b/src/js/python/data.js deleted file mode 100644 index 14e4b401..00000000 --- a/src/js/python/data.js +++ /dev/null @@ -1,24 +0,0 @@ -export default { - name: "python", - shortName: "py", - summary: "Python Script", - defaultVersion: "3.8.6", - versions: [ - { - version: "3.6.12", - }, - { - version: "3.7.9", - }, - { - version: "3.8.6", - isDefault: true, - }, - { - version: "3.9.1", - }, - { - version: "anaconda3-5.2.0", - }, - ], -}; diff --git a/src/js/python/tree.js b/src/js/python/tree.js deleted file mode 100644 index bbd0f5d7..00000000 --- a/src/js/python/tree.js +++ /dev/null @@ -1,398 +0,0 @@ -import monitors from "../allowed_monitors"; - -export default { - python: { - isDefault: true, - monitors: [monitors.standard_output], - results: ["file_content", "workflow:pyml_predict"], - flavors: { - hello_world: { - isDefault: true, - input: [ - { - name: "script.py", - templateName: "hello_world.py", - }, - { - name: "requirements.txt", - }, - ], - monitors: [monitors.standard_output], - }, - espresso_xml_get_qpt_irr: { - input: [ - { - name: "espresso_xml_get_qpt_irr.py", - }, - ], - monitors: [monitors.standard_output], - }, - espresso_extract_kpoints: { - input: [ - { - name: "espresso_extract_kpoints.py", - }, - { - name: "requirements.txt", - templateName: "requirements_empty.txt" - } - ], - monitors: [monitors.standard_output], - }, - "generic:post_processing:plot:matplotlib": { - input: [ - { - name: "plot.py", - templateName: "matplotlib_basic.py", - }, - { - name: "requirements.txt", - templateName: "processing_requirements.txt", - }, - ], - monitors: [monitors.standard_output], - }, - "generic:processing:find_extrema:scipy": { - input: [ - { - name: "find_extrema.py", - templateName: "find_extrema.py", - }, - { - name: "requirements.txt", - templateName: "processing_requirements.txt", - }, - ], - monitors: [monitors.standard_output], - }, - "pyml:setup_variables_packages": { - input: [ - { - name: "settings.py", - templateName: "pyml_settings.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - monitors: [monitors.standard_output], - }, - "pyml:custom": { - input: [ - { - name: "pyml_custom.py", - templateName: "pyml_custom.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - monitors: [monitors.standard_output], - }, - "pyml:data_input:read_csv:pandas": { - input: [ - { - name: "data_input_read_csv_pandas.py", - templateName: "data_input_read_csv_pandas.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - monitors: [monitors.standard_output], - }, - "pyml:data_input:train_test_split:sklearn": { - 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: [monitors.standard_output], - }, - "pyml:pre_processing:min_max_scaler:sklearn": { - input: [ - { - name: "pre_processing_min_max_sklearn.py", - templateName: "pre_processing_min_max_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - monitors: [monitors.standard_output], - }, - "pyml:pre_processing:remove_duplicates:pandas": { - input: [ - { - name: "pre_processing_remove_duplicates_pandas.py", - templateName: "pre_processing_remove_duplicates_pandas.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - monitors: [monitors.standard_output], - }, - "pyml:pre_processing:remove_missing:pandas": { - input: [ - { - name: "pre_processing_remove_missing_pandas.py", - templateName: "pre_processing_remove_missing_pandas.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - monitors: [monitors.standard_output], - }, - "pyml:pre_processing:standardization:sklearn": { - input: [ - { - name: "pre_processing_standardization_sklearn.py", - templateName: "pre_processing_standardization_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - monitors: [monitors.standard_output], - }, - "pyml:model:adaboosted_trees_regression:sklearn": { - input: [ - { - name: "model_adaboosted_trees_regression_sklearn.py", - templateName: "model_adaboosted_trees_regression_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - monitors: [monitors.standard_output], - results: ["workflow:pyml_predict"], - }, - "pyml:model:bagged_trees_regression:sklearn": { - input: [ - { - name: "model_bagged_trees_regression_sklearn.py", - templateName: "model_bagged_trees_regression_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:gradboosted_trees_regression:sklearn": { - input: [ - { - name: "model_gradboosted_trees_regression_sklearn.py", - templateName: "model_gradboosted_trees_regression_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:extreme_gradboosted_trees_regression:sklearn": { - input: [ - { - name: "model_extreme_gradboosted_trees_regression_sklearn.py", - templateName: "model_extreme_gradboosted_trees_regression_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:k_means_clustering:sklearn": { - input: [ - { - name: "model_k_means_clustering_sklearn.py", - templateName: "model_k_means_clustering_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:kernel_ridge_regression:sklearn": { - input: [ - { - name: "model_kernel_ridge_regression_sklearn.py", - templateName: "model_kernel_ridge_regression_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:lasso_regression:sklearn": { - input: [ - { - name: "model_lasso_regression_sklearn.py", - templateName: "model_lasso_regression_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:multilayer_perceptron:sklearn": { - input: [ - { - name: "model_mlp_sklearn.py", - templateName: "model_mlp_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:random_forest_classification:sklearn": { - input: [ - { - name: "model_random_forest_classification_sklearn.py", - templateName: "model_random_forest_classification_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:gradboosted_trees_classification:sklearn": { - input: [ - { - name: "model_gradboosted_trees_classification_sklearn.py", - templateName: "model_gradboosted_trees_classification_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:extreme_gradboosted_trees_classification:sklearn": { - input: [ - { - name: "model_extreme_gradboosted_trees_classification_sklearn.py", - templateName: "model_extreme_gradboosted_trees_classification_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:random_forest_regression:sklearn": { - input: [ - { - name: "model_random_forest_regression_sklearn.py", - templateName: "model_random_forest_regression_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:model:ridge_regression:sklearn": { - input: [ - { - name: "model_ridge_regression_sklearn.py", - templateName: "model_ridge_regression_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["workflow:pyml_predict"], - monitors: [monitors.standard_output], - }, - "pyml:post_processing:parity_plot:matplotlib": { - input: [ - { - name: "post_processing_parity_plot_matplotlib.py", - templateName: "post_processing_parity_plot_matplotlib.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["file_content"], - monitors: [monitors.standard_output], - }, - "pyml:post_processing:pca_2d_clusters:matplotlib": { - input: [ - { - name: "post_processing_pca_2d_clusters_matplotlib.py", - templateName: "post_processing_pca_2d_clusters_matplotlib.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["file_content"], - monitors: [monitors.standard_output], - }, - "pyml:post_processing:roc_curve:sklearn": { - input: [ - { - name: "post_processing_roc_curve_sklearn.py", - templateName: "post_processing_roc_curve_sklearn.py", - }, - { - name: "requirements.txt", - templateName: "pyml_requirements.txt", - }, - ], - results: ["file_content"], - monitors: [monitors.standard_output], - }, - }, - }, -}; diff --git a/src/js/shell/assets.js b/src/js/shell/assets.js deleted file mode 100644 index 9b441382..00000000 --- a/src/js/shell/assets.js +++ /dev/null @@ -1,51 +0,0 @@ -import { makeObjectsFromContextProviderNames, readAssetFile } from "../utils"; - -const applicationName = "shell"; -const executableName = "sh"; - -// Here, we're returning a delayed-evaluation lambda, to avoid loading the asset files in scenarios where they're not -// available, like on the client. -export default () => { - const allAssets = [ - /* - * BASH - */ - { - content: readAssetFile(applicationName, "bash_hello_world.j2.sh"), - name: "hello_world.sh", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "bash_job_espresso_pw_scf.j2.sh"), - name: "job_espresso_pw_scf.sh", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "bash_espresso_link_outdir_save.j2.sh"), - name: "espresso_link_outdir_save.sh", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "bash_espresso_collect_dynmat.j2.sh"), - name: "espresso_collect_dynmat.sh", - contextProviders: [], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "bash_vasp_prepare_neb_images.j2.sh"), - name: "bash_vasp_prepare_neb_images.sh", - contextProviders: ["VASPNEBInputDataManager"], - applicationName, - executableName, - }, - ]; - - return allAssets.map((a) => makeObjectsFromContextProviderNames(a)); -}; diff --git a/src/js/shell/data.js b/src/js/shell/data.js deleted file mode 100644 index 5a035b76..00000000 --- a/src/js/shell/data.js +++ /dev/null @@ -1,12 +0,0 @@ -export default { - name: "shell", - shortName: "sh", - summary: "Shell Script", - defaultVersion: "4.2.46", - versions: [ - { - version: "4.2.46", - isDefault: true, - }, - ], -}; diff --git a/src/js/shell/tree.js b/src/js/shell/tree.js deleted file mode 100644 index fc88ee53..00000000 --- a/src/js/shell/tree.js +++ /dev/null @@ -1,54 +0,0 @@ -import monitors from "../allowed_monitors"; -import allowedResults from "../allowed_results"; - -export default { - sh: { - isDefault: true, - monitors: [monitors.standard_output], - results: allowedResults, - flavors: { - hello_world: { - isDefault: true, - input: [ - { - name: "hello_world.sh", - }, - ], - monitors: [monitors.standard_output], - }, - job_espresso_pw_scf: { - input: [ - { - name: "job_espresso_pw_scf.sh", - }, - ], - monitors: [monitors.standard_output], - }, - espresso_link_outdir_save: { - input: [ - { - name: "espresso_link_outdir_save.sh", - }, - ], - monitors: [monitors.standard_output], - }, - espresso_collect_dynmat: { - input: [ - { - name: "espresso_collect_dynmat.sh", - }, - ], - monitors: [monitors.standard_output], - }, - bash_vasp_prepare_neb_images: { - isMultiMaterial: true, - input: [ - { - name: "bash_vasp_prepare_neb_images.sh", - }, - ], - monitors: [monitors.standard_output], - }, - }, - }, -}; diff --git a/src/js/vasp/assets.js b/src/js/vasp/assets.js deleted file mode 100644 index 8bb350fa..00000000 --- a/src/js/vasp/assets.js +++ /dev/null @@ -1,127 +0,0 @@ -import { makeObjectsFromContextProviderNames, readAssetFile } from "../utils"; - -const applicationName = "vasp"; -const executableName = "vasp"; - -// Here, we're returning a delayed-evaluation lambda, to avoid loading the asset files in scenarios where they're not -// available, like on the client. -export default () => { - const allAssets = [ - /* - * VASP - */ - { - content: readAssetFile(applicationName, "INCAR.j2"), - name: "INCAR", - contextProviders: ["VASPInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "INCAR_bands.j2"), - name: "INCAR_BANDS", - contextProviders: ["VASPInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "INCAR_zpe.j2"), - name: "INCAR_ZPE", - contextProviders: ["VASPInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "INCAR_relax.j2"), - name: "INCAR_RELAX", - contextProviders: ["VASPInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "INCAR_vc_relax.j2"), - name: "INCAR_VC_RELAX", - contextProviders: ["VASPInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "INCAR.j2").concat( - readAssetFile(applicationName, "_MIXIN_INCAR_hse.j2"), - ), - name: "INCAR_HSE", - contextProviders: ["VASPInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "INCAR_bands.j2").concat( - readAssetFile(applicationName, "_MIXIN_INCAR_hse.j2"), - ), - name: "INCAR_BANDS_HSE", - contextProviders: ["VASPInputDataManager"], - applicationName, - executableName, - }, - - { - content: readAssetFile(applicationName, "KPOINTS.j2"), - name: "KPOINTS", - contextProviders: ["KGridFormDataManager", "VASPInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "KPOINTS_bands.j2"), - name: "KPOINTS_BANDS", - contextProviders: ["KPathFormDataManager", "VASPInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "KPOINTS_conv.j2"), - name: "KPOINTS_CONV", - contextProviders: ["KGridFormDataManager", "VASPInputDataManager"], - applicationName, - executableName, - }, - - { - content: readAssetFile(applicationName, "POSCAR.j2"), - name: "POSCAR", - contextProviders: ["VASPInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "INCAR_neb.j2"), - name: "INCAR_NEB", - contextProviders: ["NEBFormDataManager", "VASPNEBInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "INCAR_neb_initial_final.j2"), - name: "INCAR_NEB_INITIAL_FINAL", - contextProviders: ["NEBFormDataManager", "VASPNEBInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "POSCAR_NEB_initial.j2"), - name: "POSCAR_NEB_INITIAL", - contextProviders: ["NEBFormDataManager", "VASPNEBInputDataManager"], - applicationName, - executableName, - }, - { - content: readAssetFile(applicationName, "POSCAR_NEB_final.j2"), - name: "POSCAR_NEB_FINAL", - contextProviders: ["NEBFormDataManager", "VASPNEBInputDataManager"], - applicationName, - executableName, - }, - ]; - - return allAssets.map((a) => makeObjectsFromContextProviderNames(a)); -}; diff --git a/src/js/vasp/data.js b/src/js/vasp/data.js deleted file mode 100644 index 3dd53b24..00000000 --- a/src/js/vasp/data.js +++ /dev/null @@ -1,52 +0,0 @@ -export default { - name: "vasp", - shortName: "vasp", - summary: "Vienna Ab-initio Simulation Package", - defaultVersion: "5.3.5", - isLicensed: true, - versions: [ - { - version: "5.3.5", - isDefault: true, - }, - { - version: "5.3.5", - isDefault: false, - build: "Non-collinear", - }, - { - version: "5.3.5", - isDefault: false, - build: "VTST", - }, - { - version: "5.4.4", - isDefault: true, - }, - { - version: "5.4.4", - isDefault: false, - build: "Gamma", - }, - { - version: "5.4.4", - isDefault: false, - build: "Non-collinear", - }, - { - version: "5.4.4", - isDefault: false, - build: "VTST", - }, - { - version: "5.4.4", - isDefault: false, - build: "VTST-Gamma", - }, - { - version: "5.4.4", - isDefault: false, - build: "VTST-Non-collinear", - }, - ], -}; diff --git a/src/js/vasp/tree.js b/src/js/vasp/tree.js deleted file mode 100644 index 209243ad..00000000 --- a/src/js/vasp/tree.js +++ /dev/null @@ -1,333 +0,0 @@ -import { deepClone } from "@exabyte-io/code.js/dist/utils"; -import _ from "underscore"; - -import monitors from "../allowed_monitors"; -import postProcessors from "../allowed_post-processors"; -import allowedResults from "../allowed_results"; - -const allowedMonitors = [ - monitors.standard_output, - monitors.convergence_ionic, - monitors.convergence_electronic, -]; - -const allowedPostProcessors = [ - postProcessors.error_handler, - postProcessors.prepare_restart, - postProcessors.remove_non_zero_weight_kpoints, -]; - -// helper function to introduce HSE, GW to the tree in a programmatic manner -const getTreeKeyWithMixin = (branch, flavorKey, mixinName) => { - const addPostfix = (name) => name + "_" + mixinName; - const flavor = branch[flavorKey]; - const adjustedFlavor = deepClone(flavor); - adjustedFlavor.isDefault = false; - // assuming that mixins are only relevant for INCAR - adjustedFlavor.input.forEach((inputObject) => { - if (inputObject.name === "INCAR") { - inputObject.templateName = addPostfix(inputObject.templateName || inputObject.name); - } - }); - return { [addPostfix(flavorKey).toLowerCase()]: adjustedFlavor }; -}; - -const tree = { - vasp: { - isDefault: true, - postProcessors: allowedPostProcessors, - monitors: allowedMonitors, - results: _.without(allowedResults, "phonon_dos", "phonon_dispersions"), - flavors: { - vasp: { - isDefault: true, - input: [ - { - name: "INCAR", - }, - { - name: "KPOINTS", - }, - { - name: "POSCAR", - }, - ], - results: [ - "total_energy", - "total_energy_contributions", - "pressure", - "fermi_energy", - "atomic_forces", - "total_force", - "stress_tensor", - ], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - vasp_bands: { - input: [ - { - name: "INCAR", - templateName: "INCAR_BANDS", - }, - { - name: "KPOINTS", - templateName: "KPOINTS_BANDS", - }, - { - name: "POSCAR", - templateName: "", - }, - ], - results: ["band_structure"], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - vasp_nscf: { - input: [ - { - name: "INCAR", - templateName: "INCAR_BANDS", - }, - { - name: "KPOINTS", - templateName: "KPOINTS", - }, - { - name: "POSCAR", - templateName: "POSCAR", - }, - ], - results: ["band_gaps", "fermi_energy"], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - vasp_relax: { - input: [ - { - name: "INCAR", - templateName: "INCAR_RELAX", - }, - { - name: "KPOINTS", - templateName: "KPOINTS", - }, - { - name: "POSCAR", - templateName: "POSCAR", - }, - ], - results: [ - "total_energy", - "atomic_forces", - "fermi_energy", - "pressure", - "stress_tensor", - "total_force", - "final_structure", - ], - monitors: [ - monitors.standard_output, - monitors.convergence_electronic, - monitors.convergence_ionic, - ], - postProcessors: [postProcessors.prepare_restart], - }, - vasp_vc_relax: { - input: [ - { - name: "INCAR", - templateName: "INCAR_VC_RELAX", - }, - { - name: "KPOINTS", - templateName: "KPOINTS", - }, - { - name: "POSCAR", - templateName: "POSCAR", - }, - ], - results: [ - "total_energy", - "atomic_forces", - "fermi_energy", - "pressure", - "stress_tensor", - "total_force", - "final_structure", - ], - monitors: [ - monitors.standard_output, - monitors.convergence_electronic, - monitors.convergence_ionic, - ], - postProcessors: [postProcessors.prepare_restart], - }, - vasp_zpe: { - input: [ - { - name: "INCAR", - templateName: "INCAR_ZPE", - }, - { - name: "KPOINTS", - templateName: "KPOINTS", - }, - { - name: "POSCAR", - templateName: "POSCAR", - }, - ], - results: [ - "total_energy", - "fermi_energy", - "pressure", - "atomic_forces", - "stress_tensor", - "total_force", - "zero_point_energy", - ], - monitors: [ - monitors.standard_output, - monitors.convergence_electronic, - monitors.convergence_ionic, - ], - }, - vasp_kpt_conv: { - // kpoint convergence => not including kgrid mixin - input: [ - { - name: "INCAR", - templateName: "INCAR", - }, - { - name: "KPOINTS", - templateName: "KPOINTS_CONV", - }, - { - name: "POSCAR", - templateName: "POSCAR", - }, - ], - results: [ - "total_energy", - "total_energy_contributions", - "pressure", - "fermi_energy", - "atomic_forces", - "total_force", - "stress_tensor", - ], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - vasp_vc_relax_conv: { - input: [ - { - name: "INCAR", - templateName: "INCAR_VC_RELAX", - }, - { - name: "KPOINTS", - templateName: "KPOINTS_CONV", - }, - { - name: "POSCAR", - templateName: "POSCAR", - }, - ], - results: [ - "total_energy", - "total_energy_contributions", - "pressure", - "fermi_energy", - "atomic_forces", - "total_force", - "stress_tensor", - ], - monitors: [ - monitors.standard_output, - monitors.convergence_electronic, - monitors.convergence_ionic, - ], - }, - vasp_neb: { - isMultiMaterial: true, - input: [ - { - name: "INCAR", - templateName: "INCAR_NEB", - }, - { - name: "KPOINTS", - templateName: "KPOINTS", - }, - ], - results: ["reaction_energy_barrier", "reaction_energy_profile"], - monitors: [monitors.standard_output], - }, - vasp_neb_initial: { - isMultiMaterial: true, - input: [ - { - name: "INCAR", - templateName: "INCAR_NEB_INITIAL_FINAL", - }, - { - name: "KPOINTS", - }, - { - name: "POSCAR", - templateName: "POSCAR_NEB_INITIAL", - }, - ], - results: [ - "total_energy", - "total_energy_contributions", - "pressure", - "fermi_energy", - "atomic_forces", - "total_force", - "stress_tensor", - ], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - vasp_neb_final: { - isMultiMaterial: true, - input: [ - { - name: "INCAR", - templateName: "INCAR_NEB_INITIAL_FINAL", - }, - { - name: "KPOINTS", - }, - { - name: "POSCAR", - templateName: "POSCAR_NEB_FINAL", - }, - ], - results: [ - "total_energy", - "total_energy_contributions", - "pressure", - "fermi_energy", - "atomic_forces", - "total_force", - "stress_tensor", - ], - monitors: [monitors.standard_output, monitors.convergence_electronic], - }, - }, - }, -}; - -const flavorsBranch = tree.vasp.flavors; -const mixedFlavorsBranch = {}; - -// ADD HSE -["vasp", "vasp_bands", "vasp_nscf"].forEach((key) => { - Object.assign(mixedFlavorsBranch, getTreeKeyWithMixin(flavorsBranch, key, "HSE")); -}); - -// update vasp flavors in tree -tree.vasp.flavors = { ...flavorsBranch, ...mixedFlavorsBranch }; - -export default tree; From bc34094fb7fdd12b50bc71a0fb28a4b065500b7d Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 15:34:14 -0700 Subject: [PATCH 20/52] chore: move build:assets to pre-commit --- .husky/pre-commit | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 36af2198..0bd7a19d 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,5 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" +npm run build:assets npx lint-staged diff --git a/package.json b/package.json index c2a93dee..665fcf62 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "prepublishOnly": "rm -rf lib; npm run transpile", "postinstall": "npm run transpile", - "transpile": "mkdir -p lib; babel src/js --out-dir lib/js; npm run build:assets", + "transpile": "mkdir -p lib; babel src/js --out-dir lib/js", "test": "nyc --reporter=text mocha --require @babel/register tests", "build:assets": "node build_templates.js", "lint": "eslint src/js tests && prettier --write src/js tests", From aeee027437ea6d15a859a2796e1ce18feea24c3a Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 16:07:44 -0700 Subject: [PATCH 21/52] track JS data files with git LFS --- .gitattributes | 3 +++ .husky/post-checkout | 3 +++ .husky/post-commit | 3 +++ .husky/post-merge | 3 +++ .husky/pre-push | 3 +++ src/js/data/application_data.js | 8 +++----- src/js/data/templates.js | 8 +++----- src/js/data/tree.js | 8 +++----- 8 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 .gitattributes create mode 100755 .husky/post-checkout create mode 100755 .husky/post-commit create mode 100755 .husky/post-merge create mode 100755 .husky/pre-push diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..267443bb --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +src/js/data/templates.js filter=lfs diff=lfs merge=lfs -text +src/js/data/application_data.js filter=lfs diff=lfs merge=lfs -text +src/js/data/tree.js filter=lfs diff=lfs merge=lfs -text diff --git a/.husky/post-checkout b/.husky/post-checkout new file mode 100755 index 00000000..cab40f26 --- /dev/null +++ b/.husky/post-checkout @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; } +git lfs post-checkout "$@" diff --git a/.husky/post-commit b/.husky/post-commit new file mode 100755 index 00000000..9443f416 --- /dev/null +++ b/.husky/post-commit @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n"; exit 2; } +git lfs post-commit "$@" diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100755 index 00000000..828b7089 --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; } +git lfs post-merge "$@" diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 00000000..81a9cc63 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n"; exit 2; } +git lfs pre-push "$@" diff --git a/src/js/data/application_data.js b/src/js/data/application_data.js index 1ae79235..8a541a17 100644 --- a/src/js/data/application_data.js +++ b/src/js/data/application_data.js @@ -1,5 +1,3 @@ -/** - * Empty module file which will get populated at build time - * by build_assets.js - */ -export const applicationData = {}; +version https://git-lfs.github.com/spec/v1 +oid sha256:31049a607e3816e41e122d1db62157abc10fd167ccd5ac865bfbe1f57f984675 +size 125 diff --git a/src/js/data/templates.js b/src/js/data/templates.js index cc9d434e..966e67af 100644 --- a/src/js/data/templates.js +++ b/src/js/data/templates.js @@ -1,5 +1,3 @@ -/** - * Empty module file which will get populated at build time - * by build_assets.js - */ -export const allTemplates = []; +version https://git-lfs.github.com/spec/v1 +oid sha256:f4f1cd609c036a02ca49c95383980dcb81809283acfc02e8d81b8acbab0b6017 +size 122 diff --git a/src/js/data/tree.js b/src/js/data/tree.js index cc5e0ec8..f1edc4d8 100644 --- a/src/js/data/tree.js +++ b/src/js/data/tree.js @@ -1,5 +1,3 @@ -/** - * Empty module file which will get populated at build time - * by build_assets.js - */ -export const applicationTree = {}; +version https://git-lfs.github.com/spec/v1 +oid sha256:a8ac815d46e90bd7ccd56abf1da5ab567cd26aff6004c4610c2a905a8a2724af +size 125 From 1713040c5517ba38bbc5007c189c28d484926c2b Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 16:12:02 -0700 Subject: [PATCH 22/52] chore: change target path for built JS files --- build_templates.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_templates.js b/build_templates.js index 08b045be..c88ce3cf 100644 --- a/build_templates.js +++ b/build_templates.js @@ -20,18 +20,18 @@ function buildAsset({ assetPath, targetPath, dataKey = "" }) { buildAsset({ assetPath: "./templates/templates.yml", - targetPath: "./lib/js/data/templates.js", + targetPath: "./src/js/data/templates.js", dataKey: "allTemplates", }); buildAsset({ assetPath: "./applications/application_data.yml", - targetPath: "./lib/js/data/application_data.js", + targetPath: "./src/js/data/application_data.js", dataKey: "applicationData", }); buildAsset({ assetPath: "./executables/tree.yml", - targetPath: "./lib/js/data/tree.js", + targetPath: "./src/js/data/tree.js", dataKey: "applicationTree", }); From 1bee8e6a6ac3764c3199bd18e30fec997d89bb63 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 16:16:36 -0700 Subject: [PATCH 23/52] chore: add built JS files to src --- src/js/data/application_data.js | 4 ++-- src/js/data/templates.js | 4 ++-- src/js/data/tree.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/js/data/application_data.js b/src/js/data/application_data.js index 8a541a17..a8f65e3d 100644 --- a/src/js/data/application_data.js +++ b/src/js/data/application_data.js @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31049a607e3816e41e122d1db62157abc10fd167ccd5ac865bfbe1f57f984675 -size 125 +oid sha256:1bb967ff495dd1a0c095c2f0882d42e28060e1d7cbf1aac0be789011911410e1 +size 5305 diff --git a/src/js/data/templates.js b/src/js/data/templates.js index 966e67af..fc2907af 100644 --- a/src/js/data/templates.js +++ b/src/js/data/templates.js @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4f1cd609c036a02ca49c95383980dcb81809283acfc02e8d81b8acbab0b6017 -size 122 +oid sha256:a7842efdefb0b5dcbc3b59d22a7484c86e2a976f268c6ebc1a203e258b3c4a00 +size 149605 diff --git a/src/js/data/tree.js b/src/js/data/tree.js index f1edc4d8..54dab23e 100644 --- a/src/js/data/tree.js +++ b/src/js/data/tree.js @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8ac815d46e90bd7ccd56abf1da5ab567cd26aff6004c4610c2a905a8a2724af -size 125 +oid sha256:0f6a82a9cb73a4b82649cb352fb1a8e0517b0c812acafe970165dbcf429f7104 +size 52490 From 48a181861650e17855ecfc774c118e8c623313d4 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 16:46:44 -0700 Subject: [PATCH 24/52] chore: add eslint-disable to generated files --- build_templates.js | 3 ++- src/js/data/application_data.js | 4 ++-- src/js/data/templates.js | 4 ++-- src/js/data/tree.js | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build_templates.js b/build_templates.js index c88ce3cf..cd4bea6a 100644 --- a/build_templates.js +++ b/build_templates.js @@ -10,9 +10,10 @@ const utils = require("@exabyte-io/code.js/dist/utils"); function buildAsset({ assetPath, targetPath, dataKey = "" }) { const fileContent = fs.readFileSync(assetPath); const obj = yaml.load(fileContent, { schema: utils.JsYamlAllSchemas }); + const ignore = "// eslint-disable\n"; fs.writeFileSync( targetPath, - `module.exports = {${dataKey}: ` + JSON.stringify(obj) + "}", + ignore + `module.exports = {${dataKey}: ` + JSON.stringify(obj) + "}", "utf8", ); console.log(`Written asset "${assetPath}" to "${targetPath}"`); diff --git a/src/js/data/application_data.js b/src/js/data/application_data.js index a8f65e3d..17d4bc2b 100644 --- a/src/js/data/application_data.js +++ b/src/js/data/application_data.js @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1bb967ff495dd1a0c095c2f0882d42e28060e1d7cbf1aac0be789011911410e1 -size 5305 +oid sha256:0550452714e4a9742a34b868b97f953c95313ae3b022b604780baf612c8e8d10 +size 5323 diff --git a/src/js/data/templates.js b/src/js/data/templates.js index fc2907af..f3ab86f4 100644 --- a/src/js/data/templates.js +++ b/src/js/data/templates.js @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7842efdefb0b5dcbc3b59d22a7484c86e2a976f268c6ebc1a203e258b3c4a00 -size 149605 +oid sha256:a99ae21684730dbe1ae7dea8a5219ea4fce0fa4fba5fb7d56e7824791d762e2a +size 149623 diff --git a/src/js/data/tree.js b/src/js/data/tree.js index 54dab23e..9587c2a7 100644 --- a/src/js/data/tree.js +++ b/src/js/data/tree.js @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f6a82a9cb73a4b82649cb352fb1a8e0517b0c812acafe970165dbcf429f7104 -size 52490 +oid sha256:27e27768fd6cd70ad925ac34192ac1a9ae98f23c1c939661c37a6d7712e0d95f +size 52508 From 27591db8b9854531972fecdaccb068fb7e3ee282 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 16:47:18 -0700 Subject: [PATCH 25/52] chore: run build script conditionally --- .husky/pre-commit | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 0bd7a19d..5d777aa3 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,11 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npm run build:assets +SRC_PATTERN="\.y(a?ml)$" +if git diff --cached --name-only | grep --quiet -E "$SRC_PATTERN" +then + echo "Yaml assets changed. Running build script." + npm run build:assets +fi + npx lint-staged From 3eb1561ce4ee8bbebafa631dfc3d0d66e8838cbf Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 16:48:00 -0700 Subject: [PATCH 26/52] chore: update package-lock.json --- package-lock.json | 312 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 305 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index d50a5efb..e25e5146 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1248,6 +1248,18 @@ "to-fast-properties": "^2.0.0" } }, + "@bcherny/json-schema-ref-parser": { + "version": "10.0.5-fork", + "resolved": "https://registry.npmjs.org/@bcherny/json-schema-ref-parser/-/json-schema-ref-parser-10.0.5-fork.tgz", + "integrity": "sha512-E/jKbPoca1tfUPj3iSbitDZTGnq6FUFjkH6L8U2oDwSuwK1WhnnVtCG7oFOTg/DDnyoXbQYUiUiGOibHqaGVnw==", + "dev": true, + "requires": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, "@es-joy/jsdoccomment": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.17.0.tgz", @@ -1298,9 +1310,8 @@ } }, "@exabyte-io/code.js": { - "version": "2023.7.11-0", - "resolved": "https://registry.npmjs.org/@exabyte-io/code.js/-/code.js-2023.7.11-0.tgz", - "integrity": "sha512-dXrR8CqCcQZSOWOQ/H4N9dSSx9UWG5mTlINGvXxw3Xj15F1y0sjXR08ITThPv4ywjYRGCpG6qe743ZEj+FwV4g==", + "version": "git+https://github.com/Exabyte-io/code.js.git#1a0884db8d778d146c91d31234291221788c5881", + "from": "git+https://github.com/Exabyte-io/code.js.git#1a0884db8d778d146c91d31234291221788c5881", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1311,11 +1322,13 @@ "@babel/preset-react": "7.16.7", "@babel/register": "^7.16.0", "@babel/runtime-corejs3": "7.16.8", - "@exabyte-io/esse.js": "2023.7.11-1", + "@exabyte-io/esse.js": "2023.7.28-0", "ajv": "4.1.7", "crypto-js": "^4.1.1", "js-yaml": "^4.1.0", + "json-schema-deref-sync": "0.14.0", "json-schema-merge-allof": "^0.8.1", + "json-schema-to-typescript": "^13.0.2", "lodash": "^4.17.21", "mathjs": "^3.9.0", "mixwith": "^0.1.1", @@ -1385,9 +1398,9 @@ "dev": true }, "@exabyte-io/esse.js": { - "version": "2023.7.11-1", - "resolved": "https://registry.npmjs.org/@exabyte-io/esse.js/-/esse.js-2023.7.11-1.tgz", - "integrity": "sha512-jM+bNs9SlYCgosH2KmpV/4hXyHJSJi8xOacGV/U/8qSPhDo/SGDQWWw8ePqqcOCej50G4Yqo65XJOuP5+bm7gA==", + "version": "2023.7.28-0", + "resolved": "https://registry.npmjs.org/@exabyte-io/esse.js/-/esse.js-2023.7.28-0.tgz", + "integrity": "sha512-B+0LF2GDKO3qb910lOvWS3YpusltJL5KdNqdjO//ljZ677fmH89VgMr82BM8jAhIEx5Uo6bZZ/Fwdsl+oYsUMg==", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1537,18 +1550,64 @@ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, + "@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true + }, "@nicolo-ribaudo/chokidar-2": { "version": "2.1.8-no-fsevents.3", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", "optional": true }, + "@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/json-schema": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "dev": true + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/lodash": { + "version": "4.14.196", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.196.tgz", + "integrity": "sha512-22y3o88f4a94mKljsZcanlNWPzO0uBsBdzLAngf2tp533LzZcQzb6+eZPJ+vCTt+bqF2XnvT9gejTLsAcJAJyQ==", + "dev": true + }, + "@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true + }, + "@types/node": { + "version": "20.4.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.6.tgz", + "integrity": "sha512-q0RkvNgMweWWIvSMDiXhflGUKMdIxBo2M2tYM/0kEGDueQByFzK4KZAgu5YHGFNxziTlppNpTIBcqHQAxlfHdA==", + "dev": true + }, + "@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true + }, "@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", @@ -1632,6 +1691,12 @@ "color-convert": "^1.9.0" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, "anymatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", @@ -1884,6 +1949,12 @@ "get-intrinsic": "^1.0.2" } }, + "call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1959,6 +2030,19 @@ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, + "cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + } + }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -2195,6 +2279,16 @@ "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==", "dev": true }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "dag-map": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/dag-map/-/dag-map-1.0.2.tgz", @@ -2347,12 +2441,56 @@ "is-symbol": "^1.0.2" } }, + "es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "requires": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + } + }, "es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -2920,6 +3058,16 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -2937,6 +3085,23 @@ "strip-final-newline": "^2.0.0" } }, + "ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "requires": { + "type": "^2.7.2" + }, + "dependencies": { + "type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + } + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3106,6 +3271,12 @@ "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, + "get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true + }, "get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -3143,6 +3314,15 @@ "is-glob": "^4.0.1" } }, + "glob-promise": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-4.2.2.tgz", + "integrity": "sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==", + "dev": true, + "requires": { + "@types/glob": "^7.1.3" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -3423,6 +3603,12 @@ "isobject": "^3.0.1" } }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, "is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -3731,6 +3917,36 @@ "lodash": "^4.17.20" } }, + "json-schema-to-typescript": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-13.0.2.tgz", + "integrity": "sha512-TCaEVW4aI2FmMQe7f98mvr3/oiVmXEC1xZjkTZ9L/BSoTXFlC7p64mD5AD2d8XWycNBQZUnHwXL5iVXt1HWwNQ==", + "dev": true, + "requires": { + "@bcherny/json-schema-ref-parser": "10.0.5-fork", + "@types/json-schema": "^7.0.11", + "@types/lodash": "^4.14.182", + "@types/prettier": "^2.6.1", + "cli-color": "^2.0.2", + "get-stdin": "^8.0.0", + "glob": "^7.1.6", + "glob-promise": "^4.2.2", + "is-glob": "^4.0.3", + "lodash": "^4.17.21", + "minimist": "^1.2.6", + "mkdirp": "^1.0.4", + "mz": "^2.7.0", + "prettier": "^2.6.2" + }, + "dependencies": { + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true + } + } + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -4075,6 +4291,15 @@ "yallist": "^4.0.0" } }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.2" + } + }, "make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -4111,6 +4336,22 @@ "is-buffer": "~1.1.1" } }, + "memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, "memory-cache": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/memory-cache/-/memory-cache-0.2.0.tgz", @@ -4158,6 +4399,12 @@ "integrity": "sha512-DQsf/liljH/9e+94jR+xfK8vlKceeKdOM9H9UEXLwGuvEEpO6debNtJ9yt1ZKzPKPrwqGxzMdu0BR1fnQb6i4A==", "dev": true }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, "mocha": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", @@ -4307,6 +4554,17 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "nanoid": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", @@ -4319,6 +4577,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -5357,12 +5621,40 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "tiny-emitter": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.2.tgz", @@ -5417,6 +5709,12 @@ "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", From e5f2efb3b18e749b8865dfafd4ec289ac0781860 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 17:07:15 -0700 Subject: [PATCH 27/52] fix: typo in path --- applications/application_data.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/application_data.yml b/applications/application_data.yml index e8e7accf..482d4c85 100644 --- a/applications/application_data.yml +++ b/applications/application_data.yml @@ -1,6 +1,6 @@ espresso: !include "applications/espresso.yml" exabyteml: !include "applications/exabyteml.yml" -jupyterLab: !include "applications/jupterLab.yml" +jupyterLab: !include "applications/jupyterLab.yml" nwchem: !include "applications/nwchem.yml" python: !include "applications/python.yml" shell: !include "applications/shell.yml" From 138b6dedfd0b268eab7b7406d2daf0f93ba6724a Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 17:09:57 -0700 Subject: [PATCH 28/52] chore: update built JS files --- src/js/data/application_data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/data/application_data.js b/src/js/data/application_data.js index 17d4bc2b..7899e64f 100644 --- a/src/js/data/application_data.js +++ b/src/js/data/application_data.js @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0550452714e4a9742a34b868b97f953c95313ae3b022b604780baf612c8e8d10 -size 5323 +oid sha256:448322dc7e13f72a8a688bba946aa3336caa674767577fbd4f57cb97c8cfaa8e +size 5627 From d4ebaae31d8d4e43d105980191049e109e2c9acc Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 4 Aug 2023 18:19:04 -0700 Subject: [PATCH 29/52] chore: update url in package.json --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 665fcf62..ae2e31ea 100644 --- a/package.json +++ b/package.json @@ -15,15 +15,15 @@ }, "repository": { "type": "git", - "url": "https://github.com/Exabyte-io/exabyte-application-flavors.git" + "url": "https://github.com/Exabyte-io/application-flavors.git" }, "main": "lib/js/index.js", "author": "Exabyte Inc.", "email": "info@exabyte.io", "bugs": { - "url": "https://github.com/Exabyte-io/exabyte-application-flavors/issues" + "url": "https://github.com/Exabyte-io/application-flavors/issues" }, - "homepage": "https://github.com/Exabyte-io/exabyte-application-flavors", + "homepage": "https://github.com/Exabyte-io/application-flavors", "devDependencies": { "@exabyte-io/eslint-config": "^2022.11.17-0", "@exabyte-io/code.js": "git+https://github.com/Exabyte-io/code.js.git#1a0884db8d778d146c91d31234291221788c5881", From ffe56abd084c22429063086c5c846eeb386a9318 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Mon, 7 Aug 2023 15:03:37 -0700 Subject: [PATCH 30/52] chore: add git config for LFS url --- .gitconfig | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitconfig diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 00000000..38e591b6 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://github.com/Exabyte-io/application-flavors.git/info/lfs From 148c2c02bf1056ce80fd10af91b7a3282e96f3e9 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Mon, 7 Aug 2023 15:20:56 -0700 Subject: [PATCH 31/52] revert: add git config file for LFS url --- .gitconfig | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .gitconfig diff --git a/.gitconfig b/.gitconfig deleted file mode 100644 index 38e591b6..00000000 --- a/.gitconfig +++ /dev/null @@ -1,2 +0,0 @@ -[lfs] - url = https://github.com/Exabyte-io/application-flavors.git/info/lfs From 5d07ceb1b1a081ecca0e4dec00b6334600d39f45 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Mon, 7 Aug 2023 15:28:35 -0700 Subject: [PATCH 32/52] chore: restore JS files to git from lfs --- .gitattributes | 3 - src/js/data/application_data.js | 145 +++- src/js/data/templates.js | 727 +++++++++++++++++++- src/js/data/tree.js | 1147 ++++++++++++++++++++++++++++++- 4 files changed, 2010 insertions(+), 12 deletions(-) diff --git a/.gitattributes b/.gitattributes index 267443bb..e69de29b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +0,0 @@ -src/js/data/templates.js filter=lfs diff=lfs merge=lfs -text -src/js/data/application_data.js filter=lfs diff=lfs merge=lfs -text -src/js/data/tree.js filter=lfs diff=lfs merge=lfs -text diff --git a/src/js/data/application_data.js b/src/js/data/application_data.js index 7899e64f..9ff08113 100644 --- a/src/js/data/application_data.js +++ b/src/js/data/application_data.js @@ -1,3 +1,142 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:448322dc7e13f72a8a688bba946aa3336caa674767577fbd4f57cb97c8cfaa8e -size 5627 +// eslint-disable +module.exports = { + applicationData: { + espresso: { + name: "espresso", + shortName: "qe", + summary: "Quantum Espresso", + defaultVersion: "5.4.0", + versions: [ + { version: "5.2.1", isDefault: true, hasAdvancedComputeOptions: true }, + { + version: "5.2.1", + isDefault: false, + build: "GNU", + hasAdvancedComputeOptions: true, + }, + { + version: "5.2.1", + isDefault: false, + build: "Intel", + hasAdvancedComputeOptions: true, + }, + { version: "5.4.0", isDefault: true, hasAdvancedComputeOptions: true }, + { + version: "5.4.0", + isDefault: false, + build: "GNU", + hasAdvancedComputeOptions: true, + }, + { + version: "5.4.0", + isDefault: false, + build: "Intel", + hasAdvancedComputeOptions: true, + }, + { version: "6.0.0", isDefault: true, hasAdvancedComputeOptions: true }, + { + version: "6.0.0", + isDefault: false, + build: "GNU", + hasAdvancedComputeOptions: true, + }, + { + version: "6.0.0", + isDefault: false, + build: "Intel", + hasAdvancedComputeOptions: true, + }, + { version: "6.3", isDefault: true, hasAdvancedComputeOptions: true }, + { version: "6.3", isDefault: false, build: "GNU", hasAdvancedComputeOptions: true }, + { + version: "6.3", + isDefault: false, + build: "Intel", + hasAdvancedComputeOptions: true, + }, + { version: "6.4.1", isDefault: true, hasAdvancedComputeOptions: true }, + { version: "6.5.0", isDefault: true, hasAdvancedComputeOptions: true }, + { version: "6.6.0", isDefault: true, hasAdvancedComputeOptions: true }, + { version: "6.7.0", isDefault: true, hasAdvancedComputeOptions: true }, + { version: "6.8.0", isDefault: true, hasAdvancedComputeOptions: true }, + { version: "7.0", isDefault: true, hasAdvancedComputeOptions: true }, + { version: "7.0", isDefault: false, build: "GNU", hasAdvancedComputeOptions: true }, + { + version: "7.0", + isDefault: false, + build: "Intel", + hasAdvancedComputeOptions: true, + }, + { version: "7.2", isDefault: true, hasAdvancedComputeOptions: true }, + { + version: "7.2", + isDefault: false, + build: "Intel", + hasAdvancedComputeOptions: true, + }, + ], + }, + exabyteml: { + name: "exabyteml", + shortName: "ml", + summary: "Exabyte Machine Learning Engine", + defaultVersion: "0.2.0", + versions: [{ version: "0.2.0", isDefault: true }], + }, + jupyterLab: { + name: "jupyterLab", + shortName: "jl", + summary: "JupyterLab", + defaultVersion: "3.0.3", + versions: [ + { version: "3.0.3", isDefault: true }, + { version: "3.0.3", isDefault: false, build: "with-pre-installed-packages" }, + ], + }, + nwchem: { + name: "nwchem", + shortName: "nwchem", + summary: "NWChem", + defaultVersion: "7.0.2", + versions: [{ version: "7.0.2", isDefault: true }, { version: "6.6" }], + }, + python: { + name: "python", + shortName: "py", + summary: "Python Script", + defaultVersion: "3.8.6", + versions: [ + { version: "3.6.12" }, + { version: "3.7.9" }, + { version: "3.8.6", isDefault: true }, + { version: "3.9.1" }, + { version: "anaconda3-5.2.0" }, + ], + }, + shell: { + name: "shell", + shortName: "sh", + summary: "Shell Script", + defaultVersion: "4.2.46", + versions: [{ version: "4.2.46", isDefault: true }], + }, + vasp: { + name: "vasp", + shortName: "vasp", + summary: "Vienna Ab-initio Simulation Package", + defaultVersion: "5.3.5", + isLicensed: true, + versions: [ + { version: "5.3.5", isDefault: true }, + { version: "5.3.5", isDefault: false, build: "Non-collinear" }, + { version: "5.3.5", isDefault: false, build: "VTST" }, + { version: "5.4.4", isDefault: true }, + { version: "5.4.4", isDefault: false, build: "Gamma" }, + { version: "5.4.4", isDefault: false, build: "Non-collinear" }, + { version: "5.4.4", isDefault: false, build: "VTST" }, + { version: "5.4.4", isDefault: false, build: "VTST-Gamma" }, + { version: "5.4.4", isDefault: false, build: "VTST-Non-collinear" }, + ], + }, + }, +}; diff --git a/src/js/data/templates.js b/src/js/data/templates.js index f3ab86f4..a449a842 100644 --- a/src/js/data/templates.js +++ b/src/js/data/templates.js @@ -1,3 +1,724 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a99ae21684730dbe1ae7dea8a5219ea4fce0fa4fba5fb7d56e7824791d762e2a -size 149623 +// eslint-disable +module.exports = { + allTemplates: [ + { + content: "1\npp.dat\n1.0\n3000\n3\n3.0000\n", + name: "average.in", + contextProviders: [], + applicationName: "espresso", + executableName: "average.x", + }, + { + 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\n", + name: "bands.in", + contextProviders: [], + applicationName: "espresso", + executableName: "bands.x", + }, + { + content: + "&DOS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n/\n\n", + name: "dos.in", + contextProviders: [], + applicationName: "espresso", + executableName: "dos.x", + }, + { + 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", + name: "dynmat_grid.in", + contextProviders: [{ name: "IGridFormDataManager" }], + applicationName: "espresso", + executableName: "dynmat.x", + }, + { + 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\n", + name: "gw_bands_plasmon_pole.in", + contextProviders: [ + { name: "KGridFormDataManager" }, + { name: "QGridFormDataManager" }, + { name: "ExplicitKPath2PIBAFormDataManager" }, + ], + applicationName: "espresso", + executableName: "gw.x", + }, + { + 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\n", + name: "gw_bands_full_frequency.in", + contextProviders: [ + { name: "KGridFormDataManager" }, + { name: "QGridFormDataManager" }, + { name: "ExplicitKPath2PIBAFormDataManager" }, + ], + applicationName: "espresso", + executableName: "gw.x", + }, + { + 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", + name: "matdyn_grid.in", + contextProviders: [{ name: "IGridFormDataManager" }], + applicationName: "espresso", + executableName: "matdyn.x", + }, + { + 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", + name: "matdyn_path.in", + contextProviders: [{ name: "IPathFormDataManager" }], + applicationName: "espresso", + executableName: "matdyn.x", + }, + { + 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 || 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", + name: "neb.in", + contextProviders: [ + { name: "KGridFormDataManager" }, + { name: "NEBFormDataManager" }, + { name: "QENEBInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + ], + applicationName: "espresso", + executableName: "neb.x", + }, + { + 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", + name: "ph_grid.in", + contextProviders: [{ name: "QGridFormDataManager" }], + applicationName: "espresso", + executableName: "ph.x", + }, + { + 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/\n{% for point in qpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor %}\n{% endfor %}\n", + name: "ph_path.in", + contextProviders: [{ name: "QPathFormDataManager" }], + applicationName: "espresso", + executableName: "ph.x", + }, + { + 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", + name: "ph_gamma.in", + contextProviders: [], + applicationName: "espresso", + executableName: "ph.x", + }, + { + 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", + name: "ph_init_qpoints.in", + contextProviders: [{ name: "QGridFormDataManager" }], + applicationName: "espresso", + executableName: "ph.x", + }, + { + 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", + name: "ph_grid_restart.in", + contextProviders: [{ name: "QGridFormDataManager" }], + applicationName: "espresso", + executableName: "ph.x", + }, + { + 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", + name: "ph_single_irr_qpt.in", + contextProviders: [{ name: "QGridFormDataManager" }], + applicationName: "espresso", + executableName: "ph.x", + }, + { + 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\n", + name: "pp_density.in", + contextProviders: [], + applicationName: "espresso", + executableName: "pp.x", + }, + { + content: + "&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n", + name: "pp_electrostatic_potential.in", + contextProviders: [], + applicationName: "espresso", + executableName: "pp.x", + }, + { + content: + "&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n", + name: "projwfc.in", + contextProviders: [], + applicationName: "espresso", + executableName: "projwfc.x", + }, + { + 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", + name: "pw_scf.in", + contextProviders: [ + { name: "KGridFormDataManager" }, + { name: "QEPWXInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + ], + applicationName: "espresso", + executableName: "pw.x", + }, + { + 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", + name: "pw_scf_bands_hse.in", + contextProviders: [ + { name: "QEPWXInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + { name: "QGridFormDataManager" }, + { name: "ExplicitKPathFormDataManager" }, + ], + applicationName: "espresso", + executableName: "pw.x", + }, + { + 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", + name: "pw_esm.in", + contextProviders: [ + { name: "KGridFormDataManager" }, + { name: "QEPWXInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + { name: "BoundaryConditionsFormDataManager" }, + ], + applicationName: "espresso", + executableName: "pw.x", + }, + { + 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", + name: "pw_esm_relax.in", + contextProviders: [ + { name: "KGridFormDataManager" }, + { name: "QEPWXInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + { name: "BoundaryConditionsFormDataManager" }, + ], + applicationName: "espresso", + executableName: "pw.x", + }, + { + 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", + name: "pw_scf_kpt_conv.in", + contextProviders: [ + { name: "QEPWXInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + ], + applicationName: "espresso", + executableName: "pw.x", + }, + { + 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/\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", + name: "pw_nscf.in", + contextProviders: [ + { name: "KGridFormDataManager" }, + { name: "QEPWXInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + ], + applicationName: "espresso", + executableName: "pw.x", + }, + { + 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", + name: "pw_relax.in", + contextProviders: [ + { name: "KGridFormDataManager" }, + { name: "QEPWXInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + ], + applicationName: "espresso", + executableName: "pw.x", + }, + { + 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", + name: "pw_vc_relax.in", + contextProviders: [ + { name: "KGridFormDataManager" }, + { name: "QEPWXInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + ], + applicationName: "espresso", + executableName: "pw.x", + }, + { + 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", + name: "pw_bands.in", + contextProviders: [ + { name: "KPathFormDataManager" }, + { name: "QEPWXInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + ], + applicationName: "espresso", + executableName: "pw.x", + }, + { + 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", + name: "pw_scf_hse.in", + contextProviders: [ + { name: "KGridFormDataManager" }, + { name: "QEPWXInputDataManager" }, + { name: "PlanewaveCutoffDataManager" }, + ], + applicationName: "espresso", + executableName: "pw.x", + }, + { + content: + "&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n", + name: "q2r.in", + contextProviders: [], + applicationName: "espresso", + executableName: "q2r.x", + }, + { + content: + "# ------------------------------------------------------------------------------- #\n# #\n# Example JupyterLab requirements #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. A Python virtual environment is created #\n# - in /scratch/$USER/$JOB_ID (for build: 'Default') #\n# - in /export/share/python/ (for build: 'with-pre-installed-packages') #\n# 3. This list is used to populate a Python virtual environment #\n# 4. JupyterLab is started #\n# #\n# For more information visit: #\n# - https://jupyterlab.readthedocs.io/en/stable/index.html #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Note: With the JupyterLab build 'with-pre-installed-packages', packages #\n# cannot be added during the notebook runtime. #\n# #\n# ------------------------------------------------------------------------------- #\n\njupyterlab==3.0.3\nnotebook>=6.2.0\nexabyte-api-client>=2020.10.19\nnumpy>=1.17.3\npandas>=1.1.4\nurllib3<2\n", + name: "requirements.txt", + contextProviders: [], + applicationName: "jupyterLab", + executableName: "jupyter", + }, + { + 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', + name: "nwchem_total_energy.inp", + contextProviders: [{ name: "NWChemInputDataManager" }], + applicationName: "nwchem", + executableName: "nwchem", + }, + { + 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 pymatgen as mg\n\nsi = mg.Element("Si")\n\nprint(si.atomic_mass)\n', + name: "hello_world.py", + contextProviders: [], + applicationName: "python", + executableName: "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# The package set below is a stable working set of pymatgen and #\n# all of its dependencies. Please adjust the list to include #\n# your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\n# Python 3 packages\ncertifi==2020.12.5\nchardet==4.0.0\ncycler==0.10.0\ndecorator==4.4.2\nfuture==0.18.2\nidna==2.10\nkiwisolver==1.3.1\nmatplotlib==3.3.4\nmonty==4.0.2\nmpmath==1.2.1\nnetworkx==2.5\nnumpy==1.19.5\npalettable==3.3.0\npandas==1.1.5\nPillow==8.1.0\nplotly==4.14.3\npymatgen==2021.2.8.1\npyparsing==2.4.7\npython-dateutil==2.8.1\npytz==2021.1\nrequests==2.25.1\nretrying==1.3.3\nruamel.yaml==0.16.12\nruamel.yaml.clib==0.2.2\nscipy==1.5.4\nsix==1.15.0\nspglib==1.16.1\nsympy==1.7.1\ntabulate==0.8.7\nuncertainties==3.1.5\nurllib3==1.26.3\nxgboost==1.4.2\n", + name: "requirements.txt", + contextProviders: [], + applicationName: "python", + executableName: "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", + name: "requirements_empty.txt", + contextProviders: [], + applicationName: "python", + executableName: "python", + }, + { + content: + '# -------------------------------------------------------------------------------\n# This script contains a few helpful commands for basic plotting with matplotlib.\n# The commented out blocks are optional suggestions and included for convenience.\n# -------------------------------------------------------------------------------\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as ticker\nimport numpy as np\n\n\n# Plot Settings\n# -------------\nfigure_size = (6.4, 4.8) # width, height [inches]\ndpi = 100 # resolution [dots-per-inch]\nfont_size_title = 16 # font size of title\nfont_size_axis = 12 # font size of axis label\nfont_size_tick = 12 # font size of tick label\nfont_size_legend = 14 # font size of legend\nx_axis_label = None # label for x-axis\ny_axis_label = None # label for y-axis\ntitle = None # figure title\nshow_legend = False # whether to show legend\nsave_name = "plot.pdf" # output filename (with suffix), e.g. \'plot.pdf\'\nx_view_limits = {"left": None, "right": None} # view limits for x-axis\ny_view_limits = {"top": None, "bottom": None} # view limits for y-axis\nx_tick_spacing = None # custom tick spacing for x-axis (optional)\ny_tick_spacing = None # custom tick spacing for y-axis (optional)\nx_tick_labels = None # custom tick labels for x-axis (optional)\ny_tick_labels = None # custom tick labels for y-axis (optional)\n\n\n# Figure & axes objects\n# ---------------------\nfig = plt.figure(figsize=figure_size, dpi=dpi)\nax = fig.add_subplot(111)\n\n# Example plot (REPLACE ACCORDINGLY)\n# ------------\nx = np.linspace(0, 7, num=100)\ny = np.sin(x)\nax.plot(x, y, "g-", zorder=3)\n\n\n# Help lines\n# ----------\n# ax.axhline(y=0, color="0.25", linewidth=0.6, zorder=1)\n# ax.axvline(x=0, color="0.25", linewidth=0.6, zorder=1)\n\n\n# View limits\n# -----------\nax.set_xlim(**x_view_limits)\nax.set_ylim(**y_view_limits)\n\n\n# Grid lines\n# ----------\n# grid_style = {\n# "linestyle" : "dotted",\n# "linewidth" : 0.6,\n# "color" : "0.25",\n# }\n# ax.grid(**grid_style)\n\n# Custom tick spacing\n# -------------------\n# ax.xaxis.set_major_locator(ticker.MultipleLocator(x_tick_spacing))\n# ax.yaxis.set_major_locator(ticker.MultipleLocator(y_tick_spacing))\n\n# Custom tick labels\n# ------------------\nif x_tick_labels is not None:\n ax.set_xticklabels(x_tick_labels, fontdict={"fontsize": font_size_tick}, minor=False)\nif y_tick_labels is not None:\n ax.set_yticklabels(y_tick_labels, fontdict={"fontsize": font_size_tick}, minor=False)\n\n# Other tick settings\n# -------------------\n# ax.tick_params(axis="both", which="major", labelsize=font_size_tick, direction="in")\n# ax.tick_params(axis="x", which="major", pad=10)\n# ax.tick_params(axis="x", which="minor", bottom=False, top=False)\n\n\n# Axis labels\n# -----------\nif x_axis_label is not None:\n ax.set_xlabel(x_axis_label, size=font_size_axis)\nif y_axis_label is not None:\n ax.set_ylabel(y_axis_label, size=font_size_axis)\n\n# Figure title\n# ------------\nif title is not None:\n ax.set_title(title, fontsize=font_size_title)\n\n# Legend\n# ------\nif show_legend:\n ax.legend(prop={\'size\': font_size_legend})\n\n# Save figure\n# -----------\nif save_name is not None:\n save_format = save_name.split(".")[-1]\n fig.savefig(save_name, format=save_format, bbox_inches="tight")\n', + name: "matplotlib_basic.py", + contextProviders: [], + applicationName: "python", + executableName: "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\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', + name: "espresso_xml_get_qpt_irr.py", + contextProviders: [], + applicationName: "python", + executableName: "python", + }, + { + content: + 'import re\nimport json\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', + name: "espresso_extract_kpoints.py", + contextProviders: [], + applicationName: "python", + executableName: "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 numpy as np\nfrom scipy.signal import find_peaks\nimport json\nfrom munch import Munch\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", + name: "find_extrema.py", + contextProviders: [], + applicationName: "python", + executableName: "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", + name: "processing_requirements.txt", + contextProviders: [], + applicationName: "python", + executableName: "python", + }, + { + content: + '# ----------------------------------------------------------------- #\n# #\n# PythonML Package Requirements for use on the Exabyte.io Platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# The package set below is a stable working set of pymatgen and #\n# all of its dependencies. Please adjust the list to include #\n# your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\n# Python 3 packages\ncertifi==2020.12.5\nchardet==4.0.0\ncycler==0.10.0\ndecorator==4.4.2\nfuture==0.18.2\nidna==2.10\nkiwisolver==1.3.1\nmatplotlib==3.3.4\nmonty==4.0.2\nmpmath==1.2.1\nnetworkx==2.5\nnumpy==1.19.5\npalettable==3.3.0\npandas==1.1.5\nPillow==8.1.0\nplotly==4.14.3\npymatgen==2021.2.8.1\npyparsing==2.4.7\npython-dateutil==2.8.1\npytz==2021.1\nrequests==2.25.1\nretrying==1.3.3\nruamel.yaml==0.16.12\nruamel.yaml.clib==0.2.2\nscikit-learn==0.24.1\nscipy==1.5.4\nsix==1.15.0\nspglib==1.16.1\nsympy==1.7.1\ntabulate==0.8.7\nuncertainties==3.1.5\nurllib3==1.26.3\nxgboost==1.4.2;python_version>="3.6"\n', + name: "pyml_requirements.txt", + contextProviders: [], + applicationName: "python", + executableName: "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 pickle, os\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', + name: "pyml_settings.py", + contextProviders: [{ name: "MLSettingsDataManager" }], + applicationName: "python", + executableName: "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', + name: "pyml_custom.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.preprocessing\nimport settings\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', + name: "data_input_read_csv_pandas.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.model_selection\nimport numpy as np\nimport settings\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', + name: "data_input_train_test_split_sklearn.py", + contextProviders: [{ name: "MLTrainTestSplitDataManager" }], + applicationName: "python", + executableName: "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 sklearn.preprocessing\n\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 # 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', + name: "pre_processing_min_max_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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', + name: "pre_processing_remove_duplicates_pandas.py", + contextProviders: [], + applicationName: "python", + executableName: "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', + name: "pre_processing_remove_missing_pandas.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.preprocessing\n\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 # 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', + name: "pre_processing_standardization_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.ensemble\nimport sklearn.tree\nimport sklearn.metrics\nimport numpy as np\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 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', + name: "model_adaboosted_trees_regression_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.ensemble\nimport sklearn.tree\nimport sklearn.metrics\nimport numpy as np\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 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', + name: "model_bagged_trees_regression_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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', + name: "model_gradboosted_trees_regression_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 xgboost\nimport sklearn.metrics\nimport numpy as np\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 # 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', + name: "model_extreme_gradboosted_trees_regression_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.cluster\nimport sklearn.metrics\nimport numpy as np\nimport settings\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', + name: "model_k_means_clustering_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.kernel_ridge\nimport sklearn.metrics\nimport numpy as np\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 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', + name: "model_kernel_ridge_regression_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.linear_model\nimport sklearn.metrics\nimport numpy as np\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 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', + name: "model_lasso_regression_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.neural_network\nimport sklearn.metrics\nimport numpy as np\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 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', + name: "model_mlp_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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', + name: "model_random_forest_classification_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 # 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', + name: "model_gradboosted_trees_classification_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 xgboost\nimport sklearn.metrics\nimport numpy as np\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 # 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', + name: "model_extreme_gradboosted_trees_classification_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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', + name: "model_random_forest_regression_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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 sklearn.linear_model\nimport sklearn.metrics\nimport numpy as np\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 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', + name: "model_ridge_regression_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "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\n\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', + name: "post_processing_parity_plot_matplotlib.py", + contextProviders: [], + applicationName: "python", + executableName: "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 pandas as pd\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport sklearn.decomposition\nimport settings\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', + name: "post_processing_pca_2d_clusters_matplotlib.py", + contextProviders: [], + applicationName: "python", + executableName: "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.pyplot as plt\nimport matplotlib.collections\nimport sklearn.metrics\nimport numpy as np\nimport settings\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', + name: "post_processing_roc_curve_sklearn.py", + contextProviders: [], + applicationName: "python", + executableName: "python", + }, + { + 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', + name: "hello_world.sh", + contextProviders: [], + applicationName: "shell", + executableName: "sh", + }, + { + 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.exabyte.io/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@exabyte.io\n\n# load module\nmodule add espresso/540-i-174-impi-044\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n", + name: "job_espresso_pw_scf.sh", + contextProviders: [], + applicationName: "shell", + executableName: "sh", + }, + { + 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", + name: "espresso_link_outdir_save.sh", + contextProviders: [], + applicationName: "shell", + executableName: "sh", + }, + { + 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", + name: "espresso_collect_dynmat.sh", + contextProviders: [], + applicationName: "shell", + executableName: "sh", + }, + { + 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 < Date: Mon, 7 Aug 2023 16:19:57 -0700 Subject: [PATCH 33/52] chore: set version to 0.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae2e31ea..45bf4783 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@exabyte-io/application-flavors.js", - "version": "2022.1.9-2", + "version": "0.0.0", "description": "Input file templates and related computational configuration parameters for the applications used in the platform.", "scripts": { "prepublishOnly": "rm -rf lib; npm run transpile", From 26a74b2a1a91f5ad06de0bb10af9698a714370bb Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Mon, 7 Aug 2023 17:04:25 -0700 Subject: [PATCH 34/52] chore: fix typo --- executables/jupyterLab/jupyter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/executables/jupyterLab/jupyter.yml b/executables/jupyterLab/jupyter.yml index 42dfc2eb..ee1f34b2 100644 --- a/executables/jupyterLab/jupyter.yml +++ b/executables/jupyterLab/jupyter.yml @@ -12,5 +12,5 @@ flavors: monitors: - standard_output - jupyterNotebookEndpoint - applicationName: jupyerLab + applicationName: jupyterLab executableName: jupyter From 2f8dff87783972378eadf928bba35803025c5930 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Mon, 7 Aug 2023 17:06:28 -0700 Subject: [PATCH 35/52] chore: update generated JS files --- src/js/data/tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/data/tree.js b/src/js/data/tree.js index 4f90a6ed..cf1ffa17 100644 --- a/src/js/data/tree.js +++ b/src/js/data/tree.js @@ -391,7 +391,7 @@ module.exports = { isDefault: true, input: [{ name: "requirements.txt", templateName: "requirements.txt" }], monitors: ["standard_output", "jupyterNotebookEndpoint"], - applicationName: "jupyerLab", + applicationName: "jupyterLab", executableName: "jupyter", }, }, From b74c30e5e97cab4b4fd018065ed0dc5043f55613 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Mon, 7 Aug 2023 18:41:44 -0700 Subject: [PATCH 36/52] chore: use 2 spaces for Yaml indent --- applications/espresso.yml | 176 ++++---- applications/exabyteml.yml | 4 +- applications/jupyterLab.yml | 10 +- applications/nwchem.yml | 6 +- applications/python.yml | 12 +- applications/shell.yml | 4 +- applications/vasp.yml | 54 +-- executables/espresso/average.x.yml | 38 +- executables/espresso/bands.x.yml | 22 +- executables/espresso/dos.x.yml | 22 +- executables/espresso/dynmat.x.yml | 18 +- executables/espresso/gw.x.yml | 52 +-- executables/espresso/matdyn.x.yml | 42 +- executables/espresso/neb.x.yml | 28 +- executables/espresso/ph.x.yml | 110 ++--- executables/espresso/pp.x.yml | 34 +- executables/espresso/projwfc.x.yml | 22 +- executables/espresso/pw.x.yml | 342 +++++++-------- executables/espresso/q2r.x.yml | 18 +- executables/exabyteml/score.yml | 18 +- executables/exabyteml/train.yml | 18 +- executables/jupyterLab/jupyter.yml | 24 +- executables/nwchem/nwchem.yml | 30 +- executables/python/python.yml | 642 ++++++++++++++--------------- executables/shell/sh.yml | 114 ++--- executables/tree.yml | 38 +- executables/vasp/vasp.yml | 592 +++++++++++++------------- methods/espresso/5.2.1.yml | 24 +- methods/vasp/5.3.5.yml | 10 +- 29 files changed, 1262 insertions(+), 1262 deletions(-) diff --git a/applications/espresso.yml b/applications/espresso.yml index f2eb9a44..154bd02b 100644 --- a/applications/espresso.yml +++ b/applications/espresso.yml @@ -3,91 +3,91 @@ shortName: qe summary: Quantum Espresso defaultVersion: "5.4.0" versions: -# version 5.2.1 - - version: "5.2.1" - isDefault: true - hasAdvancedComputeOptions: true - - version: "5.2.1" - isDefault: false - build: GNU - hasAdvancedComputeOptions: true - - version: "5.2.1" - isDefault: false - build: Intel - hasAdvancedComputeOptions: true -# version 5.4.0 - - version: "5.4.0" - isDefault: true - hasAdvancedComputeOptions: true - - version: "5.4.0" - isDefault: false - build: GNU - hasAdvancedComputeOptions: true - - version: "5.4.0" - isDefault: false - build: Intel - hasAdvancedComputeOptions: true -# version 6.0.0 - - version: "6.0.0" - isDefault: true - hasAdvancedComputeOptions: true - - version: "6.0.0" - isDefault: false - build: GNU - hasAdvancedComputeOptions: true - - version: "6.0.0" - isDefault: false - build: Intel - hasAdvancedComputeOptions: true -# version 6.3 - - version: "6.3" - isDefault: true - hasAdvancedComputeOptions: true - - version: "6.3" - isDefault: false - build: GNU - hasAdvancedComputeOptions: true - - version: "6.3" - isDefault: false - build: Intel - hasAdvancedComputeOptions: true -# version 6.4.1 - - version: "6.4.1" - isDefault: true - hasAdvancedComputeOptions: true -# version 6.5.0 - - version: "6.5.0" - isDefault: true - hasAdvancedComputeOptions: true -# version 6.6.0 - - version: "6.6.0" - isDefault: true - hasAdvancedComputeOptions: true -# version 6.7.0 - - version: "6.7.0" - isDefault: true - hasAdvancedComputeOptions: true -# version 6.8.0 - - version: "6.8.0" - isDefault: true - hasAdvancedComputeOptions: true -# version 7.0 - - version: "7.0" - isDefault: true - hasAdvancedComputeOptions: true - - version: "7.0" - isDefault: false - build: GNU - hasAdvancedComputeOptions: true - - version: "7.0" - isDefault: false - build: Intel - hasAdvancedComputeOptions: true -# version 7.2 - - version: "7.2" - isDefault: true - hasAdvancedComputeOptions: true - - version: "7.2" - isDefault: false - build: Intel - hasAdvancedComputeOptions: true + # version 5.2.1 + - version: "5.2.1" + isDefault: true + hasAdvancedComputeOptions: true + - version: "5.2.1" + isDefault: false + build: GNU + hasAdvancedComputeOptions: true + - version: "5.2.1" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true + # version 5.4.0 + - version: "5.4.0" + isDefault: true + hasAdvancedComputeOptions: true + - version: "5.4.0" + isDefault: false + build: GNU + hasAdvancedComputeOptions: true + - version: "5.4.0" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true + # version 6.0.0 + - version: "6.0.0" + isDefault: true + hasAdvancedComputeOptions: true + - version: "6.0.0" + isDefault: false + build: GNU + hasAdvancedComputeOptions: true + - version: "6.0.0" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true + # version 6.3 + - version: "6.3" + isDefault: true + hasAdvancedComputeOptions: true + - version: "6.3" + isDefault: false + build: GNU + hasAdvancedComputeOptions: true + - version: "6.3" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true + # version 6.4.1 + - version: "6.4.1" + isDefault: true + hasAdvancedComputeOptions: true + # version 6.5.0 + - version: "6.5.0" + isDefault: true + hasAdvancedComputeOptions: true + # version 6.6.0 + - version: "6.6.0" + isDefault: true + hasAdvancedComputeOptions: true + # version 6.7.0 + - version: "6.7.0" + isDefault: true + hasAdvancedComputeOptions: true + # version 6.8.0 + - version: "6.8.0" + isDefault: true + hasAdvancedComputeOptions: true + # version 7.0 + - version: "7.0" + isDefault: true + hasAdvancedComputeOptions: true + - version: "7.0" + isDefault: false + build: GNU + hasAdvancedComputeOptions: true + - version: "7.0" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true + # version 7.2 + - version: "7.2" + isDefault: true + hasAdvancedComputeOptions: true + - version: "7.2" + isDefault: false + build: Intel + hasAdvancedComputeOptions: true diff --git a/applications/exabyteml.yml b/applications/exabyteml.yml index 112a4893..48d1642a 100644 --- a/applications/exabyteml.yml +++ b/applications/exabyteml.yml @@ -3,5 +3,5 @@ shortName: ml summary: Exabyte Machine Learning Engine defaultVersion: "0.2.0" versions: - - version: "0.2.0" - isDefault: true + - version: "0.2.0" + isDefault: true diff --git a/applications/jupyterLab.yml b/applications/jupyterLab.yml index d8ea2115..cd071e96 100644 --- a/applications/jupyterLab.yml +++ b/applications/jupyterLab.yml @@ -3,8 +3,8 @@ shortName: jl summary: JupyterLab defaultVersion: "3.0.3" versions: - - version: "3.0.3" - isDefault: true - - version: "3.0.3" - isDefault: false - build: with-pre-installed-packages + - version: "3.0.3" + isDefault: true + - version: "3.0.3" + isDefault: false + build: with-pre-installed-packages diff --git a/applications/nwchem.yml b/applications/nwchem.yml index ae762ab8..f817e42c 100644 --- a/applications/nwchem.yml +++ b/applications/nwchem.yml @@ -3,6 +3,6 @@ shortName: nwchem summary: NWChem defaultVersion: "7.0.2" versions: - - version: "7.0.2" - isDefault: true - - version: "6.6" + - version: "7.0.2" + isDefault: true + - version: "6.6" diff --git a/applications/python.yml b/applications/python.yml index 5b6dfe88..45a172c9 100644 --- a/applications/python.yml +++ b/applications/python.yml @@ -3,9 +3,9 @@ shortName: py summary: Python Script defaultVersion: "3.8.6" versions: - - version: "3.6.12" - - version: "3.7.9" - - version: "3.8.6" - isDefault: true - - version: "3.9.1" - - version: "anaconda3-5.2.0" + - version: "3.6.12" + - version: "3.7.9" + - version: "3.8.6" + isDefault: true + - version: "3.9.1" + - version: "anaconda3-5.2.0" diff --git a/applications/shell.yml b/applications/shell.yml index c6480c52..c0b3dd8c 100644 --- a/applications/shell.yml +++ b/applications/shell.yml @@ -3,5 +3,5 @@ shortName: sh summary: Shell Script defaultVersion: "4.2.46" versions: - - version: "4.2.46" - isDefault: true + - version: "4.2.46" + isDefault: true diff --git a/applications/vasp.yml b/applications/vasp.yml index b8a74e10..258f1e9e 100644 --- a/applications/vasp.yml +++ b/applications/vasp.yml @@ -4,30 +4,30 @@ summary: Vienna Ab-initio Simulation Package defaultVersion: "5.3.5" isLicensed: true versions: -# version 5.3.5 - - version: "5.3.5" - isDefault: true - - version: "5.3.5" - isDefault: false - build: Non-collinear - - version: "5.3.5" - isDefault: false - build: VTST -# version 5.4.4 - - version: "5.4.4" - isDefault: true - - version: "5.4.4" - isDefault: false - build: Gamma - - version: "5.4.4" - isDefault: false - build: Non-collinear - - version: "5.4.4" - isDefault: false - build: VTST - - version: "5.4.4" - isDefault: false - build: VTST-Gamma - - version: "5.4.4" - isDefault: false - build: VTST-Non-collinear + # version 5.3.5 + - version: "5.3.5" + isDefault: true + - version: "5.3.5" + isDefault: false + build: Non-collinear + - version: "5.3.5" + isDefault: false + build: VTST + # version 5.4.4 + - version: "5.4.4" + isDefault: true + - version: "5.4.4" + isDefault: false + build: Gamma + - version: "5.4.4" + isDefault: false + build: Non-collinear + - version: "5.4.4" + isDefault: false + build: VTST + - version: "5.4.4" + isDefault: false + build: VTST-Gamma + - version: "5.4.4" + isDefault: false + build: VTST-Non-collinear diff --git a/executables/espresso/average.x.yml b/executables/espresso/average.x.yml index 097115f7..15bc7e54 100644 --- a/executables/espresso/average.x.yml +++ b/executables/espresso/average.x.yml @@ -1,23 +1,23 @@ monitors: - - standard_output + - standard_output results: - - average_potential_profile + - average_potential_profile flavors: - average: - input: - - name: average.in - results: [] - monitors: - - standard_output - applicationName: espresso - executableName: average.x + average: + input: + - name: average.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: average.x - average_potential: - input: - - name: average.in - results: - - average_potential_profile - monitors: - - standard_output - applicationName: espresso - executableName: average.x + average_potential: + input: + - name: average.in + results: + - average_potential_profile + monitors: + - standard_output + applicationName: espresso + executableName: average.x diff --git a/executables/espresso/bands.x.yml b/executables/espresso/bands.x.yml index f2805113..42789a70 100644 --- a/executables/espresso/bands.x.yml +++ b/executables/espresso/bands.x.yml @@ -1,14 +1,14 @@ monitors: - - standard_output + - standard_output results: - - band_structure + - band_structure flavors: - bands: - input: - - name: bands.in - results: - - band_structure - monitors: - - standard_output - applicationName: espresso - executableName: bands.x + bands: + input: + - name: bands.in + results: + - band_structure + monitors: + - standard_output + applicationName: espresso + executableName: bands.x diff --git a/executables/espresso/dos.x.yml b/executables/espresso/dos.x.yml index 953d76c5..88891b1b 100644 --- a/executables/espresso/dos.x.yml +++ b/executables/espresso/dos.x.yml @@ -1,14 +1,14 @@ monitors: - - standard_output + - standard_output results: - - density_of_states + - density_of_states flavors: - dos: - input: - - name: dos.in - results: - - density_of_states - monitors: - - standard_output - applicationName: espresso - executableName: dos.x + dos: + input: + - name: dos.in + results: + - density_of_states + monitors: + - standard_output + applicationName: espresso + executableName: dos.x diff --git a/executables/espresso/dynmat.x.yml b/executables/espresso/dynmat.x.yml index 46ab296d..97ba57bb 100644 --- a/executables/espresso/dynmat.x.yml +++ b/executables/espresso/dynmat.x.yml @@ -1,12 +1,12 @@ monitors: - - standard_output + - standard_output results: [] flavors: - dynmat: - input: - - name: dynmat_grid.in - results: [] - monitors: - - standard_output - applicationName: espresso - executableName: dynmat.x + dynmat: + input: + - name: dynmat_grid.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: dynmat.x diff --git a/executables/espresso/gw.x.yml b/executables/espresso/gw.x.yml index 43fd7340..29b3c314 100644 --- a/executables/espresso/gw.x.yml +++ b/executables/espresso/gw.x.yml @@ -1,30 +1,30 @@ monitors: - - standard_output + - standard_output results: - - band_structure - - fermi_energy - - band_gaps + - band_structure + - fermi_energy + - band_gaps flavors: - gw_bands_plasmon_pole: - input: - - name: gw_bands_plasmon_pole.in - results: - - band_structure - - fermi_energy - - band_gaps - monitors: - - standard_output - applicationName: espresso - executableName: gw.x + gw_bands_plasmon_pole: + input: + - name: gw_bands_plasmon_pole.in + results: + - band_structure + - fermi_energy + - band_gaps + monitors: + - standard_output + applicationName: espresso + executableName: gw.x - gw_bands_full_frequency: - input: - - name: gw_bands_full_frequency.in - results: - - band_structure - - fermi_energy - - band_gaps - monitors: - - standard_output - applicationName: espresso - executableName: gw.x + gw_bands_full_frequency: + input: + - name: gw_bands_full_frequency.in + results: + - band_structure + - fermi_energy + - band_gaps + monitors: + - standard_output + applicationName: espresso + executableName: gw.x diff --git a/executables/espresso/matdyn.x.yml b/executables/espresso/matdyn.x.yml index 82e01db8..934af78e 100644 --- a/executables/espresso/matdyn.x.yml +++ b/executables/espresso/matdyn.x.yml @@ -1,25 +1,25 @@ monitors: - - standard_output + - standard_output results: - - phonon_dos - - phonon_dispersions + - phonon_dos + - phonon_dispersions flavors: - matdyn_grid: - input: - - name: matdyn_grid.in - monitors: - - standard_output - results: - - phonon_dos - applicationName: espresso - executableName: matdyn.x + matdyn_grid: + input: + - name: matdyn_grid.in + monitors: + - standard_output + results: + - phonon_dos + applicationName: espresso + executableName: matdyn.x - matdyn_path: - input: - - name: matdyn_path.in - monitors: - - standard_output - results: - - phonon_dispersions - applicationName: espresso - executableName: matdyn.x + matdyn_path: + input: + - name: matdyn_path.in + monitors: + - standard_output + results: + - phonon_dispersions + applicationName: espresso + executableName: matdyn.x diff --git a/executables/espresso/neb.x.yml b/executables/espresso/neb.x.yml index 3e1b129a..df1a329f 100644 --- a/executables/espresso/neb.x.yml +++ b/executables/espresso/neb.x.yml @@ -1,17 +1,17 @@ monitors: - - standard_output + - standard_output results: - - reaction_energy_barrier - - reaction_energy_profile + - reaction_energy_barrier + - reaction_energy_profile flavors: - neb: - isMultiMaterial: true - input: - - name: neb.in - results: - - reaction_energy_barrier - - reaction_energy_profile - monitors: - - standard_output - applicationName: espresso - executableName: neb.x + neb: + isMultiMaterial: true + input: + - name: neb.in + results: + - reaction_energy_barrier + - reaction_energy_profile + monitors: + - standard_output + applicationName: espresso + executableName: neb.x diff --git a/executables/espresso/ph.x.yml b/executables/espresso/ph.x.yml index 20947888..fa14edcb 100644 --- a/executables/espresso/ph.x.yml +++ b/executables/espresso/ph.x.yml @@ -1,63 +1,63 @@ monitors: - - standard_output + - standard_output results: - - phonon_dos - - phonon_dispersions - - zero_point_energy + - phonon_dos + - phonon_dispersions + - zero_point_energy flavors: - ph_path: - input: - - name: ph_path.in - results: - - phonon_dispersions - monitors: - - standard_output - applicationName: espresso - executableName: ph.x + ph_path: + input: + - name: ph_path.in + results: + - phonon_dispersions + monitors: + - standard_output + applicationName: espresso + executableName: ph.x - ph_grid: - input: - - name: ph_grid.in - results: - - phonon_dos - monitors: - - standard_output - applicationName: espresso - executableName: ph.x + ph_grid: + input: + - name: ph_grid.in + results: + - phonon_dos + monitors: + - standard_output + applicationName: espresso + executableName: ph.x - ph_gamma: - input: - - name: ph_gamma.in - results: - - zero_point_energy - monitors: - - standard_output - applicationName: espresso - executableName: ph.x + ph_gamma: + input: + - name: ph_gamma.in + results: + - zero_point_energy + monitors: + - standard_output + applicationName: espresso + executableName: ph.x - ph_init_qpoints: - input: - - name: ph_init_qpoints.in - results: [] - monitors: - - standard_output - applicationName: espresso - executableName: ph.x + ph_init_qpoints: + input: + - name: ph_init_qpoints.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: ph.x - ph_grid_restart: - input: - - name: ph_grid_restart.in - results: [] - monitors: - - standard_output - applicationName: espresso - executableName: ph.x + ph_grid_restart: + input: + - name: ph_grid_restart.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: ph.x - ph_single_irr_qpt: - input: - - name: ph_single_irr_qpt.in - results: [] - monitors: - - standard_output - applicationName: espresso - executableName: ph.x + ph_single_irr_qpt: + input: + - name: ph_single_irr_qpt.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: ph.x diff --git a/executables/espresso/pp.x.yml b/executables/espresso/pp.x.yml index 8c7edab5..4048c13b 100644 --- a/executables/espresso/pp.x.yml +++ b/executables/espresso/pp.x.yml @@ -1,21 +1,21 @@ monitors: - - standard_output + - standard_output results: [] flavors: - pp_density: - input: - - name: pp_density.in - results: [] - monitors: - - standard_output - applicationName: espresso - executableName: pp.x + pp_density: + input: + - name: pp_density.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: pp.x - pp_electrostatic_potential: - input: - - name: pp_electrostatic_potential.in - results: [] - monitors: - - standard_output - applicationName: espresso - executableName: pp.x + pp_electrostatic_potential: + input: + - name: pp_electrostatic_potential.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: pp.x diff --git a/executables/espresso/projwfc.x.yml b/executables/espresso/projwfc.x.yml index 813d3cb8..37f60fc3 100644 --- a/executables/espresso/projwfc.x.yml +++ b/executables/espresso/projwfc.x.yml @@ -1,14 +1,14 @@ monitors: - - standard_output + - standard_output results: - - density_of_states + - density_of_states flavors: - projwfc: - input: - - name: projwfc.in - results: - - density_of_states - monitors: - - standard_output - applicationName: espresso - executableName: projwfc.x + projwfc: + input: + - name: projwfc.in + results: + - density_of_states + monitors: + - standard_output + applicationName: espresso + executableName: projwfc.x diff --git a/executables/espresso/pw.x.yml b/executables/espresso/pw.x.yml index 2aa9569f..00ffb83f 100644 --- a/executables/espresso/pw.x.yml +++ b/executables/espresso/pw.x.yml @@ -1,186 +1,186 @@ isDefault: true hasAdvancedComputeOptions: true postProcessors: - - remove_non_zero_weight_kpoints + - remove_non_zero_weight_kpoints monitors: - - standard_output" - - convergence_ionic" - - convergence_electronic" + - standard_output" + - convergence_ionic" + - convergence_electronic" results: - - atomic_forces - - band_gaps - - charge_density_profile - - density_of_states - - fermi_energy - - final_structure - - magnetic_moments - - potential_profile - - pressure - - reaction_energy_barrier - - reaction_energy_profile - - stress_tensor - - total_energy - - total_energy_contributions - - total_force + - atomic_forces + - band_gaps + - charge_density_profile + - density_of_states + - fermi_energy + - final_structure + - magnetic_moments + - potential_profile + - pressure + - reaction_energy_barrier + - reaction_energy_profile + - stress_tensor + - total_energy + - total_energy_contributions + - total_force flavors: - pw_scf: - isDefault: true - input: - - name: pw_scf.in - results: - - atomic_forces - - fermi_energy - - pressure - - stress_tensor - - total_energy - - total_energy_contributions - - total_force - monitors: - - standard_output - - convergence_electronic - applicationName: espresso - executableName: pw.x + pw_scf: + isDefault: true + input: + - name: pw_scf.in + results: + - atomic_forces + - fermi_energy + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x - pw_scf_bands_hse: - input: - - name: pw_scf_bands_hse.in - results: - - total_energy - - total_energy_contributions - - pressure - - fermi_energy - - atomic_forces - - total_force - - stress_tensor - monitors: - - standard_output - - convergence_electronic - applicationName: espresso - executableName: pw.x + pw_scf_bands_hse: + input: + - name: pw_scf_bands_hse.in + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x - pw_scf_hse: - input: - - name: pw_scf_hse.in - results: - - atomic_forces - - band_gaps - - fermi_energy - - pressure - - stress_tensor - - total_energy - - total_energy_contributions - - total_force - monitors: - - standard_output - - convergence_electronic - applicationName: espresso - executableName: pw.x + pw_scf_hse: + input: + - name: pw_scf_hse.in + results: + - atomic_forces + - band_gaps + - fermi_energy + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x - pw_esm: - input: - - name: pw_esm.in - results: - - total_energy - - total_energy_contributions - - pressure - - fermi_energy - - atomic_forces - - total_force - - stress_tensor - - potential_profile - - charge_density_profile - monitors: - - standard_output - - convergence_electronic - applicationName: espresso - executableName: pw.x + pw_esm: + input: + - name: pw_esm.in + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + - potential_profile + - charge_density_profile + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x - pw_esm_relax: - input: - - name: pw_esm_relax.in - results: - - total_energy - - total_energy_contributions - - pressure - - fermi_energy - - atomic_forces - - total_force - - stress_tensor - - potential_profile - - charge_density_profile - monitors: - - standard_output - - convergence_electronic - applicationName: espresso - executableName: pw.x + pw_esm_relax: + input: + - name: pw_esm_relax.in + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + - potential_profile + - charge_density_profile + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x - pw_nscf: - input: - - name: pw_nscf.in - results: - - fermi_energy - - band_gaps - monitors: - - standard_output - applicationName: espresso - executableName: pw.x + pw_nscf: + input: + - name: pw_nscf.in + results: + - fermi_energy + - band_gaps + monitors: + - standard_output + applicationName: espresso + executableName: pw.x - pw_bands: - input: - - name: pw_bands.in - monitors: - - standard_output - applicationName: espresso - executableName: pw.x + pw_bands: + input: + - name: pw_bands.in + monitors: + - standard_output + applicationName: espresso + executableName: pw.x - pw_relax: - 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 - applicationName: espresso - executableName: pw.x + pw_relax: + 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 + applicationName: espresso + executableName: pw.x - pw_vc-relax: - 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 - applicationName: espresso - executableName: pw.x + pw_vc-relax: + 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 + applicationName: espresso + executableName: pw.x - pw_scf_kpt_conv: - input: - - name: pw_scf_kpt_conv.in - results: - - total_energy - - fermi_energy - - pressure - - atomic_forces - - total_force - - stress_tensor - monitors: - - standard_output - - convergence_electronic - applicationName: espresso - executableName: pw.x + pw_scf_kpt_conv: + input: + - name: pw_scf_kpt_conv.in + results: + - total_energy + - fermi_energy + - pressure + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: espresso + executableName: pw.x diff --git a/executables/espresso/q2r.x.yml b/executables/espresso/q2r.x.yml index 3e1d5a3c..9929be16 100644 --- a/executables/espresso/q2r.x.yml +++ b/executables/espresso/q2r.x.yml @@ -1,12 +1,12 @@ monitors: - - standard_output + - standard_output results: [] flavors: - q2r: - input: - - name: q2r.in - results: [] - monitors: - - standard_output - applicationName: espresso - executableName: q2r.x + q2r: + input: + - name: q2r.in + results: [] + monitors: + - standard_output + applicationName: espresso + executableName: q2r.x diff --git a/executables/exabyteml/score.yml b/executables/exabyteml/score.yml index 6de59c0a..99a5874c 100644 --- a/executables/exabyteml/score.yml +++ b/executables/exabyteml/score.yml @@ -1,13 +1,13 @@ isDefault: false monitors: - - standard_output + - standard_output results: - - predicted_properties + - predicted_properties flavors: - score: - isDefault: true - input: [] - monitors: - - standard_output - applicationName: exabyteml - executableName: score + score: + isDefault: true + input: [] + monitors: + - standard_output + applicationName: exabyteml + executableName: score diff --git a/executables/exabyteml/train.yml b/executables/exabyteml/train.yml index 8c2aa85c..fb09255d 100644 --- a/executables/exabyteml/train.yml +++ b/executables/exabyteml/train.yml @@ -1,13 +1,13 @@ isDefault: true monitors: - - standard_output + - standard_output results: - - "workflow:ml_predict" + - "workflow:ml_predict" flavors: - train: - isDefault: true - input: [] - monitors: - - standard_output - applicationName: exabyteml - executableName: train + train: + isDefault: true + input: [] + monitors: + - standard_output + applicationName: exabyteml + executableName: train diff --git a/executables/jupyterLab/jupyter.yml b/executables/jupyterLab/jupyter.yml index ee1f34b2..c9e9703c 100644 --- a/executables/jupyterLab/jupyter.yml +++ b/executables/jupyterLab/jupyter.yml @@ -1,16 +1,16 @@ isDefault: true monitors: - - standard_output - - jupyterNotebookEndpoint + - standard_output + - jupyterNotebookEndpoint results: [] flavors: - notebook: - isDefault: true - input: - - name: requirements.txt - templateName: requirements.txt - monitors: - - standard_output - - jupyterNotebookEndpoint - applicationName: jupyterLab - executableName: jupyter + notebook: + isDefault: true + input: + - name: requirements.txt + templateName: requirements.txt + monitors: + - standard_output + - jupyterNotebookEndpoint + applicationName: jupyterLab + executableName: jupyter diff --git a/executables/nwchem/nwchem.yml b/executables/nwchem/nwchem.yml index 09b38376..f797c9e1 100644 --- a/executables/nwchem/nwchem.yml +++ b/executables/nwchem/nwchem.yml @@ -1,21 +1,21 @@ isDefault: true hasAdvancedComputeOptions: false postProcessors: - - error_handler + - error_handler monitors: - - standard_output + - standard_output results: - - total_energy - - total_energy_contributions + - total_energy + - total_energy_contributions flavors: - nwchem_total_energy: - isDefault: true - input: - - name: nwchem_total_energy.inp - results: - - total_energy - - total_energy_contributions - monitors: - - standard_output - applicationName: nwchem - executableName: nwchem + nwchem_total_energy: + isDefault: true + input: + - name: nwchem_total_energy.inp + results: + - total_energy + - total_energy_contributions + monitors: + - standard_output + applicationName: nwchem + executableName: nwchem diff --git a/executables/python/python.yml b/executables/python/python.yml index c0d203d7..2474c4df 100644 --- a/executables/python/python.yml +++ b/executables/python/python.yml @@ -1,353 +1,353 @@ isDefault: true monitors: - - standard_output + - standard_output results: - - file_content - - "workflow:pyml_predict" + - file_content + - "workflow:pyml_predict" flavors: - hello_world: - isDefault: true - input: - - name: script.py - templateName: hello_world.py - - name: requirements.txt - monitors: - - standard_output - applicationName: python - executableName: python + hello_world: + isDefault: true + input: + - name: script.py + templateName: hello_world.py + - name: requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python - espresso_xml_get_qpt_irr: - input: - - name: espresso_xml_get_qpt_irr.py - monitors: - - standard_output - applicationName: python - executableName: python + espresso_xml_get_qpt_irr: + input: + - name: espresso_xml_get_qpt_irr.py + monitors: + - standard_output + applicationName: python + executableName: python - espresso_extract_kpoints: - input: - - name: espresso_extract_kpoints.py - - name: requirements.txt - templateName: requirements_empty.txt - monitors: - - standard_output - applicationName: python - executableName: python + espresso_extract_kpoints: + input: + - name: espresso_extract_kpoints.py + - name: requirements.txt + templateName: requirements_empty.txt + monitors: + - standard_output + applicationName: python + executableName: python - "generic:post_processing:plot:matplotlib": - input: - - name: plot.py - templateName: matplotlib_basic.py - - name: requirements.txt - templateName: processing_requirements.txt - monitors: - - standard_output - applicationName: python - executableName: python + "generic:post_processing:plot:matplotlib": + input: + - name: plot.py + templateName: matplotlib_basic.py + - name: requirements.txt + templateName: processing_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python - "generic:processing:find_extrema:scipy": - input: - - name: find_extrema.py - templateName: find_extrema.py - - name: requirements.txt - templateName: processing_requirements.txt - monitors: - - standard_output - applicationName: python - executableName: python + "generic:processing:find_extrema:scipy": + input: + - name: find_extrema.py + templateName: find_extrema.py + - name: requirements.txt + templateName: processing_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:setup_variables_packages": - input: - - name: settings.py - templateName: pyml_settings.py - - name: requirements.txt - templateName: pyml_requirements.txt - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:setup_variables_packages": + input: + - name: settings.py + templateName: pyml_settings.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:custom": - input: - - name: pyml_custom.py - templateName: pyml_custom.py - - name: requirements.txt - templateName: pyml_requirements.txt - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:custom": + input: + - name: pyml_custom.py + templateName: pyml_custom.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:data_input:read_csv:pandas": - 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 - applicationName: python - executableName: python + "pyml:data_input:read_csv:pandas": + 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 + applicationName: python + executableName: python - "pyml:data_input:train_test_split:sklearn": - 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 - applicationName: python - executableName: python + "pyml:data_input:train_test_split:sklearn": + 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 + applicationName: python + executableName: python - "pyml:pre_processing:min_max_scaler:sklearn": - input: - - name: pre_processing_min_max_sklearn.py - templateName: pre_processing_min_max_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:pre_processing:min_max_scaler:sklearn": + input: + - name: pre_processing_min_max_sklearn.py + templateName: pre_processing_min_max_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:pre_processing:remove_duplicates:pandas": - input: - - name: pre_processing_remove_duplicates_pandas.py - templateName: pre_processing_remove_duplicates_pandas.py - - name: requirements.txt - templateName: pyml_requirements.txt - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:pre_processing:remove_duplicates:pandas": + input: + - name: pre_processing_remove_duplicates_pandas.py + templateName: pre_processing_remove_duplicates_pandas.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:pre_processing:remove_missing:pandas": - input: - - name: pre_processing_remove_missing_pandas.py - templateName: pre_processing_remove_missing_pandas.py - - name: requirements.txt - templateName: pyml_requirements.txt - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:pre_processing:remove_missing:pandas": + input: + - name: pre_processing_remove_missing_pandas.py + templateName: pre_processing_remove_missing_pandas.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:pre_processing:standardization:sklearn": - input: - - name: pre_processing_standardization_sklearn.py - templateName: pre_processing_standardization_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:pre_processing:standardization:sklearn": + input: + - name: pre_processing_standardization_sklearn.py + templateName: pre_processing_standardization_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:adaboosted_trees_regression:sklearn": - input: - - name: model_adaboosted_trees_regression_sklearn.py - templateName: model_adaboosted_trees_regression_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - monitors: - - standard_output - results: - - "workflow:pyml_predict" - applicationName: python - executableName: python + "pyml:model:adaboosted_trees_regression:sklearn": + input: + - name: model_adaboosted_trees_regression_sklearn.py + templateName: model_adaboosted_trees_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + monitors: + - standard_output + results: + - "workflow:pyml_predict" + applicationName: python + executableName: python - "pyml:model:bagged_trees_regression:sklearn": - input: - - name: model_bagged_trees_regression_sklearn.py - templateName: model_bagged_trees_regression_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:bagged_trees_regression:sklearn": + input: + - name: model_bagged_trees_regression_sklearn.py + templateName: model_bagged_trees_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:gradboosted_trees_regression:sklearn": - input: - - name: model_gradboosted_trees_regression_sklearn.py - templateName: model_gradboosted_trees_regression_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:gradboosted_trees_regression:sklearn": + input: + - name: model_gradboosted_trees_regression_sklearn.py + templateName: model_gradboosted_trees_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:extreme_gradboosted_trees_regression:sklearn": - input: - - name: model_extreme_gradboosted_trees_regression_sklearn.py - templateName: model_extreme_gradboosted_trees_regression_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:extreme_gradboosted_trees_regression:sklearn": + input: + - name: model_extreme_gradboosted_trees_regression_sklearn.py + templateName: model_extreme_gradboosted_trees_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:k_means_clustering:sklearn": - input: - - name: model_k_means_clustering_sklearn.py - templateName: model_k_means_clustering_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:k_means_clustering:sklearn": + input: + - name: model_k_means_clustering_sklearn.py + templateName: model_k_means_clustering_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:kernel_ridge_regression:sklearn": - input: - - name: model_kernel_ridge_regression_sklearn.py - templateName: model_kernel_ridge_regression_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:kernel_ridge_regression:sklearn": + input: + - name: model_kernel_ridge_regression_sklearn.py + templateName: model_kernel_ridge_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:lasso_regression:sklearn": - input: - - name: model_lasso_regression_sklearn.py - templateName: model_lasso_regression_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:lasso_regression:sklearn": + input: + - name: model_lasso_regression_sklearn.py + templateName: model_lasso_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:multilayer_perceptron:sklearn": - input: - - name: model_mlp_sklearn.py - templateName: model_mlp_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:multilayer_perceptron:sklearn": + input: + - name: model_mlp_sklearn.py + templateName: model_mlp_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:random_forest_classification:sklearn": - input: - - name: model_random_forest_classification_sklearn.py - templateName: model_random_forest_classification_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:random_forest_classification:sklearn": + input: + - name: model_random_forest_classification_sklearn.py + templateName: model_random_forest_classification_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:gradboosted_trees_classification:sklearn": - input: - - name: model_gradboosted_trees_classification_sklearn.py - templateName: model_gradboosted_trees_classification_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:gradboosted_trees_classification:sklearn": + input: + - name: model_gradboosted_trees_classification_sklearn.py + templateName: model_gradboosted_trees_classification_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:extreme_gradboosted_trees_classification:sklearn": - input: - - name: model_extreme_gradboosted_trees_classification_sklearn.py - templateName: model_extreme_gradboosted_trees_classification_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:extreme_gradboosted_trees_classification:sklearn": + input: + - name: model_extreme_gradboosted_trees_classification_sklearn.py + templateName: model_extreme_gradboosted_trees_classification_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:random_forest_regression:sklearn": - input: - - name: model_random_forest_regression_sklearn.py - templateName: model_random_forest_regression_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:random_forest_regression:sklearn": + input: + - name: model_random_forest_regression_sklearn.py + templateName: model_random_forest_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:model:ridge_regression:sklearn": - input: - - name: model_ridge_regression_sklearn.py - templateName: model_ridge_regression_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - "workflow:pyml_predict" - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:model:ridge_regression:sklearn": + input: + - name: model_ridge_regression_sklearn.py + templateName: model_ridge_regression_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - "workflow:pyml_predict" + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:post_processing:parity_plot:matplotlib": - input: - - name: post_processing_parity_plot_matplotlib.py - templateName: post_processing_parity_plot_matplotlib.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - file_content - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:post_processing:parity_plot:matplotlib": + input: + - name: post_processing_parity_plot_matplotlib.py + templateName: post_processing_parity_plot_matplotlib.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - file_content + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:post_processing:pca_2d_clusters:matplotlib": - input: - - name: post_processing_pca_2d_clusters_matplotlib.py - templateName: post_processing_pca_2d_clusters_matplotlib.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - file_content - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:post_processing:pca_2d_clusters:matplotlib": + input: + - name: post_processing_pca_2d_clusters_matplotlib.py + templateName: post_processing_pca_2d_clusters_matplotlib.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - file_content + monitors: + - standard_output + applicationName: python + executableName: python - "pyml:post_processing:roc_curve:sklearn": - input: - - name: post_processing_roc_curve_sklearn.py - templateName: post_processing_roc_curve_sklearn.py - - name: requirements.txt - templateName: pyml_requirements.txt - results: - - file_content - monitors: - - standard_output - applicationName: python - executableName: python + "pyml:post_processing:roc_curve:sklearn": + input: + - name: post_processing_roc_curve_sklearn.py + templateName: post_processing_roc_curve_sklearn.py + - name: requirements.txt + templateName: pyml_requirements.txt + results: + - file_content + monitors: + - standard_output + applicationName: python + executableName: python diff --git a/executables/shell/sh.yml b/executables/shell/sh.yml index 2fd83384..98f27ffc 100644 --- a/executables/shell/sh.yml +++ b/executables/shell/sh.yml @@ -1,65 +1,65 @@ isDefault: true monitors: - - standard_output + - standard_output results: - - atomic_forces - - band_gaps - - band_structure - - density_of_states - - fermi_energy - - phonon_dispersions - - phonon_dos - - pressure - - stress_tensor - - total_energy - - total_energy_contributions - - total_force - - zero_point_energy - - final_structure - - magnetic_moments - - reaction_energy_barrier - - reaction_energy_profile - - potential_profile - - charge_density_profile + - atomic_forces + - band_gaps + - band_structure + - density_of_states + - fermi_energy + - phonon_dispersions + - phonon_dos + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + - zero_point_energy + - final_structure + - magnetic_moments + - reaction_energy_barrier + - reaction_energy_profile + - potential_profile + - charge_density_profile flavors: - hello_world: - isDefault: true - input: - - name: hello_world.sh - monitors: - - standard_output - applicationName: shell - executableName: sh + hello_world: + isDefault: true + input: + - name: hello_world.sh + monitors: + - standard_output + applicationName: shell + executableName: sh - job_espresso_pw_scf: - input: - - name: job_espresso_pw_scf.sh - monitors: - - standard_output - applicationName: shell - executableName: sh + job_espresso_pw_scf: + input: + - name: job_espresso_pw_scf.sh + monitors: + - standard_output + applicationName: shell + executableName: sh - espresso_link_outdir_save: - input: - - name: espresso_link_outdir_save.sh - monitors: - - standard_output - applicationName: shell - executableName: sh + espresso_link_outdir_save: + input: + - name: espresso_link_outdir_save.sh + monitors: + - standard_output + applicationName: shell + executableName: sh - espresso_collect_dynmat: - input: - - name: espresso_collect_dynmat.sh - monitors: - - standard_output - applicationName: shell - executableName: sh + espresso_collect_dynmat: + input: + - name: espresso_collect_dynmat.sh + monitors: + - standard_output + applicationName: shell + executableName: sh - bash_vasp_prepare_neb_images: - isMultiMaterial: true - input: - - name: bash_vasp_prepare_neb_images.sh - monitors: - - standard_output - applicationName: shell - executableName: sh + bash_vasp_prepare_neb_images: + isMultiMaterial: true + input: + - name: bash_vasp_prepare_neb_images.sh + monitors: + - standard_output + applicationName: shell + executableName: sh diff --git a/executables/tree.yml b/executables/tree.yml index 2605f322..5956fe0f 100644 --- a/executables/tree.yml +++ b/executables/tree.yml @@ -1,26 +1,26 @@ espresso: - average.x: !include "executables/espresso/average.x.yml" - bands.x: !include "executables/espresso/bands.x.yml" - dos.x: !include "executables/espresso/dos.x.yml" - dynmat.x: !include "executables/espresso/dynmat.x.yml" - gw.x: !include "executables/espresso/gw.x.yml" - matdyn.x: !include "executables/espresso/matdyn.x.yml" - neb.x: !include "executables/espresso/neb.x.yml" - ph.x: !include "executables/espresso/ph.x.yml" - pp.x: !include "executables/espresso/pp.x.yml" - projwfc.x: !include "executables/espresso/projwfc.x.yml" - pw.x: !include "executables/espresso/pw.x.yml" - q2r.x: !include "executables/espresso/q2r.x.yml" + average.x: !include "executables/espresso/average.x.yml" + bands.x: !include "executables/espresso/bands.x.yml" + dos.x: !include "executables/espresso/dos.x.yml" + dynmat.x: !include "executables/espresso/dynmat.x.yml" + gw.x: !include "executables/espresso/gw.x.yml" + matdyn.x: !include "executables/espresso/matdyn.x.yml" + neb.x: !include "executables/espresso/neb.x.yml" + ph.x: !include "executables/espresso/ph.x.yml" + pp.x: !include "executables/espresso/pp.x.yml" + projwfc.x: !include "executables/espresso/projwfc.x.yml" + pw.x: !include "executables/espresso/pw.x.yml" + q2r.x: !include "executables/espresso/q2r.x.yml" jupyterLab: - jupyter: !include "executables/jupyterLab/jupyter.yml" + jupyter: !include "executables/jupyterLab/jupyter.yml" exabyteml: - score: !include "executables/exabyteml/score.yml" - train: !include "executables/exabyteml/train.yml" + score: !include "executables/exabyteml/score.yml" + train: !include "executables/exabyteml/train.yml" nwchem: - nwchem: !include "executables/nwchem/nwchem.yml" + nwchem: !include "executables/nwchem/nwchem.yml" python: - python: !include "executables/python/python.yml" + python: !include "executables/python/python.yml" shell: - sh: !include "executables/shell/sh.yml" + sh: !include "executables/shell/sh.yml" vasp: - vasp: !include "executables/vasp/vasp.yml" + vasp: !include "executables/vasp/vasp.yml" diff --git a/executables/vasp/vasp.yml b/executables/vasp/vasp.yml index 69e2262c..726b02f3 100644 --- a/executables/vasp/vasp.yml +++ b/executables/vasp/vasp.yml @@ -1,314 +1,314 @@ isDefault: true postProcessors: - - error_handler - - prepare_restart - - remove_non_zero_weight_kpoints + - error_handler + - prepare_restart + - remove_non_zero_weight_kpoints monitors: - - standard_output - - convergence_ionic - - convergence_electronic + - standard_output + - convergence_ionic + - convergence_electronic results: - - atomic_forces - - band_gaps - - band_structure - - density_of_states - - fermi_energy - - pressure - - stress_tensor - - total_energy - - total_energy_contributions - - total_force - - zero_point_energy - - final_structure - - magnetic_moments - - reaction_energy_barrier - - reaction_energy_profile - - potential_profile - - charge_density_profile + - atomic_forces + - band_gaps + - band_structure + - density_of_states + - fermi_energy + - pressure + - stress_tensor + - total_energy + - total_energy_contributions + - total_force + - zero_point_energy + - final_structure + - magnetic_moments + - reaction_energy_barrier + - reaction_energy_profile + - potential_profile + - charge_density_profile flavors: - vasp: - isDefault: true - input: - - name: INCAR - - name: KPOINTS - - name: POSCAR - results: - - total_energy - - total_energy_contributions - - pressure - - fermi_energy - - atomic_forces - - total_force - - stress_tensor - monitors: - - standard_output - - convergence_electronic - applicationName: vasp - executableName: vasp + vasp: + isDefault: true + input: + - name: INCAR + - name: KPOINTS + - name: POSCAR + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp - vasp_bands: - input: - - name: INCAR - templateName: INCAR_BANDS - - name: KPOINTS - templateName: KPOINTS_BANDS - - name: POSCAR - templateName: "" - results: - - band_structure - monitors: - - standard_output - - convergence_electronic - applicationName: vasp - executableName: vasp + vasp_bands: + input: + - name: INCAR + templateName: INCAR_BANDS + - name: KPOINTS + templateName: KPOINTS_BANDS + - name: POSCAR + templateName: "" + results: + - band_structure + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp - vasp_nscf: - input: - - name: INCAR - templateName: INCAR_BANDS - - name: KPOINTS - templateName: KPOINTS - - name: POSCAR - templateName: POSCAR - results: - - band_gaps - - fermi_energy - monitors: - - standard_output - - convergence_electronic - applicationName: vasp - executableName: vasp + vasp_nscf: + input: + - name: INCAR + templateName: INCAR_BANDS + - name: KPOINTS + templateName: KPOINTS + - name: POSCAR + templateName: POSCAR + results: + - band_gaps + - fermi_energy + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp - vasp_hse: - isDefault: false - input: - - name: INCAR - templateName: INCAR_HSE - - name: KPOINTS - - name: POSCAR - results: - - total_energy - - total_energy_contributions - - pressure - - fermi_energy - - atomic_forces - - total_force - - stress_tensor - monitors: - - standard_output - - convergence_electronic - applicationName: vasp - executableName: vasp + vasp_hse: + isDefault: false + input: + - name: INCAR + templateName: INCAR_HSE + - name: KPOINTS + - name: POSCAR + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp - vasp_bands_hse: - isDefault: false - input: - - name: INCAR - templateName: INCAR_BANDS_HSE - - name: KPOINTS - templateName: KPOINTS_BANDS - - name: POSCAR - templateName: "" - results: - - band_structure - monitors: - - standard_output - - convergence_electronic - applicationName: vasp - executableName: vasp + vasp_bands_hse: + isDefault: false + input: + - name: INCAR + templateName: INCAR_BANDS_HSE + - name: KPOINTS + templateName: KPOINTS_BANDS + - name: POSCAR + templateName: "" + results: + - band_structure + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp - vasp_nscf_hse: - isDefault: false - input: - - name: INCAR - templateName: INCAR_BANDS_HSE - - name: KPOINTS - templateName: KPOINTS - - name: POSCAR - templateName: POSCAR - results: - - band_gaps - - fermi_energy - monitors: - - standard_output - - convergence_electronic - applicationName: vasp - executableName: vasp + vasp_nscf_hse: + isDefault: false + input: + - name: INCAR + templateName: INCAR_BANDS_HSE + - name: KPOINTS + templateName: KPOINTS + - name: POSCAR + templateName: POSCAR + results: + - band_gaps + - fermi_energy + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp - vasp_relax: - input: - - name: INCAR - templateName: INCAR_RELAX - - name: KPOINTS - templateName: KPOINTS - - name: POSCAR - templateName: POSCAR - results: - - total_energy - - atomic_forces - - fermi_energy - - pressure - - stress_tensor - - total_force - - final_structure - monitors: - - standard_output - - convergence_electronic - - convergence_ionic - postProcessors: - - prepare_restart - applicationName: vasp - executableName: vasp + vasp_relax: + input: + - name: INCAR + templateName: INCAR_RELAX + - name: KPOINTS + templateName: KPOINTS + - name: POSCAR + templateName: POSCAR + results: + - total_energy + - atomic_forces + - fermi_energy + - pressure + - stress_tensor + - total_force + - final_structure + monitors: + - standard_output + - convergence_electronic + - convergence_ionic + postProcessors: + - prepare_restart + applicationName: vasp + executableName: vasp - vasp_vc_relax: - input: - - name: INCAR - templateName: INCAR_VC_RELAX - - name: KPOINTS - templateName: KPOINTS - - name: POSCAR - templateName: POSCAR - results: - - total_energy - - atomic_forces - - fermi_energy - - pressure - - stress_tensor - - total_force - - final_structure - monitors: - - standard_output - - convergence_electronic - - convergence_ionic - postProcessors: - - prepare_restart - applicationName: vasp - executableName: vasp + vasp_vc_relax: + input: + - name: INCAR + templateName: INCAR_VC_RELAX + - name: KPOINTS + templateName: KPOINTS + - name: POSCAR + templateName: POSCAR + results: + - total_energy + - atomic_forces + - fermi_energy + - pressure + - stress_tensor + - total_force + - final_structure + monitors: + - standard_output + - convergence_electronic + - convergence_ionic + postProcessors: + - prepare_restart + applicationName: vasp + executableName: vasp - vasp_zpe: - input: - - name: INCAR - templateName: INCAR_ZPE - - name: KPOINTS - templateName: KPOINTS - - name: POSCAR - templateName: POSCAR - results: - - total_energy - - fermi_energy - - pressure - - atomic_forces - - stress_tensor - - total_force - - zero_point_energy - monitors: - - standard_output - - convergence_electronic - - convergence_ionic - applicationName: vasp - executableName: vasp + vasp_zpe: + input: + - name: INCAR + templateName: INCAR_ZPE + - name: KPOINTS + templateName: KPOINTS + - name: POSCAR + templateName: POSCAR + results: + - total_energy + - fermi_energy + - pressure + - atomic_forces + - stress_tensor + - total_force + - zero_point_energy + monitors: + - standard_output + - convergence_electronic + - convergence_ionic + applicationName: vasp + executableName: vasp - vasp_kpt_conv: - # kpoint convergence => not including kgrid mixin - input: - - name: INCAR - templateName: INCAR - - name: KPOINTS - templateName: KPOINTS_CONV - - name: POSCAR - templateName: POSCAR - results: - - total_energy - - total_energy_contributions - - pressure - - fermi_energy - - atomic_forces - - total_force - - stress_tensor - monitors: - - standard_output - - convergence_electronic - applicationName: vasp - executableName: vasp + vasp_kpt_conv: + # kpoint convergence => not including kgrid mixin + input: + - name: INCAR + templateName: INCAR + - name: KPOINTS + templateName: KPOINTS_CONV + - name: POSCAR + templateName: POSCAR + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp - vasp_vc_relax_conv: - input: - - name: INCAR - templateName: INCAR_VC_RELAX - - name: KPOINTS - templateName: KPOINTS_CONV - - name: POSCAR - templateName: POSCAR - results: - - total_energy - - total_energy_contributions - - pressure - - fermi_energy - - atomic_forces - - total_force - - stress_tensor - monitors: - - standard_output - - convergence_electronic - - convergence_ionic - applicationName: vasp - executableName: vasp + vasp_vc_relax_conv: + input: + - name: INCAR + templateName: INCAR_VC_RELAX + - name: KPOINTS + templateName: KPOINTS_CONV + - name: POSCAR + templateName: POSCAR + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + - convergence_ionic + applicationName: vasp + executableName: vasp - vasp_neb: - isMultiMaterial: true - input: - - name: INCAR - templateName: INCAR_NEB - - name: KPOINTS - templateName: KPOINTS - results: - - reaction_energy_barrier - - reaction_energy_profile - monitors: - - standard_output - applicationName: vasp - executableName: vasp + vasp_neb: + isMultiMaterial: true + input: + - name: INCAR + templateName: INCAR_NEB + - name: KPOINTS + templateName: KPOINTS + results: + - reaction_energy_barrier + - reaction_energy_profile + monitors: + - standard_output + applicationName: vasp + executableName: vasp - vasp_neb_initial: - isMultiMaterial: true - input: - - name: INCAR - templateName: INCAR_NEB_INITIAL_FINAL - - name: KPOINTS - - name: POSCAR - templateName: POSCAR_NEB_INITIAL - results: - - total_energy - - total_energy_contributions - - pressure - - fermi_energy - - atomic_forces - - total_force - - stress_tensor - monitors: - - standard_output - - convergence_electronic - applicationName: vasp - executableName: vasp + vasp_neb_initial: + isMultiMaterial: true + input: + - name: INCAR + templateName: INCAR_NEB_INITIAL_FINAL + - name: KPOINTS + - name: POSCAR + templateName: POSCAR_NEB_INITIAL + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp - vasp_neb_final: - isMultiMaterial: true - input: - - name: INCAR - templateName: INCAR_NEB_INITIAL_FINAL - - name: KPOINTS - - name: POSCAR - templateName: POSCAR_NEB_FINAL - results: - - total_energy - - total_energy_contributions - - pressure - - fermi_energy - - atomic_forces - - total_force - - stress_tensor - monitors: - - standard_output - - convergence_electronic - applicationName: vasp - executableName: vasp + vasp_neb_final: + isMultiMaterial: true + input: + - name: INCAR + templateName: INCAR_NEB_INITIAL_FINAL + - name: KPOINTS + - name: POSCAR + templateName: POSCAR_NEB_FINAL + results: + - total_energy + - total_energy_contributions + - pressure + - fermi_energy + - atomic_forces + - total_force + - stress_tensor + monitors: + - standard_output + - convergence_electronic + applicationName: vasp + executableName: vasp diff --git a/methods/espresso/5.2.1.yml b/methods/espresso/5.2.1.yml index ff52e6eb..61fdbb88 100644 --- a/methods/espresso/5.2.1.yml +++ b/methods/espresso/5.2.1.yml @@ -1,16 +1,16 @@ Default: pw.x: pw_scf: - - path: /qm/wf/undefined/pw/undefined - - regex: "\/qm\/wf\/undefined\/psp\/.*" - - regex: "\/qm\/wf\/undefined\/smearing\/.*" - - regex: "\/qm\/wf\/undefined\/tetrahedron\/.*" - - path: /opt/diff/ordern/cg/undefined - - path: /linalg/diag/undefined/davidson/undefined + - path: /qm/wf/undefined/pw/undefined + - regex: "\/qm\/wf\/undefined\/psp\/.*" + - regex: "\/qm\/wf\/undefined\/smearing\/.*" + - regex: "\/qm\/wf\/undefined\/tetrahedron\/.*" + - path: /opt/diff/ordern/cg/undefined + - path: /linalg/diag/undefined/davidson/undefined pw_scf_bands_hse: - - path: /qm/wf/undefined/pw/undefined - - regex: "\/qm\/wf\/undefined\/psp\/.*" - - regex: "\/qm\/wf\/undefined\/smearing\/.*" - - regex: "\/qm\/wf\/undefined\/tetrahedron\/.*" - - path: /opt/diff/ordern/cg/undefined - - path: /linalg/diag/undefined/davidson/undefined + - path: /qm/wf/undefined/pw/undefined + - regex: "\/qm\/wf\/undefined\/psp\/.*" + - regex: "\/qm\/wf\/undefined\/smearing\/.*" + - regex: "\/qm\/wf\/undefined\/tetrahedron\/.*" + - path: /opt/diff/ordern/cg/undefined + - path: /linalg/diag/undefined/davidson/undefined diff --git a/methods/vasp/5.3.5.yml b/methods/vasp/5.3.5.yml index 7fa8eacd..784b8882 100644 --- a/methods/vasp/5.3.5.yml +++ b/methods/vasp/5.3.5.yml @@ -1,8 +1,8 @@ Default: + vasp: vasp: - vasp: - - path: /qm/wf/undefined/pw/undefined - - path: /qm/wf/undefined/psp/paw - - regex: "\/qm\/wf\/undefined\/smearing\/(fermi-dirac|gaussian|methfessel-paxton)" - - regex: "\/qm\/wf\/undefined\/tetrahedron\/(linear|bloechl)" + - path: /qm/wf/undefined/pw/undefined + - path: /qm/wf/undefined/psp/paw + - regex: "\/qm\/wf\/undefined\/smearing\/(fermi-dirac|gaussian|methfessel-paxton)" + - regex: "\/qm\/wf\/undefined\/tetrahedron\/(linear|bloechl)" From a65d4cadae46d27be91ac22621acd7dd0ce1b725 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 8 Aug 2023 10:37:10 -0700 Subject: [PATCH 37/52] chore: fix typo in monitor name --- executables/espresso/pw.x.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/executables/espresso/pw.x.yml b/executables/espresso/pw.x.yml index 00ffb83f..8ef01253 100644 --- a/executables/espresso/pw.x.yml +++ b/executables/espresso/pw.x.yml @@ -3,9 +3,9 @@ hasAdvancedComputeOptions: true postProcessors: - remove_non_zero_weight_kpoints monitors: - - standard_output" - - convergence_ionic" - - convergence_electronic" + - standard_output + - convergence_ionic + - convergence_electronic results: - atomic_forces - band_gaps From 840f29c75cee459fa4c81eb1f4c14c7fa939ea64 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 8 Aug 2023 10:37:54 -0700 Subject: [PATCH 38/52] chore: update generated JS files --- src/js/data/tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/data/tree.js b/src/js/data/tree.js index cf1ffa17..fdba23bc 100644 --- a/src/js/data/tree.js +++ b/src/js/data/tree.js @@ -200,7 +200,7 @@ module.exports = { isDefault: true, hasAdvancedComputeOptions: true, postProcessors: ["remove_non_zero_weight_kpoints"], - monitors: ['standard_output"', 'convergence_ionic"', 'convergence_electronic"'], + monitors: ["standard_output", "convergence_ionic", "convergence_electronic"], results: [ "atomic_forces", "band_gaps", From 525bfc163053d2c0e66a7ee9a61680f781679c1e Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 8 Aug 2023 11:14:37 -0700 Subject: [PATCH 39/52] fix: jupyter lab monitor enum --- executables/jupyterLab/jupyter.yml | 4 ++-- src/js/data/tree.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/executables/jupyterLab/jupyter.yml b/executables/jupyterLab/jupyter.yml index c9e9703c..0a324241 100644 --- a/executables/jupyterLab/jupyter.yml +++ b/executables/jupyterLab/jupyter.yml @@ -1,7 +1,7 @@ isDefault: true monitors: - standard_output - - jupyterNotebookEndpoint + - jupyter_notebook_endpoint results: [] flavors: notebook: @@ -11,6 +11,6 @@ flavors: templateName: requirements.txt monitors: - standard_output - - jupyterNotebookEndpoint + - jupyter_notebook_endpoint applicationName: jupyterLab executableName: jupyter diff --git a/src/js/data/tree.js b/src/js/data/tree.js index fdba23bc..e35e0079 100644 --- a/src/js/data/tree.js +++ b/src/js/data/tree.js @@ -384,13 +384,13 @@ module.exports = { jupyterLab: { jupyter: { isDefault: true, - monitors: ["standard_output", "jupyterNotebookEndpoint"], + monitors: ["standard_output", "jupyter_notebook_endpoint"], results: [], flavors: { notebook: { isDefault: true, input: [{ name: "requirements.txt", templateName: "requirements.txt" }], - monitors: ["standard_output", "jupyterNotebookEndpoint"], + monitors: ["standard_output", "jupyter_notebook_endpoint"], applicationName: "jupyterLab", executableName: "jupyter", }, From 08ec995fba30c30d43393cdbf1d4c0593a90ac8f Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 10 Aug 2023 09:33:27 -0700 Subject: [PATCH 40/52] chore: remove LFS hooks and .gitattributes --- .gitattributes | 0 .husky/post-checkout | 3 --- .husky/post-commit | 3 --- .husky/post-merge | 3 --- .husky/pre-push | 3 --- 5 files changed, 12 deletions(-) delete mode 100644 .gitattributes delete mode 100755 .husky/post-checkout delete mode 100755 .husky/post-commit delete mode 100755 .husky/post-merge delete mode 100755 .husky/pre-push diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index e69de29b..00000000 diff --git a/.husky/post-checkout b/.husky/post-checkout deleted file mode 100755 index cab40f26..00000000 --- a/.husky/post-checkout +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; } -git lfs post-checkout "$@" diff --git a/.husky/post-commit b/.husky/post-commit deleted file mode 100755 index 9443f416..00000000 --- a/.husky/post-commit +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n"; exit 2; } -git lfs post-commit "$@" diff --git a/.husky/post-merge b/.husky/post-merge deleted file mode 100755 index 828b7089..00000000 --- a/.husky/post-merge +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; } -git lfs post-merge "$@" diff --git a/.husky/pre-push b/.husky/pre-push deleted file mode 100755 index 81a9cc63..00000000 --- a/.husky/pre-push +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n"; exit 2; } -git lfs pre-push "$@" From ef521355fecb713a697541aa9cc5295de8bed8d3 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 10 Aug 2023 09:47:40 -0700 Subject: [PATCH 41/52] style: make version comments more pronounced --- applications/espresso.yml | 22 +++++++++++----------- applications/vasp.yml | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/applications/espresso.yml b/applications/espresso.yml index 154bd02b..ca7124c0 100644 --- a/applications/espresso.yml +++ b/applications/espresso.yml @@ -3,7 +3,7 @@ shortName: qe summary: Quantum Espresso defaultVersion: "5.4.0" versions: - # version 5.2.1 + #### version 5.2.1 #### - version: "5.2.1" isDefault: true hasAdvancedComputeOptions: true @@ -15,7 +15,7 @@ versions: isDefault: false build: Intel hasAdvancedComputeOptions: true - # version 5.4.0 + #### version 5.4.0 #### - version: "5.4.0" isDefault: true hasAdvancedComputeOptions: true @@ -27,7 +27,7 @@ versions: isDefault: false build: Intel hasAdvancedComputeOptions: true - # version 6.0.0 + #### version 6.0.0 #### - version: "6.0.0" isDefault: true hasAdvancedComputeOptions: true @@ -39,7 +39,7 @@ versions: isDefault: false build: Intel hasAdvancedComputeOptions: true - # version 6.3 + #### version 6.3 #### - version: "6.3" isDefault: true hasAdvancedComputeOptions: true @@ -51,27 +51,27 @@ versions: isDefault: false build: Intel hasAdvancedComputeOptions: true - # version 6.4.1 + #### version 6.4.1 #### - version: "6.4.1" isDefault: true hasAdvancedComputeOptions: true - # version 6.5.0 + #### version 6.5.0 #### - version: "6.5.0" isDefault: true hasAdvancedComputeOptions: true - # version 6.6.0 + #### version 6.6.0 #### - version: "6.6.0" isDefault: true hasAdvancedComputeOptions: true - # version 6.7.0 + #### version 6.7.0 #### - version: "6.7.0" isDefault: true hasAdvancedComputeOptions: true - # version 6.8.0 + #### version 6.8.0 #### - version: "6.8.0" isDefault: true hasAdvancedComputeOptions: true - # version 7.0 + #### version 7.0 #### - version: "7.0" isDefault: true hasAdvancedComputeOptions: true @@ -83,7 +83,7 @@ versions: isDefault: false build: Intel hasAdvancedComputeOptions: true - # version 7.2 + #### version 7.2 #### - version: "7.2" isDefault: true hasAdvancedComputeOptions: true diff --git a/applications/vasp.yml b/applications/vasp.yml index 258f1e9e..29a65906 100644 --- a/applications/vasp.yml +++ b/applications/vasp.yml @@ -4,7 +4,7 @@ summary: Vienna Ab-initio Simulation Package defaultVersion: "5.3.5" isLicensed: true versions: - # version 5.3.5 + #### version 5.3.5 #### - version: "5.3.5" isDefault: true - version: "5.3.5" @@ -13,7 +13,7 @@ versions: - version: "5.3.5" isDefault: false build: VTST - # version 5.4.4 + #### version 5.4.4 #### - version: "5.4.4" isDefault: true - version: "5.4.4" From 892466d0bd5c59463678960b00b0a95e71c735be Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 10 Aug 2023 09:49:30 -0700 Subject: [PATCH 42/52] chore: turn off prettier for generated files --- .prettierignore | 2 + src/js/data/application_data.js | 142 +--- src/js/data/templates.js | 724 +------------------ src/js/data/tree.js | 1144 +------------------------------ 4 files changed, 5 insertions(+), 2007 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..e0015981 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +# Ignore auto-generated files +src/js/data/* diff --git a/src/js/data/application_data.js b/src/js/data/application_data.js index 9ff08113..69db0efc 100644 --- a/src/js/data/application_data.js +++ b/src/js/data/application_data.js @@ -1,142 +1,2 @@ // eslint-disable -module.exports = { - applicationData: { - espresso: { - name: "espresso", - shortName: "qe", - summary: "Quantum Espresso", - defaultVersion: "5.4.0", - versions: [ - { version: "5.2.1", isDefault: true, hasAdvancedComputeOptions: true }, - { - version: "5.2.1", - isDefault: false, - build: "GNU", - hasAdvancedComputeOptions: true, - }, - { - version: "5.2.1", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - { version: "5.4.0", isDefault: true, hasAdvancedComputeOptions: true }, - { - version: "5.4.0", - isDefault: false, - build: "GNU", - hasAdvancedComputeOptions: true, - }, - { - version: "5.4.0", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - { version: "6.0.0", isDefault: true, hasAdvancedComputeOptions: true }, - { - version: "6.0.0", - isDefault: false, - build: "GNU", - hasAdvancedComputeOptions: true, - }, - { - version: "6.0.0", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - { version: "6.3", isDefault: true, hasAdvancedComputeOptions: true }, - { version: "6.3", isDefault: false, build: "GNU", hasAdvancedComputeOptions: true }, - { - version: "6.3", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - { version: "6.4.1", isDefault: true, hasAdvancedComputeOptions: true }, - { version: "6.5.0", isDefault: true, hasAdvancedComputeOptions: true }, - { version: "6.6.0", isDefault: true, hasAdvancedComputeOptions: true }, - { version: "6.7.0", isDefault: true, hasAdvancedComputeOptions: true }, - { version: "6.8.0", isDefault: true, hasAdvancedComputeOptions: true }, - { version: "7.0", isDefault: true, hasAdvancedComputeOptions: true }, - { version: "7.0", isDefault: false, build: "GNU", hasAdvancedComputeOptions: true }, - { - version: "7.0", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - { version: "7.2", isDefault: true, hasAdvancedComputeOptions: true }, - { - version: "7.2", - isDefault: false, - build: "Intel", - hasAdvancedComputeOptions: true, - }, - ], - }, - exabyteml: { - name: "exabyteml", - shortName: "ml", - summary: "Exabyte Machine Learning Engine", - defaultVersion: "0.2.0", - versions: [{ version: "0.2.0", isDefault: true }], - }, - jupyterLab: { - name: "jupyterLab", - shortName: "jl", - summary: "JupyterLab", - defaultVersion: "3.0.3", - versions: [ - { version: "3.0.3", isDefault: true }, - { version: "3.0.3", isDefault: false, build: "with-pre-installed-packages" }, - ], - }, - nwchem: { - name: "nwchem", - shortName: "nwchem", - summary: "NWChem", - defaultVersion: "7.0.2", - versions: [{ version: "7.0.2", isDefault: true }, { version: "6.6" }], - }, - python: { - name: "python", - shortName: "py", - summary: "Python Script", - defaultVersion: "3.8.6", - versions: [ - { version: "3.6.12" }, - { version: "3.7.9" }, - { version: "3.8.6", isDefault: true }, - { version: "3.9.1" }, - { version: "anaconda3-5.2.0" }, - ], - }, - shell: { - name: "shell", - shortName: "sh", - summary: "Shell Script", - defaultVersion: "4.2.46", - versions: [{ version: "4.2.46", isDefault: true }], - }, - vasp: { - name: "vasp", - shortName: "vasp", - summary: "Vienna Ab-initio Simulation Package", - defaultVersion: "5.3.5", - isLicensed: true, - versions: [ - { version: "5.3.5", isDefault: true }, - { version: "5.3.5", isDefault: false, build: "Non-collinear" }, - { version: "5.3.5", isDefault: false, build: "VTST" }, - { version: "5.4.4", isDefault: true }, - { version: "5.4.4", isDefault: false, build: "Gamma" }, - { version: "5.4.4", isDefault: false, build: "Non-collinear" }, - { version: "5.4.4", isDefault: false, build: "VTST" }, - { version: "5.4.4", isDefault: false, build: "VTST-Gamma" }, - { version: "5.4.4", isDefault: false, build: "VTST-Non-collinear" }, - ], - }, - }, -}; +module.exports = { applicationData: { "espresso":{ "name":"espresso","shortName":"qe","summary":"Quantum Espresso","defaultVersion":"5.4.0","versions":[{ "version":"5.2.1","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"5.2.1","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true },{ "version":"5.2.1","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true },{ "version":"5.4.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"5.4.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true },{ "version":"5.4.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true },{ "version":"6.0.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.0.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true },{ "version":"6.0.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true },{ "version":"6.3","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.3","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true },{ "version":"6.3","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true },{ "version":"6.4.1","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.5.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.6.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.7.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.8.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"7.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"7.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true },{ "version":"7.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true },{ "version":"7.2","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"7.2","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true }] },"exabyteml":{ "name":"exabyteml","shortName":"ml","summary":"Exabyte Machine Learning Engine","defaultVersion":"0.2.0","versions":[{ "version":"0.2.0","isDefault":true }] },"jupyterLab":{ "name":"jupyterLab","shortName":"jl","summary":"JupyterLab","defaultVersion":"3.0.3","versions":[{ "version":"3.0.3","isDefault":true },{ "version":"3.0.3","isDefault":false,"build":"with-pre-installed-packages" }] },"nwchem":{ "name":"nwchem","shortName":"nwchem","summary":"NWChem","defaultVersion":"7.0.2","versions":[{ "version":"7.0.2","isDefault":true },{ "version":"6.6" }] },"python":{ "name":"python","shortName":"py","summary":"Python Script","defaultVersion":"3.8.6","versions":[{ "version":"3.6.12" },{ "version":"3.7.9" },{ "version":"3.8.6","isDefault":true },{ "version":"3.9.1" },{ "version":"anaconda3-5.2.0" }] },"shell":{ "name":"shell","shortName":"sh","summary":"Shell Script","defaultVersion":"4.2.46","versions":[{ "version":"4.2.46","isDefault":true }] },"vasp":{ "name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","defaultVersion":"5.3.5","isLicensed":true,"versions":[{ "version":"5.3.5","isDefault":true },{ "version":"5.3.5","isDefault":false,"build":"Non-collinear" },{ "version":"5.3.5","isDefault":false,"build":"VTST" },{ "version":"5.4.4","isDefault":true },{ "version":"5.4.4","isDefault":false,"build":"Gamma" },{ "version":"5.4.4","isDefault":false,"build":"Non-collinear" },{ "version":"5.4.4","isDefault":false,"build":"VTST" },{ "version":"5.4.4","isDefault":false,"build":"VTST-Gamma" },{ "version":"5.4.4","isDefault":false,"build":"VTST-Non-collinear" }] } } } \ No newline at end of file diff --git a/src/js/data/templates.js b/src/js/data/templates.js index a449a842..330f98a7 100644 --- a/src/js/data/templates.js +++ b/src/js/data/templates.js @@ -1,724 +1,2 @@ // eslint-disable -module.exports = { - allTemplates: [ - { - content: "1\npp.dat\n1.0\n3000\n3\n3.0000\n", - name: "average.in", - contextProviders: [], - applicationName: "espresso", - executableName: "average.x", - }, - { - 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\n", - name: "bands.in", - contextProviders: [], - applicationName: "espresso", - executableName: "bands.x", - }, - { - content: - "&DOS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n/\n\n", - name: "dos.in", - contextProviders: [], - applicationName: "espresso", - executableName: "dos.x", - }, - { - 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", - name: "dynmat_grid.in", - contextProviders: [{ name: "IGridFormDataManager" }], - applicationName: "espresso", - executableName: "dynmat.x", - }, - { - 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\n", - name: "gw_bands_plasmon_pole.in", - contextProviders: [ - { name: "KGridFormDataManager" }, - { name: "QGridFormDataManager" }, - { name: "ExplicitKPath2PIBAFormDataManager" }, - ], - applicationName: "espresso", - executableName: "gw.x", - }, - { - 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\n", - name: "gw_bands_full_frequency.in", - contextProviders: [ - { name: "KGridFormDataManager" }, - { name: "QGridFormDataManager" }, - { name: "ExplicitKPath2PIBAFormDataManager" }, - ], - applicationName: "espresso", - executableName: "gw.x", - }, - { - 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", - name: "matdyn_grid.in", - contextProviders: [{ name: "IGridFormDataManager" }], - applicationName: "espresso", - executableName: "matdyn.x", - }, - { - 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", - name: "matdyn_path.in", - contextProviders: [{ name: "IPathFormDataManager" }], - applicationName: "espresso", - executableName: "matdyn.x", - }, - { - 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 || 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", - name: "neb.in", - contextProviders: [ - { name: "KGridFormDataManager" }, - { name: "NEBFormDataManager" }, - { name: "QENEBInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - ], - applicationName: "espresso", - executableName: "neb.x", - }, - { - 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", - name: "ph_grid.in", - contextProviders: [{ name: "QGridFormDataManager" }], - applicationName: "espresso", - executableName: "ph.x", - }, - { - 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/\n{% for point in qpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor %}\n{% endfor %}\n", - name: "ph_path.in", - contextProviders: [{ name: "QPathFormDataManager" }], - applicationName: "espresso", - executableName: "ph.x", - }, - { - 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", - name: "ph_gamma.in", - contextProviders: [], - applicationName: "espresso", - executableName: "ph.x", - }, - { - 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", - name: "ph_init_qpoints.in", - contextProviders: [{ name: "QGridFormDataManager" }], - applicationName: "espresso", - executableName: "ph.x", - }, - { - 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", - name: "ph_grid_restart.in", - contextProviders: [{ name: "QGridFormDataManager" }], - applicationName: "espresso", - executableName: "ph.x", - }, - { - 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", - name: "ph_single_irr_qpt.in", - contextProviders: [{ name: "QGridFormDataManager" }], - applicationName: "espresso", - executableName: "ph.x", - }, - { - 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\n", - name: "pp_density.in", - contextProviders: [], - applicationName: "espresso", - executableName: "pp.x", - }, - { - content: - "&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n", - name: "pp_electrostatic_potential.in", - contextProviders: [], - applicationName: "espresso", - executableName: "pp.x", - }, - { - content: - "&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n", - name: "projwfc.in", - contextProviders: [], - applicationName: "espresso", - executableName: "projwfc.x", - }, - { - 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", - name: "pw_scf.in", - contextProviders: [ - { name: "KGridFormDataManager" }, - { name: "QEPWXInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - ], - applicationName: "espresso", - executableName: "pw.x", - }, - { - 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", - name: "pw_scf_bands_hse.in", - contextProviders: [ - { name: "QEPWXInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - { name: "QGridFormDataManager" }, - { name: "ExplicitKPathFormDataManager" }, - ], - applicationName: "espresso", - executableName: "pw.x", - }, - { - 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", - name: "pw_esm.in", - contextProviders: [ - { name: "KGridFormDataManager" }, - { name: "QEPWXInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - { name: "BoundaryConditionsFormDataManager" }, - ], - applicationName: "espresso", - executableName: "pw.x", - }, - { - 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", - name: "pw_esm_relax.in", - contextProviders: [ - { name: "KGridFormDataManager" }, - { name: "QEPWXInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - { name: "BoundaryConditionsFormDataManager" }, - ], - applicationName: "espresso", - executableName: "pw.x", - }, - { - 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", - name: "pw_scf_kpt_conv.in", - contextProviders: [ - { name: "QEPWXInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - ], - applicationName: "espresso", - executableName: "pw.x", - }, - { - 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/\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", - name: "pw_nscf.in", - contextProviders: [ - { name: "KGridFormDataManager" }, - { name: "QEPWXInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - ], - applicationName: "espresso", - executableName: "pw.x", - }, - { - 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", - name: "pw_relax.in", - contextProviders: [ - { name: "KGridFormDataManager" }, - { name: "QEPWXInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - ], - applicationName: "espresso", - executableName: "pw.x", - }, - { - 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", - name: "pw_vc_relax.in", - contextProviders: [ - { name: "KGridFormDataManager" }, - { name: "QEPWXInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - ], - applicationName: "espresso", - executableName: "pw.x", - }, - { - 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", - name: "pw_bands.in", - contextProviders: [ - { name: "KPathFormDataManager" }, - { name: "QEPWXInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - ], - applicationName: "espresso", - executableName: "pw.x", - }, - { - 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", - name: "pw_scf_hse.in", - contextProviders: [ - { name: "KGridFormDataManager" }, - { name: "QEPWXInputDataManager" }, - { name: "PlanewaveCutoffDataManager" }, - ], - applicationName: "espresso", - executableName: "pw.x", - }, - { - content: - "&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n", - name: "q2r.in", - contextProviders: [], - applicationName: "espresso", - executableName: "q2r.x", - }, - { - content: - "# ------------------------------------------------------------------------------- #\n# #\n# Example JupyterLab requirements #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. A Python virtual environment is created #\n# - in /scratch/$USER/$JOB_ID (for build: 'Default') #\n# - in /export/share/python/ (for build: 'with-pre-installed-packages') #\n# 3. This list is used to populate a Python virtual environment #\n# 4. JupyterLab is started #\n# #\n# For more information visit: #\n# - https://jupyterlab.readthedocs.io/en/stable/index.html #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Note: With the JupyterLab build 'with-pre-installed-packages', packages #\n# cannot be added during the notebook runtime. #\n# #\n# ------------------------------------------------------------------------------- #\n\njupyterlab==3.0.3\nnotebook>=6.2.0\nexabyte-api-client>=2020.10.19\nnumpy>=1.17.3\npandas>=1.1.4\nurllib3<2\n", - name: "requirements.txt", - contextProviders: [], - applicationName: "jupyterLab", - executableName: "jupyter", - }, - { - 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', - name: "nwchem_total_energy.inp", - contextProviders: [{ name: "NWChemInputDataManager" }], - applicationName: "nwchem", - executableName: "nwchem", - }, - { - 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 pymatgen as mg\n\nsi = mg.Element("Si")\n\nprint(si.atomic_mass)\n', - name: "hello_world.py", - contextProviders: [], - applicationName: "python", - executableName: "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# The package set below is a stable working set of pymatgen and #\n# all of its dependencies. Please adjust the list to include #\n# your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\n# Python 3 packages\ncertifi==2020.12.5\nchardet==4.0.0\ncycler==0.10.0\ndecorator==4.4.2\nfuture==0.18.2\nidna==2.10\nkiwisolver==1.3.1\nmatplotlib==3.3.4\nmonty==4.0.2\nmpmath==1.2.1\nnetworkx==2.5\nnumpy==1.19.5\npalettable==3.3.0\npandas==1.1.5\nPillow==8.1.0\nplotly==4.14.3\npymatgen==2021.2.8.1\npyparsing==2.4.7\npython-dateutil==2.8.1\npytz==2021.1\nrequests==2.25.1\nretrying==1.3.3\nruamel.yaml==0.16.12\nruamel.yaml.clib==0.2.2\nscipy==1.5.4\nsix==1.15.0\nspglib==1.16.1\nsympy==1.7.1\ntabulate==0.8.7\nuncertainties==3.1.5\nurllib3==1.26.3\nxgboost==1.4.2\n", - name: "requirements.txt", - contextProviders: [], - applicationName: "python", - executableName: "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", - name: "requirements_empty.txt", - contextProviders: [], - applicationName: "python", - executableName: "python", - }, - { - content: - '# -------------------------------------------------------------------------------\n# This script contains a few helpful commands for basic plotting with matplotlib.\n# The commented out blocks are optional suggestions and included for convenience.\n# -------------------------------------------------------------------------------\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as ticker\nimport numpy as np\n\n\n# Plot Settings\n# -------------\nfigure_size = (6.4, 4.8) # width, height [inches]\ndpi = 100 # resolution [dots-per-inch]\nfont_size_title = 16 # font size of title\nfont_size_axis = 12 # font size of axis label\nfont_size_tick = 12 # font size of tick label\nfont_size_legend = 14 # font size of legend\nx_axis_label = None # label for x-axis\ny_axis_label = None # label for y-axis\ntitle = None # figure title\nshow_legend = False # whether to show legend\nsave_name = "plot.pdf" # output filename (with suffix), e.g. \'plot.pdf\'\nx_view_limits = {"left": None, "right": None} # view limits for x-axis\ny_view_limits = {"top": None, "bottom": None} # view limits for y-axis\nx_tick_spacing = None # custom tick spacing for x-axis (optional)\ny_tick_spacing = None # custom tick spacing for y-axis (optional)\nx_tick_labels = None # custom tick labels for x-axis (optional)\ny_tick_labels = None # custom tick labels for y-axis (optional)\n\n\n# Figure & axes objects\n# ---------------------\nfig = plt.figure(figsize=figure_size, dpi=dpi)\nax = fig.add_subplot(111)\n\n# Example plot (REPLACE ACCORDINGLY)\n# ------------\nx = np.linspace(0, 7, num=100)\ny = np.sin(x)\nax.plot(x, y, "g-", zorder=3)\n\n\n# Help lines\n# ----------\n# ax.axhline(y=0, color="0.25", linewidth=0.6, zorder=1)\n# ax.axvline(x=0, color="0.25", linewidth=0.6, zorder=1)\n\n\n# View limits\n# -----------\nax.set_xlim(**x_view_limits)\nax.set_ylim(**y_view_limits)\n\n\n# Grid lines\n# ----------\n# grid_style = {\n# "linestyle" : "dotted",\n# "linewidth" : 0.6,\n# "color" : "0.25",\n# }\n# ax.grid(**grid_style)\n\n# Custom tick spacing\n# -------------------\n# ax.xaxis.set_major_locator(ticker.MultipleLocator(x_tick_spacing))\n# ax.yaxis.set_major_locator(ticker.MultipleLocator(y_tick_spacing))\n\n# Custom tick labels\n# ------------------\nif x_tick_labels is not None:\n ax.set_xticklabels(x_tick_labels, fontdict={"fontsize": font_size_tick}, minor=False)\nif y_tick_labels is not None:\n ax.set_yticklabels(y_tick_labels, fontdict={"fontsize": font_size_tick}, minor=False)\n\n# Other tick settings\n# -------------------\n# ax.tick_params(axis="both", which="major", labelsize=font_size_tick, direction="in")\n# ax.tick_params(axis="x", which="major", pad=10)\n# ax.tick_params(axis="x", which="minor", bottom=False, top=False)\n\n\n# Axis labels\n# -----------\nif x_axis_label is not None:\n ax.set_xlabel(x_axis_label, size=font_size_axis)\nif y_axis_label is not None:\n ax.set_ylabel(y_axis_label, size=font_size_axis)\n\n# Figure title\n# ------------\nif title is not None:\n ax.set_title(title, fontsize=font_size_title)\n\n# Legend\n# ------\nif show_legend:\n ax.legend(prop={\'size\': font_size_legend})\n\n# Save figure\n# -----------\nif save_name is not None:\n save_format = save_name.split(".")[-1]\n fig.savefig(save_name, format=save_format, bbox_inches="tight")\n', - name: "matplotlib_basic.py", - contextProviders: [], - applicationName: "python", - executableName: "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\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', - name: "espresso_xml_get_qpt_irr.py", - contextProviders: [], - applicationName: "python", - executableName: "python", - }, - { - content: - 'import re\nimport json\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', - name: "espresso_extract_kpoints.py", - contextProviders: [], - applicationName: "python", - executableName: "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 numpy as np\nfrom scipy.signal import find_peaks\nimport json\nfrom munch import Munch\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", - name: "find_extrema.py", - contextProviders: [], - applicationName: "python", - executableName: "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", - name: "processing_requirements.txt", - contextProviders: [], - applicationName: "python", - executableName: "python", - }, - { - content: - '# ----------------------------------------------------------------- #\n# #\n# PythonML Package Requirements for use on the Exabyte.io Platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# The package set below is a stable working set of pymatgen and #\n# all of its dependencies. Please adjust the list to include #\n# your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\n# Python 3 packages\ncertifi==2020.12.5\nchardet==4.0.0\ncycler==0.10.0\ndecorator==4.4.2\nfuture==0.18.2\nidna==2.10\nkiwisolver==1.3.1\nmatplotlib==3.3.4\nmonty==4.0.2\nmpmath==1.2.1\nnetworkx==2.5\nnumpy==1.19.5\npalettable==3.3.0\npandas==1.1.5\nPillow==8.1.0\nplotly==4.14.3\npymatgen==2021.2.8.1\npyparsing==2.4.7\npython-dateutil==2.8.1\npytz==2021.1\nrequests==2.25.1\nretrying==1.3.3\nruamel.yaml==0.16.12\nruamel.yaml.clib==0.2.2\nscikit-learn==0.24.1\nscipy==1.5.4\nsix==1.15.0\nspglib==1.16.1\nsympy==1.7.1\ntabulate==0.8.7\nuncertainties==3.1.5\nurllib3==1.26.3\nxgboost==1.4.2;python_version>="3.6"\n', - name: "pyml_requirements.txt", - contextProviders: [], - applicationName: "python", - executableName: "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 pickle, os\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', - name: "pyml_settings.py", - contextProviders: [{ name: "MLSettingsDataManager" }], - applicationName: "python", - executableName: "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', - name: "pyml_custom.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.preprocessing\nimport settings\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', - name: "data_input_read_csv_pandas.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.model_selection\nimport numpy as np\nimport settings\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', - name: "data_input_train_test_split_sklearn.py", - contextProviders: [{ name: "MLTrainTestSplitDataManager" }], - applicationName: "python", - executableName: "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 sklearn.preprocessing\n\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 # 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', - name: "pre_processing_min_max_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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', - name: "pre_processing_remove_duplicates_pandas.py", - contextProviders: [], - applicationName: "python", - executableName: "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', - name: "pre_processing_remove_missing_pandas.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.preprocessing\n\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 # 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', - name: "pre_processing_standardization_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.ensemble\nimport sklearn.tree\nimport sklearn.metrics\nimport numpy as np\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 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', - name: "model_adaboosted_trees_regression_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.ensemble\nimport sklearn.tree\nimport sklearn.metrics\nimport numpy as np\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 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', - name: "model_bagged_trees_regression_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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', - name: "model_gradboosted_trees_regression_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 xgboost\nimport sklearn.metrics\nimport numpy as np\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 # 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', - name: "model_extreme_gradboosted_trees_regression_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.cluster\nimport sklearn.metrics\nimport numpy as np\nimport settings\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', - name: "model_k_means_clustering_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.kernel_ridge\nimport sklearn.metrics\nimport numpy as np\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 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', - name: "model_kernel_ridge_regression_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.linear_model\nimport sklearn.metrics\nimport numpy as np\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 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', - name: "model_lasso_regression_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.neural_network\nimport sklearn.metrics\nimport numpy as np\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 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', - name: "model_mlp_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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', - name: "model_random_forest_classification_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 # 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', - name: "model_gradboosted_trees_classification_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 xgboost\nimport sklearn.metrics\nimport numpy as np\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 # 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', - name: "model_extreme_gradboosted_trees_classification_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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', - name: "model_random_forest_regression_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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 sklearn.linear_model\nimport sklearn.metrics\nimport numpy as np\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 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', - name: "model_ridge_regression_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "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\n\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', - name: "post_processing_parity_plot_matplotlib.py", - contextProviders: [], - applicationName: "python", - executableName: "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 pandas as pd\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport sklearn.decomposition\nimport settings\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', - name: "post_processing_pca_2d_clusters_matplotlib.py", - contextProviders: [], - applicationName: "python", - executableName: "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.pyplot as plt\nimport matplotlib.collections\nimport sklearn.metrics\nimport numpy as np\nimport settings\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', - name: "post_processing_roc_curve_sklearn.py", - contextProviders: [], - applicationName: "python", - executableName: "python", - }, - { - 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', - name: "hello_world.sh", - contextProviders: [], - applicationName: "shell", - executableName: "sh", - }, - { - 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.exabyte.io/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@exabyte.io\n\n# load module\nmodule add espresso/540-i-174-impi-044\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n", - name: "job_espresso_pw_scf.sh", - contextProviders: [], - applicationName: "shell", - executableName: "sh", - }, - { - 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", - name: "espresso_link_outdir_save.sh", - contextProviders: [], - applicationName: "shell", - executableName: "sh", - }, - { - 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", - name: "espresso_collect_dynmat.sh", - contextProviders: [], - applicationName: "shell", - executableName: "sh", - }, - { - 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 <=6.2.0\nexabyte-api-client>=2020.10.19\nnumpy>=1.17.3\npandas>=1.1.4\nurllib3<2\n","name":"requirements.txt","contextProviders":[],"applicationName":"jupyterLab","executableName":"jupyter" },{ "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","name":"nwchem_total_energy.inp","contextProviders":[{ "name":"NWChemInputDataManager" }],"applicationName":"nwchem","executableName":"nwchem" },{ "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 pymatgen as mg\n\nsi = mg.Element(\"Si\")\n\nprint(si.atomic_mass)\n","name":"hello_world.py","contextProviders":[],"applicationName":"python","executableName":"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# The package set below is a stable working set of pymatgen and #\n# all of its dependencies. Please adjust the list to include #\n# your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\n# Python 3 packages\ncertifi==2020.12.5\nchardet==4.0.0\ncycler==0.10.0\ndecorator==4.4.2\nfuture==0.18.2\nidna==2.10\nkiwisolver==1.3.1\nmatplotlib==3.3.4\nmonty==4.0.2\nmpmath==1.2.1\nnetworkx==2.5\nnumpy==1.19.5\npalettable==3.3.0\npandas==1.1.5\nPillow==8.1.0\nplotly==4.14.3\npymatgen==2021.2.8.1\npyparsing==2.4.7\npython-dateutil==2.8.1\npytz==2021.1\nrequests==2.25.1\nretrying==1.3.3\nruamel.yaml==0.16.12\nruamel.yaml.clib==0.2.2\nscipy==1.5.4\nsix==1.15.0\nspglib==1.16.1\nsympy==1.7.1\ntabulate==0.8.7\nuncertainties==3.1.5\nurllib3==1.26.3\nxgboost==1.4.2\n","name":"requirements.txt","contextProviders":[],"applicationName":"python","executableName":"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","name":"requirements_empty.txt","contextProviders":[],"applicationName":"python","executableName":"python" },{ "content":"# -------------------------------------------------------------------------------\n# This script contains a few helpful commands for basic plotting with matplotlib.\n# The commented out blocks are optional suggestions and included for convenience.\n# -------------------------------------------------------------------------------\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as ticker\nimport numpy as np\n\n\n# Plot Settings\n# -------------\nfigure_size = (6.4, 4.8) # width, height [inches]\ndpi = 100 # resolution [dots-per-inch]\nfont_size_title = 16 # font size of title\nfont_size_axis = 12 # font size of axis label\nfont_size_tick = 12 # font size of tick label\nfont_size_legend = 14 # font size of legend\nx_axis_label = None # label for x-axis\ny_axis_label = None # label for y-axis\ntitle = None # figure title\nshow_legend = False # whether to show legend\nsave_name = \"plot.pdf\" # output filename (with suffix), e.g. 'plot.pdf'\nx_view_limits = {\"left\": None, \"right\": None} # view limits for x-axis\ny_view_limits = {\"top\": None, \"bottom\": None} # view limits for y-axis\nx_tick_spacing = None # custom tick spacing for x-axis (optional)\ny_tick_spacing = None # custom tick spacing for y-axis (optional)\nx_tick_labels = None # custom tick labels for x-axis (optional)\ny_tick_labels = None # custom tick labels for y-axis (optional)\n\n\n# Figure & axes objects\n# ---------------------\nfig = plt.figure(figsize=figure_size, dpi=dpi)\nax = fig.add_subplot(111)\n\n# Example plot (REPLACE ACCORDINGLY)\n# ------------\nx = np.linspace(0, 7, num=100)\ny = np.sin(x)\nax.plot(x, y, \"g-\", zorder=3)\n\n\n# Help lines\n# ----------\n# ax.axhline(y=0, color=\"0.25\", linewidth=0.6, zorder=1)\n# ax.axvline(x=0, color=\"0.25\", linewidth=0.6, zorder=1)\n\n\n# View limits\n# -----------\nax.set_xlim(**x_view_limits)\nax.set_ylim(**y_view_limits)\n\n\n# Grid lines\n# ----------\n# grid_style = {\n# \"linestyle\" : \"dotted\",\n# \"linewidth\" : 0.6,\n# \"color\" : \"0.25\",\n# }\n# ax.grid(**grid_style)\n\n# Custom tick spacing\n# -------------------\n# ax.xaxis.set_major_locator(ticker.MultipleLocator(x_tick_spacing))\n# ax.yaxis.set_major_locator(ticker.MultipleLocator(y_tick_spacing))\n\n# Custom tick labels\n# ------------------\nif x_tick_labels is not None:\n ax.set_xticklabels(x_tick_labels, fontdict={\"fontsize\": font_size_tick}, minor=False)\nif y_tick_labels is not None:\n ax.set_yticklabels(y_tick_labels, fontdict={\"fontsize\": font_size_tick}, minor=False)\n\n# Other tick settings\n# -------------------\n# ax.tick_params(axis=\"both\", which=\"major\", labelsize=font_size_tick, direction=\"in\")\n# ax.tick_params(axis=\"x\", which=\"major\", pad=10)\n# ax.tick_params(axis=\"x\", which=\"minor\", bottom=False, top=False)\n\n\n# Axis labels\n# -----------\nif x_axis_label is not None:\n ax.set_xlabel(x_axis_label, size=font_size_axis)\nif y_axis_label is not None:\n ax.set_ylabel(y_axis_label, size=font_size_axis)\n\n# Figure title\n# ------------\nif title is not None:\n ax.set_title(title, fontsize=font_size_title)\n\n# Legend\n# ------\nif show_legend:\n ax.legend(prop={'size': font_size_legend})\n\n# Save figure\n# -----------\nif save_name is not None:\n save_format = save_name.split(\".\")[-1]\n fig.savefig(save_name, format=save_format, bbox_inches=\"tight\")\n","name":"matplotlib_basic.py","contextProviders":[],"applicationName":"python","executableName":"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\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","name":"espresso_xml_get_qpt_irr.py","contextProviders":[],"applicationName":"python","executableName":"python" },{ "content":"import re\nimport json\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","name":"espresso_extract_kpoints.py","contextProviders":[],"applicationName":"python","executableName":"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 numpy as np\nfrom scipy.signal import find_peaks\nimport json\nfrom munch import Munch\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","name":"find_extrema.py","contextProviders":[],"applicationName":"python","executableName":"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","name":"processing_requirements.txt","contextProviders":[],"applicationName":"python","executableName":"python" },{ "content":"# ----------------------------------------------------------------- #\n# #\n# PythonML Package Requirements for use on the Exabyte.io Platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# The package set below is a stable working set of pymatgen and #\n# all of its dependencies. Please adjust the list to include #\n# your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\n# Python 3 packages\ncertifi==2020.12.5\nchardet==4.0.0\ncycler==0.10.0\ndecorator==4.4.2\nfuture==0.18.2\nidna==2.10\nkiwisolver==1.3.1\nmatplotlib==3.3.4\nmonty==4.0.2\nmpmath==1.2.1\nnetworkx==2.5\nnumpy==1.19.5\npalettable==3.3.0\npandas==1.1.5\nPillow==8.1.0\nplotly==4.14.3\npymatgen==2021.2.8.1\npyparsing==2.4.7\npython-dateutil==2.8.1\npytz==2021.1\nrequests==2.25.1\nretrying==1.3.3\nruamel.yaml==0.16.12\nruamel.yaml.clib==0.2.2\nscikit-learn==0.24.1\nscipy==1.5.4\nsix==1.15.0\nspglib==1.16.1\nsympy==1.7.1\ntabulate==0.8.7\nuncertainties==3.1.5\nurllib3==1.26.3\nxgboost==1.4.2;python_version>=\"3.6\"\n","name":"pyml_requirements.txt","contextProviders":[],"applicationName":"python","executableName":"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 pickle, os\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","name":"pyml_settings.py","contextProviders":[{ "name":"MLSettingsDataManager" }],"applicationName":"python","executableName":"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","name":"pyml_custom.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.preprocessing\nimport settings\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","name":"data_input_read_csv_pandas.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.model_selection\nimport numpy as np\nimport settings\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","name":"data_input_train_test_split_sklearn.py","contextProviders":[{ "name":"MLTrainTestSplitDataManager" }],"applicationName":"python","executableName":"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 sklearn.preprocessing\n\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 # 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","name":"pre_processing_min_max_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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","name":"pre_processing_remove_duplicates_pandas.py","contextProviders":[],"applicationName":"python","executableName":"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","name":"pre_processing_remove_missing_pandas.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.preprocessing\n\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 # 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","name":"pre_processing_standardization_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.tree\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_adaboosted_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.tree\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_bagged_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_gradboosted_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 xgboost\nimport sklearn.metrics\nimport numpy as np\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 # 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","name":"model_extreme_gradboosted_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.cluster\nimport sklearn.metrics\nimport numpy as np\nimport settings\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","name":"model_k_means_clustering_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.kernel_ridge\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_kernel_ridge_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.linear_model\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_lasso_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.neural_network\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_mlp_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_random_forest_classification_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 # 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","name":"model_gradboosted_trees_classification_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 xgboost\nimport sklearn.metrics\nimport numpy as np\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 # 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","name":"model_extreme_gradboosted_trees_classification_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_random_forest_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.linear_model\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_ridge_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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\n\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","name":"post_processing_parity_plot_matplotlib.py","contextProviders":[],"applicationName":"python","executableName":"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 pandas as pd\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport sklearn.decomposition\nimport settings\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","name":"post_processing_pca_2d_clusters_matplotlib.py","contextProviders":[],"applicationName":"python","executableName":"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.pyplot as plt\nimport matplotlib.collections\nimport sklearn.metrics\nimport numpy as np\nimport settings\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","name":"post_processing_roc_curve_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"python" },{ "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","name":"hello_world.sh","contextProviders":[],"applicationName":"shell","executableName":"sh" },{ "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.exabyte.io/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@exabyte.io\n\n# load module\nmodule add espresso/540-i-174-impi-044\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","name":"job_espresso_pw_scf.sh","contextProviders":[],"applicationName":"shell","executableName":"sh" },{ "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","name":"espresso_link_outdir_save.sh","contextProviders":[],"applicationName":"shell","executableName":"sh" },{ "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","name":"espresso_collect_dynmat.sh","contextProviders":[],"applicationName":"shell","executableName":"sh" },{ "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 < Date: Thu, 10 Aug 2023 14:45:27 -0700 Subject: [PATCH 43/52] chore: add yamllint config --- .yamllint.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .yamllint.yml diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 00000000..e106264f --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,25 @@ +--- + +extends: default + +rules: + line-length: + max: 100 + empty-lines: + level: warning + max-end: 1 + quoted-strings: + quote-type: single + required: false + indentation: + spaces: 2 + indent-sequences: consistent + document-start: disable + comments: + min-spaces-from-content: 1 + comments-indentation: disable + +ignore: + - node_modules/ + - test/ + - tests/ From e507a5c1be573cb24e3b9d92f4461dc564fabbd5 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 10 Aug 2023 14:47:23 -0700 Subject: [PATCH 44/52] style: resolve yamllint errors --- applications/application_data.yml | 14 +- applications/espresso.yml | 46 +-- applications/exabyteml.yml | 4 +- applications/jupyterLab.yml | 6 +- applications/nwchem.yml | 6 +- applications/python.yml | 12 +- applications/shell.yml | 4 +- applications/vasp.yml | 20 +- assets/python/ml/generation/config.yaml | 2 +- assets/python/ml/generation/model.yaml | 41 +-- executables/exabyteml/train.yml | 2 +- executables/python/python.yml | 80 ++--- executables/tree.yml | 38 +-- executables/vasp/vasp.yml | 4 +- methods/espresso/5.2.1.yml | 12 +- methods/vasp/5.3.5.yml | 4 +- models/espresso/5.4.0.yml | 2 +- templates/espresso/average.x.yml | 10 +- templates/espresso/bands.x.yml | 10 +- templates/espresso/dos.x.yml | 10 +- templates/espresso/dynmat.x.yml | 12 +- templates/espresso/gw.x.yml | 32 +- templates/espresso/matdyn.x.yml | 24 +- templates/espresso/neb.x.yml | 18 +- templates/espresso/ph.x.yml | 70 ++--- templates/espresso/pp.x.yml | 20 +- templates/espresso/projwfc.x.yml | 10 +- templates/espresso/pw.x.yml | 164 +++++----- templates/espresso/q2r.x.yml | 10 +- templates/jupyterLab/jupyter.yml | 10 +- templates/nwchem/nwchem.yml | 12 +- templates/python/python.yml | 399 ++++++++++++------------ templates/shell/sh.yml | 52 +-- templates/templates.yml | 34 +- templates/vasp/vasp.yml | 202 ++++++------ 35 files changed, 699 insertions(+), 697 deletions(-) diff --git a/applications/application_data.yml b/applications/application_data.yml index 482d4c85..b43c59bf 100644 --- a/applications/application_data.yml +++ b/applications/application_data.yml @@ -1,7 +1,7 @@ -espresso: !include "applications/espresso.yml" -exabyteml: !include "applications/exabyteml.yml" -jupyterLab: !include "applications/jupyterLab.yml" -nwchem: !include "applications/nwchem.yml" -python: !include "applications/python.yml" -shell: !include "applications/shell.yml" -vasp: !include "applications/vasp.yml" +espresso: !include 'applications/espresso.yml' +exabyteml: !include 'applications/exabyteml.yml' +jupyterLab: !include 'applications/jupyterLab.yml' +nwchem: !include 'applications/nwchem.yml' +python: !include 'applications/python.yml' +shell: !include 'applications/shell.yml' +vasp: !include 'applications/vasp.yml' diff --git a/applications/espresso.yml b/applications/espresso.yml index ca7124c0..3e4d629d 100644 --- a/applications/espresso.yml +++ b/applications/espresso.yml @@ -1,93 +1,93 @@ name: espresso shortName: qe summary: Quantum Espresso -defaultVersion: "5.4.0" +defaultVersion: '5.4.0' versions: #### version 5.2.1 #### - - version: "5.2.1" + - version: '5.2.1' isDefault: true hasAdvancedComputeOptions: true - - version: "5.2.1" + - version: '5.2.1' isDefault: false build: GNU hasAdvancedComputeOptions: true - - version: "5.2.1" + - version: '5.2.1' isDefault: false build: Intel hasAdvancedComputeOptions: true #### version 5.4.0 #### - - version: "5.4.0" + - version: '5.4.0' isDefault: true hasAdvancedComputeOptions: true - - version: "5.4.0" + - version: '5.4.0' isDefault: false build: GNU hasAdvancedComputeOptions: true - - version: "5.4.0" + - version: '5.4.0' isDefault: false build: Intel hasAdvancedComputeOptions: true #### version 6.0.0 #### - - version: "6.0.0" + - version: '6.0.0' isDefault: true hasAdvancedComputeOptions: true - - version: "6.0.0" + - version: '6.0.0' isDefault: false build: GNU hasAdvancedComputeOptions: true - - version: "6.0.0" + - version: '6.0.0' isDefault: false build: Intel hasAdvancedComputeOptions: true #### version 6.3 #### - - version: "6.3" + - version: '6.3' isDefault: true hasAdvancedComputeOptions: true - - version: "6.3" + - version: '6.3' isDefault: false build: GNU hasAdvancedComputeOptions: true - - version: "6.3" + - version: '6.3' isDefault: false build: Intel hasAdvancedComputeOptions: true #### version 6.4.1 #### - - version: "6.4.1" + - version: '6.4.1' isDefault: true hasAdvancedComputeOptions: true #### version 6.5.0 #### - - version: "6.5.0" + - version: '6.5.0' isDefault: true hasAdvancedComputeOptions: true #### version 6.6.0 #### - - version: "6.6.0" + - version: '6.6.0' isDefault: true hasAdvancedComputeOptions: true #### version 6.7.0 #### - - version: "6.7.0" + - version: '6.7.0' isDefault: true hasAdvancedComputeOptions: true #### version 6.8.0 #### - - version: "6.8.0" + - version: '6.8.0' isDefault: true hasAdvancedComputeOptions: true #### version 7.0 #### - - version: "7.0" + - version: '7.0' isDefault: true hasAdvancedComputeOptions: true - - version: "7.0" + - version: '7.0' isDefault: false build: GNU hasAdvancedComputeOptions: true - - version: "7.0" + - version: '7.0' isDefault: false build: Intel hasAdvancedComputeOptions: true #### version 7.2 #### - - version: "7.2" + - version: '7.2' isDefault: true hasAdvancedComputeOptions: true - - version: "7.2" + - version: '7.2' isDefault: false build: Intel hasAdvancedComputeOptions: true diff --git a/applications/exabyteml.yml b/applications/exabyteml.yml index 48d1642a..36cf20c2 100644 --- a/applications/exabyteml.yml +++ b/applications/exabyteml.yml @@ -1,7 +1,7 @@ name: exabyteml shortName: ml summary: Exabyte Machine Learning Engine -defaultVersion: "0.2.0" +defaultVersion: '0.2.0' versions: - - version: "0.2.0" + - version: '0.2.0' isDefault: true diff --git a/applications/jupyterLab.yml b/applications/jupyterLab.yml index cd071e96..77525a9f 100644 --- a/applications/jupyterLab.yml +++ b/applications/jupyterLab.yml @@ -1,10 +1,10 @@ name: jupyterLab shortName: jl summary: JupyterLab -defaultVersion: "3.0.3" +defaultVersion: '3.0.3' versions: - - version: "3.0.3" + - version: '3.0.3' isDefault: true - - version: "3.0.3" + - version: '3.0.3' isDefault: false build: with-pre-installed-packages diff --git a/applications/nwchem.yml b/applications/nwchem.yml index f817e42c..4a5268ba 100644 --- a/applications/nwchem.yml +++ b/applications/nwchem.yml @@ -1,8 +1,8 @@ name: nwchem shortName: nwchem summary: NWChem -defaultVersion: "7.0.2" +defaultVersion: '7.0.2' versions: - - version: "7.0.2" + - version: '7.0.2' isDefault: true - - version: "6.6" + - version: '6.6' diff --git a/applications/python.yml b/applications/python.yml index 45a172c9..4aa59a5e 100644 --- a/applications/python.yml +++ b/applications/python.yml @@ -1,11 +1,11 @@ name: python shortName: py summary: Python Script -defaultVersion: "3.8.6" +defaultVersion: '3.8.6' versions: - - version: "3.6.12" - - version: "3.7.9" - - version: "3.8.6" + - version: '3.6.12' + - version: '3.7.9' + - version: '3.8.6' isDefault: true - - version: "3.9.1" - - version: "anaconda3-5.2.0" + - version: '3.9.1' + - version: 'anaconda3-5.2.0' diff --git a/applications/shell.yml b/applications/shell.yml index c0b3dd8c..820a0cd8 100644 --- a/applications/shell.yml +++ b/applications/shell.yml @@ -1,7 +1,7 @@ name: shell shortName: sh summary: Shell Script -defaultVersion: "4.2.46" +defaultVersion: '4.2.46' versions: - - version: "4.2.46" + - version: '4.2.46' isDefault: true diff --git a/applications/vasp.yml b/applications/vasp.yml index 29a65906..6e67457b 100644 --- a/applications/vasp.yml +++ b/applications/vasp.yml @@ -1,33 +1,33 @@ name: vasp shortName: vasp summary: Vienna Ab-initio Simulation Package -defaultVersion: "5.3.5" +defaultVersion: '5.3.5' isLicensed: true versions: #### version 5.3.5 #### - - version: "5.3.5" + - version: '5.3.5' isDefault: true - - version: "5.3.5" + - version: '5.3.5' isDefault: false build: Non-collinear - - version: "5.3.5" + - version: '5.3.5' isDefault: false build: VTST #### version 5.4.4 #### - - version: "5.4.4" + - version: '5.4.4' isDefault: true - - version: "5.4.4" + - version: '5.4.4' isDefault: false build: Gamma - - version: "5.4.4" + - version: '5.4.4' isDefault: false build: Non-collinear - - version: "5.4.4" + - version: '5.4.4' isDefault: false build: VTST - - version: "5.4.4" + - version: '5.4.4' isDefault: false build: VTST-Gamma - - version: "5.4.4" + - version: '5.4.4' isDefault: false build: VTST-Non-collinear diff --git a/assets/python/ml/generation/config.yaml b/assets/python/ml/generation/config.yaml index c3f88e4c..d754dd7e 100644 --- a/assets/python/ml/generation/config.yaml +++ b/assets/python/ml/generation/config.yaml @@ -1,4 +1,4 @@ -pyml_render_output_directory: ".." +pyml_render_output_directory: '..' documentation_box_common_text: regression: > When then workflow is in Training mode, the model is trained diff --git a/assets/python/ml/generation/model.yaml b/assets/python/ml/generation/model.yaml index 9ce78eb0..806b43c6 100644 --- a/assets/python/ml/generation/model.yaml +++ b/assets/python/ml/generation/model.yaml @@ -1,5 +1,6 @@ +# yamllint disable rule:truthy rule:line-length name: adaboosted_trees -category: "regression" +category: 'regression' provider: sklearn ensemble: True description: > @@ -12,11 +13,11 @@ model_class: sklearn.ensemble.AdaBoostRegressor model_default_args: n_estimators: 50 learning_rate: 1 - loss: "linear" + loss: 'linear' base_estimator_class: sklearn.tree.DecisionTreeRegressor base_estimator_default_args: - criterion: "mse" - splitter: "best" + criterion: 'mse' + splitter: 'best' max_depth: None min_samples_split: 2 min_samples_leaf: 1 @@ -29,7 +30,7 @@ base_estimator_default_args: --- name: bagged_trees -category: "regression" +category: 'regression' provider: sklearn ensemble: True description: > @@ -49,8 +50,8 @@ model_default_args: verbose: 0 base_estimator_class: sklearn.tree.DecisionTreeRegressor base_estimator_default_args: - criterion: "mse" - splitter: "best" + criterion: 'mse' + splitter: 'best' max_depth: None min_samples_split: 2 min_samples_leaf: 1 @@ -63,7 +64,7 @@ base_estimator_default_args: --- name: gradboosted_trees -category: "regression" +category: 'regression' provider: sklearn ensemble: False description: > @@ -75,11 +76,11 @@ imports: - sklearn.ensemble model_class: sklearn.ensemble.GradientBoostingRegressor model_default_args: - loss: "ls" + loss: 'ls' learning_rate: 0.1 n_estimators: 100 subsample: 1.0 - criterion: "friedman_mse" + criterion: 'friedman_mse' min_samples_split: 2 min_samples_leaf: 1 min_weight_fraction_leaf: 0.0 @@ -107,12 +108,12 @@ imports: model_class: sklearn.cluster.KMeans model_default_args: n_clusters: 4 - init: "k-means++" + init: 'k-means++' n_init: 10 max_iter: 300 tol: 1.e-4 copy_x: True - algorithm: "auto" + algorithm: 'auto' verbose: 0 --- @@ -128,7 +129,7 @@ imports: model_class: sklearn.kernel_ridge.KernelRidge model_default_args: alpha: 1.0 - kernel: "linear" + kernel: 'linear' --- @@ -148,7 +149,7 @@ model_default_args: precompute: False tol: 1.e-4 positive: True - selection: "cyclic" + selection: 'cyclic' --- @@ -163,8 +164,8 @@ imports: model_class: sklearn.neural_network.MLPRegressor model_default_args: hidden_layer_sizes: (100,) - activation: "relu" - solver: "adam" + activation: 'relu' + solver: 'adam' max_iter: 300 early_stopping: False validation_fraction: 0.1 @@ -182,12 +183,12 @@ imports: model_class: sklearn.ensemble.RandomForestClassifier model_default_args: n_estimators: 100 - criterion: "gini" + criterion: 'gini' max_depth: None min_samples_split: 2 min_samples_leaf: 1 min_weight_fraction_leaf: 0.0 - max_features: "auto" + max_features: 'auto' max_leaf_nodes: None min_impurity_decrease: 0.0 bootstrap: True @@ -210,12 +211,12 @@ imports: model_class: sklearn.ensemble.RandomForestRegressor model_default_args: n_estimators: 100 - criterion: "mse" + criterion: 'mse' max_depth: None min_samples_split: 2 min_samples_leaf: 1 min_weight_fraction_leaf: 0.0 - max_features: "auto" + max_features: 'auto' max_leaf_nodes: None min_impurity_decrease: 0.0 bootstrap: True diff --git a/executables/exabyteml/train.yml b/executables/exabyteml/train.yml index fb09255d..1bc95049 100644 --- a/executables/exabyteml/train.yml +++ b/executables/exabyteml/train.yml @@ -2,7 +2,7 @@ isDefault: true monitors: - standard_output results: - - "workflow:ml_predict" + - 'workflow:ml_predict' flavors: train: isDefault: true diff --git a/executables/python/python.yml b/executables/python/python.yml index 2474c4df..9c6f56e4 100644 --- a/executables/python/python.yml +++ b/executables/python/python.yml @@ -3,7 +3,7 @@ monitors: - standard_output results: - file_content - - "workflow:pyml_predict" + - 'workflow:pyml_predict' flavors: hello_world: isDefault: true @@ -34,7 +34,7 @@ flavors: applicationName: python executableName: python - "generic:post_processing:plot:matplotlib": + 'generic:post_processing:plot:matplotlib': input: - name: plot.py templateName: matplotlib_basic.py @@ -45,7 +45,7 @@ flavors: applicationName: python executableName: python - "generic:processing:find_extrema:scipy": + 'generic:processing:find_extrema:scipy': input: - name: find_extrema.py templateName: find_extrema.py @@ -56,7 +56,7 @@ flavors: applicationName: python executableName: python - "pyml:setup_variables_packages": + 'pyml:setup_variables_packages': input: - name: settings.py templateName: pyml_settings.py @@ -67,7 +67,7 @@ flavors: applicationName: python executableName: python - "pyml:custom": + 'pyml:custom': input: - name: pyml_custom.py templateName: pyml_custom.py @@ -78,7 +78,7 @@ flavors: applicationName: python executableName: python - "pyml:data_input:read_csv:pandas": + 'pyml:data_input:read_csv:pandas': input: - name: data_input_read_csv_pandas.py templateName: data_input_read_csv_pandas.py @@ -89,7 +89,7 @@ flavors: applicationName: python executableName: python - "pyml:data_input:train_test_split:sklearn": + 'pyml:data_input:train_test_split:sklearn': input: - name: data_input_train_test_split_sklearn.py templateName: data_input_train_test_split_sklearn.py @@ -100,7 +100,7 @@ flavors: applicationName: python executableName: python - "pyml:pre_processing:min_max_scaler:sklearn": + 'pyml:pre_processing:min_max_scaler:sklearn': input: - name: pre_processing_min_max_sklearn.py templateName: pre_processing_min_max_sklearn.py @@ -111,7 +111,7 @@ flavors: applicationName: python executableName: python - "pyml:pre_processing:remove_duplicates:pandas": + 'pyml:pre_processing:remove_duplicates:pandas': input: - name: pre_processing_remove_duplicates_pandas.py templateName: pre_processing_remove_duplicates_pandas.py @@ -122,7 +122,7 @@ flavors: applicationName: python executableName: python - "pyml:pre_processing:remove_missing:pandas": + 'pyml:pre_processing:remove_missing:pandas': input: - name: pre_processing_remove_missing_pandas.py templateName: pre_processing_remove_missing_pandas.py @@ -133,7 +133,7 @@ flavors: applicationName: python executableName: python - "pyml:pre_processing:standardization:sklearn": + 'pyml:pre_processing:standardization:sklearn': input: - name: pre_processing_standardization_sklearn.py templateName: pre_processing_standardization_sklearn.py @@ -144,7 +144,7 @@ flavors: applicationName: python executableName: python - "pyml:model:adaboosted_trees_regression:sklearn": + 'pyml:model:adaboosted_trees_regression:sklearn': input: - name: model_adaboosted_trees_regression_sklearn.py templateName: model_adaboosted_trees_regression_sklearn.py @@ -153,167 +153,167 @@ flavors: monitors: - standard_output results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' applicationName: python executableName: python - "pyml:model:bagged_trees_regression:sklearn": + 'pyml:model:bagged_trees_regression:sklearn': input: - name: model_bagged_trees_regression_sklearn.py templateName: model_bagged_trees_regression_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:gradboosted_trees_regression:sklearn": + 'pyml:model:gradboosted_trees_regression:sklearn': input: - name: model_gradboosted_trees_regression_sklearn.py templateName: model_gradboosted_trees_regression_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:extreme_gradboosted_trees_regression:sklearn": + 'pyml:model:extreme_gradboosted_trees_regression:sklearn': input: - name: model_extreme_gradboosted_trees_regression_sklearn.py templateName: model_extreme_gradboosted_trees_regression_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:k_means_clustering:sklearn": + 'pyml:model:k_means_clustering:sklearn': input: - name: model_k_means_clustering_sklearn.py templateName: model_k_means_clustering_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:kernel_ridge_regression:sklearn": + 'pyml:model:kernel_ridge_regression:sklearn': input: - name: model_kernel_ridge_regression_sklearn.py templateName: model_kernel_ridge_regression_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:lasso_regression:sklearn": + 'pyml:model:lasso_regression:sklearn': input: - name: model_lasso_regression_sklearn.py templateName: model_lasso_regression_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:multilayer_perceptron:sklearn": + 'pyml:model:multilayer_perceptron:sklearn': input: - name: model_mlp_sklearn.py templateName: model_mlp_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:random_forest_classification:sklearn": + 'pyml:model:random_forest_classification:sklearn': input: - name: model_random_forest_classification_sklearn.py templateName: model_random_forest_classification_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:gradboosted_trees_classification:sklearn": + 'pyml:model:gradboosted_trees_classification:sklearn': input: - name: model_gradboosted_trees_classification_sklearn.py templateName: model_gradboosted_trees_classification_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:extreme_gradboosted_trees_classification:sklearn": + 'pyml:model:extreme_gradboosted_trees_classification:sklearn': input: - name: model_extreme_gradboosted_trees_classification_sklearn.py templateName: model_extreme_gradboosted_trees_classification_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:random_forest_regression:sklearn": + 'pyml:model:random_forest_regression:sklearn': input: - name: model_random_forest_regression_sklearn.py templateName: model_random_forest_regression_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:model:ridge_regression:sklearn": + 'pyml:model:ridge_regression:sklearn': input: - name: model_ridge_regression_sklearn.py templateName: model_ridge_regression_sklearn.py - name: requirements.txt templateName: pyml_requirements.txt results: - - "workflow:pyml_predict" + - 'workflow:pyml_predict' monitors: - standard_output applicationName: python executableName: python - "pyml:post_processing:parity_plot:matplotlib": + 'pyml:post_processing:parity_plot:matplotlib': input: - name: post_processing_parity_plot_matplotlib.py templateName: post_processing_parity_plot_matplotlib.py @@ -326,7 +326,7 @@ flavors: applicationName: python executableName: python - "pyml:post_processing:pca_2d_clusters:matplotlib": + 'pyml:post_processing:pca_2d_clusters:matplotlib': input: - name: post_processing_pca_2d_clusters_matplotlib.py templateName: post_processing_pca_2d_clusters_matplotlib.py @@ -339,7 +339,7 @@ flavors: applicationName: python executableName: python - "pyml:post_processing:roc_curve:sklearn": + 'pyml:post_processing:roc_curve:sklearn': input: - name: post_processing_roc_curve_sklearn.py templateName: post_processing_roc_curve_sklearn.py diff --git a/executables/tree.yml b/executables/tree.yml index 5956fe0f..29c5f867 100644 --- a/executables/tree.yml +++ b/executables/tree.yml @@ -1,26 +1,26 @@ espresso: - average.x: !include "executables/espresso/average.x.yml" - bands.x: !include "executables/espresso/bands.x.yml" - dos.x: !include "executables/espresso/dos.x.yml" - dynmat.x: !include "executables/espresso/dynmat.x.yml" - gw.x: !include "executables/espresso/gw.x.yml" - matdyn.x: !include "executables/espresso/matdyn.x.yml" - neb.x: !include "executables/espresso/neb.x.yml" - ph.x: !include "executables/espresso/ph.x.yml" - pp.x: !include "executables/espresso/pp.x.yml" - projwfc.x: !include "executables/espresso/projwfc.x.yml" - pw.x: !include "executables/espresso/pw.x.yml" - q2r.x: !include "executables/espresso/q2r.x.yml" + average.x: !include 'executables/espresso/average.x.yml' + bands.x: !include 'executables/espresso/bands.x.yml' + dos.x: !include 'executables/espresso/dos.x.yml' + dynmat.x: !include 'executables/espresso/dynmat.x.yml' + gw.x: !include 'executables/espresso/gw.x.yml' + matdyn.x: !include 'executables/espresso/matdyn.x.yml' + neb.x: !include 'executables/espresso/neb.x.yml' + ph.x: !include 'executables/espresso/ph.x.yml' + pp.x: !include 'executables/espresso/pp.x.yml' + projwfc.x: !include 'executables/espresso/projwfc.x.yml' + pw.x: !include 'executables/espresso/pw.x.yml' + q2r.x: !include 'executables/espresso/q2r.x.yml' jupyterLab: - jupyter: !include "executables/jupyterLab/jupyter.yml" + jupyter: !include 'executables/jupyterLab/jupyter.yml' exabyteml: - score: !include "executables/exabyteml/score.yml" - train: !include "executables/exabyteml/train.yml" + score: !include 'executables/exabyteml/score.yml' + train: !include 'executables/exabyteml/train.yml' nwchem: - nwchem: !include "executables/nwchem/nwchem.yml" + nwchem: !include 'executables/nwchem/nwchem.yml' python: - python: !include "executables/python/python.yml" + python: !include 'executables/python/python.yml' shell: - sh: !include "executables/shell/sh.yml" + sh: !include 'executables/shell/sh.yml' vasp: - vasp: !include "executables/vasp/vasp.yml" + vasp: !include 'executables/vasp/vasp.yml' diff --git a/executables/vasp/vasp.yml b/executables/vasp/vasp.yml index 726b02f3..cfc8f8ef 100644 --- a/executables/vasp/vasp.yml +++ b/executables/vasp/vasp.yml @@ -53,7 +53,7 @@ flavors: - name: KPOINTS templateName: KPOINTS_BANDS - name: POSCAR - templateName: "" + templateName: '' results: - band_structure monitors: @@ -108,7 +108,7 @@ flavors: - name: KPOINTS templateName: KPOINTS_BANDS - name: POSCAR - templateName: "" + templateName: '' results: - band_structure monitors: diff --git a/methods/espresso/5.2.1.yml b/methods/espresso/5.2.1.yml index 61fdbb88..eb265c42 100644 --- a/methods/espresso/5.2.1.yml +++ b/methods/espresso/5.2.1.yml @@ -2,15 +2,15 @@ Default: pw.x: pw_scf: - path: /qm/wf/undefined/pw/undefined - - regex: "\/qm\/wf\/undefined\/psp\/.*" - - regex: "\/qm\/wf\/undefined\/smearing\/.*" - - regex: "\/qm\/wf\/undefined\/tetrahedron\/.*" + - regex: '\/qm\/wf\/undefined\/psp\/.*' + - regex: '\/qm\/wf\/undefined\/smearing\/.*' + - regex: '\/qm\/wf\/undefined\/tetrahedron\/.*' - path: /opt/diff/ordern/cg/undefined - path: /linalg/diag/undefined/davidson/undefined pw_scf_bands_hse: - path: /qm/wf/undefined/pw/undefined - - regex: "\/qm\/wf\/undefined\/psp\/.*" - - regex: "\/qm\/wf\/undefined\/smearing\/.*" - - regex: "\/qm\/wf\/undefined\/tetrahedron\/.*" + - regex: '\/qm\/wf\/undefined\/psp\/.*' + - regex: '\/qm\/wf\/undefined\/smearing\/.*' + - regex: '\/qm\/wf\/undefined\/tetrahedron\/.*' - path: /opt/diff/ordern/cg/undefined - path: /linalg/diag/undefined/davidson/undefined diff --git a/methods/vasp/5.3.5.yml b/methods/vasp/5.3.5.yml index 784b8882..0fcdb909 100644 --- a/methods/vasp/5.3.5.yml +++ b/methods/vasp/5.3.5.yml @@ -3,6 +3,6 @@ Default: vasp: - path: /qm/wf/undefined/pw/undefined - path: /qm/wf/undefined/psp/paw - - regex: "\/qm\/wf\/undefined\/smearing\/(fermi-dirac|gaussian|methfessel-paxton)" - - regex: "\/qm\/wf\/undefined\/tetrahedron\/(linear|bloechl)" + - regex: '\/qm\/wf\/undefined\/smearing\/(fermi-dirac|gaussian|methfessel-paxton)' + - regex: '\/qm\/wf\/undefined\/tetrahedron\/(linear|bloechl)' diff --git a/models/espresso/5.4.0.yml b/models/espresso/5.4.0.yml index 29d4e838..e1769357 100644 --- a/models/espresso/5.4.0.yml +++ b/models/espresso/5.4.0.yml @@ -1 +1 @@ -!include "models/espresso/5.2.1.yml" +!include 'models/espresso/5.2.1.yml' diff --git a/templates/espresso/average.x.yml b/templates/espresso/average.x.yml index ca6b37be..a604b56c 100644 --- a/templates/espresso/average.x.yml +++ b/templates/espresso/average.x.yml @@ -1,5 +1,5 @@ -- content: !readFile "assets/espresso/average.j2.in" - name: average.in - contextProviders: [] - applicationName: espresso - executableName: average.x +- content: !readFile 'assets/espresso/average.j2.in' + name: average.in + contextProviders: [] + applicationName: espresso + executableName: average.x diff --git a/templates/espresso/bands.x.yml b/templates/espresso/bands.x.yml index 5fad74e8..2ecb4b9e 100644 --- a/templates/espresso/bands.x.yml +++ b/templates/espresso/bands.x.yml @@ -1,5 +1,5 @@ -- content: !readFile "assets/espresso/bands.j2.in" - name: bands.in - contextProviders: [] - applicationName: espresso - executableName: bands.x +- content: !readFile 'assets/espresso/bands.j2.in' + name: bands.in + contextProviders: [] + applicationName: espresso + executableName: bands.x diff --git a/templates/espresso/dos.x.yml b/templates/espresso/dos.x.yml index f689780f..b52c5608 100644 --- a/templates/espresso/dos.x.yml +++ b/templates/espresso/dos.x.yml @@ -1,5 +1,5 @@ -- content: !readFile "assets/espresso/dos.j2.in" - name: dos.in - contextProviders: [] - applicationName: espresso - executableName: dos.x +- content: !readFile 'assets/espresso/dos.j2.in' + name: dos.in + contextProviders: [] + applicationName: espresso + executableName: dos.x diff --git a/templates/espresso/dynmat.x.yml b/templates/espresso/dynmat.x.yml index d4641e2c..aaad6ebc 100644 --- a/templates/espresso/dynmat.x.yml +++ b/templates/espresso/dynmat.x.yml @@ -1,6 +1,6 @@ -- content: !readFile "assets/espresso/matdyn_grid.j2.in" - name: dynmat_grid.in - contextProviders: - - name: IGridFormDataManager - applicationName: espresso - executableName: dynmat.x +- content: !readFile 'assets/espresso/matdyn_grid.j2.in' + name: dynmat_grid.in + contextProviders: + - name: IGridFormDataManager + applicationName: espresso + executableName: dynmat.x diff --git a/templates/espresso/gw.x.yml b/templates/espresso/gw.x.yml index 9b2d8271..bec6740a 100644 --- a/templates/espresso/gw.x.yml +++ b/templates/espresso/gw.x.yml @@ -1,17 +1,17 @@ -- content: !readFile "assets/espresso/gw_bands_plasmon_pole.j2.in" - name: gw_bands_plasmon_pole.in - contextProviders: - - name: KGridFormDataManager - - name: QGridFormDataManager - - name: ExplicitKPath2PIBAFormDataManager - applicationName: espresso - executableName: gw.x +- content: !readFile 'assets/espresso/gw_bands_plasmon_pole.j2.in' + name: gw_bands_plasmon_pole.in + contextProviders: + - name: KGridFormDataManager + - name: QGridFormDataManager + - name: ExplicitKPath2PIBAFormDataManager + applicationName: espresso + executableName: gw.x -- content: !readFile "assets/espresso/gw_bands_full_frequency.j2.in" - name: gw_bands_full_frequency.in - contextProviders: - - name: KGridFormDataManager - - name: QGridFormDataManager - - name: ExplicitKPath2PIBAFormDataManager - applicationName: espresso - executableName: gw.x +- content: !readFile 'assets/espresso/gw_bands_full_frequency.j2.in' + name: gw_bands_full_frequency.in + contextProviders: + - name: KGridFormDataManager + - name: QGridFormDataManager + - name: ExplicitKPath2PIBAFormDataManager + applicationName: espresso + executableName: gw.x diff --git a/templates/espresso/matdyn.x.yml b/templates/espresso/matdyn.x.yml index a96ecb2b..5bdaccd5 100644 --- a/templates/espresso/matdyn.x.yml +++ b/templates/espresso/matdyn.x.yml @@ -1,13 +1,13 @@ -- content: !readFile "assets/espresso/matdyn_grid.j2.in" - name: matdyn_grid.in - contextProviders: - - name: IGridFormDataManager - applicationName: espresso - executableName: matdyn.x +- content: !readFile 'assets/espresso/matdyn_grid.j2.in' + name: matdyn_grid.in + contextProviders: + - name: IGridFormDataManager + applicationName: espresso + executableName: matdyn.x -- content: !readFile "assets/espresso/matdyn_path.j2.in" - name: matdyn_path.in - contextProviders: - - name: IPathFormDataManager - applicationName: espresso - executableName: matdyn.x +- content: !readFile 'assets/espresso/matdyn_path.j2.in' + name: matdyn_path.in + contextProviders: + - name: IPathFormDataManager + applicationName: espresso + executableName: matdyn.x diff --git a/templates/espresso/neb.x.yml b/templates/espresso/neb.x.yml index 9721399a..b767b1c1 100644 --- a/templates/espresso/neb.x.yml +++ b/templates/espresso/neb.x.yml @@ -1,9 +1,9 @@ -- content: !readFile "assets/espresso/neb.j2.in" - name: neb.in - contextProviders: - - name: KGridFormDataManager - - name: NEBFormDataManager - - name: QENEBInputDataManager - - name: PlanewaveCutoffDataManager - applicationName: espresso - executableName: neb.x +- content: !readFile 'assets/espresso/neb.j2.in' + name: neb.in + contextProviders: + - name: KGridFormDataManager + - name: NEBFormDataManager + - name: QENEBInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: neb.x diff --git a/templates/espresso/ph.x.yml b/templates/espresso/ph.x.yml index d25898cf..73720811 100644 --- a/templates/espresso/ph.x.yml +++ b/templates/espresso/ph.x.yml @@ -1,40 +1,40 @@ -- content: !readFile "assets/espresso/ph_grid.j2.in" - name: ph_grid.in - contextProviders: - - name: QGridFormDataManager - applicationName: espresso - executableName: ph.x +- content: !readFile 'assets/espresso/ph_grid.j2.in' + name: ph_grid.in + contextProviders: + - name: QGridFormDataManager + applicationName: espresso + executableName: ph.x -- content: !readFile "assets/espresso/ph_path.j2.in" - name: ph_path.in - contextProviders: - - name: QPathFormDataManager - applicationName: espresso - executableName: ph.x +- content: !readFile 'assets/espresso/ph_path.j2.in' + name: ph_path.in + contextProviders: + - name: QPathFormDataManager + applicationName: espresso + executableName: ph.x -- content: !readFile "assets/espresso/ph_gamma.j2.in" - name: ph_gamma.in - contextProviders: [] - applicationName: espresso - executableName: ph.x +- content: !readFile 'assets/espresso/ph_gamma.j2.in' + name: ph_gamma.in + contextProviders: [] + applicationName: espresso + executableName: ph.x -- content: !readFile "assets/espresso/ph_init_qpoints.j2.in" - name: ph_init_qpoints.in - contextProviders: - - name: QGridFormDataManager - applicationName: espresso - executableName: ph.x +- content: !readFile 'assets/espresso/ph_init_qpoints.j2.in' + name: ph_init_qpoints.in + contextProviders: + - name: QGridFormDataManager + applicationName: espresso + executableName: ph.x -- content: !readFile "assets/espresso/ph_grid_restart.j2.in" - name: ph_grid_restart.in - contextProviders: - - name: QGridFormDataManager - applicationName: espresso - executableName: ph.x +- content: !readFile 'assets/espresso/ph_grid_restart.j2.in' + name: ph_grid_restart.in + contextProviders: + - name: QGridFormDataManager + applicationName: espresso + executableName: ph.x -- content: !readFile "assets/espresso/ph_single_irr_qpt.j2.in" - name: ph_single_irr_qpt.in - contextProviders: - - name: QGridFormDataManager - applicationName: espresso - executableName: ph.x +- content: !readFile 'assets/espresso/ph_single_irr_qpt.j2.in' + name: ph_single_irr_qpt.in + contextProviders: + - name: QGridFormDataManager + applicationName: espresso + executableName: ph.x diff --git a/templates/espresso/pp.x.yml b/templates/espresso/pp.x.yml index 75b07539..7a0e7875 100644 --- a/templates/espresso/pp.x.yml +++ b/templates/espresso/pp.x.yml @@ -1,11 +1,11 @@ -- content: !readFile "assets/espresso/pp_density.j2.in" - name: pp_density.in - contextProviders: [] - applicationName: espresso - executableName: pp.x +- content: !readFile 'assets/espresso/pp_density.j2.in' + name: pp_density.in + contextProviders: [] + applicationName: espresso + executableName: pp.x -- content: !readFile "assets/espresso/pp_electrostatic_potential.j2.in" - name: pp_electrostatic_potential.in - contextProviders: [] - applicationName: espresso - executableName: pp.x +- content: !readFile 'assets/espresso/pp_electrostatic_potential.j2.in' + name: pp_electrostatic_potential.in + contextProviders: [] + applicationName: espresso + executableName: pp.x diff --git a/templates/espresso/projwfc.x.yml b/templates/espresso/projwfc.x.yml index 82129ea5..48e8b7c2 100644 --- a/templates/espresso/projwfc.x.yml +++ b/templates/espresso/projwfc.x.yml @@ -1,5 +1,5 @@ -- content: !readFile "assets/espresso/projwfc.j2.in" - name: projwfc.in - contextProviders: [] - applicationName: espresso - executableName: projwfc.x +- content: !readFile 'assets/espresso/projwfc.j2.in' + name: projwfc.in + contextProviders: [] + applicationName: espresso + executableName: projwfc.x diff --git a/templates/espresso/pw.x.yml b/templates/espresso/pw.x.yml index 15065d5e..38080360 100644 --- a/templates/espresso/pw.x.yml +++ b/templates/espresso/pw.x.yml @@ -1,91 +1,91 @@ -- content: !readFile "assets/espresso/pw_scf.j2.in" - name: pw_scf.in - contextProviders: - - name: KGridFormDataManager - - name: QEPWXInputDataManager - - name: PlanewaveCutoffDataManager - applicationName: espresso - executableName: pw.x +- content: !readFile 'assets/espresso/pw_scf.j2.in' + name: pw_scf.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x -- content: !readFile "assets/espresso/pw_scf_bands_hse.j2.in" - name: pw_scf_bands_hse.in - contextProviders: - - name: QEPWXInputDataManager - - name: PlanewaveCutoffDataManager - - name: QGridFormDataManager - - name: ExplicitKPathFormDataManager - applicationName: espresso - executableName: pw.x +- content: !readFile 'assets/espresso/pw_scf_bands_hse.j2.in' + name: pw_scf_bands_hse.in + contextProviders: + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + - name: QGridFormDataManager + - name: ExplicitKPathFormDataManager + applicationName: espresso + executableName: pw.x -- content: !readFile "assets/espresso/pw_esm.j2.in" - name: pw_esm.in - contextProviders: - - name: KGridFormDataManager - - name: QEPWXInputDataManager - - name: PlanewaveCutoffDataManager - - name: BoundaryConditionsFormDataManager - applicationName: espresso - executableName: pw.x +- content: !readFile 'assets/espresso/pw_esm.j2.in' + name: pw_esm.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + - name: BoundaryConditionsFormDataManager + applicationName: espresso + executableName: pw.x -- content: !readFile "assets/espresso/pw_esm_relax.j2.in" - name: pw_esm_relax.in - contextProviders: - - name: KGridFormDataManager - - name: QEPWXInputDataManager - - name: PlanewaveCutoffDataManager - - name: BoundaryConditionsFormDataManager - applicationName: espresso - executableName: pw.x +- content: !readFile 'assets/espresso/pw_esm_relax.j2.in' + name: pw_esm_relax.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + - name: BoundaryConditionsFormDataManager + applicationName: espresso + executableName: pw.x -- content: !readFile "assets/espresso/pw_scf_kpt_conv.j2.in" - name: pw_scf_kpt_conv.in - contextProviders: - - name: QEPWXInputDataManager - - name: PlanewaveCutoffDataManager - applicationName: espresso - executableName: pw.x +- content: !readFile 'assets/espresso/pw_scf_kpt_conv.j2.in' + name: pw_scf_kpt_conv.in + contextProviders: + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x -- content: !readFile "assets/espresso/pw_nscf.j2.in" - name: pw_nscf.in - contextProviders: - - name: KGridFormDataManager - - name: QEPWXInputDataManager - - name: PlanewaveCutoffDataManager - applicationName: espresso - executableName: pw.x +- content: !readFile 'assets/espresso/pw_nscf.j2.in' + name: pw_nscf.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x -- content: !readFile "assets/espresso/pw_relax.j2.in" - name: pw_relax.in - contextProviders: - - name: KGridFormDataManager - - name: QEPWXInputDataManager - - name: PlanewaveCutoffDataManager - applicationName: espresso - executableName: pw.x +- content: !readFile 'assets/espresso/pw_relax.j2.in' + name: pw_relax.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x -- content: !readFile "assets/espresso/pw_vc_relax.j2.in" - name: pw_vc_relax.in - contextProviders: - - name: KGridFormDataManager - - name: QEPWXInputDataManager - - name: PlanewaveCutoffDataManager - applicationName: espresso - executableName: pw.x +- content: !readFile 'assets/espresso/pw_vc_relax.j2.in' + name: pw_vc_relax.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x -- content: !readFile "assets/espresso/pw_bands.j2.in" - name: pw_bands.in - contextProviders: - - name: KPathFormDataManager - - name: QEPWXInputDataManager - - name: PlanewaveCutoffDataManager - applicationName: espresso - executableName: pw.x +- content: !readFile 'assets/espresso/pw_bands.j2.in' + name: pw_bands.in + contextProviders: + - name: KPathFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x -- content: !readFile "assets/espresso/pw_scf_hse.j2.in" - name: pw_scf_hse.in - contextProviders: - - name: KGridFormDataManager - - name: QEPWXInputDataManager - - name: PlanewaveCutoffDataManager - applicationName: espresso - executableName: pw.x +- content: !readFile 'assets/espresso/pw_scf_hse.j2.in' + name: pw_scf_hse.in + contextProviders: + - name: KGridFormDataManager + - name: QEPWXInputDataManager + - name: PlanewaveCutoffDataManager + applicationName: espresso + executableName: pw.x diff --git a/templates/espresso/q2r.x.yml b/templates/espresso/q2r.x.yml index 8fed753f..4716320d 100644 --- a/templates/espresso/q2r.x.yml +++ b/templates/espresso/q2r.x.yml @@ -1,5 +1,5 @@ -- content: !readFile "assets/espresso/q2r.j2.in" - name: q2r.in - contextProviders: [] - applicationName: espresso - executableName: q2r.x +- content: !readFile 'assets/espresso/q2r.j2.in' + name: q2r.in + contextProviders: [] + applicationName: espresso + executableName: q2r.x diff --git a/templates/jupyterLab/jupyter.yml b/templates/jupyterLab/jupyter.yml index 19315d7f..984d9bd2 100644 --- a/templates/jupyterLab/jupyter.yml +++ b/templates/jupyterLab/jupyter.yml @@ -1,5 +1,5 @@ -- content: !readFile "assets/jupyterLab/requirements303.j2.txt" - name: requirements.txt - contextProviders: [] - applicationName: jupyterLab - executableName: jupyter +- content: !readFile 'assets/jupyterLab/requirements303.j2.txt' + name: requirements.txt + contextProviders: [] + applicationName: jupyterLab + executableName: jupyter diff --git a/templates/nwchem/nwchem.yml b/templates/nwchem/nwchem.yml index 07275a83..d388c6d9 100644 --- a/templates/nwchem/nwchem.yml +++ b/templates/nwchem/nwchem.yml @@ -1,6 +1,6 @@ -- content: !readFile "assets/nwchem/nwchem_total_energy.j2.inp" - name: nwchem_total_energy.inp - contextProviders: - - name: NWChemInputDataManager - applicationName: nwchem - executableName: nwchem +- content: !readFile 'assets/nwchem/nwchem_total_energy.j2.inp' + name: nwchem_total_energy.inp + contextProviders: + - name: NWChemInputDataManager + applicationName: nwchem + executableName: nwchem diff --git a/templates/python/python.yml b/templates/python/python.yml index a21bad99..cf7085c1 100644 --- a/templates/python/python.yml +++ b/templates/python/python.yml @@ -1,199 +1,200 @@ -- content: !readFile "assets/python/hello_world.pyi" - name: hello_world.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/requirements.j2.txt" - name: requirements.txt - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/requirements_empty.j2.txt" - name: requirements_empty.txt - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/generic/post_processing:plot:matplotlib.pyi" - name: matplotlib_basic.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/espresso_xml_get_qpt_irr.pyi" - name: espresso_xml_get_qpt_irr.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/espresso_extract_kpoints.pyi" - name: espresso_extract_kpoints.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/generic/processing:find_extrema.pyi" - name: find_extrema.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/generic/requirements.j2.txt" - name: processing_requirements.txt - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/requirements.j2.txt" - name: pyml_requirements.txt - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:setup_variables_packages.pyi" - name: pyml_settings.py - contextProviders: - - name: MLSettingsDataManager - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:custom.pyi" - name: pyml_custom.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:data_input:read_csv:pandas.pyi" - name: data_input_read_csv_pandas.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:data_input:train_test_split:sklearn.pyi" - name: data_input_train_test_split_sklearn.py - contextProviders: - - name: MLTrainTestSplitDataManager - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi" - name: pre_processing_min_max_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi" - name: pre_processing_remove_duplicates_pandas.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:pre_processing:remove_missing:pandas.pyi" - name: pre_processing_remove_missing_pandas.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:pre_processing:standardization:sklearn.pyi" - name: pre_processing_standardization_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi" - name: model_adaboosted_trees_regression_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi" - name: model_bagged_trees_regression_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi" - name: model_gradboosted_trees_regression_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi" - name: model_extreme_gradboosted_trees_regression_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:k_means_clustering:sklearn.pyi" - name: model_k_means_clustering_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi" - name: model_kernel_ridge_regression_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:lasso_regression:sklearn.pyi" - name: model_lasso_regression_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi" - name: model_mlp_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:random_forest_classification:sklearn.pyi" - name: model_random_forest_classification_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi" - name: model_gradboosted_trees_classification_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi" - name: model_extreme_gradboosted_trees_classification_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:random_forest_regression:sklearn.pyi" - name: model_random_forest_regression_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:model:ridge_regression:sklearn.pyi" - name: model_ridge_regression_sklearn.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi" - name: post_processing_parity_plot_matplotlib.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi" - name: post_processing_pca_2d_clusters_matplotlib.py - contextProviders: [] - applicationName: python - executableName: python - -- content: !readFile "assets/python/ml/pyml:post_processing:roc_curve:sklearn.pyi" - name: post_processing_roc_curve_sklearn.py - contextProviders: [] - applicationName: python - executableName: python +- content: !readFile 'assets/python/hello_world.pyi' + name: hello_world.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/requirements.j2.txt' + name: requirements.txt + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/requirements_empty.j2.txt' + name: requirements_empty.txt + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/generic/post_processing:plot:matplotlib.pyi' + name: matplotlib_basic.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/espresso_xml_get_qpt_irr.pyi' + name: espresso_xml_get_qpt_irr.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/espresso_extract_kpoints.pyi' + name: espresso_extract_kpoints.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/generic/processing:find_extrema.pyi' + name: find_extrema.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/generic/requirements.j2.txt' + name: processing_requirements.txt + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/requirements.j2.txt' + name: pyml_requirements.txt + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:setup_variables_packages.pyi' + name: pyml_settings.py + contextProviders: + - name: MLSettingsDataManager + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:custom.pyi' + name: pyml_custom.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:data_input:read_csv:pandas.pyi' + name: data_input_read_csv_pandas.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:data_input:train_test_split:sklearn.pyi' + name: data_input_train_test_split_sklearn.py + contextProviders: + - name: MLTrainTestSplitDataManager + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:pre_processing:min_max_scaler:sklearn.pyi' + name: pre_processing_min_max_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:pre_processing:remove_duplicates:pandas.pyi' + name: pre_processing_remove_duplicates_pandas.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:pre_processing:remove_missing:pandas.pyi' + name: pre_processing_remove_missing_pandas.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:pre_processing:standardization:sklearn.pyi' + name: pre_processing_standardization_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:adaboosted_trees_regression:sklearn.pyi' + name: model_adaboosted_trees_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:bagged_trees_regression:sklearn.pyi' + name: model_bagged_trees_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:gradboosted_trees_regression:sklearn.pyi' + name: model_gradboosted_trees_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:extreme_gradboosted_trees_regression:sklearn.pyi' + name: model_extreme_gradboosted_trees_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:k_means_clustering:sklearn.pyi' + name: model_k_means_clustering_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:kernel_ridge_regression:sklearn.pyi' + name: model_kernel_ridge_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:lasso_regression:sklearn.pyi' + name: model_lasso_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:multilayer_perceptron_regression:sklearn.pyi' + name: model_mlp_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:random_forest_classification:sklearn.pyi' + name: model_random_forest_classification_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:gradboosted_trees_classification:sklearn.pyi' + name: model_gradboosted_trees_classification_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +# yamllint disable-line rule:line-length +- content: !readFile 'assets/python/ml/pyml:model:extreme_gradboosted_trees_classification:sklearn.pyi' + name: model_extreme_gradboosted_trees_classification_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:random_forest_regression:sklearn.pyi' + name: model_random_forest_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:model:ridge_regression:sklearn.pyi' + name: model_ridge_regression_sklearn.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:post_processing:parity_plot:matplotlib.pyi' + name: post_processing_parity_plot_matplotlib.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:post_processing:pca_2d_clusters:matplotlib.pyi' + name: post_processing_pca_2d_clusters_matplotlib.py + contextProviders: [] + applicationName: python + executableName: python + +- content: !readFile 'assets/python/ml/pyml:post_processing:roc_curve:sklearn.pyi' + name: post_processing_roc_curve_sklearn.py + contextProviders: [] + applicationName: python + executableName: python diff --git a/templates/shell/sh.yml b/templates/shell/sh.yml index 555375ee..bca74490 100644 --- a/templates/shell/sh.yml +++ b/templates/shell/sh.yml @@ -1,30 +1,30 @@ -- content: !readFile "assets/shell/bash_hello_world.j2.sh" - name: hello_world.sh - contextProviders: [] - applicationName: shell - executableName: sh +- content: !readFile 'assets/shell/bash_hello_world.j2.sh' + name: hello_world.sh + contextProviders: [] + applicationName: shell + executableName: sh -- content: !readFile "assets/shell/bash_job_espresso_pw_scf.j2.sh" - name: job_espresso_pw_scf.sh - contextProviders: [] - applicationName: shell - executableName: sh +- content: !readFile 'assets/shell/bash_job_espresso_pw_scf.j2.sh' + name: job_espresso_pw_scf.sh + contextProviders: [] + applicationName: shell + executableName: sh -- content: !readFile "assets/shell/bash_espresso_link_outdir_save.j2.sh" - name: espresso_link_outdir_save.sh - contextProviders: [] - applicationName: shell - executableName: sh +- content: !readFile 'assets/shell/bash_espresso_link_outdir_save.j2.sh' + name: espresso_link_outdir_save.sh + contextProviders: [] + applicationName: shell + executableName: sh -- content: !readFile "assets/shell/bash_espresso_collect_dynmat.j2.sh" - name: espresso_collect_dynmat.sh - contextProviders: [] - applicationName: shell - executableName: sh +- content: !readFile 'assets/shell/bash_espresso_collect_dynmat.j2.sh' + name: espresso_collect_dynmat.sh + contextProviders: [] + applicationName: shell + executableName: sh -- content: !readFile "assets/shell/bash_vasp_prepare_neb_images.j2.sh" - name: bash_vasp_prepare_neb_images.sh - contextProviders: - - name: VASPNEBInputDataManager - applicationName: shell - executableName: sh +- content: !readFile 'assets/shell/bash_vasp_prepare_neb_images.j2.sh' + name: bash_vasp_prepare_neb_images.sh + contextProviders: + - name: VASPNEBInputDataManager + applicationName: shell + executableName: sh diff --git a/templates/templates.yml b/templates/templates.yml index 81a5db3a..b0ead83d 100644 --- a/templates/templates.yml +++ b/templates/templates.yml @@ -1,23 +1,23 @@ !flatten - - !include "templates/espresso/average.x.yml" - - !include "templates/espresso/bands.x.yml" - - !include "templates/espresso/dos.x.yml" - - !include "templates/espresso/dynmat.x.yml" - - !include "templates/espresso/gw.x.yml" - - !include "templates/espresso/matdyn.x.yml" - - !include "templates/espresso/neb.x.yml" - - !include "templates/espresso/ph.x.yml" - - !include "templates/espresso/pp.x.yml" - - !include "templates/espresso/projwfc.x.yml" - - !include "templates/espresso/pw.x.yml" - - !include "templates/espresso/q2r.x.yml" +- !include 'templates/espresso/average.x.yml' +- !include 'templates/espresso/bands.x.yml' +- !include 'templates/espresso/dos.x.yml' +- !include 'templates/espresso/dynmat.x.yml' +- !include 'templates/espresso/gw.x.yml' +- !include 'templates/espresso/matdyn.x.yml' +- !include 'templates/espresso/neb.x.yml' +- !include 'templates/espresso/ph.x.yml' +- !include 'templates/espresso/pp.x.yml' +- !include 'templates/espresso/projwfc.x.yml' +- !include 'templates/espresso/pw.x.yml' +- !include 'templates/espresso/q2r.x.yml' # jupyterLab - - !include "templates/jupyterLab/jupyter.yml" +- !include 'templates/jupyterLab/jupyter.yml' # nwchem - - !include "templates/nwchem/nwchem.yml" +- !include 'templates/nwchem/nwchem.yml' # python - - !include "templates/python/python.yml" +- !include 'templates/python/python.yml' # shell - - !include "templates/shell/sh.yml" +- !include 'templates/shell/sh.yml' # vasp - - !include "templates/vasp/vasp.yml" +- !include 'templates/vasp/vasp.yml' diff --git a/templates/vasp/vasp.yml b/templates/vasp/vasp.yml index 807010cd..39d5e931 100644 --- a/templates/vasp/vasp.yml +++ b/templates/vasp/vasp.yml @@ -1,115 +1,115 @@ -- content: !readFile "assets/vasp/INCAR.j2" - name: INCAR - contextProviders: - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/INCAR.j2' + name: INCAR + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/INCAR_bands.j2" - name: INCAR_BANDS - contextProviders: - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/INCAR_bands.j2' + name: INCAR_BANDS + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/INCAR_zpe.j2" - name: INCAR_ZPE - contextProviders: - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/INCAR_zpe.j2' + name: INCAR_ZPE + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/INCAR_relax.j2" - name: INCAR_RELAX - contextProviders: - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/INCAR_relax.j2' + name: INCAR_RELAX + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/INCAR_vc_relax.j2" - name: INCAR_VC_RELAX - contextProviders: - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/INCAR_vc_relax.j2' + name: INCAR_VC_RELAX + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !concatString - - !readFile "assets/vasp/INCAR.j2" - - !readFile "assets/vasp/_MIXIN_INCAR_hse.j2" - name: INCAR_HSE - contextProviders: - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !concatString + - !readFile 'assets/vasp/INCAR.j2' + - !readFile 'assets/vasp/_MIXIN_INCAR_hse.j2' + name: INCAR_HSE + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !concatString - - !readFile "assets/vasp/INCAR_bands.j2" - - !readFile "assets/vasp/_MIXIN_INCAR_hse.j2" - name: INCAR_BANDS_HSE - contextProviders: - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !concatString + - !readFile 'assets/vasp/INCAR_bands.j2' + - !readFile 'assets/vasp/_MIXIN_INCAR_hse.j2' + name: INCAR_BANDS_HSE + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/KPOINTS.j2" - name: KPOINTS - contextProviders: - - name: KGridFormDataManager - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/KPOINTS.j2' + name: KPOINTS + contextProviders: + - name: KGridFormDataManager + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/KPOINTS_bands.j2" - name: KPOINTS_BANDS - contextProviders: - - name: KPathFormDataManager - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/KPOINTS_bands.j2' + name: KPOINTS_BANDS + contextProviders: + - name: KPathFormDataManager + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/KPOINTS_conv.j2" - name: KPOINTS_CONV - contextProviders: - - name: KGridFormDataManager - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/KPOINTS_conv.j2' + name: KPOINTS_CONV + contextProviders: + - name: KGridFormDataManager + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/POSCAR.j2" - name: POSCAR - contextProviders: - - name: VASPInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/POSCAR.j2' + name: POSCAR + contextProviders: + - name: VASPInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/INCAR_neb.j2" - name: INCAR_NEB - contextProviders: - - name: NEBFormDataManager - - name: VASPNEBInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/INCAR_neb.j2' + name: INCAR_NEB + contextProviders: + - name: NEBFormDataManager + - name: VASPNEBInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/INCAR_neb_initial_final.j2" - name: INCAR_NEB_INITIAL_FINAL - contextProviders: - - name: NEBFormDataManager - - name: VASPNEBInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/INCAR_neb_initial_final.j2' + name: INCAR_NEB_INITIAL_FINAL + contextProviders: + - name: NEBFormDataManager + - name: VASPNEBInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/POSCAR_NEB_initial.j2" - name: POSCAR_NEB_INITIAL - contextProviders: - - name: NEBFormDataManager - - name: VASPNEBInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/POSCAR_NEB_initial.j2' + name: POSCAR_NEB_INITIAL + contextProviders: + - name: NEBFormDataManager + - name: VASPNEBInputDataManager + applicationName: vasp + executableName: vasp -- content: !readFile "assets/vasp/POSCAR_NEB_final.j2" - name: POSCAR_NEB_FINAL - contextProviders: - - name: NEBFormDataManager - - name: VASPNEBInputDataManager - applicationName: vasp - executableName: vasp +- content: !readFile 'assets/vasp/POSCAR_NEB_final.j2' + name: POSCAR_NEB_FINAL + contextProviders: + - name: NEBFormDataManager + - name: VASPNEBInputDataManager + applicationName: vasp + executableName: vasp From a3d310d6a26ac19832ec287986111d6c91b31f63 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 10 Aug 2023 14:52:24 -0700 Subject: [PATCH 45/52] chore: update generated JS files --- src/js/data/application_data.js | 4 ++-- src/js/data/templates.js | 4 ++-- src/js/data/tree.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/js/data/application_data.js b/src/js/data/application_data.js index 69db0efc..1b2ec12f 100644 --- a/src/js/data/application_data.js +++ b/src/js/data/application_data.js @@ -1,2 +1,2 @@ -// eslint-disable -module.exports = { applicationData: { "espresso":{ "name":"espresso","shortName":"qe","summary":"Quantum Espresso","defaultVersion":"5.4.0","versions":[{ "version":"5.2.1","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"5.2.1","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true },{ "version":"5.2.1","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true },{ "version":"5.4.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"5.4.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true },{ "version":"5.4.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true },{ "version":"6.0.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.0.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true },{ "version":"6.0.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true },{ "version":"6.3","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.3","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true },{ "version":"6.3","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true },{ "version":"6.4.1","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.5.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.6.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.7.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"6.8.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"7.0","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"7.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true },{ "version":"7.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true },{ "version":"7.2","isDefault":true,"hasAdvancedComputeOptions":true },{ "version":"7.2","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true }] },"exabyteml":{ "name":"exabyteml","shortName":"ml","summary":"Exabyte Machine Learning Engine","defaultVersion":"0.2.0","versions":[{ "version":"0.2.0","isDefault":true }] },"jupyterLab":{ "name":"jupyterLab","shortName":"jl","summary":"JupyterLab","defaultVersion":"3.0.3","versions":[{ "version":"3.0.3","isDefault":true },{ "version":"3.0.3","isDefault":false,"build":"with-pre-installed-packages" }] },"nwchem":{ "name":"nwchem","shortName":"nwchem","summary":"NWChem","defaultVersion":"7.0.2","versions":[{ "version":"7.0.2","isDefault":true },{ "version":"6.6" }] },"python":{ "name":"python","shortName":"py","summary":"Python Script","defaultVersion":"3.8.6","versions":[{ "version":"3.6.12" },{ "version":"3.7.9" },{ "version":"3.8.6","isDefault":true },{ "version":"3.9.1" },{ "version":"anaconda3-5.2.0" }] },"shell":{ "name":"shell","shortName":"sh","summary":"Shell Script","defaultVersion":"4.2.46","versions":[{ "version":"4.2.46","isDefault":true }] },"vasp":{ "name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","defaultVersion":"5.3.5","isLicensed":true,"versions":[{ "version":"5.3.5","isDefault":true },{ "version":"5.3.5","isDefault":false,"build":"Non-collinear" },{ "version":"5.3.5","isDefault":false,"build":"VTST" },{ "version":"5.4.4","isDefault":true },{ "version":"5.4.4","isDefault":false,"build":"Gamma" },{ "version":"5.4.4","isDefault":false,"build":"Non-collinear" },{ "version":"5.4.4","isDefault":false,"build":"VTST" },{ "version":"5.4.4","isDefault":false,"build":"VTST-Gamma" },{ "version":"5.4.4","isDefault":false,"build":"VTST-Non-collinear" }] } } } \ No newline at end of file +/* eslint-disable */ +module.exports = {applicationData: {"espresso":{"name":"espresso","shortName":"qe","summary":"Quantum Espresso","defaultVersion":"5.4.0","versions":[{"version":"5.2.1","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"5.2.1","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"5.2.1","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"5.4.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"5.4.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"5.4.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"6.0.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.0.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"6.0.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"6.3","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.3","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"6.3","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"6.4.1","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.5.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.6.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.7.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.8.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"7.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"7.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"7.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"7.2","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"7.2","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true}]},"exabyteml":{"name":"exabyteml","shortName":"ml","summary":"Exabyte Machine Learning Engine","defaultVersion":"0.2.0","versions":[{"version":"0.2.0","isDefault":true}]},"jupyterLab":{"name":"jupyterLab","shortName":"jl","summary":"JupyterLab","defaultVersion":"3.0.3","versions":[{"version":"3.0.3","isDefault":true},{"version":"3.0.3","isDefault":false,"build":"with-pre-installed-packages"}]},"nwchem":{"name":"nwchem","shortName":"nwchem","summary":"NWChem","defaultVersion":"7.0.2","versions":[{"version":"7.0.2","isDefault":true},{"version":"6.6"}]},"python":{"name":"python","shortName":"py","summary":"Python Script","defaultVersion":"3.8.6","versions":[{"version":"3.6.12"},{"version":"3.7.9"},{"version":"3.8.6","isDefault":true},{"version":"3.9.1"},{"version":"anaconda3-5.2.0"}]},"shell":{"name":"shell","shortName":"sh","summary":"Shell Script","defaultVersion":"4.2.46","versions":[{"version":"4.2.46","isDefault":true}]},"vasp":{"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","defaultVersion":"5.3.5","isLicensed":true,"versions":[{"version":"5.3.5","isDefault":true},{"version":"5.3.5","isDefault":false,"build":"Non-collinear"},{"version":"5.3.5","isDefault":false,"build":"VTST"},{"version":"5.4.4","isDefault":true},{"version":"5.4.4","isDefault":false,"build":"Gamma"},{"version":"5.4.4","isDefault":false,"build":"Non-collinear"},{"version":"5.4.4","isDefault":false,"build":"VTST"},{"version":"5.4.4","isDefault":false,"build":"VTST-Gamma"},{"version":"5.4.4","isDefault":false,"build":"VTST-Non-collinear"}]}}} diff --git a/src/js/data/templates.js b/src/js/data/templates.js index 330f98a7..9c2fa77b 100644 --- a/src/js/data/templates.js +++ b/src/js/data/templates.js @@ -1,2 +1,2 @@ -// eslint-disable -module.exports = { allTemplates: [{ "content":"1\npp.dat\n1.0\n3000\n3\n3.0000\n","name":"average.in","contextProviders":[],"applicationName":"espresso","executableName":"average.x" },{ "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\n","name":"bands.in","contextProviders":[],"applicationName":"espresso","executableName":"bands.x" },{ "content":"&DOS\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n/\n\n","name":"dos.in","contextProviders":[],"applicationName":"espresso","executableName":"dos.x" },{ "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","name":"dynmat_grid.in","contextProviders":[{ "name":"IGridFormDataManager" }],"applicationName":"espresso","executableName":"dynmat.x" },{ "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\n","name":"gw_bands_plasmon_pole.in","contextProviders":[{ "name":"KGridFormDataManager" },{ "name":"QGridFormDataManager" },{ "name":"ExplicitKPath2PIBAFormDataManager" }],"applicationName":"espresso","executableName":"gw.x" },{ "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\n","name":"gw_bands_full_frequency.in","contextProviders":[{ "name":"KGridFormDataManager" },{ "name":"QGridFormDataManager" },{ "name":"ExplicitKPath2PIBAFormDataManager" }],"applicationName":"espresso","executableName":"gw.x" },{ "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","name":"matdyn_grid.in","contextProviders":[{ "name":"IGridFormDataManager" }],"applicationName":"espresso","executableName":"matdyn.x" },{ "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","name":"matdyn_path.in","contextProviders":[{ "name":"IPathFormDataManager" }],"applicationName":"espresso","executableName":"matdyn.x" },{ "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 || 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","name":"neb.in","contextProviders":[{ "name":"KGridFormDataManager" },{ "name":"NEBFormDataManager" },{ "name":"QENEBInputDataManager" },{ "name":"PlanewaveCutoffDataManager" }],"applicationName":"espresso","executableName":"neb.x" },{ "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","name":"ph_grid.in","contextProviders":[{ "name":"QGridFormDataManager" }],"applicationName":"espresso","executableName":"ph.x" },{ "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/\n{% for point in qpath -%}\n{% for d in point.coordinates %}{{d}} {% endfor %}\n{% endfor %}\n","name":"ph_path.in","contextProviders":[{ "name":"QPathFormDataManager" }],"applicationName":"espresso","executableName":"ph.x" },{ "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","name":"ph_gamma.in","contextProviders":[],"applicationName":"espresso","executableName":"ph.x" },{ "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","name":"ph_init_qpoints.in","contextProviders":[{ "name":"QGridFormDataManager" }],"applicationName":"espresso","executableName":"ph.x" },{ "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","name":"ph_grid_restart.in","contextProviders":[{ "name":"QGridFormDataManager" }],"applicationName":"espresso","executableName":"ph.x" },{ "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","name":"ph_single_irr_qpt.in","contextProviders":[{ "name":"QGridFormDataManager" }],"applicationName":"espresso","executableName":"ph.x" },{ "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\n","name":"pp_density.in","contextProviders":[],"applicationName":"espresso","executableName":"pp.x" },{ "content":"&INPUTPP\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n filplot = 'pp.dat'\n plot_num = 11\n/\n","name":"pp_electrostatic_potential.in","contextProviders":[],"applicationName":"espresso","executableName":"pp.x" },{ "content":"&PROJWFC\n prefix = '__prefix__'\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n degauss = 0.01\n deltaE = 0.05\n/\n","name":"projwfc.in","contextProviders":[],"applicationName":"espresso","executableName":"projwfc.x" },{ "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","name":"pw_scf.in","contextProviders":[{ "name":"KGridFormDataManager" },{ "name":"QEPWXInputDataManager" },{ "name":"PlanewaveCutoffDataManager" }],"applicationName":"espresso","executableName":"pw.x" },{ "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","name":"pw_scf_bands_hse.in","contextProviders":[{ "name":"QEPWXInputDataManager" },{ "name":"PlanewaveCutoffDataManager" },{ "name":"QGridFormDataManager" },{ "name":"ExplicitKPathFormDataManager" }],"applicationName":"espresso","executableName":"pw.x" },{ "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","name":"pw_esm.in","contextProviders":[{ "name":"KGridFormDataManager" },{ "name":"QEPWXInputDataManager" },{ "name":"PlanewaveCutoffDataManager" },{ "name":"BoundaryConditionsFormDataManager" }],"applicationName":"espresso","executableName":"pw.x" },{ "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","name":"pw_esm_relax.in","contextProviders":[{ "name":"KGridFormDataManager" },{ "name":"QEPWXInputDataManager" },{ "name":"PlanewaveCutoffDataManager" },{ "name":"BoundaryConditionsFormDataManager" }],"applicationName":"espresso","executableName":"pw.x" },{ "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","name":"pw_scf_kpt_conv.in","contextProviders":[{ "name":"QEPWXInputDataManager" },{ "name":"PlanewaveCutoffDataManager" }],"applicationName":"espresso","executableName":"pw.x" },{ "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/\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","name":"pw_nscf.in","contextProviders":[{ "name":"KGridFormDataManager" },{ "name":"QEPWXInputDataManager" },{ "name":"PlanewaveCutoffDataManager" }],"applicationName":"espresso","executableName":"pw.x" },{ "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","name":"pw_relax.in","contextProviders":[{ "name":"KGridFormDataManager" },{ "name":"QEPWXInputDataManager" },{ "name":"PlanewaveCutoffDataManager" }],"applicationName":"espresso","executableName":"pw.x" },{ "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","name":"pw_vc_relax.in","contextProviders":[{ "name":"KGridFormDataManager" },{ "name":"QEPWXInputDataManager" },{ "name":"PlanewaveCutoffDataManager" }],"applicationName":"espresso","executableName":"pw.x" },{ "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","name":"pw_bands.in","contextProviders":[{ "name":"KPathFormDataManager" },{ "name":"QEPWXInputDataManager" },{ "name":"PlanewaveCutoffDataManager" }],"applicationName":"espresso","executableName":"pw.x" },{ "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","name":"pw_scf_hse.in","contextProviders":[{ "name":"KGridFormDataManager" },{ "name":"QEPWXInputDataManager" },{ "name":"PlanewaveCutoffDataManager" }],"applicationName":"espresso","executableName":"pw.x" },{ "content":"&INPUT\n fildyn = 'dyn'\n zasr = 'simple'\n flfrc = 'force_constants.fc'\n/\n","name":"q2r.in","contextProviders":[],"applicationName":"espresso","executableName":"q2r.x" },{ "content":"# ------------------------------------------------------------------------------- #\n# #\n# Example JupyterLab requirements #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. A Python virtual environment is created #\n# - in /scratch/$USER/$JOB_ID (for build: 'Default') #\n# - in /export/share/python/ (for build: 'with-pre-installed-packages') #\n# 3. This list is used to populate a Python virtual environment #\n# 4. JupyterLab is started #\n# #\n# For more information visit: #\n# - https://jupyterlab.readthedocs.io/en/stable/index.html #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# Note: With the JupyterLab build 'with-pre-installed-packages', packages #\n# cannot be added during the notebook runtime. #\n# #\n# ------------------------------------------------------------------------------- #\n\njupyterlab==3.0.3\nnotebook>=6.2.0\nexabyte-api-client>=2020.10.19\nnumpy>=1.17.3\npandas>=1.1.4\nurllib3<2\n","name":"requirements.txt","contextProviders":[],"applicationName":"jupyterLab","executableName":"jupyter" },{ "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","name":"nwchem_total_energy.inp","contextProviders":[{ "name":"NWChemInputDataManager" }],"applicationName":"nwchem","executableName":"nwchem" },{ "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 pymatgen as mg\n\nsi = mg.Element(\"Si\")\n\nprint(si.atomic_mass)\n","name":"hello_world.py","contextProviders":[],"applicationName":"python","executableName":"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# The package set below is a stable working set of pymatgen and #\n# all of its dependencies. Please adjust the list to include #\n# your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\n# Python 3 packages\ncertifi==2020.12.5\nchardet==4.0.0\ncycler==0.10.0\ndecorator==4.4.2\nfuture==0.18.2\nidna==2.10\nkiwisolver==1.3.1\nmatplotlib==3.3.4\nmonty==4.0.2\nmpmath==1.2.1\nnetworkx==2.5\nnumpy==1.19.5\npalettable==3.3.0\npandas==1.1.5\nPillow==8.1.0\nplotly==4.14.3\npymatgen==2021.2.8.1\npyparsing==2.4.7\npython-dateutil==2.8.1\npytz==2021.1\nrequests==2.25.1\nretrying==1.3.3\nruamel.yaml==0.16.12\nruamel.yaml.clib==0.2.2\nscipy==1.5.4\nsix==1.15.0\nspglib==1.16.1\nsympy==1.7.1\ntabulate==0.8.7\nuncertainties==3.1.5\nurllib3==1.26.3\nxgboost==1.4.2\n","name":"requirements.txt","contextProviders":[],"applicationName":"python","executableName":"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","name":"requirements_empty.txt","contextProviders":[],"applicationName":"python","executableName":"python" },{ "content":"# -------------------------------------------------------------------------------\n# This script contains a few helpful commands for basic plotting with matplotlib.\n# The commented out blocks are optional suggestions and included for convenience.\n# -------------------------------------------------------------------------------\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as ticker\nimport numpy as np\n\n\n# Plot Settings\n# -------------\nfigure_size = (6.4, 4.8) # width, height [inches]\ndpi = 100 # resolution [dots-per-inch]\nfont_size_title = 16 # font size of title\nfont_size_axis = 12 # font size of axis label\nfont_size_tick = 12 # font size of tick label\nfont_size_legend = 14 # font size of legend\nx_axis_label = None # label for x-axis\ny_axis_label = None # label for y-axis\ntitle = None # figure title\nshow_legend = False # whether to show legend\nsave_name = \"plot.pdf\" # output filename (with suffix), e.g. 'plot.pdf'\nx_view_limits = {\"left\": None, \"right\": None} # view limits for x-axis\ny_view_limits = {\"top\": None, \"bottom\": None} # view limits for y-axis\nx_tick_spacing = None # custom tick spacing for x-axis (optional)\ny_tick_spacing = None # custom tick spacing for y-axis (optional)\nx_tick_labels = None # custom tick labels for x-axis (optional)\ny_tick_labels = None # custom tick labels for y-axis (optional)\n\n\n# Figure & axes objects\n# ---------------------\nfig = plt.figure(figsize=figure_size, dpi=dpi)\nax = fig.add_subplot(111)\n\n# Example plot (REPLACE ACCORDINGLY)\n# ------------\nx = np.linspace(0, 7, num=100)\ny = np.sin(x)\nax.plot(x, y, \"g-\", zorder=3)\n\n\n# Help lines\n# ----------\n# ax.axhline(y=0, color=\"0.25\", linewidth=0.6, zorder=1)\n# ax.axvline(x=0, color=\"0.25\", linewidth=0.6, zorder=1)\n\n\n# View limits\n# -----------\nax.set_xlim(**x_view_limits)\nax.set_ylim(**y_view_limits)\n\n\n# Grid lines\n# ----------\n# grid_style = {\n# \"linestyle\" : \"dotted\",\n# \"linewidth\" : 0.6,\n# \"color\" : \"0.25\",\n# }\n# ax.grid(**grid_style)\n\n# Custom tick spacing\n# -------------------\n# ax.xaxis.set_major_locator(ticker.MultipleLocator(x_tick_spacing))\n# ax.yaxis.set_major_locator(ticker.MultipleLocator(y_tick_spacing))\n\n# Custom tick labels\n# ------------------\nif x_tick_labels is not None:\n ax.set_xticklabels(x_tick_labels, fontdict={\"fontsize\": font_size_tick}, minor=False)\nif y_tick_labels is not None:\n ax.set_yticklabels(y_tick_labels, fontdict={\"fontsize\": font_size_tick}, minor=False)\n\n# Other tick settings\n# -------------------\n# ax.tick_params(axis=\"both\", which=\"major\", labelsize=font_size_tick, direction=\"in\")\n# ax.tick_params(axis=\"x\", which=\"major\", pad=10)\n# ax.tick_params(axis=\"x\", which=\"minor\", bottom=False, top=False)\n\n\n# Axis labels\n# -----------\nif x_axis_label is not None:\n ax.set_xlabel(x_axis_label, size=font_size_axis)\nif y_axis_label is not None:\n ax.set_ylabel(y_axis_label, size=font_size_axis)\n\n# Figure title\n# ------------\nif title is not None:\n ax.set_title(title, fontsize=font_size_title)\n\n# Legend\n# ------\nif show_legend:\n ax.legend(prop={'size': font_size_legend})\n\n# Save figure\n# -----------\nif save_name is not None:\n save_format = save_name.split(\".\")[-1]\n fig.savefig(save_name, format=save_format, bbox_inches=\"tight\")\n","name":"matplotlib_basic.py","contextProviders":[],"applicationName":"python","executableName":"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\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","name":"espresso_xml_get_qpt_irr.py","contextProviders":[],"applicationName":"python","executableName":"python" },{ "content":"import re\nimport json\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","name":"espresso_extract_kpoints.py","contextProviders":[],"applicationName":"python","executableName":"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 numpy as np\nfrom scipy.signal import find_peaks\nimport json\nfrom munch import Munch\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","name":"find_extrema.py","contextProviders":[],"applicationName":"python","executableName":"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","name":"processing_requirements.txt","contextProviders":[],"applicationName":"python","executableName":"python" },{ "content":"# ----------------------------------------------------------------- #\n# #\n# PythonML Package Requirements for use on the Exabyte.io Platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# The package set below is a stable working set of pymatgen and #\n# all of its dependencies. Please adjust the list to include #\n# your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\n# Python 3 packages\ncertifi==2020.12.5\nchardet==4.0.0\ncycler==0.10.0\ndecorator==4.4.2\nfuture==0.18.2\nidna==2.10\nkiwisolver==1.3.1\nmatplotlib==3.3.4\nmonty==4.0.2\nmpmath==1.2.1\nnetworkx==2.5\nnumpy==1.19.5\npalettable==3.3.0\npandas==1.1.5\nPillow==8.1.0\nplotly==4.14.3\npymatgen==2021.2.8.1\npyparsing==2.4.7\npython-dateutil==2.8.1\npytz==2021.1\nrequests==2.25.1\nretrying==1.3.3\nruamel.yaml==0.16.12\nruamel.yaml.clib==0.2.2\nscikit-learn==0.24.1\nscipy==1.5.4\nsix==1.15.0\nspglib==1.16.1\nsympy==1.7.1\ntabulate==0.8.7\nuncertainties==3.1.5\nurllib3==1.26.3\nxgboost==1.4.2;python_version>=\"3.6\"\n","name":"pyml_requirements.txt","contextProviders":[],"applicationName":"python","executableName":"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 pickle, os\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","name":"pyml_settings.py","contextProviders":[{ "name":"MLSettingsDataManager" }],"applicationName":"python","executableName":"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","name":"pyml_custom.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.preprocessing\nimport settings\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","name":"data_input_read_csv_pandas.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.model_selection\nimport numpy as np\nimport settings\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","name":"data_input_train_test_split_sklearn.py","contextProviders":[{ "name":"MLTrainTestSplitDataManager" }],"applicationName":"python","executableName":"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 sklearn.preprocessing\n\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 # 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","name":"pre_processing_min_max_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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","name":"pre_processing_remove_duplicates_pandas.py","contextProviders":[],"applicationName":"python","executableName":"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","name":"pre_processing_remove_missing_pandas.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.preprocessing\n\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 # 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","name":"pre_processing_standardization_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.tree\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_adaboosted_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.tree\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_bagged_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_gradboosted_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 xgboost\nimport sklearn.metrics\nimport numpy as np\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 # 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","name":"model_extreme_gradboosted_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.cluster\nimport sklearn.metrics\nimport numpy as np\nimport settings\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","name":"model_k_means_clustering_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.kernel_ridge\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_kernel_ridge_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.linear_model\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_lasso_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.neural_network\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_mlp_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_random_forest_classification_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 # 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","name":"model_gradboosted_trees_classification_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 xgboost\nimport sklearn.metrics\nimport numpy as np\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 # 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","name":"model_extreme_gradboosted_trees_classification_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_random_forest_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.linear_model\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_ridge_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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\n\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","name":"post_processing_parity_plot_matplotlib.py","contextProviders":[],"applicationName":"python","executableName":"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 pandas as pd\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport sklearn.decomposition\nimport settings\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","name":"post_processing_pca_2d_clusters_matplotlib.py","contextProviders":[],"applicationName":"python","executableName":"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.pyplot as plt\nimport matplotlib.collections\nimport sklearn.metrics\nimport numpy as np\nimport settings\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","name":"post_processing_roc_curve_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"python" },{ "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","name":"hello_world.sh","contextProviders":[],"applicationName":"shell","executableName":"sh" },{ "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.exabyte.io/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@exabyte.io\n\n# load module\nmodule add espresso/540-i-174-impi-044\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","name":"job_espresso_pw_scf.sh","contextProviders":[],"applicationName":"shell","executableName":"sh" },{ "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","name":"espresso_link_outdir_save.sh","contextProviders":[],"applicationName":"shell","executableName":"sh" },{ "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","name":"espresso_collect_dynmat.sh","contextProviders":[],"applicationName":"shell","executableName":"sh" },{ "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 <=6.2.0\nexabyte-api-client>=2020.10.19\nnumpy>=1.17.3\npandas>=1.1.4\nurllib3<2\n","name":"requirements.txt","contextProviders":[],"applicationName":"jupyterLab","executableName":"jupyter"},{"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","name":"nwchem_total_energy.inp","contextProviders":[{"name":"NWChemInputDataManager"}],"applicationName":"nwchem","executableName":"nwchem"},{"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 pymatgen as mg\n\nsi = mg.Element(\"Si\")\n\nprint(si.atomic_mass)\n","name":"hello_world.py","contextProviders":[],"applicationName":"python","executableName":"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# The package set below is a stable working set of pymatgen and #\n# all of its dependencies. Please adjust the list to include #\n# your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\n# Python 3 packages\ncertifi==2020.12.5\nchardet==4.0.0\ncycler==0.10.0\ndecorator==4.4.2\nfuture==0.18.2\nidna==2.10\nkiwisolver==1.3.1\nmatplotlib==3.3.4\nmonty==4.0.2\nmpmath==1.2.1\nnetworkx==2.5\nnumpy==1.19.5\npalettable==3.3.0\npandas==1.1.5\nPillow==8.1.0\nplotly==4.14.3\npymatgen==2021.2.8.1\npyparsing==2.4.7\npython-dateutil==2.8.1\npytz==2021.1\nrequests==2.25.1\nretrying==1.3.3\nruamel.yaml==0.16.12\nruamel.yaml.clib==0.2.2\nscipy==1.5.4\nsix==1.15.0\nspglib==1.16.1\nsympy==1.7.1\ntabulate==0.8.7\nuncertainties==3.1.5\nurllib3==1.26.3\nxgboost==1.4.2\n","name":"requirements.txt","contextProviders":[],"applicationName":"python","executableName":"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","name":"requirements_empty.txt","contextProviders":[],"applicationName":"python","executableName":"python"},{"content":"# -------------------------------------------------------------------------------\n# This script contains a few helpful commands for basic plotting with matplotlib.\n# The commented out blocks are optional suggestions and included for convenience.\n# -------------------------------------------------------------------------------\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as ticker\nimport numpy as np\n\n\n# Plot Settings\n# -------------\nfigure_size = (6.4, 4.8) # width, height [inches]\ndpi = 100 # resolution [dots-per-inch]\nfont_size_title = 16 # font size of title\nfont_size_axis = 12 # font size of axis label\nfont_size_tick = 12 # font size of tick label\nfont_size_legend = 14 # font size of legend\nx_axis_label = None # label for x-axis\ny_axis_label = None # label for y-axis\ntitle = None # figure title\nshow_legend = False # whether to show legend\nsave_name = \"plot.pdf\" # output filename (with suffix), e.g. 'plot.pdf'\nx_view_limits = {\"left\": None, \"right\": None} # view limits for x-axis\ny_view_limits = {\"top\": None, \"bottom\": None} # view limits for y-axis\nx_tick_spacing = None # custom tick spacing for x-axis (optional)\ny_tick_spacing = None # custom tick spacing for y-axis (optional)\nx_tick_labels = None # custom tick labels for x-axis (optional)\ny_tick_labels = None # custom tick labels for y-axis (optional)\n\n\n# Figure & axes objects\n# ---------------------\nfig = plt.figure(figsize=figure_size, dpi=dpi)\nax = fig.add_subplot(111)\n\n# Example plot (REPLACE ACCORDINGLY)\n# ------------\nx = np.linspace(0, 7, num=100)\ny = np.sin(x)\nax.plot(x, y, \"g-\", zorder=3)\n\n\n# Help lines\n# ----------\n# ax.axhline(y=0, color=\"0.25\", linewidth=0.6, zorder=1)\n# ax.axvline(x=0, color=\"0.25\", linewidth=0.6, zorder=1)\n\n\n# View limits\n# -----------\nax.set_xlim(**x_view_limits)\nax.set_ylim(**y_view_limits)\n\n\n# Grid lines\n# ----------\n# grid_style = {\n# \"linestyle\" : \"dotted\",\n# \"linewidth\" : 0.6,\n# \"color\" : \"0.25\",\n# }\n# ax.grid(**grid_style)\n\n# Custom tick spacing\n# -------------------\n# ax.xaxis.set_major_locator(ticker.MultipleLocator(x_tick_spacing))\n# ax.yaxis.set_major_locator(ticker.MultipleLocator(y_tick_spacing))\n\n# Custom tick labels\n# ------------------\nif x_tick_labels is not None:\n ax.set_xticklabels(x_tick_labels, fontdict={\"fontsize\": font_size_tick}, minor=False)\nif y_tick_labels is not None:\n ax.set_yticklabels(y_tick_labels, fontdict={\"fontsize\": font_size_tick}, minor=False)\n\n# Other tick settings\n# -------------------\n# ax.tick_params(axis=\"both\", which=\"major\", labelsize=font_size_tick, direction=\"in\")\n# ax.tick_params(axis=\"x\", which=\"major\", pad=10)\n# ax.tick_params(axis=\"x\", which=\"minor\", bottom=False, top=False)\n\n\n# Axis labels\n# -----------\nif x_axis_label is not None:\n ax.set_xlabel(x_axis_label, size=font_size_axis)\nif y_axis_label is not None:\n ax.set_ylabel(y_axis_label, size=font_size_axis)\n\n# Figure title\n# ------------\nif title is not None:\n ax.set_title(title, fontsize=font_size_title)\n\n# Legend\n# ------\nif show_legend:\n ax.legend(prop={'size': font_size_legend})\n\n# Save figure\n# -----------\nif save_name is not None:\n save_format = save_name.split(\".\")[-1]\n fig.savefig(save_name, format=save_format, bbox_inches=\"tight\")\n","name":"matplotlib_basic.py","contextProviders":[],"applicationName":"python","executableName":"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\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","name":"espresso_xml_get_qpt_irr.py","contextProviders":[],"applicationName":"python","executableName":"python"},{"content":"import re\nimport json\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","name":"espresso_extract_kpoints.py","contextProviders":[],"applicationName":"python","executableName":"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 numpy as np\nfrom scipy.signal import find_peaks\nimport json\nfrom munch import Munch\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","name":"find_extrema.py","contextProviders":[],"applicationName":"python","executableName":"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","name":"processing_requirements.txt","contextProviders":[],"applicationName":"python","executableName":"python"},{"content":"# ----------------------------------------------------------------- #\n# #\n# PythonML Package Requirements for use on the Exabyte.io Platform #\n# #\n# Will be used as follows: #\n# #\n# 1. A runtime directory for this calculation is created #\n# 2. This list is used to populate a Python virtual environment #\n# 3. The virtual environment is activated #\n# 4. The Python process running the script included within this #\n# job is started #\n# #\n# For more information visit: #\n# - https://pip.pypa.io/en/stable/reference/pip_install #\n# - https://virtualenv.pypa.io/en/stable/ #\n# #\n# The package set below is a stable working set of pymatgen and #\n# all of its dependencies. Please adjust the list to include #\n# your preferred packages. #\n# #\n# ----------------------------------------------------------------- #\n\n# Python 3 packages\ncertifi==2020.12.5\nchardet==4.0.0\ncycler==0.10.0\ndecorator==4.4.2\nfuture==0.18.2\nidna==2.10\nkiwisolver==1.3.1\nmatplotlib==3.3.4\nmonty==4.0.2\nmpmath==1.2.1\nnetworkx==2.5\nnumpy==1.19.5\npalettable==3.3.0\npandas==1.1.5\nPillow==8.1.0\nplotly==4.14.3\npymatgen==2021.2.8.1\npyparsing==2.4.7\npython-dateutil==2.8.1\npytz==2021.1\nrequests==2.25.1\nretrying==1.3.3\nruamel.yaml==0.16.12\nruamel.yaml.clib==0.2.2\nscikit-learn==0.24.1\nscipy==1.5.4\nsix==1.15.0\nspglib==1.16.1\nsympy==1.7.1\ntabulate==0.8.7\nuncertainties==3.1.5\nurllib3==1.26.3\nxgboost==1.4.2;python_version>=\"3.6\"\n","name":"pyml_requirements.txt","contextProviders":[],"applicationName":"python","executableName":"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 pickle, os\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","name":"pyml_settings.py","contextProviders":[{"name":"MLSettingsDataManager"}],"applicationName":"python","executableName":"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","name":"pyml_custom.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.preprocessing\nimport settings\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","name":"data_input_read_csv_pandas.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.model_selection\nimport numpy as np\nimport settings\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","name":"data_input_train_test_split_sklearn.py","contextProviders":[{"name":"MLTrainTestSplitDataManager"}],"applicationName":"python","executableName":"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 sklearn.preprocessing\n\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 # 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","name":"pre_processing_min_max_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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","name":"pre_processing_remove_duplicates_pandas.py","contextProviders":[],"applicationName":"python","executableName":"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","name":"pre_processing_remove_missing_pandas.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.preprocessing\n\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 # 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","name":"pre_processing_standardization_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.tree\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_adaboosted_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.tree\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_bagged_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_gradboosted_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 xgboost\nimport sklearn.metrics\nimport numpy as np\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 # 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","name":"model_extreme_gradboosted_trees_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.cluster\nimport sklearn.metrics\nimport numpy as np\nimport settings\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","name":"model_k_means_clustering_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.kernel_ridge\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_kernel_ridge_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.linear_model\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_lasso_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.neural_network\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_mlp_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_random_forest_classification_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 # 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","name":"model_gradboosted_trees_classification_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 xgboost\nimport sklearn.metrics\nimport numpy as np\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 # 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","name":"model_extreme_gradboosted_trees_classification_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.ensemble\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_random_forest_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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 sklearn.linear_model\nimport sklearn.metrics\nimport numpy as np\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 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","name":"model_ridge_regression_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"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\n\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","name":"post_processing_parity_plot_matplotlib.py","contextProviders":[],"applicationName":"python","executableName":"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 pandas as pd\nimport matplotlib.cm\nimport matplotlib.lines\nimport matplotlib.pyplot as plt\nimport sklearn.decomposition\nimport settings\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","name":"post_processing_pca_2d_clusters_matplotlib.py","contextProviders":[],"applicationName":"python","executableName":"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.pyplot as plt\nimport matplotlib.collections\nimport sklearn.metrics\nimport numpy as np\nimport settings\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","name":"post_processing_roc_curve_sklearn.py","contextProviders":[],"applicationName":"python","executableName":"python"},{"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","name":"hello_world.sh","contextProviders":[],"applicationName":"shell","executableName":"sh"},{"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.exabyte.io/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@exabyte.io\n\n# load module\nmodule add espresso/540-i-174-impi-044\n\n# go to the job working directory\ncd $PBS_O_WORKDIR\n\n# create input file\ncat > pw.in < pw.out\n","name":"job_espresso_pw_scf.sh","contextProviders":[],"applicationName":"shell","executableName":"sh"},{"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","name":"espresso_link_outdir_save.sh","contextProviders":[],"applicationName":"shell","executableName":"sh"},{"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","name":"espresso_collect_dynmat.sh","contextProviders":[],"applicationName":"shell","executableName":"sh"},{"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 < Date: Thu, 10 Aug 2023 14:53:33 -0700 Subject: [PATCH 46/52] chore: disable eslint in generated JS files --- build_templates.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_templates.js b/build_templates.js index cd4bea6a..3d04046e 100644 --- a/build_templates.js +++ b/build_templates.js @@ -10,10 +10,10 @@ const utils = require("@exabyte-io/code.js/dist/utils"); function buildAsset({ assetPath, targetPath, dataKey = "" }) { const fileContent = fs.readFileSync(assetPath); const obj = yaml.load(fileContent, { schema: utils.JsYamlAllSchemas }); - const ignore = "// eslint-disable\n"; + const ignore = "/* eslint-disable */\n"; fs.writeFileSync( targetPath, - ignore + `module.exports = {${dataKey}: ` + JSON.stringify(obj) + "}", + ignore + `module.exports = {${dataKey}: ` + JSON.stringify(obj) + "}\n", "utf8", ); console.log(`Written asset "${assetPath}" to "${targetPath}"`); From 7b22ded8026d2a267845fa3cf8b01bef88fccb43 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 10 Aug 2023 15:01:12 -0700 Subject: [PATCH 47/52] chore: add yaml linter GH action --- .github/workflows/cicd.yml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 696342f2..34f93c7c 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -1,12 +1,33 @@ name: Continuous Testing and Publication from 'dev' -on: [push] +on: [push] # yamllint disable-line rule:truthy concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: + run-linter: + runs-on: ubuntu-latest + + steps: + - name: Checkout this repository + uses: actions/checkout@v2 + with: + lfs: true + + - name: Checkout actions repository + uses: actions/checkout@v2 + with: + repository: Exabyte-io/actions + token: ${{ secrets.BOT_GITHUB_TOKEN }} + ref: 4d3e0fc415f6eb28739a331e7f44cd7ba242668f + path: actions + + - name: Run Yaml linter + uses: ./actions/yaml/lint + with: + python-version: 3.8 run-py-tests: runs-on: ubuntu-latest @@ -37,8 +58,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: - - 12.x + node-version: + - 12.x - 14.x - 16.x From 66672599925fb1e2a38060a2112a9f9b502344fe Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 10 Aug 2023 15:01:43 -0700 Subject: [PATCH 48/52] chore: update package-lock.json --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index e25e5146..45b50cad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@exabyte-io/application-flavors.js", - "version": "2022.1.9-2", + "version": "0.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { From 7d6d276b26ddc571c5bf9ddd97744834bd036280 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 10 Aug 2023 15:05:29 -0700 Subject: [PATCH 49/52] chore: define ignore pattern in string --- .yamllint.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.yamllint.yml b/.yamllint.yml index e106264f..9e85cf7e 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -19,7 +19,7 @@ rules: min-spaces-from-content: 1 comments-indentation: disable -ignore: - - node_modules/ - - test/ - - tests/ +ignore: | + node_modules/ + test/ + tests/ From 2dc8891f9c20cb2c5bca24c4143fafeda02b6043 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 10 Aug 2023 16:39:38 -0700 Subject: [PATCH 50/52] chore: use HEAD of GH actions repo --- .github/workflows/cicd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 34f93c7c..e2d79a41 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -21,7 +21,6 @@ jobs: with: repository: Exabyte-io/actions token: ${{ secrets.BOT_GITHUB_TOKEN }} - ref: 4d3e0fc415f6eb28739a331e7f44cd7ba242668f path: actions - name: Run Yaml linter From 5821283642a9ec2d0084c22ff3b770d72c1fd653 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Thu, 10 Aug 2023 16:48:02 -0700 Subject: [PATCH 51/52] chore: update application data --- src/js/data/application_data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/data/application_data.js b/src/js/data/application_data.js index 1b2ec12f..84c93a08 100644 --- a/src/js/data/application_data.js +++ b/src/js/data/application_data.js @@ -1,2 +1,2 @@ /* eslint-disable */ -module.exports = {applicationData: {"espresso":{"name":"espresso","shortName":"qe","summary":"Quantum Espresso","defaultVersion":"5.4.0","versions":[{"version":"5.2.1","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"5.2.1","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"5.2.1","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"5.4.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"5.4.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"5.4.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"6.0.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.0.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"6.0.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"6.3","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.3","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"6.3","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"6.4.1","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.5.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.6.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.7.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.8.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"7.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"7.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"7.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"7.2","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"7.2","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true}]},"exabyteml":{"name":"exabyteml","shortName":"ml","summary":"Exabyte Machine Learning Engine","defaultVersion":"0.2.0","versions":[{"version":"0.2.0","isDefault":true}]},"jupyterLab":{"name":"jupyterLab","shortName":"jl","summary":"JupyterLab","defaultVersion":"3.0.3","versions":[{"version":"3.0.3","isDefault":true},{"version":"3.0.3","isDefault":false,"build":"with-pre-installed-packages"}]},"nwchem":{"name":"nwchem","shortName":"nwchem","summary":"NWChem","defaultVersion":"7.0.2","versions":[{"version":"7.0.2","isDefault":true},{"version":"6.6"}]},"python":{"name":"python","shortName":"py","summary":"Python Script","defaultVersion":"3.8.6","versions":[{"version":"3.6.12"},{"version":"3.7.9"},{"version":"3.8.6","isDefault":true},{"version":"3.9.1"},{"version":"anaconda3-5.2.0"}]},"shell":{"name":"shell","shortName":"sh","summary":"Shell Script","defaultVersion":"4.2.46","versions":[{"version":"4.2.46","isDefault":true}]},"vasp":{"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","defaultVersion":"5.3.5","isLicensed":true,"versions":[{"version":"5.3.5","isDefault":true},{"version":"5.3.5","isDefault":false,"build":"Non-collinear"},{"version":"5.3.5","isDefault":false,"build":"VTST"},{"version":"5.4.4","isDefault":true},{"version":"5.4.4","isDefault":false,"build":"Gamma"},{"version":"5.4.4","isDefault":false,"build":"Non-collinear"},{"version":"5.4.4","isDefault":false,"build":"VTST"},{"version":"5.4.4","isDefault":false,"build":"VTST-Gamma"},{"version":"5.4.4","isDefault":false,"build":"VTST-Non-collinear"}]}}} +module.exports = {applicationData: {"espresso":{"name":"espresso","shortName":"qe","summary":"Quantum Espresso","defaultVersion":"5.4.0","versions":[{"version":"5.2.1","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"5.2.1","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"5.2.1","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"5.4.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"5.4.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"5.4.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"6.0.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.0.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"6.0.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"6.3","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.3","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"6.3","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"6.4.1","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.5.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.6.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.7.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"6.8.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"7.0","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"7.0","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true},{"version":"7.0","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"7.2","isDefault":true,"hasAdvancedComputeOptions":true},{"version":"7.2","isDefault":false,"build":"Intel","hasAdvancedComputeOptions":true},{"version":"7.2","isDefault":false,"build":"GNU","hasAdvancedComputeOptions":true}]},"exabyteml":{"name":"exabyteml","shortName":"ml","summary":"Exabyte Machine Learning Engine","defaultVersion":"0.2.0","versions":[{"version":"0.2.0","isDefault":true}]},"jupyterLab":{"name":"jupyterLab","shortName":"jl","summary":"JupyterLab","defaultVersion":"3.0.3","versions":[{"version":"3.0.3","isDefault":true},{"version":"3.0.3","isDefault":false,"build":"with-pre-installed-packages"}]},"nwchem":{"name":"nwchem","shortName":"nwchem","summary":"NWChem","defaultVersion":"7.0.2","versions":[{"version":"7.0.2","isDefault":true},{"version":"6.6"}]},"python":{"name":"python","shortName":"py","summary":"Python Script","defaultVersion":"3.8.6","versions":[{"version":"3.6.12"},{"version":"3.7.9"},{"version":"3.8.6","isDefault":true},{"version":"3.9.1"},{"version":"anaconda3-5.2.0"}]},"shell":{"name":"shell","shortName":"sh","summary":"Shell Script","defaultVersion":"4.2.46","versions":[{"version":"4.2.46","isDefault":true}]},"vasp":{"name":"vasp","shortName":"vasp","summary":"Vienna Ab-initio Simulation Package","defaultVersion":"5.3.5","isLicensed":true,"versions":[{"version":"5.3.5","isDefault":true},{"version":"5.3.5","isDefault":false,"build":"Non-collinear"},{"version":"5.3.5","isDefault":false,"build":"VTST"},{"version":"5.4.4","isDefault":true},{"version":"5.4.4","isDefault":false,"build":"Gamma"},{"version":"5.4.4","isDefault":false,"build":"Non-collinear"},{"version":"5.4.4","isDefault":false,"build":"VTST"},{"version":"5.4.4","isDefault":false,"build":"VTST-Gamma"},{"version":"5.4.4","isDefault":false,"build":"VTST-Non-collinear"}]}}} From 6506125a664a7e5cee071f10837afdea7c3ff5f9 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 11 Aug 2023 12:18:58 -0700 Subject: [PATCH 52/52] codejs++: use 2023.8.10-0 --- package-lock.json | 29 +++++++++++++++-------------- package.json | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 45b50cad..01270d26 100644 --- a/package-lock.json +++ b/package-lock.json @@ -929,9 +929,9 @@ "dev": true }, "@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", + "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", "dev": true, "requires": { "@babel/helper-string-parser": "^7.22.5", @@ -982,9 +982,9 @@ "dev": true }, "@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", + "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", "dev": true, "requires": { "@babel/helper-string-parser": "^7.22.5", @@ -1310,8 +1310,9 @@ } }, "@exabyte-io/code.js": { - "version": "git+https://github.com/Exabyte-io/code.js.git#1a0884db8d778d146c91d31234291221788c5881", - "from": "git+https://github.com/Exabyte-io/code.js.git#1a0884db8d778d146c91d31234291221788c5881", + "version": "2023.8.10-0", + "resolved": "https://registry.npmjs.org/@exabyte-io/code.js/-/code.js-2023.8.10-0.tgz", + "integrity": "sha512-LmBzrXNyV5Vosf3jlWROVkr9mx+73hh8iz2kRCqU8XaLemAOjTQgttWcFZ9+iio/+DFM4cgEqR9u0RE5adEFsQ==", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1585,9 +1586,9 @@ "dev": true }, "@types/lodash": { - "version": "4.14.196", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.196.tgz", - "integrity": "sha512-22y3o88f4a94mKljsZcanlNWPzO0uBsBdzLAngf2tp533LzZcQzb6+eZPJ+vCTt+bqF2XnvT9gejTLsAcJAJyQ==", + "version": "4.14.197", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.197.tgz", + "integrity": "sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==", "dev": true }, "@types/minimatch": { @@ -1597,9 +1598,9 @@ "dev": true }, "@types/node": { - "version": "20.4.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.6.tgz", - "integrity": "sha512-q0RkvNgMweWWIvSMDiXhflGUKMdIxBo2M2tYM/0kEGDueQByFzK4KZAgu5YHGFNxziTlppNpTIBcqHQAxlfHdA==", + "version": "20.4.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.9.tgz", + "integrity": "sha512-8e2HYcg7ohnTUbHk8focoklEQYvemQmu9M/f43DZVx43kHn0tE3BY/6gSDxS7k0SprtS0NHvj+L80cGLnoOUcQ==", "dev": true }, "@types/prettier": { diff --git a/package.json b/package.json index 45bf4783..559c2efb 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "homepage": "https://github.com/Exabyte-io/application-flavors", "devDependencies": { "@exabyte-io/eslint-config": "^2022.11.17-0", - "@exabyte-io/code.js": "git+https://github.com/Exabyte-io/code.js.git#1a0884db8d778d146c91d31234291221788c5881", + "@exabyte-io/code.js": "2023.8.10-0", "chai": "^4.3.4", "eslint": "^7.32.0", "eslint-config-airbnb": "^19.0.2",