@mat3ra/esse 2023.12.25-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +10 -0
- package/.eslintrc.json +3 -0
- package/.pre-commit-config.yaml +20 -0
- package/.prettierrc +6 -0
- package/LICENSE.md +15 -0
- package/README.md +157 -0
- package/build_schemas.js +42 -0
- package/build_schemas.py +61 -0
- package/docs/README.md +3 -0
- package/example/3pse/file/applications/espresso/7.2/pw.x.json +94 -0
- package/example/core/abstract/2d_data.json +19 -0
- package/example/core/abstract/2d_plot.json +26 -0
- package/example/core/abstract/3d_grid.json +12 -0
- package/example/core/abstract/3d_tensor.json +17 -0
- package/example/core/abstract/3d_vector_basis.json +17 -0
- package/example/core/abstract/point.json +5 -0
- package/example/core/abstract/vector.json +5 -0
- package/example/core/primitive/1d_data_series.json +12 -0
- package/example/core/primitive/3d_lattice.json +8 -0
- package/example/core/primitive/array_of_3_booleans.json +5 -0
- package/example/core/primitive/array_of_3_numbers.json +5 -0
- package/example/core/primitive/array_of_ids.json +8 -0
- package/example/core/primitive/axis.json +4 -0
- package/example/core/primitive/scalar.json +3 -0
- package/example/core/primitive/string.json +3 -0
- package/example/core/reference/experiment/condition.json +12 -0
- package/example/core/reference/experiment/location.json +4 -0
- package/example/core/reference/experiment.json +22 -0
- package/example/core/reference/literature/name.json +5 -0
- package/example/core/reference/literature/pages.json +4 -0
- package/example/core/reference/literature.json +8 -0
- package/example/core/reference/modeling/exabyte.json +7 -0
- package/example/core/reference/modeling.json +3 -0
- package/example/core/reference.json +3 -0
- package/example/core/reusable/atomic_vectors.json +18 -0
- package/example/core/reusable/band_gap.json +16 -0
- package/example/core/reusable/energy.json +5 -0
- package/example/core/reusable/file_metadata.json +5 -0
- package/example/core/reusable/object_storage_container_data.json +8 -0
- package/example/element.json +14 -0
- package/example/job/compute.json +26 -0
- package/example/job.json +26 -0
- package/example/material.json +94 -0
- package/example/method/categorized_method.json +47 -0
- package/example/method/method_parameters.json +3 -0
- package/example/method.json +7 -0
- package/example/methods_directory/legacy/localorbital.json +4 -0
- package/example/methods_directory/legacy/pseudopotential.json +4 -0
- package/example/methods_directory/legacy/regression.json +61 -0
- package/example/methods_directory/legacy/unknown.json +4 -0
- package/example/methods_directory/mathematical/cg.json +10 -0
- package/example/methods_directory/mathematical/regression.json +65 -0
- package/example/methods_directory/physical/ao/dunning.json +13 -0
- package/example/methods_directory/physical/psp/file.json +49 -0
- package/example/methods_directory/physical/psp.json +16 -0
- package/example/methods_directory/physical/pw.json +9 -0
- package/example/methods_directory/physical/smearing.json +10 -0
- package/example/methods_directory/physical/tetrahedron.json +10 -0
- package/example/model/categorized_model.json +33 -0
- package/example/model/model_parameters.json +7 -0
- package/example/model.json +7 -0
- package/example/models_category/pb/qm/abin/gw.json +7 -0
- package/example/models_category/pb/qm/dft/ksdft.json +6 -0
- package/example/models_category/pb/qm/semp.json +5 -0
- package/example/models_directory/gga.json +15 -0
- package/example/models_directory/gw.json +15 -0
- package/example/models_directory/hybrid.json +15 -0
- package/example/models_directory/lda.json +15 -0
- package/example/models_directory/legacy/dft.json +8 -0
- package/example/models_directory/legacy/ml.json +7 -0
- package/example/models_directory/legacy/unknown.json +7 -0
- package/example/models_directory/re.json +9 -0
- package/example/project.json +21 -0
- package/example/properties_directory/electronic_configuration.json +4 -0
- package/example/properties_directory/elemental/atomic_radius.json +4 -0
- package/example/properties_directory/elemental/electronegativity.json +4 -0
- package/example/properties_directory/elemental/ionization_potential.json +4 -0
- package/example/properties_directory/non-scalar/band_gaps.json +25 -0
- package/example/properties_directory/non-scalar/band_structure.json +47 -0
- package/example/properties_directory/non-scalar/charge_density_profile.json +22 -0
- package/example/properties_directory/non-scalar/density_of_states.json +55 -0
- package/example/properties_directory/non-scalar/dielectric_tensor.json +133 -0
- package/example/properties_directory/non-scalar/file_content.json +8 -0
- package/example/properties_directory/non-scalar/hubbard_u.json +24 -0
- package/example/properties_directory/non-scalar/hubbard_v.json +22 -0
- package/example/properties_directory/non-scalar/hubbard_v_nn.json +24 -0
- package/example/properties_directory/non-scalar/phonon_dispersions.json +41 -0
- package/example/properties_directory/non-scalar/phonon_dos.json +37 -0
- package/example/properties_directory/non-scalar/potential_profile.json +32 -0
- package/example/properties_directory/non-scalar/reaction_energy_profile.json +30 -0
- package/example/properties_directory/non-scalar/stress_tensor.json +21 -0
- package/example/properties_directory/non-scalar/total_energy_contributions.json +44 -0
- package/example/properties_directory/non-scalar/vibrational_spectrum.json +25 -0
- package/example/properties_directory/scalar/electron_affinity.json +5 -0
- package/example/properties_directory/scalar/fermi_energy.json +5 -0
- package/example/properties_directory/scalar/formation_energy.json +5 -0
- package/example/properties_directory/scalar/ionization_potential.json +5 -0
- package/example/properties_directory/scalar/pressure.json +5 -0
- package/example/properties_directory/scalar/reaction_energy_barrier.json +5 -0
- package/example/properties_directory/scalar/surface_energy.json +5 -0
- package/example/properties_directory/scalar/total_energy.json +5 -0
- package/example/properties_directory/scalar/total_force.json +5 -0
- package/example/properties_directory/scalar/valence_band_offset.json +5 -0
- package/example/properties_directory/scalar/zero_point_energy.json +5 -0
- package/example/properties_directory/structural/atomic_forces.json +22 -0
- package/example/properties_directory/structural/basis/atomic_constraints.json +21 -0
- package/example/properties_directory/structural/basis/atomic_coordinate.json +8 -0
- package/example/properties_directory/structural/basis/atomic_coordinates.json +21 -0
- package/example/properties_directory/structural/basis/atomic_element.json +4 -0
- package/example/properties_directory/structural/basis/bonds.json +24 -0
- package/example/properties_directory/structural/basis.json +19 -0
- package/example/properties_directory/structural/density.json +5 -0
- package/example/properties_directory/structural/elemental_ratio.json +5 -0
- package/example/properties_directory/structural/inchi.json +4 -0
- package/example/properties_directory/structural/inchi_key.json +4 -0
- package/example/properties_directory/structural/lattice/lattice_bravais.json +13 -0
- package/example/properties_directory/structural/lattice/lattice_vectors.json +19 -0
- package/example/properties_directory/structural/lattice.json +7 -0
- package/example/properties_directory/structural/magnetic_moments.json +22 -0
- package/example/properties_directory/structural/molecular_pattern.json +71 -0
- package/example/properties_directory/structural/p-norm.json +5 -0
- package/example/properties_directory/structural/symmetry.json +9 -0
- package/example/properties_directory/structural/volume.json +5 -0
- package/example/properties_directory/workflow/convergence/electronic.json +15 -0
- package/example/properties_directory/workflow/convergence/ionic.json +20 -0
- package/example/properties_directory/workflow/convergence/kpoint.json +22 -0
- package/example/property/base.json +21 -0
- package/example/software/application.json +7 -0
- package/example/software/executable.json +20 -0
- package/example/software/flavor.json +9 -0
- package/example/software/template.json +14 -0
- package/example/software_directory/ml/exabyteml.json +6 -0
- package/example/software_directory/ml/unit/execution/evaluate/cross-validate.json +17 -0
- package/example/software_directory/ml/unit/execution/initialize.json +20 -0
- package/example/software_directory/ml/unit/execution/score.json +15 -0
- package/example/software_directory/ml/unit/execution/train.json +26 -0
- package/example/software_directory/ml/unit/processing/data_transformation/manipulation.json +14 -0
- package/example/software_directory/ml/unit/processing/data_transformation/scale_and_reduce.json +26 -0
- package/example/software_directory/ml/unit/processing/feature_selection/filter_based.json +13 -0
- package/example/software_directory/modeling/espresso/arguments.json +5 -0
- package/example/software_directory/modeling/espresso.json +6 -0
- package/example/software_directory/modeling/nwchem.json +6 -0
- package/example/software_directory/modeling/unit/execution.json +16 -0
- package/example/software_directory/modeling/vasp.json +6 -0
- package/example/software_directory/scripting/jupyter-lab.json +8 -0
- package/example/software_directory/scripting/python.json +8 -0
- package/example/software_directory/scripting/shell.json +8 -0
- package/example/software_directory/scripting/unit/execution.json +17 -0
- package/example/system/_material.json +5 -0
- package/example/system/_parent_job.json +5 -0
- package/example/system/_project.json +5 -0
- package/example/system/consistency_check.json +6 -0
- package/example/system/creator.json +5 -0
- package/example/system/entity_reference.json +5 -0
- package/example/system/file_source.json +6 -0
- package/example/system/message.json +14 -0
- package/example/system/owner.json +5 -0
- package/example/workflow/subworkflow.json +18 -0
- package/example/workflow/unit/assignment.json +19 -0
- package/example/workflow/unit/condition.json +22 -0
- package/example/workflow/unit/execution.json +39 -0
- package/example/workflow/unit/input/_inputItemScope.json +4 -0
- package/example/workflow/unit/io/api.json +31 -0
- package/example/workflow/unit/io/db.json +15 -0
- package/example/workflow/unit/io/object_storage.json +7 -0
- package/example/workflow/unit/io.json +41 -0
- package/example/workflow/unit/map.json +16 -0
- package/example/workflow/unit/processing.json +13 -0
- package/example/workflow/unit/reduce.json +16 -0
- package/example/workflow/unit/runtime/runtime_items.json +14 -0
- package/example/workflow/unit.json +8 -0
- package/example/workflow.json +34 -0
- package/lib/js/esse/index.js +83 -0
- package/lib/js/esse/schemaUtils.js +78 -0
- package/lib/js/esse/settings.js +18 -0
- package/lib/js/esse/utils.js +74 -0
- package/lib/js/json_include/index.js +110 -0
- package/lib/js/json_include/settings.js +13 -0
- package/lib/js/json_include/utils.js +22 -0
- package/lib/js/scripts/createEnumsFromYaml.js +74 -0
- package/lib/js/scripts/setSchemaIds.js +156 -0
- package/npmignore +6 -0
- package/package.json +75 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json +66 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json +30 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x/cell.json +89 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json +36 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x/control.json +181 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x/electrons.json +157 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json +219 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x/ions.json +216 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json +87 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x/system.json +649 -0
- package/schema/3pse/file/applications/espresso/7.2/pw.x.json +52 -0
- package/schema/core/abstract/2d_data.json +19 -0
- package/schema/core/abstract/2d_plot.json +29 -0
- package/schema/core/abstract/3d_grid.json +17 -0
- package/schema/core/abstract/3d_tensor.json +11 -0
- package/schema/core/abstract/3d_vector_basis.json +25 -0
- package/schema/core/abstract/point.json +10 -0
- package/schema/core/abstract/vector.json +13 -0
- package/schema/core/primitive/1d_data_series.json +16 -0
- package/schema/core/primitive/3d_lattice.json +40 -0
- package/schema/core/primitive/array_of_3_booleans.json +11 -0
- package/schema/core/primitive/array_of_3_numbers.json +11 -0
- package/schema/core/primitive/array_of_ids.json +17 -0
- package/schema/core/primitive/array_of_strings.json +11 -0
- package/schema/core/primitive/axis.json +18 -0
- package/schema/core/primitive/group_info.json +16 -0
- package/schema/core/primitive/integer_one_or_zero.json +8 -0
- package/schema/core/primitive/linked_list/base_node.json +34 -0
- package/schema/core/primitive/linked_list/named_node.json +14 -0
- package/schema/core/primitive/linked_list/named_node_in_group.json +14 -0
- package/schema/core/primitive/linked_list/node_with_type.json +16 -0
- package/schema/core/primitive/linked_list.json +24 -0
- package/schema/core/primitive/scalar.json +14 -0
- package/schema/core/primitive/slugified_entry.json +21 -0
- package/schema/core/primitive/slugified_entry_or_slug.json +14 -0
- package/schema/core/primitive/string.json +14 -0
- package/schema/core/reference/exabyte.json +19 -0
- package/schema/core/reference/experiment/condition.json +29 -0
- package/schema/core/reference/experiment/location.json +19 -0
- package/schema/core/reference/experiment.json +58 -0
- package/schema/core/reference/literature/name.json +24 -0
- package/schema/core/reference/literature/pages.json +17 -0
- package/schema/core/reference/literature.json +82 -0
- package/schema/core/reference/modeling/exabyte.json +30 -0
- package/schema/core/reference/modeling.json +10 -0
- package/schema/core/reference.json +16 -0
- package/schema/core/reusable/atomic_data/per_orbital.json +22 -0
- package/schema/core/reusable/atomic_data/per_orbital_pair.json +39 -0
- package/schema/core/reusable/atomic_data/value_number.json +13 -0
- package/schema/core/reusable/atomic_data/value_string.json +13 -0
- package/schema/core/reusable/atomic_data_per_orbital_numeric.json +15 -0
- package/schema/core/reusable/atomic_data_per_orbital_pair_numeric.json +15 -0
- package/schema/core/reusable/atomic_orbital.json +32 -0
- package/schema/core/reusable/atomic_scalars.json +17 -0
- package/schema/core/reusable/atomic_strings.json +17 -0
- package/schema/core/reusable/atomic_vectors.json +17 -0
- package/schema/core/reusable/band_gap.json +44 -0
- package/schema/core/reusable/categories.json +29 -0
- package/schema/core/reusable/category_path.json +7 -0
- package/schema/core/reusable/dielectric_tensor_component.json +28 -0
- package/schema/core/reusable/energy.json +29 -0
- package/schema/core/reusable/file_metadata.json +20 -0
- package/schema/core/reusable/frequency_function_matrix.json +23 -0
- package/schema/core/reusable/object_storage_container_data.json +37 -0
- package/schema/definitions/units.json +103 -0
- package/schema/element.json +28 -0
- package/schema/in_memory_entity/base.json +30 -0
- package/schema/in_memory_entity/defaultable.json +13 -0
- package/schema/in_memory_entity/named.json +13 -0
- package/schema/in_memory_entity/named_defaultable.json +16 -0
- package/schema/in_memory_entity/named_defaultable_has_metadata.json +19 -0
- package/schema/in_memory_entity/named_defaultable_runtime_items.json +19 -0
- package/schema/job/base.json +80 -0
- package/schema/job/compute.json +145 -0
- package/schema/job.json +19 -0
- package/schema/material/conventional.json +10 -0
- package/schema/material.json +57 -0
- package/schema/method/categorized_method.json +24 -0
- package/schema/method/method_parameters.json +20 -0
- package/schema/method/unit_method.json +27 -0
- package/schema/method.json +27 -0
- package/schema/methods_category/mathematical/diff/enum_options.json +8 -0
- package/schema/methods_category/mathematical/diff/enum_options.yml +3 -0
- package/schema/methods_category/mathematical/diff/fd.json +15 -0
- package/schema/methods_category/mathematical/diff.json +15 -0
- package/schema/methods_category/mathematical/discr/enum_options.json +8 -0
- package/schema/methods_category/mathematical/discr/enum_options.yml +3 -0
- package/schema/methods_category/mathematical/discr/mesh/enum_options.json +18 -0
- package/schema/methods_category/mathematical/discr/mesh/enum_options.yml +7 -0
- package/schema/methods_category/mathematical/discr/mesh/hybrid.json +15 -0
- package/schema/methods_category/mathematical/discr/mesh/nstruct.json +15 -0
- package/schema/methods_category/mathematical/discr/mesh/struct/cartesian.json +15 -0
- package/schema/methods_category/mathematical/discr/mesh/struct/enum_options.json +8 -0
- package/schema/methods_category/mathematical/discr/mesh/struct/enum_options.yml +3 -0
- package/schema/methods_category/mathematical/discr/mesh/struct.json +15 -0
- package/schema/methods_category/mathematical/discr/mesh.json +15 -0
- package/schema/methods_category/mathematical/discr.json +15 -0
- package/schema/methods_category/mathematical/enum_options.json +45 -0
- package/schema/methods_category/mathematical/enum_options.yml +22 -0
- package/schema/methods_category/mathematical/fapprx/basisexp.json +15 -0
- package/schema/methods_category/mathematical/fapprx/enum_options.json +13 -0
- package/schema/methods_category/mathematical/fapprx/enum_options.yml +5 -0
- package/schema/methods_category/mathematical/fapprx/ipol/enum_options.json +18 -0
- package/schema/methods_category/mathematical/fapprx/ipol/enum_options.yml +7 -0
- package/schema/methods_category/mathematical/fapprx/ipol/lin.json +15 -0
- package/schema/methods_category/mathematical/fapprx/ipol/poly.json +15 -0
- package/schema/methods_category/mathematical/fapprx/ipol/spline.json +15 -0
- package/schema/methods_category/mathematical/fapprx/ipol.json +15 -0
- package/schema/methods_category/mathematical/fapprx.json +15 -0
- package/schema/methods_category/mathematical/intgr/analytic/enum_options.json +20 -0
- package/schema/methods_category/mathematical/intgr/analytic/enum_options.yml +14 -0
- package/schema/methods_category/mathematical/intgr/analytic/volume.json +18 -0
- package/schema/methods_category/mathematical/intgr/analytic.json +15 -0
- package/schema/methods_category/mathematical/intgr/diffeq/enum_options.json +13 -0
- package/schema/methods_category/mathematical/intgr/diffeq/enum_options.yml +5 -0
- package/schema/methods_category/mathematical/intgr/diffeq/order1.json +15 -0
- package/schema/methods_category/mathematical/intgr/diffeq/order2.json +15 -0
- package/schema/methods_category/mathematical/intgr/diffeq.json +15 -0
- package/schema/methods_category/mathematical/intgr/enum_options.json +23 -0
- package/schema/methods_category/mathematical/intgr/enum_options.yml +9 -0
- package/schema/methods_category/mathematical/intgr/numquad/enum_options.json +13 -0
- package/schema/methods_category/mathematical/intgr/numquad/enum_options.yml +5 -0
- package/schema/methods_category/mathematical/intgr/numquad/gauss.json +15 -0
- package/schema/methods_category/mathematical/intgr/numquad/newcot.json +15 -0
- package/schema/methods_category/mathematical/intgr/numquad.json +15 -0
- package/schema/methods_category/mathematical/intgr/transf/enum_options.json +8 -0
- package/schema/methods_category/mathematical/intgr/transf/enum_options.yml +3 -0
- package/schema/methods_category/mathematical/intgr/transf/fourier.json +15 -0
- package/schema/methods_category/mathematical/intgr/transf.json +15 -0
- package/schema/methods_category/mathematical/intgr.json +15 -0
- package/schema/methods_category/mathematical/linalg/dcomp.json +15 -0
- package/schema/methods_category/mathematical/linalg/diag/davidson.json +15 -0
- package/schema/methods_category/mathematical/linalg/diag/enum_options.json +8 -0
- package/schema/methods_category/mathematical/linalg/diag/enum_options.yml +3 -0
- package/schema/methods_category/mathematical/linalg/diag.json +15 -0
- package/schema/methods_category/mathematical/linalg/enum_options.json +23 -0
- package/schema/methods_category/mathematical/linalg/enum_options.yml +9 -0
- package/schema/methods_category/mathematical/linalg/lintra.json +15 -0
- package/schema/methods_category/mathematical/linalg/matf.json +15 -0
- package/schema/methods_category/mathematical/linalg.json +15 -0
- package/schema/methods_category/mathematical/opt/diff/bracket.json +15 -0
- package/schema/methods_category/mathematical/opt/diff/enum_options.json +28 -0
- package/schema/methods_category/mathematical/opt/diff/enum_options.yml +11 -0
- package/schema/methods_category/mathematical/opt/diff/local.json +15 -0
- package/schema/methods_category/mathematical/opt/diff/order1.json +15 -0
- package/schema/methods_category/mathematical/opt/diff/order2.json +15 -0
- package/schema/methods_category/mathematical/opt/diff/ordern/cg.json +15 -0
- package/schema/methods_category/mathematical/opt/diff/ordern/enum_options.json +8 -0
- package/schema/methods_category/mathematical/opt/diff/ordern/enum_options.yml +3 -0
- package/schema/methods_category/mathematical/opt/diff/ordern.json +15 -0
- package/schema/methods_category/mathematical/opt/diff.json +15 -0
- package/schema/methods_category/mathematical/opt/enum_options.json +18 -0
- package/schema/methods_category/mathematical/opt/enum_options.yml +7 -0
- package/schema/methods_category/mathematical/opt/ndiff/direct.json +15 -0
- package/schema/methods_category/mathematical/opt/ndiff/enum_options.json +18 -0
- package/schema/methods_category/mathematical/opt/ndiff/enum_options.yml +7 -0
- package/schema/methods_category/mathematical/opt/ndiff/pop.json +15 -0
- package/schema/methods_category/mathematical/opt/ndiff/stoch.json +15 -0
- package/schema/methods_category/mathematical/opt/ndiff.json +15 -0
- package/schema/methods_category/mathematical/opt/root/bracket.json +15 -0
- package/schema/methods_category/mathematical/opt/root/enum_options.json +13 -0
- package/schema/methods_category/mathematical/opt/root/enum_options.yml +5 -0
- package/schema/methods_category/mathematical/opt/root/iter.json +15 -0
- package/schema/methods_category/mathematical/opt/root.json +15 -0
- package/schema/methods_category/mathematical/opt.json +15 -0
- package/schema/methods_category/mathematical/regression.json +18 -0
- package/schema/methods_category/physical/enum_options.json +8 -0
- package/schema/methods_category/physical/enum_options.yml +3 -0
- package/schema/methods_category/physical/qm/enum_options.json +8 -0
- package/schema/methods_category/physical/qm/enum_options.yml +3 -0
- package/schema/methods_category/physical/qm/wf/ao/dunning.json +17 -0
- package/schema/methods_category/physical/qm/wf/ao/other.json +17 -0
- package/schema/methods_category/physical/qm/wf/ao/pople.json +17 -0
- package/schema/methods_category/physical/qm/wf/ao.json +18 -0
- package/schema/methods_category/physical/qm/wf/enum_options.json +63 -0
- package/schema/methods_category/physical/qm/wf/enum_options.yml +43 -0
- package/schema/methods_category/physical/qm/wf/psp.json +18 -0
- package/schema/methods_category/physical/qm/wf/pw.json +15 -0
- package/schema/methods_category/physical/qm/wf/smearing.json +19 -0
- package/schema/methods_category/physical/qm/wf/tetrahedron.json +18 -0
- package/schema/methods_category/physical/qm/wf.json +15 -0
- package/schema/methods_category/physical/qm.json +15 -0
- package/schema/methods_directory/legacy/localorbital.json +22 -0
- package/schema/methods_directory/legacy/pseudopotential.json +25 -0
- package/schema/methods_directory/legacy/regression.json +34 -0
- package/schema/methods_directory/legacy/unknown.json +22 -0
- package/schema/methods_directory/mathematical/cg.json +17 -0
- package/schema/methods_directory/mathematical/davidson.json +17 -0
- package/schema/methods_directory/mathematical/regression/data.json +24 -0
- package/schema/methods_directory/mathematical/regression/dataset.json +21 -0
- package/schema/methods_directory/mathematical/regression/kernel_ridge/data_per_property.json +27 -0
- package/schema/methods_directory/mathematical/regression/linear/data_per_property.json +22 -0
- package/schema/methods_directory/mathematical/regression/per_feature_item.json +22 -0
- package/schema/methods_directory/mathematical/regression/precision.json +14 -0
- package/schema/methods_directory/mathematical/regression/precision_per_property.json +23 -0
- package/schema/methods_directory/mathematical/regression.json +26 -0
- package/schema/methods_directory/physical/ao/dunning.json +33 -0
- package/schema/methods_directory/physical/ao/enum_options.json +28 -0
- package/schema/methods_directory/physical/ao/enum_options.yml +19 -0
- package/schema/methods_directory/physical/ao/other.json +33 -0
- package/schema/methods_directory/physical/ao/pople.json +33 -0
- package/schema/methods_directory/physical/psp/file.json +26 -0
- package/schema/methods_directory/physical/psp/file_data_item.json +80 -0
- package/schema/methods_directory/physical/psp.json +24 -0
- package/schema/methods_directory/physical/pw.json +17 -0
- package/schema/methods_directory/physical/smearing.json +17 -0
- package/schema/methods_directory/physical/tetrahedron.json +16 -0
- package/schema/model/categorized_model.json +18 -0
- package/schema/model/mixins/dft/double_hybrid_functional.json +12 -0
- package/schema/model/mixins/dft/enum_options.json +30 -0
- package/schema/model/mixins/dft/enum_options.yml +13 -0
- package/schema/model/mixins/dft/gga_functional.json +12 -0
- package/schema/model/mixins/dft/hybrid_functional.json +12 -0
- package/schema/model/mixins/dft/lda_functional.json +12 -0
- package/schema/model/mixins/dft/mgga_functional.json +12 -0
- package/schema/model/mixins/dispersion_correction.json +12 -0
- package/schema/model/mixins/enum_options.json +22 -0
- package/schema/model/mixins/enum_options.yml +10 -0
- package/schema/model/mixins/hubbard.json +12 -0
- package/schema/model/mixins/spin_orbit_coupling.json +11 -0
- package/schema/model/mixins/spin_polarization.json +12 -0
- package/schema/model/model_parameters.json +38 -0
- package/schema/model/model_without_method.json +30 -0
- package/schema/model.json +24 -0
- package/schema/models_category/enum_options.json +13 -0
- package/schema/models_category/enum_options.yml +5 -0
- package/schema/models_category/pb/enum_options.json +8 -0
- package/schema/models_category/pb/enum_options.yml +3 -0
- package/schema/models_category/pb/qm/abin/enum_options.json +15 -0
- package/schema/models_category/pb/qm/abin/enum_options.yml +10 -0
- package/schema/models_category/pb/qm/abin/gw.json +18 -0
- package/schema/models_category/pb/qm/abin.json +15 -0
- package/schema/models_category/pb/qm/dft/enum_options.json +8 -0
- package/schema/models_category/pb/qm/dft/enum_options.yml +3 -0
- package/schema/models_category/pb/qm/dft/ksdft/double_hybrid.json +15 -0
- package/schema/models_category/pb/qm/dft/ksdft/enum_options.json +28 -0
- package/schema/models_category/pb/qm/dft/ksdft/enum_options.yml +11 -0
- package/schema/models_category/pb/qm/dft/ksdft/gga.json +15 -0
- package/schema/models_category/pb/qm/dft/ksdft/hybrid.json +15 -0
- package/schema/models_category/pb/qm/dft/ksdft/lda.json +15 -0
- package/schema/models_category/pb/qm/dft/ksdft/mgga.json +15 -0
- package/schema/models_category/pb/qm/dft/ksdft.json +15 -0
- package/schema/models_category/pb/qm/dft.json +15 -0
- package/schema/models_category/pb/qm/enum_options.json +18 -0
- package/schema/models_category/pb/qm/enum_options.yml +7 -0
- package/schema/models_category/pb/qm/semp.json +15 -0
- package/schema/models_category/pb/qm.json +15 -0
- package/schema/models_category/pb.json +15 -0
- package/schema/models_category/st/det/enum_options.json +8 -0
- package/schema/models_category/st/det/enum_options.yml +3 -0
- package/schema/models_category/st/det/ml/enum_options.json +8 -0
- package/schema/models_category/st/det/ml/enum_options.yml +3 -0
- package/schema/models_category/st/det/ml/re.json +15 -0
- package/schema/models_category/st/det/ml.json +15 -0
- package/schema/models_category/st/det.json +15 -0
- package/schema/models_category/st/enum_options.json +8 -0
- package/schema/models_category/st/enum_options.yml +3 -0
- package/schema/models_category/st.json +15 -0
- package/schema/models_directory/double_hybrid.json +39 -0
- package/schema/models_directory/gga.json +42 -0
- package/schema/models_directory/gw.json +54 -0
- package/schema/models_directory/hybrid.json +42 -0
- package/schema/models_directory/lda.json +42 -0
- package/schema/models_directory/legacy/dft.json +81 -0
- package/schema/models_directory/legacy/ml.json +22 -0
- package/schema/models_directory/legacy/unknown.json +22 -0
- package/schema/models_directory/mgga.json +42 -0
- package/schema/models_directory/re.json +23 -0
- package/schema/project.json +40 -0
- package/schema/properties_directory/derived_properties.json +31 -0
- package/schema/properties_directory/electronic_configuration.json +16 -0
- package/schema/properties_directory/elemental/atomic_radius.json +21 -0
- package/schema/properties_directory/elemental/electronegativity.json +18 -0
- package/schema/properties_directory/elemental/ionization_potential.json +21 -0
- package/schema/properties_directory/non-scalar/average_potential_profile.json +41 -0
- package/schema/properties_directory/non-scalar/band_gaps.json +51 -0
- package/schema/properties_directory/non-scalar/band_structure.json +52 -0
- package/schema/properties_directory/non-scalar/charge_density_profile.json +38 -0
- package/schema/properties_directory/non-scalar/density_of_states.json +70 -0
- package/schema/properties_directory/non-scalar/dielectric_tensor.json +22 -0
- package/schema/properties_directory/non-scalar/file_content.json +34 -0
- package/schema/properties_directory/non-scalar/hubbard_u.json +32 -0
- package/schema/properties_directory/non-scalar/hubbard_v.json +33 -0
- package/schema/properties_directory/non-scalar/hubbard_v_nn.json +11 -0
- package/schema/properties_directory/non-scalar/phonon_dispersions.json +41 -0
- package/schema/properties_directory/non-scalar/phonon_dos.json +42 -0
- package/schema/properties_directory/non-scalar/potential_profile.json +38 -0
- package/schema/properties_directory/non-scalar/reaction_energy_profile.json +38 -0
- package/schema/properties_directory/non-scalar/stress_tensor.json +18 -0
- package/schema/properties_directory/non-scalar/total_energy_contributions.json +211 -0
- package/schema/properties_directory/non-scalar/vibrational_spectrum.json +45 -0
- package/schema/properties_directory/scalar/electron_affinity.json +17 -0
- package/schema/properties_directory/scalar/fermi_energy.json +17 -0
- package/schema/properties_directory/scalar/formation_energy.json +17 -0
- package/schema/properties_directory/scalar/ionization_potential.json +17 -0
- package/schema/properties_directory/scalar/pressure.json +21 -0
- package/schema/properties_directory/scalar/reaction_energy_barrier.json +17 -0
- package/schema/properties_directory/scalar/surface_energy.json +17 -0
- package/schema/properties_directory/scalar/total_energy.json +17 -0
- package/schema/properties_directory/scalar/total_force.json +20 -0
- package/schema/properties_directory/scalar/valence_band_offset.json +17 -0
- package/schema/properties_directory/scalar/zero_point_energy.json +17 -0
- package/schema/properties_directory/structural/atomic_forces.json +19 -0
- package/schema/properties_directory/structural/basis/atomic_constraints.json +16 -0
- package/schema/properties_directory/structural/basis/atomic_coordinate.json +14 -0
- package/schema/properties_directory/structural/basis/atomic_coordinates.json +21 -0
- package/schema/properties_directory/structural/basis/atomic_element.json +25 -0
- package/schema/properties_directory/structural/basis/bonds.json +35 -0
- package/schema/properties_directory/structural/basis.json +33 -0
- package/schema/properties_directory/structural/density.json +22 -0
- package/schema/properties_directory/structural/elemental_ratio.json +27 -0
- package/schema/properties_directory/structural/inchi.json +17 -0
- package/schema/properties_directory/structural/inchi_key.json +17 -0
- package/schema/properties_directory/structural/lattice/lattice_bravais.json +38 -0
- package/schema/properties_directory/structural/lattice/lattice_vectors.json +20 -0
- package/schema/properties_directory/structural/lattice/type_enum.json +23 -0
- package/schema/properties_directory/structural/lattice/type_extended_enum.json +32 -0
- package/schema/properties_directory/structural/lattice.json +25 -0
- package/schema/properties_directory/structural/magnetic_moments.json +19 -0
- package/schema/properties_directory/structural/molecular_pattern.json +19 -0
- package/schema/properties_directory/structural/p-norm.json +22 -0
- package/schema/properties_directory/structural/patterns/functional_group.json +32 -0
- package/schema/properties_directory/structural/patterns/ring.json +31 -0
- package/schema/properties_directory/structural/patterns/special_bond.json +29 -0
- package/schema/properties_directory/structural/symmetry.json +35 -0
- package/schema/properties_directory/structural/volume.json +22 -0
- package/schema/properties_directory/workflow/convergence/electronic.json +31 -0
- package/schema/properties_directory/workflow/convergence/ionic.json +60 -0
- package/schema/properties_directory/workflow/convergence/kpoint.json +46 -0
- package/schema/property/base.json +57 -0
- package/schema/property/meta.json +10 -0
- package/schema/property/raw.json +57 -0
- package/schema/property/source.json +26 -0
- package/schema/software/application.json +40 -0
- package/schema/software/executable.json +32 -0
- package/schema/software/flavor.json +40 -0
- package/schema/software/template.json +33 -0
- package/schema/software_directory/ml/exabyteml.json +23 -0
- package/schema/software_directory/ml/unit/execution/evaluate/cross-validate.json +25 -0
- package/schema/software_directory/ml/unit/execution/initialize.json +29 -0
- package/schema/software_directory/ml/unit/execution/score.json +13 -0
- package/schema/software_directory/ml/unit/execution/train.json +38 -0
- package/schema/software_directory/ml/unit/execution.json +17 -0
- package/schema/software_directory/ml/unit/processing/data_transformation/manipulation.json +50 -0
- package/schema/software_directory/ml/unit/processing/data_transformation/scale_and_reduce.json +70 -0
- package/schema/software_directory/ml/unit/processing/data_transformation.json +8 -0
- package/schema/software_directory/ml/unit/processing/feature_selection/filter_based.json +45 -0
- package/schema/software_directory/ml/unit/processing/feature_selection.json +8 -0
- package/schema/software_directory/ml/unit/processing.json +11 -0
- package/schema/software_directory/modeling/espresso/arguments.json +44 -0
- package/schema/software_directory/modeling/espresso.json +26 -0
- package/schema/software_directory/modeling/nwchem.json +34 -0
- package/schema/software_directory/modeling/unit/execution.json +14 -0
- package/schema/software_directory/modeling/vasp.json +40 -0
- package/schema/software_directory/scripting/jupyter-lab.json +38 -0
- package/schema/software_directory/scripting/python.json +52 -0
- package/schema/software_directory/scripting/shell.json +52 -0
- package/schema/software_directory/scripting/unit/execution.json +14 -0
- package/schema/system/_material.json +19 -0
- package/schema/system/_parent_job.json +19 -0
- package/schema/system/_project.json +19 -0
- package/schema/system/bankable.json +15 -0
- package/schema/system/consistency_check.json +39 -0
- package/schema/system/creator.json +19 -0
- package/schema/system/creator_account.json +10 -0
- package/schema/system/database_source.json +40 -0
- package/schema/system/defaultable.json +12 -0
- package/schema/system/description.json +14 -0
- package/schema/system/entity_reference.json +19 -0
- package/schema/system/file_source.json +30 -0
- package/schema/system/history.json +25 -0
- package/schema/system/in_set.json +28 -0
- package/schema/system/is_multi_material.json +10 -0
- package/schema/system/is_outdated.json +10 -0
- package/schema/system/job_extended.json +39 -0
- package/schema/system/message.json +67 -0
- package/schema/system/metadata.json +10 -0
- package/schema/system/name.json +11 -0
- package/schema/system/owner.json +19 -0
- package/schema/system/path.json +11 -0
- package/schema/system/path_entity.json +13 -0
- package/schema/system/schema_version.json +12 -0
- package/schema/system/scope.json +10 -0
- package/schema/system/set.json +16 -0
- package/schema/system/sharing.json +10 -0
- package/schema/system/soft_removable.json +15 -0
- package/schema/system/status.json +31 -0
- package/schema/system/tags.json +14 -0
- package/schema/system/timestampable.json +37 -0
- package/schema/system/use_values.json +10 -0
- package/schema/workflow/base.json +39 -0
- package/schema/workflow/base_flow.json +39 -0
- package/schema/workflow/scope.json +20 -0
- package/schema/workflow/subworkflow.json +37 -0
- package/schema/workflow/unit/assertion.json +28 -0
- package/schema/workflow/unit/assignment.json +37 -0
- package/schema/workflow/unit/condition.json +51 -0
- package/schema/workflow/unit/execution.json +40 -0
- package/schema/workflow/unit/input/_input.json +22 -0
- package/schema/workflow/unit/input/_inputItem.json +20 -0
- package/schema/workflow/unit/input/_inputItemId.json +21 -0
- package/schema/workflow/unit/input/_inputItemScope.json +20 -0
- package/schema/workflow/unit/io/api.json +24 -0
- package/schema/workflow/unit/io/db.json +39 -0
- package/schema/workflow/unit/io/object_storage.json +25 -0
- package/schema/workflow/unit/io.json +53 -0
- package/schema/workflow/unit/map.json +67 -0
- package/schema/workflow/unit/processing.json +34 -0
- package/schema/workflow/unit/reduce.json +50 -0
- package/schema/workflow/unit/runtime/_runtime_item_full_object.json +15 -0
- package/schema/workflow/unit/runtime/_runtime_item_name_object.json +15 -0
- package/schema/workflow/unit/runtime/_runtime_item_string.json +7 -0
- package/schema/workflow/unit/runtime/runtime_item.json +13 -0
- package/schema/workflow/unit/runtime/runtime_items.json +36 -0
- package/schema/workflow/unit.json +65 -0
- package/schema/workflow.json +63 -0
- package/src/__init__.py +0 -0
- package/src/js/esse/index.js +47 -0
- package/src/js/esse/schemaUtils.js +45 -0
- package/src/js/esse/settings.js +4 -0
- package/src/js/esse/utils.js +52 -0
- package/src/js/json_include/index.js +71 -0
- package/src/js/json_include/settings.js +3 -0
- package/src/js/json_include/utils.js +11 -0
- package/src/js/scripts/createEnumsFromYaml.mjs +43 -0
- package/src/js/scripts/setSchemaIds.mjs +34 -0
package/.babelrc
ADDED
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/Exabyte-io/pre-commit-hooks
|
|
3
|
+
rev: 2023.6.13
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
exclude: ^src/py/mat3ra/esse/data
|
|
7
|
+
- id: black
|
|
8
|
+
exclude: ^src/py/mat3ra/esse/data
|
|
9
|
+
- repo: local
|
|
10
|
+
hooks:
|
|
11
|
+
- id: generate-python-modules
|
|
12
|
+
name: Regenerate data modules classes from static assets
|
|
13
|
+
# yamllint disable rule:line-length
|
|
14
|
+
entry: |
|
|
15
|
+
bash -c 'if ! [ "$(git diff --cached --name-only | grep -e "example|schema")" ]; then echo "Skipping model generation because static files were not changed."; exit 0; fi'
|
|
16
|
+
bash -c 'python build_schemas.py'
|
|
17
|
+
# yamllint enable rule:line-length
|
|
18
|
+
language: system
|
|
19
|
+
pass_filenames: false
|
|
20
|
+
verbose: true
|
package/.prettierrc
ADDED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright 2019 Exabyte Inc.
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
[](https://badge.fury.io/py/esse)
|
|
2
|
+
[](https://badge.fury.io/js/%40exabyte-io%2Fesse.js)
|
|
3
|
+
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
4
|
+
|
|
5
|
+
# ESSE
|
|
6
|
+
|
|
7
|
+
Essential Source of Schemas and Examples (ESSE) contains data formats and examples for common entities used in digital materials science (see refs. [1, 2](#links) below).
|
|
8
|
+
|
|
9
|
+
Although, the schemas are used to facilitate the operations of [mat3ra.com](https://mat3ra.com), they are designed to be generic and can be used in other applications. The open-source packages developed by Mat3ra.com use the schemas available in this repository.
|
|
10
|
+
|
|
11
|
+
The latest variants of schemas and examples are available at [schemas.mat3ra.com](https://schemas.mat3ra.com/).
|
|
12
|
+
|
|
13
|
+
ESSE has a dual-nature as both a Python and a Node.js package.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## 1. Installation
|
|
17
|
+
|
|
18
|
+
### 1.1. Python
|
|
19
|
+
|
|
20
|
+
ESSE is compatible with Python 3.8+.
|
|
21
|
+
|
|
22
|
+
#### 1.1.1. PyPI
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install mat3ra-esse
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
#### 1.1.2. Repository
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
virtualenv .venv
|
|
32
|
+
source .venv/bin/activate
|
|
33
|
+
pip install -e PATH_TO_ESSE_REPOSITORY
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 1.2. Node
|
|
37
|
+
|
|
38
|
+
#### 1.2.1. NPM
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install @exabyte-io/esse.js
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## 2. Usage
|
|
46
|
+
|
|
47
|
+
ESSE contains separate but equivalent interfaces for Python and Javascript.
|
|
48
|
+
The package provides `ESSE` class that can be initialized and used as below.
|
|
49
|
+
|
|
50
|
+
### 2.1. Usage in Python
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from mat3ra.esse import ESSE
|
|
54
|
+
|
|
55
|
+
helper = ESSE()
|
|
56
|
+
schema = helper.get_schema_by_id("material")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 2.2. Usage in Node/JS/TS
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
import {ESSE} from "esse-js";
|
|
63
|
+
|
|
64
|
+
const helper = new ESSE();
|
|
65
|
+
const schema = helper.getSchemaById("material");
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## 3. Directory Structure
|
|
70
|
+
|
|
71
|
+
ESSE contains 3 main directories, [schema](schema), [example](example) and [src](src) outlined below.
|
|
72
|
+
|
|
73
|
+
### 3.1. Schema
|
|
74
|
+
|
|
75
|
+
The schema directory contains the schemas specifying the rules to structure data. A set of core schemas, outlined below, are defined to facilitate the schema modularity.
|
|
76
|
+
|
|
77
|
+
- [Primitive](schema/core/primitive) directory contains a set of custom primitives that extends default standard primitive types allowed by schema, such as String and Number.
|
|
78
|
+
Primitives are solely defined by the default primitives and can not be re-constructed from each other.
|
|
79
|
+
- [Abstract](schema/core/abstract) directory contains unit-less schemas that are constructed from default and custom primitives.
|
|
80
|
+
- [Reusable](schema/core/reusable) directory contains the schemas that are widely used in other schemas to avoid duplication, constructed from the abstract and primitive schemas.
|
|
81
|
+
- [Reference](schema/core/reference) directory contains the schemas defining the rules to structure the references to data sources.
|
|
82
|
+
|
|
83
|
+
### 3.2. Example
|
|
84
|
+
|
|
85
|
+
This directory contains the examples formed according to the schemas and implements the same directory structure as the schema directory.
|
|
86
|
+
|
|
87
|
+
### 3.3. src
|
|
88
|
+
|
|
89
|
+
This directory contains Python and Javascript interfaces implementing the functionality to access and validate schemas and examples.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## 4. Conventions
|
|
93
|
+
|
|
94
|
+
### 4.1. Generative vs Non-generative keys
|
|
95
|
+
Generative keys are the fields which allow for user input prior to calculation of the final property values. A flag is included in the schema comments on the fields in [property schemas](schema/properties_directory): `isGenerative:true` marks which fields to use as subschemas in the generation of a user input schema. On properties allowing user inputs, additional fields may be tagged, as in [the `file_content` property](schema/properties_directory/non-scalar/file_content.json)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## 5. Development
|
|
99
|
+
|
|
100
|
+
The schemas and examples are stored as JSON assets. The JSON assets are used to generate JS/TS and PY modules that can be used to access the schemas and examples in the corresponding runtimes. The modules are generated using the [build_schemas.py](./build_schemas.py) and [build_schema.js](./build_schema.js) scripts. The JS modules are generated during the transpilation step of the npm. The PY modules are generated during the development and distributed within the pip package.
|
|
101
|
+
|
|
102
|
+
The following outlines the development process workflow:
|
|
103
|
+
|
|
104
|
+
1. Setup: clone the repository and install the dependencies for both JS and PY (as explained below).
|
|
105
|
+
2. Edit code and commit changes.
|
|
106
|
+
3. Pre commit is used to regenerate the modules.
|
|
107
|
+
4. Push the changes to GitHub.
|
|
108
|
+
5. GH workflow is used to generate the fully resolved file (without "$ref"s and "$allOf" etc.) and examples and publish them to [schemas.mat3ra.com](http://schemas.mat3ra.com/).
|
|
109
|
+
6. Publish the new version of the package to PyPI and npm.
|
|
110
|
+
|
|
111
|
+
The [pre-commit](.husky/pre-commit) is using both JS and PY runtime(s) to regenerate the schemas and examples.
|
|
112
|
+
|
|
113
|
+
[//]: # (TODO: consider reusing JS runtime and schemas build script for PY modules for consistency)
|
|
114
|
+
NOTE: The PY and JS modules are built from the same JSON sources, but using different runtimes (scripts) and thus may still be different. Only for JS the fully resolved schemas (with merged "$allOf") are created. They are used for the docs website.
|
|
115
|
+
|
|
116
|
+
### 5.1. Development in Python
|
|
117
|
+
|
|
118
|
+
When developing in python the following should be taken into account:
|
|
119
|
+
|
|
120
|
+
1. The modules containing the schemas and examples are generated using the [build-schemas.py](./build_schemas.py) script. There is a setup for it to be run automatically on every commit, but it is recommended to run it manually before committing to make sure that the changes are reflected in the modules. This can be done with `pre-commit run --all-files`. The pre-commit package can be installed with `pip install pre-commit`. To rebuild schemas manually, run (note `-e` in install):
|
|
121
|
+
```bash
|
|
122
|
+
virtualenv .venv
|
|
123
|
+
source .venv/bin/activate
|
|
124
|
+
pip install -e ."[tests]"
|
|
125
|
+
python build_schemas.py
|
|
126
|
+
```
|
|
127
|
+
2. Tests can be run using the following commands:
|
|
128
|
+
```bash
|
|
129
|
+
virtualenv .venv
|
|
130
|
+
source .venv/bin/activate
|
|
131
|
+
pip install ."[tests]"
|
|
132
|
+
python -m unittest discover --verbose --catch --start-directory tests/py/esse/
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 5.2. Development in Javascript/Typescript
|
|
136
|
+
|
|
137
|
+
See [package.json](package.json) for the list of available npm commands. The JS modules are generated using the [build_schema.js](./build_schema.js) script. There is a setup for it to be run automatically when the package is installed (see "transpile" directive). To rebuild schemas manually, run:
|
|
138
|
+
```bash
|
|
139
|
+
npm install
|
|
140
|
+
npm run transpile
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 5.3. General Dev Suggestions
|
|
144
|
+
|
|
145
|
+
This repository is an [open-source](LICENSE.md) work-in-progress and we welcome contributions. We suggest forking this repository and introducing the adjustments there, the changes in the fork can further be considered for merging into this repository as it is commonly done on GitHub (see [3](#links) below).
|
|
146
|
+
|
|
147
|
+
Other suggestions:
|
|
148
|
+
|
|
149
|
+
- Use unique IDs for schemas
|
|
150
|
+
- Do not use circular references in the schemas, instead leave the type as object and add explanation to description.
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## 6. Links
|
|
154
|
+
|
|
155
|
+
1: [Data-centric online ecosystem for digital materials science](https://arxiv.org/pdf/1902.10838.pdf)
|
|
156
|
+
2: [CateCom: A Practical Data-Centric Approach to Categorization of Computational Models](https://pubs.acs.org/doi/abs/10.1021/acs.jcim.2c00112)
|
|
157
|
+
3: [GitHub Standard Fork & Pull Request Workflow](https://gist.github.com/Chaser324/ce0505fbed06b947d962)
|
package/build_schemas.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* build_schemas uses node API to read all schemas from the FS
|
|
3
|
+
* at build time and writes them out to a single schemas.js file for
|
|
4
|
+
* downstream consumption to avoid FS calls in the browser.
|
|
5
|
+
*/
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const mergeAllOf = require("json-schema-merge-allof");
|
|
9
|
+
const { ESSE } = require("./lib/js/esse");
|
|
10
|
+
|
|
11
|
+
const esse = new ESSE();
|
|
12
|
+
const { schemas, wrappedExamples } = esse;
|
|
13
|
+
const schema = esse.buildGlobalSchema();
|
|
14
|
+
|
|
15
|
+
fs.writeFileSync(
|
|
16
|
+
"./schemas.js",
|
|
17
|
+
"module.exports = {schemas: " + JSON.stringify(schemas) + "}",
|
|
18
|
+
"utf8",
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
fs.writeFileSync("./schema.js", "module.exports = " + JSON.stringify(schema), "utf8");
|
|
22
|
+
|
|
23
|
+
if (process.env.BUILD_ASSETS !== "true") {
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const subfolder = process.env.BUILD_PATH || "./docs/js/";
|
|
28
|
+
schemas.forEach((s) => {
|
|
29
|
+
if (process.env.SKIP_MERGE_ALLOF !== "true") {
|
|
30
|
+
s = mergeAllOf(s, { resolvers: { defaultResolver: mergeAllOf.options.resolvers.title } });
|
|
31
|
+
}
|
|
32
|
+
const id_as_path = s.$id.replace("-", "_");
|
|
33
|
+
const full_path = `${subfolder}/${id_as_path}.json`;
|
|
34
|
+
fs.mkdirSync(path.dirname(full_path), { recursive: true });
|
|
35
|
+
fs.writeFileSync(full_path, JSON.stringify(s, null, 4), "utf8");
|
|
36
|
+
});
|
|
37
|
+
wrappedExamples.forEach((e) => {
|
|
38
|
+
const id_as_path = e.path.replace("-", "_");
|
|
39
|
+
const full_path = `${subfolder}/${id_as_path}.json`;
|
|
40
|
+
fs.mkdirSync(path.dirname(full_path), { recursive: true });
|
|
41
|
+
fs.writeFileSync(full_path, JSON.stringify(e.data, null, 4), "utf8");
|
|
42
|
+
});
|
package/build_schemas.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This script builds the schemas and examples modules.
|
|
3
|
+
The schemas module contains all the schemas in the SCHEMAS_DIR.
|
|
4
|
+
The examples module contains all the examples in the EXAMPLES_DIR.
|
|
5
|
+
The script is aware of the include and reference statements and is using the json_include library to resolve them.
|
|
6
|
+
The script creates the python modules containing the schemas and examples and avoids
|
|
7
|
+
having the dependency on the filesystem during the calls to the ESSE class.
|
|
8
|
+
Usage (NOTE: "-e" in pip install is required for the file references to be resolved):
|
|
9
|
+
virtualenv .venv
|
|
10
|
+
source .venv/bin/activate
|
|
11
|
+
pip install -e ."[tests]"
|
|
12
|
+
python build_schemas.py
|
|
13
|
+
After that, check for the files `src/py/mat3ra/esse/data/schemas.py` and `src/py/mat3ra/esse/data/examples.py`.
|
|
14
|
+
"""
|
|
15
|
+
import os
|
|
16
|
+
import json
|
|
17
|
+
import yaml
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
from mat3ra.esse.utils import parse_include_reference_statements_by_dir
|
|
21
|
+
|
|
22
|
+
TOP_DIR = os.path.dirname(__file__)
|
|
23
|
+
SCHEMAS = parse_include_reference_statements_by_dir(TOP_DIR)
|
|
24
|
+
# Wrap examples into {"data": example, "path": schema_id} format to relate them to schemas.
|
|
25
|
+
EXAMPLES = parse_include_reference_statements_by_dir(TOP_DIR, True)
|
|
26
|
+
|
|
27
|
+
with open(os.path.join(TOP_DIR, "manifest/properties.yaml")) as f:
|
|
28
|
+
PROPERTIES_MANIFEST = yaml.load(f.read(), Loader=yaml.FullLoader)
|
|
29
|
+
RESULTS = [k for k, v in PROPERTIES_MANIFEST.items() if v.get("isResult")]
|
|
30
|
+
|
|
31
|
+
with open("src/py/mat3ra/esse/data/schemas.py", "w") as f:
|
|
32
|
+
f.write("import json\n" + f"SCHEMAS = json.loads(json.dumps({SCHEMAS}))")
|
|
33
|
+
|
|
34
|
+
with open("src/py/mat3ra/esse/data/examples.py", "w") as f:
|
|
35
|
+
f.write("import json\n" + f"EXAMPLES = json.loads(json.dumps({EXAMPLES}))")
|
|
36
|
+
|
|
37
|
+
with open("src/py/mat3ra/esse/data/properties.py", "w") as f:
|
|
38
|
+
content = (
|
|
39
|
+
"import json\n"
|
|
40
|
+
+ f"PROPERTIES_MANIFEST = json.loads(json.dumps({PROPERTIES_MANIFEST}))\n"
|
|
41
|
+
+ f"RESULTS = json.loads(json.dumps({RESULTS}))\n"
|
|
42
|
+
)
|
|
43
|
+
f.write(content)
|
|
44
|
+
|
|
45
|
+
if os.environ.get("BUILD_DOCS") != "true":
|
|
46
|
+
exit(0)
|
|
47
|
+
|
|
48
|
+
for schema in SCHEMAS:
|
|
49
|
+
id_as_path = schema["$id"].replace("-", "_")
|
|
50
|
+
full_path = os.path.join(TOP_DIR, "docs/py/schema", id_as_path + ".json")
|
|
51
|
+
Path(full_path).parent.mkdir(parents=True, exist_ok=True)
|
|
52
|
+
with open(full_path, "w") as f:
|
|
53
|
+
f.write(json.dumps(schema, sort_keys=True, indent=4, separators=(",", ": ")))
|
|
54
|
+
|
|
55
|
+
for example in EXAMPLES:
|
|
56
|
+
id_as_path = example["path"].replace("-", "_")
|
|
57
|
+
full_path = os.path.join(TOP_DIR, "docs/py/example", id_as_path + ".json")
|
|
58
|
+
Path(full_path).parent.mkdir(parents=True, exist_ok=True)
|
|
59
|
+
with open(full_path, "w") as f:
|
|
60
|
+
f.write(json.dumps(example, sort_keys=True, indent=4, separators=(",", ": ")))
|
|
61
|
+
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"&CONTROL": {
|
|
3
|
+
"calculation": "scf",
|
|
4
|
+
"title": "",
|
|
5
|
+
"verbosity": "low",
|
|
6
|
+
"restart_mode": "from_scratch",
|
|
7
|
+
"wf_collect": true,
|
|
8
|
+
"tstress": true,
|
|
9
|
+
"tprnfor": true,
|
|
10
|
+
"outdir": "{{ JOB_WORK_DIR }}/outdir",
|
|
11
|
+
"wfcdir": "{{ JOB_WORK_DIR }}/outdir",
|
|
12
|
+
"prefix": "__prefix__",
|
|
13
|
+
"pseudo_dir": "{{ JOB_WORK_DIR }}/pseudo"
|
|
14
|
+
},
|
|
15
|
+
"&SYSTEM": {
|
|
16
|
+
"ibrav": 0,
|
|
17
|
+
"nat": 2,
|
|
18
|
+
"ntyp": 2,
|
|
19
|
+
"ecutwfc": 40,
|
|
20
|
+
"ecutrho": 200,
|
|
21
|
+
"occupations": "smearing",
|
|
22
|
+
"degauss": 0.005,
|
|
23
|
+
"starting_magnetization": [
|
|
24
|
+
0.01,
|
|
25
|
+
0.02
|
|
26
|
+
],
|
|
27
|
+
"Hubbard_occ": [
|
|
28
|
+
[
|
|
29
|
+
1,
|
|
30
|
+
1,
|
|
31
|
+
0.00
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
1,
|
|
35
|
+
2,
|
|
36
|
+
0.02
|
|
37
|
+
]
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"&ELECTRONS": {
|
|
41
|
+
"diagonalization": "david",
|
|
42
|
+
"diago_david_ndim": 4,
|
|
43
|
+
"diago_full_acc": true,
|
|
44
|
+
"mixing_beta": 0.3,
|
|
45
|
+
"startingwfc": "atomic+random"
|
|
46
|
+
},
|
|
47
|
+
"&IONS": null,
|
|
48
|
+
"&CELL": null,
|
|
49
|
+
"ATOMIC_SPECIES": {
|
|
50
|
+
"values": [
|
|
51
|
+
{
|
|
52
|
+
"X": "Cs",
|
|
53
|
+
"Mass_X": 132.90543,
|
|
54
|
+
"PseudoPot_X": "Cs.upf"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"X": "Cl",
|
|
58
|
+
"Mass_X": 35.4527,
|
|
59
|
+
"PseudoPot_X": "Cl.upf"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"CELL_PARAMETERS": {
|
|
64
|
+
"card_option": "angstrom",
|
|
65
|
+
"values": {
|
|
66
|
+
"v1": [
|
|
67
|
+
4.324582724,
|
|
68
|
+
0.000000000,
|
|
69
|
+
2.496799000
|
|
70
|
+
],
|
|
71
|
+
"v2": [
|
|
72
|
+
1.441527575,
|
|
73
|
+
4.077255694,
|
|
74
|
+
2.496799000
|
|
75
|
+
],
|
|
76
|
+
"v3": [
|
|
77
|
+
0.000000000,
|
|
78
|
+
0.000000000,
|
|
79
|
+
4.993598000
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"K_POINTS": {
|
|
84
|
+
"card_option": "automatic",
|
|
85
|
+
"values": {
|
|
86
|
+
"nk1": 2,
|
|
87
|
+
"nk2": 2,
|
|
88
|
+
"nk3": 2,
|
|
89
|
+
"sk1": 0,
|
|
90
|
+
"sk2": 0,
|
|
91
|
+
"sk3": 0
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"xAxis": {
|
|
3
|
+
"label": "kpoint index"
|
|
4
|
+
},
|
|
5
|
+
"xDataArray": [
|
|
6
|
+
0,
|
|
7
|
+
1,
|
|
8
|
+
2
|
|
9
|
+
],
|
|
10
|
+
"yAxis": {
|
|
11
|
+
"label": "eigenvalues",
|
|
12
|
+
"units": "eV"
|
|
13
|
+
},
|
|
14
|
+
"yDataSeries": [
|
|
15
|
+
[
|
|
16
|
+
0,
|
|
17
|
+
0.5,
|
|
18
|
+
1
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
0,
|
|
22
|
+
2.5,
|
|
23
|
+
5
|
|
24
|
+
]
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"authors": [
|
|
3
|
+
{
|
|
4
|
+
"affiliation": "Exabyte Inc.",
|
|
5
|
+
"first": "John",
|
|
6
|
+
"last": "Doe"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"conditions": [
|
|
10
|
+
{
|
|
11
|
+
"...": "include(experiment/condition.json)"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"method": "DFT",
|
|
15
|
+
"references": [
|
|
16
|
+
{
|
|
17
|
+
"...": "include(literature.json)"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"timestamp": 141182979832,
|
|
21
|
+
"title": "Experiment 1"
|
|
22
|
+
}
|