@mat3ra/wode 2026.4.9-0 → 2026.5.29-0
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 +1 -1
- package/dist/js/Subworkflow.d.ts +714 -0
- package/dist/js/Subworkflow.js +397 -0
- package/dist/js/Workflow.d.ts +82 -0
- package/dist/js/Workflow.js +286 -0
- package/dist/js/WorkflowDesignerMaterial.d.ts +21 -0
- package/dist/js/WorkflowDesignerMaterial.js +26 -0
- package/dist/js/context/mixins/ApplicationContextMixin.d.ts +10 -0
- package/dist/js/context/mixins/ApplicationContextMixin.js +10 -17
- package/dist/js/context/mixins/MaterialContextMixin.d.ts +18 -0
- package/dist/js/context/mixins/MaterialContextMixin.js +14 -38
- package/dist/js/context/mixins/MaterialsContextMixin.d.ts +10 -0
- package/dist/js/context/mixins/MaterialsContextMixin.js +11 -17
- package/dist/js/context/mixins/MaterialsSetContextMixin.d.ts +14 -0
- package/dist/js/context/mixins/MaterialsSetContextMixin.js +21 -23
- package/dist/js/context/providers/BoundaryConditionsFormDataManager.d.ts +30 -0
- package/dist/js/context/providers/BoundaryConditionsFormDataManager.js +62 -0
- package/dist/js/context/providers/CollinearMagnetizationDataManager.d.ts +42 -0
- package/dist/js/context/providers/CollinearMagnetizationDataManager.js +101 -0
- package/dist/js/context/providers/Hubbard/HubbardContextManagerLegacy.d.ts +29 -0
- package/dist/js/context/providers/Hubbard/HubbardContextManagerLegacy.js +69 -0
- package/dist/js/context/providers/Hubbard/HubbardContextProvider.d.ts +20 -0
- package/dist/js/context/providers/Hubbard/HubbardContextProvider.js +47 -0
- package/dist/js/context/providers/Hubbard/HubbardJContextManager.d.ts +22 -0
- package/dist/js/context/providers/Hubbard/HubbardJContextManager.js +61 -0
- package/dist/js/context/providers/Hubbard/HubbardUContextManager.d.ts +22 -0
- package/dist/js/context/providers/Hubbard/HubbardUContextManager.js +57 -0
- package/dist/js/context/providers/Hubbard/HubbardVContextManager.d.ts +22 -0
- package/dist/js/context/providers/Hubbard/HubbardVContextManager.js +79 -0
- package/dist/js/context/providers/IonDynamicsDataManager.d.ts +27 -0
- package/dist/js/context/providers/IonDynamicsDataManager.js +48 -0
- package/dist/js/context/providers/MLSettingsDataManager.d.ts +24 -0
- package/dist/js/context/providers/MLSettingsDataManager.js +42 -0
- package/dist/js/context/providers/MLTrainTestSplitDataManager.d.ts +23 -0
- package/dist/js/context/providers/MLTrainTestSplitDataManager.js +40 -0
- package/dist/js/context/providers/NEBFormDataManager.d.ts +23 -0
- package/dist/js/context/providers/NEBFormDataManager.js +39 -0
- package/dist/js/context/providers/NonCollinearMagnetizationDataManager.d.ts +78 -0
- package/dist/js/context/providers/NonCollinearMagnetizationDataManager.js +181 -0
- package/dist/js/context/providers/PlanewaveCutoffDataManager.d.ts +26 -0
- package/dist/js/context/providers/PlanewaveCutoffDataManager.js +69 -0
- package/dist/js/context/providers/PointsGrid/IGridFormDataManager.d.ts +13 -0
- package/dist/js/context/providers/PointsGrid/IGridFormDataManager.js +23 -0
- package/dist/js/context/providers/PointsGrid/KGridFormDataManager.d.ts +15 -0
- package/dist/js/context/providers/PointsGrid/KGridFormDataManager.js +30 -0
- package/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.d.ts +171 -0
- package/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.js +270 -0
- package/dist/js/context/providers/PointsGrid/QGridFormDataManager.d.ts +13 -0
- package/dist/js/context/providers/PointsGrid/QGridFormDataManager.js +23 -0
- package/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.d.ts +10 -0
- package/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.js +19 -0
- package/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.d.ts +9 -0
- package/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.js +18 -0
- package/dist/js/context/providers/PointsPath/IPathFormDataManager.d.ts +8 -0
- package/dist/js/context/providers/PointsPath/IPathFormDataManager.js +17 -0
- package/dist/js/context/providers/PointsPath/KPathFormDataManager.d.ts +8 -0
- package/dist/js/context/providers/PointsPath/KPathFormDataManager.js +17 -0
- package/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.d.ts +40 -0
- package/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.js +125 -0
- package/dist/js/context/providers/PointsPath/QPathFormDataManager.d.ts +8 -0
- package/dist/js/context/providers/PointsPath/QPathFormDataManager.js +17 -0
- package/dist/js/context/providers/base/ContextProvider.d.ts +75 -0
- package/dist/js/context/providers/base/ContextProvider.js +87 -0
- package/dist/js/context/providers/base/JSONSchemaDataProvider.d.ts +16 -0
- package/dist/js/context/providers/base/JSONSchemaDataProvider.js +17 -0
- package/dist/js/context/providers/base/JSONSchemaFormDataProvider.d.ts +19 -0
- package/dist/js/context/providers/base/JSONSchemaFormDataProvider.js +32 -0
- package/dist/js/context/providers/by_application/espresso/QENEBInputDataManager.d.ts +26 -0
- package/dist/js/context/providers/by_application/espresso/QENEBInputDataManager.js +54 -0
- package/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.d.ts +78 -0
- package/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.js +104 -0
- package/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.d.ts +36 -0
- package/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.js +58 -0
- package/dist/js/context/providers/by_application/vasp/VASPInputDataManager.d.ts +36 -0
- package/dist/js/context/providers/by_application/vasp/VASPInputDataManager.js +56 -0
- package/dist/js/context/providers/by_application/vasp/VASPNEBInputDataManager.d.ts +30 -0
- package/dist/js/context/providers/by_application/vasp/VASPNEBInputDataManager.js +50 -0
- package/dist/js/context/providers/index.d.ts +92 -0
- package/dist/js/context/providers/index.js +107 -0
- package/dist/js/context/providers/settings.d.ts +7 -0
- package/dist/js/context/providers/settings.js +11 -33
- package/dist/js/convergence/ConvergenceParameter.d.ts +26 -0
- package/dist/js/convergence/ConvergenceParameter.js +13 -0
- package/dist/js/convergence/NonUniformKGridConvergence.d.ts +12 -0
- package/dist/js/convergence/NonUniformKGridConvergence.js +31 -0
- package/dist/js/convergence/UniformKGridConvergence.d.ts +8 -0
- package/dist/js/convergence/UniformKGridConvergence.js +22 -0
- package/dist/js/convergence/factory.d.ts +8 -0
- package/dist/js/convergence/factory.js +18 -0
- package/dist/js/enums.d.ts +62 -0
- package/dist/js/enums.js +66 -61
- package/dist/js/generated/AssertionUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/AssertionUnitSchemaMixin.js +27 -0
- package/dist/js/generated/AssignmentUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/AssignmentUnitSchemaMixin.js +33 -0
- package/dist/js/generated/BaseUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/BaseUnitSchemaMixin.js +57 -0
- package/dist/js/generated/ConditionUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/ConditionUnitSchemaMixin.js +51 -0
- package/dist/js/generated/ExecutionUnitInputSchemaMixin.d.ts +5 -0
- package/dist/js/generated/ExecutionUnitInputSchemaMixin.js +27 -0
- package/dist/js/generated/ExecutionUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/ExecutionUnitSchemaMixin.js +45 -0
- package/dist/js/generated/IOUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/IOUnitSchemaMixin.js +33 -0
- package/dist/js/generated/MapUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/MapUnitSchemaMixin.js +27 -0
- package/dist/js/generated/ReduceUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/ReduceUnitSchemaMixin.js +27 -0
- package/dist/js/generated/StatusSchemaMixin.d.ts +5 -0
- package/dist/js/generated/StatusSchemaMixin.js +21 -0
- package/dist/js/generated/SubworkflowSchemaMixin.d.ts +5 -0
- package/dist/js/generated/SubworkflowSchemaMixin.js +51 -0
- package/dist/js/generated/SubworkflowUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/SubworkflowUnitSchemaMixin.js +15 -0
- package/dist/js/generated/WorkflowSchemaMixin.d.ts +5 -0
- package/dist/js/generated/WorkflowSchemaMixin.js +51 -0
- package/dist/js/index.d.ts +13 -0
- package/dist/js/index.js +66 -176
- package/dist/js/units/AssertionUnit.d.ts +20 -0
- package/dist/js/units/AssertionUnit.js +33 -0
- package/dist/js/units/AssignmentUnit.d.ts +17 -0
- package/dist/js/units/AssignmentUnit.js +35 -0
- package/dist/js/units/BaseUnit.d.ts +39 -0
- package/dist/js/units/BaseUnit.js +70 -0
- package/dist/js/units/ConditionUnit.d.ts +17 -0
- package/dist/js/units/ConditionUnit.js +37 -0
- package/dist/js/units/ExecutionUnit.d.ts +115 -0
- package/dist/js/units/ExecutionUnit.js +181 -0
- package/dist/js/units/ExecutionUnitInput.d.ts +22 -0
- package/dist/js/units/ExecutionUnitInput.js +47 -0
- package/dist/js/units/IOUnit.d.ts +16 -0
- package/dist/js/units/IOUnit.js +31 -0
- package/dist/js/units/MapUnit.d.ts +34 -0
- package/dist/js/units/MapUnit.js +46 -0
- package/dist/js/units/ReduceUnit.d.ts +16 -0
- package/dist/js/units/ReduceUnit.js +30 -0
- package/dist/js/units/SubworkflowUnit.d.ts +16 -0
- package/dist/js/units/SubworkflowUnit.js +28 -0
- package/dist/js/units/factory.d.ts +31 -0
- package/dist/js/units/factory.js +65 -47
- package/dist/js/units/index.d.ts +14 -0
- package/dist/js/units/index.js +25 -81
- package/dist/js/units/mixins/RuntimeItemsUILogicMixin.d.ts +26 -0
- package/dist/js/units/mixins/RuntimeItemsUILogicMixin.js +50 -0
- package/dist/js/utils/baseUnits.d.ts +2 -0
- package/dist/js/utils/baseUnits.js +11 -0
- package/dist/js/utils/index.d.ts +3 -0
- package/dist/js/utils/index.js +39 -0
- package/dist/js/utils/subworkflow.d.ts +2 -0
- package/dist/js/utils/subworkflow.js +29 -0
- package/dist/js/utils/underscoreStringSlugify.d.ts +6 -0
- package/dist/js/utils/underscoreStringSlugify.js +32 -0
- package/dist/js/utils/units.d.ts +4 -0
- package/dist/js/utils/units.js +16 -0
- package/dist/js/utils/workflow.d.ts +9 -0
- package/dist/js/utils/workflow.js +67 -0
- package/dist/js/utils.js +2 -7
- package/dist/js/workflows/default.d.ts +3 -0
- package/dist/js/workflows/default.js +43 -39
- package/dist/js/workflows/workflow.d.ts +4404 -0
- package/dist/js/workflows/workflow.js +310 -306
- package/package.json +56 -44
- package/src/js/Subworkflow.ts +532 -0
- package/src/js/Workflow.ts +390 -0
- package/src/js/context/mixins/ApplicationContextMixin.ts +21 -0
- package/src/js/context/mixins/MaterialContextMixin.ts +35 -0
- package/src/js/context/mixins/MaterialsContextMixin.ts +24 -0
- package/src/js/context/mixins/MaterialsSetContextMixin.ts +42 -0
- package/src/js/context/providers/BoundaryConditionsFormDataManager.ts +88 -0
- package/src/js/context/providers/CollinearMagnetizationDataManager.ts +140 -0
- package/src/js/context/providers/Hubbard/HubbardContextManagerLegacy.ts +93 -0
- package/src/js/context/providers/Hubbard/HubbardContextProvider.ts +85 -0
- package/src/js/context/providers/Hubbard/HubbardJContextManager.ts +82 -0
- package/src/js/context/providers/Hubbard/HubbardUContextManager.ts +78 -0
- package/src/js/context/providers/Hubbard/HubbardVContextManager.ts +100 -0
- package/src/js/context/providers/IonDynamicsDataManager.ts +64 -0
- package/src/js/context/providers/MLSettingsDataManager.ts +61 -0
- package/src/js/context/providers/MLTrainTestSplitDataManager.ts +59 -0
- package/src/js/context/providers/NEBFormDataManager.ts +57 -0
- package/src/js/context/providers/NonCollinearMagnetizationDataManager.ts +229 -0
- package/src/js/context/providers/PlanewaveCutoffDataManager.ts +110 -0
- package/src/js/context/providers/PointsGrid/IGridFormDataManager.ts +36 -0
- package/src/js/context/providers/PointsGrid/KGridFormDataManager.ts +46 -0
- package/src/js/context/providers/PointsGrid/PointsGridFormDataProvider.ts +371 -0
- package/src/js/context/providers/PointsGrid/QGridFormDataManager.ts +36 -0
- package/src/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.ts +26 -0
- package/src/js/context/providers/PointsPath/ExplicitKPathFormDataManager.ts +24 -0
- package/src/js/context/providers/PointsPath/IPathFormDataManager.ts +22 -0
- package/src/js/context/providers/PointsPath/KPathFormDataManager.ts +22 -0
- package/src/js/context/providers/PointsPath/PointsPathFormDataProvider.ts +192 -0
- package/src/js/context/providers/PointsPath/QPathFormDataManager.ts +22 -0
- package/src/js/context/providers/base/ContextProvider.ts +150 -0
- package/src/js/context/providers/base/JSONSchemaDataProvider.ts +31 -0
- package/src/js/context/providers/base/JSONSchemaFormDataProvider.ts +38 -0
- package/src/js/context/providers/by_application/espresso/QENEBInputDataManager.ts +107 -0
- package/src/js/context/providers/by_application/espresso/QEPWXInputDataManager.ts +178 -0
- package/src/js/context/providers/by_application/nwchem/NWChemInputDataManager.ts +93 -0
- package/src/js/context/providers/by_application/vasp/VASPInputDataManager.ts +89 -0
- package/src/js/context/providers/by_application/vasp/VASPNEBInputDataManager.ts +92 -0
- package/src/js/context/providers/index.ts +155 -0
- package/src/js/context/providers/settings.ts +13 -0
- package/src/js/convergence/ConvergenceParameter.ts +37 -0
- package/src/js/convergence/NonUniformKGridConvergence.ts +38 -0
- package/src/js/convergence/UniformKGridConvergence.ts +26 -0
- package/src/js/convergence/factory.ts +18 -0
- package/src/js/{enums.js → enums.ts} +27 -22
- package/src/js/generated/AssertionUnitSchemaMixin.ts +34 -0
- package/src/js/generated/AssignmentUnitSchemaMixin.ts +40 -0
- package/src/js/generated/BaseUnitSchemaMixin.ts +64 -0
- package/src/js/generated/ConditionUnitSchemaMixin.ts +58 -0
- package/src/js/generated/ExecutionUnitInputSchemaMixin.ts +36 -0
- package/src/js/generated/ExecutionUnitSchemaMixin.ts +52 -0
- package/src/js/generated/IOUnitSchemaMixin.ts +40 -0
- package/src/js/generated/MapUnitSchemaMixin.ts +34 -0
- package/src/js/generated/ReduceUnitSchemaMixin.ts +34 -0
- package/src/js/generated/StatusSchemaMixin.ts +28 -0
- package/src/js/generated/SubworkflowSchemaMixin.ts +58 -0
- package/src/js/generated/SubworkflowUnitSchemaMixin.ts +22 -0
- package/src/js/generated/WorkflowSchemaMixin.ts +58 -0
- package/src/js/index.ts +44 -0
- package/src/js/units/AssertionUnit.ts +49 -0
- package/src/js/units/AssignmentUnit.ts +49 -0
- package/src/js/units/BaseUnit.ts +117 -0
- package/src/js/units/ConditionUnit.ts +52 -0
- package/src/js/units/ExecutionUnit.ts +274 -0
- package/src/js/units/ExecutionUnitInput.ts +71 -0
- package/src/js/units/IOUnit.ts +43 -0
- package/src/js/units/MapUnit.ts +59 -0
- package/src/js/units/ReduceUnit.ts +46 -0
- package/src/js/units/SubworkflowUnit.ts +44 -0
- package/src/js/units/factory.ts +131 -0
- package/src/js/units/index.ts +27 -0
- package/src/js/units/mixins/RuntimeItemsUILogicMixin.ts +81 -0
- package/src/js/utils/baseUnits.ts +11 -0
- package/src/js/utils/index.ts +3 -0
- package/src/js/utils/units.ts +23 -0
- package/src/js/utils/workflow.ts +69 -0
- package/src/js/workflows/{default.js → default.ts} +8 -1
- package/build_workflows.js +0 -65
- package/dist/js/context/context.js +0 -49
- package/dist/js/context/mixins/JobContextMixin.js +0 -39
- package/dist/js/context/mixins/MethodDataContextMixin.js +0 -48
- package/dist/js/context/mixins/WorkflowContextMixin.js +0 -28
- package/dist/js/context/providers/BoundaryConditionsFormDataProvider.js +0 -84
- package/dist/js/context/providers/CollinearMagnetizationContextProvider.js +0 -96
- package/dist/js/context/providers/HubbardContextProviderLegacy.js +0 -68
- package/dist/js/context/providers/HubbardJContextProvider.js +0 -67
- package/dist/js/context/providers/HubbardUContextProvider.js +0 -70
- package/dist/js/context/providers/HubbardVContextProvider.js +0 -92
- package/dist/js/context/providers/IonDynamicsContextProvider.js +0 -58
- package/dist/js/context/providers/MLSettingsContextProvider.js +0 -51
- package/dist/js/context/providers/MLTrainTestSplitContextProvider.js +0 -47
- package/dist/js/context/providers/NEBFormDataProvider.js +0 -42
- package/dist/js/context/providers/NonCollinearMagnetizationContextProvider.js +0 -187
- package/dist/js/context/providers/PlanewaveCutoffsContextProvider.js +0 -67
- package/dist/js/context/providers/PointsGridFormDataProvider.js +0 -263
- package/dist/js/context/providers/PointsPathFormDataProvider.js +0 -147
- package/dist/js/context/providers/by_application/ExecutableContextProvider.js +0 -25
- package/dist/js/context/providers/by_application/espresso/QENEBContextProvider.js +0 -61
- package/dist/js/context/providers/by_application/espresso/QEPWXContextProvider.js +0 -150
- package/dist/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.js +0 -85
- package/dist/js/context/providers/by_application/vasp/VASPContextProvider.js +0 -65
- package/dist/js/context/providers/by_application/vasp/VASPNEBContextProvider.js +0 -57
- package/dist/js/context/providers.js +0 -199
- package/dist/js/patch.js +0 -19
- package/dist/js/subworkflows/convergence/non_uniform_kgrid.js +0 -31
- package/dist/js/subworkflows/convergence/parameter.js +0 -70
- package/dist/js/subworkflows/convergence/uniform_kgrid.js +0 -26
- package/dist/js/subworkflows/convergence.js +0 -189
- package/dist/js/subworkflows/create.js +0 -293
- package/dist/js/subworkflows/dynamic/espresso/getQpointIrrep.js +0 -34
- package/dist/js/subworkflows/dynamic/index.js +0 -19
- package/dist/js/subworkflows/dynamic/surfaceEnergy.js +0 -67
- package/dist/js/subworkflows/index.js +0 -19
- package/dist/js/units/assertion.js +0 -37
- package/dist/js/units/assignment.js +0 -42
- package/dist/js/units/base.js +0 -91
- package/dist/js/units/builders/AssertionUnitConfigBuilder.js +0 -34
- package/dist/js/units/builders/AssignmentUnitConfigBuilder.js +0 -41
- package/dist/js/units/builders/ExecutionUnitConfigBuilder.js +0 -67
- package/dist/js/units/builders/IOUnitConfigBuilder.js +0 -54
- package/dist/js/units/builders/UnitConfigBuilder.js +0 -85
- package/dist/js/units/builders/index.js +0 -18
- package/dist/js/units/condition.js +0 -52
- package/dist/js/units/execution.js +0 -225
- package/dist/js/units/io.js +0 -148
- package/dist/js/units/map.js +0 -38
- package/dist/js/units/processing.js +0 -41
- package/dist/js/units/reduce.js +0 -24
- package/dist/js/units/subworkflow.js +0 -23
- package/dist/js/workflows/create.js +0 -318
- package/dist/js/workflows/index.js +0 -113
- package/dist/js/workflows/relaxation.js +0 -38
- package/src/js/context/context.js +0 -47
- package/src/js/context/mixins/ApplicationContextMixin.js +0 -19
- package/src/js/context/mixins/JobContextMixin.js +0 -36
- package/src/js/context/mixins/MaterialContextMixin.js +0 -41
- package/src/js/context/mixins/MaterialsContextMixin.js +0 -18
- package/src/js/context/mixins/MaterialsSetContextMixin.js +0 -24
- package/src/js/context/mixins/MethodDataContextMixin.js +0 -48
- package/src/js/context/mixins/WorkflowContextMixin.js +0 -25
- package/src/js/context/providers/BoundaryConditionsFormDataProvider.js +0 -72
- package/src/js/context/providers/CollinearMagnetizationContextProvider.js +0 -105
- package/src/js/context/providers/HubbardContextProviderLegacy.js +0 -67
- package/src/js/context/providers/HubbardJContextProvider.js +0 -65
- package/src/js/context/providers/HubbardUContextProvider.js +0 -95
- package/src/js/context/providers/HubbardVContextProvider.js +0 -96
- package/src/js/context/providers/IonDynamicsContextProvider.js +0 -44
- package/src/js/context/providers/MLSettingsContextProvider.js +0 -45
- package/src/js/context/providers/MLTrainTestSplitContextProvider.js +0 -43
- package/src/js/context/providers/NEBFormDataProvider.js +0 -33
- package/src/js/context/providers/NonCollinearMagnetizationContextProvider.js +0 -179
- package/src/js/context/providers/PlanewaveCutoffsContextProvider.js +0 -65
- package/src/js/context/providers/PointsGridFormDataProvider.js +0 -271
- package/src/js/context/providers/PointsPathFormDataProvider.js +0 -163
- package/src/js/context/providers/by_application/ExecutableContextProvider.js +0 -17
- package/src/js/context/providers/by_application/espresso/QENEBContextProvider.js +0 -58
- package/src/js/context/providers/by_application/espresso/QEPWXContextProvider.js +0 -168
- package/src/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.js +0 -89
- package/src/js/context/providers/by_application/vasp/VASPContextProvider.js +0 -58
- package/src/js/context/providers/by_application/vasp/VASPNEBContextProvider.js +0 -48
- package/src/js/context/providers/settings.js +0 -38
- package/src/js/context/providers.js +0 -140
- package/src/js/index.js +0 -57
- package/src/js/patch.js +0 -12
- package/src/js/subworkflows/convergence/enums.js +0 -12
- package/src/js/subworkflows/convergence/factory.js +0 -15
- package/src/js/subworkflows/convergence/non_uniform_kgrid.js +0 -28
- package/src/js/subworkflows/convergence/parameter.js +0 -58
- package/src/js/subworkflows/convergence/uniform_kgrid.js +0 -22
- package/src/js/subworkflows/convergence.js +0 -196
- package/src/js/subworkflows/create.js +0 -220
- package/src/js/subworkflows/dynamic/espresso/getQpointIrrep.js +0 -35
- package/src/js/subworkflows/dynamic/index.js +0 -8
- package/src/js/subworkflows/dynamic/surfaceEnergy.js +0 -124
- package/src/js/subworkflows/index.js +0 -2
- package/src/js/subworkflows/subworkflow.js +0 -345
- package/src/js/units/assertion.js +0 -29
- package/src/js/units/assignment.js +0 -34
- package/src/js/units/base.js +0 -97
- package/src/js/units/builders/AssertionUnitConfigBuilder.js +0 -28
- package/src/js/units/builders/AssignmentUnitConfigBuilder.js +0 -36
- package/src/js/units/builders/ExecutionUnitConfigBuilder.js +0 -59
- package/src/js/units/builders/IOUnitConfigBuilder.js +0 -53
- package/src/js/units/builders/UnitConfigBuilder.js +0 -92
- package/src/js/units/builders/index.js +0 -15
- package/src/js/units/condition.js +0 -47
- package/src/js/units/execution.js +0 -267
- package/src/js/units/factory.js +0 -53
- package/src/js/units/index.js +0 -25
- package/src/js/units/io.js +0 -163
- package/src/js/units/map.js +0 -33
- package/src/js/units/processing.js +0 -39
- package/src/js/units/reduce.js +0 -17
- package/src/js/units/subworkflow.js +0 -15
- package/src/js/utils.js +0 -73
- package/src/js/workflows/create.js +0 -227
- package/src/js/workflows/index.js +0 -98
- package/src/js/workflows/relaxation.js +0 -42
- package/src/js/workflows/workflow.js +0 -388
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createWorkflow = createWorkflow;
|
|
7
|
-
var _create = require("../subworkflows/create");
|
|
8
|
-
var _units = require("../units");
|
|
9
|
-
var _map = require("../units/map");
|
|
10
|
-
var _utils = require("../utils");
|
|
11
|
-
var _workflow = require("./workflow");
|
|
12
|
-
/**
|
|
13
|
-
* @summary Helper for creating Map units for complex workflows
|
|
14
|
-
* @param config {Object} map unit configuration
|
|
15
|
-
* @param unitFactoryCls {*} class factory for map unit
|
|
16
|
-
* @returns {*} map unit
|
|
17
|
-
*/
|
|
18
|
-
function createMapUnit({
|
|
19
|
-
config,
|
|
20
|
-
unitFactoryCls = _units.UnitFactory
|
|
21
|
-
}) {
|
|
22
|
-
let {
|
|
23
|
-
input: defaultInput
|
|
24
|
-
} = _map.defaultMapConfig;
|
|
25
|
-
if (config.input) {
|
|
26
|
-
defaultInput = {
|
|
27
|
-
...defaultInput,
|
|
28
|
-
...config.input
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
const unit = unitFactoryCls.create({
|
|
32
|
-
..._map.defaultMapConfig,
|
|
33
|
-
input: defaultInput
|
|
34
|
-
});
|
|
35
|
-
return unit;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @summary Update subworkflow units with patch configuration defined in the workflow config
|
|
40
|
-
* @param subworkflowData {Object} subworkflow data
|
|
41
|
-
* @param unitConfigs {Array<Object>} array of patch configs for subworkflow units
|
|
42
|
-
* @returns subworkflowData {Object} subworkflowData with patches applied to units
|
|
43
|
-
*/
|
|
44
|
-
function updateUnitConfigs({
|
|
45
|
-
subworkflowData,
|
|
46
|
-
unitConfigs
|
|
47
|
-
}) {
|
|
48
|
-
unitConfigs.forEach(config => {
|
|
49
|
-
const {
|
|
50
|
-
index,
|
|
51
|
-
type,
|
|
52
|
-
config: unitConfig
|
|
53
|
-
} = config; // unitConfig should contain 'attributes' key
|
|
54
|
-
const unit = (0, _utils.findUnit)({
|
|
55
|
-
subworkflowData,
|
|
56
|
-
index,
|
|
57
|
-
type
|
|
58
|
-
});
|
|
59
|
-
console.log(` patching ${type} unit ${index} of subworkflow ${subworkflowData.name}`);
|
|
60
|
-
unit.config = (0, _utils.applyConfig)({
|
|
61
|
-
obj: unit.config,
|
|
62
|
-
config: unitConfig
|
|
63
|
-
});
|
|
64
|
-
return null;
|
|
65
|
-
});
|
|
66
|
-
return subworkflowData;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* @summary Use subworkflow.createSubworkflow to create a Subworkflow unit
|
|
71
|
-
* @param appName {String} application name
|
|
72
|
-
* @param unitData {*} object containing subworkflow configuration data
|
|
73
|
-
* @param workflowData {*} object containing all workflow configuration data
|
|
74
|
-
* @param swArgs {*} subworkflow classes
|
|
75
|
-
* @returns {*} subworkflow object
|
|
76
|
-
*/
|
|
77
|
-
function createSubworkflowUnit({
|
|
78
|
-
appName,
|
|
79
|
-
unitData,
|
|
80
|
-
workflowData,
|
|
81
|
-
cache,
|
|
82
|
-
...swArgs
|
|
83
|
-
}) {
|
|
84
|
-
const {
|
|
85
|
-
name: unitName,
|
|
86
|
-
unitConfigs,
|
|
87
|
-
config
|
|
88
|
-
} = unitData;
|
|
89
|
-
const {
|
|
90
|
-
subworkflows
|
|
91
|
-
} = workflowData;
|
|
92
|
-
const {
|
|
93
|
-
[appName]: dataByApp
|
|
94
|
-
} = subworkflows;
|
|
95
|
-
let {
|
|
96
|
-
[unitName]: subworkflowData
|
|
97
|
-
} = dataByApp;
|
|
98
|
-
subworkflowData.config = {
|
|
99
|
-
...subworkflowData.config,
|
|
100
|
-
...config
|
|
101
|
-
};
|
|
102
|
-
if (unitConfigs) subworkflowData = updateUnitConfigs({
|
|
103
|
-
subworkflowData,
|
|
104
|
-
unitConfigs
|
|
105
|
-
});
|
|
106
|
-
return (0, _create.createSubworkflow)({
|
|
107
|
-
subworkflowData,
|
|
108
|
-
cache,
|
|
109
|
-
...swArgs
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* @summary Create the first workflow object specified in a workflow configuration
|
|
115
|
-
* @param workflow {*|null} the workflow (if already initialized, no-op)
|
|
116
|
-
* @param unit {*} workflow unit object
|
|
117
|
-
* @param type {String} value in ["workflow", "subworkflow"]
|
|
118
|
-
* @param workflowCls {*} workflow class
|
|
119
|
-
* @returns {Workflow|*} workflow object
|
|
120
|
-
*/
|
|
121
|
-
function createWorkflowHead({
|
|
122
|
-
workflow,
|
|
123
|
-
unit,
|
|
124
|
-
type,
|
|
125
|
-
workflowCls
|
|
126
|
-
}) {
|
|
127
|
-
if (workflow) return workflow;
|
|
128
|
-
let wf;
|
|
129
|
-
switch (type) {
|
|
130
|
-
case "workflow":
|
|
131
|
-
wf = unit;
|
|
132
|
-
break;
|
|
133
|
-
case "subworkflow":
|
|
134
|
-
wf = workflowCls.fromSubworkflow(unit);
|
|
135
|
-
break;
|
|
136
|
-
default:
|
|
137
|
-
throw new Error(`workflow type=${type} not understood.`);
|
|
138
|
-
}
|
|
139
|
-
return wf;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @summary Combine workflow units together
|
|
144
|
-
* @param workflow {*} the workflow object
|
|
145
|
-
* @param unit {*} workflow/subworkflow object
|
|
146
|
-
* @param config {*} additional configuration for e.g. map units
|
|
147
|
-
* @param type {String} value in ["workflow", "subworkflow"]
|
|
148
|
-
* @param unitFactoryCls {*} unit factory class for e.g. map units
|
|
149
|
-
* @returns {*} modified workflow
|
|
150
|
-
*/
|
|
151
|
-
function composeWorkflow({
|
|
152
|
-
workflow,
|
|
153
|
-
unit,
|
|
154
|
-
config,
|
|
155
|
-
type,
|
|
156
|
-
unitFactoryCls
|
|
157
|
-
}) {
|
|
158
|
-
/* eslint-disable no-case-declarations */
|
|
159
|
-
switch (type) {
|
|
160
|
-
case "workflow":
|
|
161
|
-
const {
|
|
162
|
-
mapUnit: isMapUnit,
|
|
163
|
-
...mapUnitConfig
|
|
164
|
-
} = config;
|
|
165
|
-
if (isMapUnit) {
|
|
166
|
-
const mapUnit = createMapUnit({
|
|
167
|
-
config: mapUnitConfig,
|
|
168
|
-
unitFactoryCls
|
|
169
|
-
});
|
|
170
|
-
workflow.addMapUnit(mapUnit, unit);
|
|
171
|
-
} else {
|
|
172
|
-
console.log("adding workflows directly to workflows is not supported.");
|
|
173
|
-
}
|
|
174
|
-
break;
|
|
175
|
-
case "subworkflow":
|
|
176
|
-
workflow.addSubworkflow(unit);
|
|
177
|
-
break;
|
|
178
|
-
default:
|
|
179
|
-
throw new Error(`workflow type=${type} not understood.`);
|
|
180
|
-
}
|
|
181
|
-
/* eslint-enable no-case-declarations */
|
|
182
|
-
return workflow;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* @summary Convert a flattened array of workflow units to a properly constructed workflow
|
|
187
|
-
* @param wfUnits {Array} array of workflow units
|
|
188
|
-
* @param workflowCls {*} workflow class
|
|
189
|
-
* @param unitFactoryCls {*} unit factory class
|
|
190
|
-
* @returns {*} constructed workflow
|
|
191
|
-
*/
|
|
192
|
-
function createFromWorkflowUnits({
|
|
193
|
-
wfUnits,
|
|
194
|
-
workflowCls,
|
|
195
|
-
unitFactoryCls
|
|
196
|
-
}) {
|
|
197
|
-
let workflow, unit, config, type;
|
|
198
|
-
wfUnits.map(wfUnit => {
|
|
199
|
-
({
|
|
200
|
-
unit,
|
|
201
|
-
config,
|
|
202
|
-
type
|
|
203
|
-
} = wfUnit);
|
|
204
|
-
if (!workflow) {
|
|
205
|
-
workflow = createWorkflowHead({
|
|
206
|
-
workflow,
|
|
207
|
-
unit,
|
|
208
|
-
type,
|
|
209
|
-
workflowCls
|
|
210
|
-
});
|
|
211
|
-
} else {
|
|
212
|
-
workflow = composeWorkflow({
|
|
213
|
-
workflow,
|
|
214
|
-
unit,
|
|
215
|
-
config,
|
|
216
|
-
type,
|
|
217
|
-
unitFactoryCls
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
return null;
|
|
221
|
-
});
|
|
222
|
-
return (0, _utils.applyConfig)({
|
|
223
|
-
obj: workflow,
|
|
224
|
-
config
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* @summary Creates a flattened array of workflow units from nested workflow/subworkflow
|
|
230
|
-
* configuration data comprising a simple or complex workflow
|
|
231
|
-
* @param appName
|
|
232
|
-
* @param units
|
|
233
|
-
* @param swArgs
|
|
234
|
-
* @returns {*[]}
|
|
235
|
-
*/
|
|
236
|
-
function createWorkflowUnits({
|
|
237
|
-
appName,
|
|
238
|
-
workflowData,
|
|
239
|
-
workflowSubworkflowMapByApplication,
|
|
240
|
-
workflowCls,
|
|
241
|
-
cache = [],
|
|
242
|
-
...swArgs
|
|
243
|
-
}) {
|
|
244
|
-
const wfUnits = [];
|
|
245
|
-
const {
|
|
246
|
-
units
|
|
247
|
-
} = workflowData;
|
|
248
|
-
let unit, config;
|
|
249
|
-
units.map(unitData => {
|
|
250
|
-
const {
|
|
251
|
-
type
|
|
252
|
-
} = unitData;
|
|
253
|
-
switch (type) {
|
|
254
|
-
case "workflow":
|
|
255
|
-
({
|
|
256
|
-
config
|
|
257
|
-
} = unitData);
|
|
258
|
-
unit = createWorkflowUnits({
|
|
259
|
-
appName,
|
|
260
|
-
workflowData: unitData,
|
|
261
|
-
workflowSubworkflowMapByApplication,
|
|
262
|
-
workflowCls,
|
|
263
|
-
...swArgs
|
|
264
|
-
});
|
|
265
|
-
break;
|
|
266
|
-
case "subworkflow":
|
|
267
|
-
({
|
|
268
|
-
config
|
|
269
|
-
} = workflowData);
|
|
270
|
-
unit = createSubworkflowUnit({
|
|
271
|
-
appName,
|
|
272
|
-
unitData,
|
|
273
|
-
workflowData: workflowSubworkflowMapByApplication,
|
|
274
|
-
cache,
|
|
275
|
-
...swArgs
|
|
276
|
-
});
|
|
277
|
-
break;
|
|
278
|
-
default:
|
|
279
|
-
break;
|
|
280
|
-
}
|
|
281
|
-
wfUnits.push({
|
|
282
|
-
config,
|
|
283
|
-
unit,
|
|
284
|
-
type
|
|
285
|
-
});
|
|
286
|
-
return null;
|
|
287
|
-
});
|
|
288
|
-
return createFromWorkflowUnits({
|
|
289
|
-
wfUnits,
|
|
290
|
-
workflowCls,
|
|
291
|
-
subworkflowCls: swArgs.subworkflowCls,
|
|
292
|
-
unitFactoryCls: swArgs.unitFactoryCls
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
function createWorkflow({
|
|
296
|
-
appName,
|
|
297
|
-
workflowData,
|
|
298
|
-
workflowSubworkflowMapByApplication,
|
|
299
|
-
workflowCls = _workflow.Workflow,
|
|
300
|
-
...swArgs
|
|
301
|
-
}) {
|
|
302
|
-
const cache = [];
|
|
303
|
-
const {
|
|
304
|
-
name
|
|
305
|
-
} = workflowData;
|
|
306
|
-
console.log(`wode: creating ${appName} workflow ${name}`);
|
|
307
|
-
const wf = createWorkflowUnits({
|
|
308
|
-
appName,
|
|
309
|
-
workflowData,
|
|
310
|
-
workflowSubworkflowMapByApplication,
|
|
311
|
-
workflowCls,
|
|
312
|
-
cache,
|
|
313
|
-
...swArgs
|
|
314
|
-
});
|
|
315
|
-
wf.setName(name);
|
|
316
|
-
wf.applicationName = appName;
|
|
317
|
-
return wf;
|
|
318
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Workflow", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _workflow.Workflow;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "createWorkflow", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _create.createWorkflow;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
exports.createWorkflowConfigs = createWorkflowConfigs;
|
|
19
|
-
exports.createWorkflows = createWorkflows;
|
|
20
|
-
var _ade = require("@mat3ra/ade");
|
|
21
|
-
var _JSONSchemasInterface = _interopRequireDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
22
|
-
var _schemas = _interopRequireDefault(require("@mat3ra/esse/dist/js/schemas.json"));
|
|
23
|
-
var _patch = require("../patch");
|
|
24
|
-
var _create = require("./create");
|
|
25
|
-
var _workflow = require("./workflow");
|
|
26
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
27
|
-
// Import Template here to apply context provider patch
|
|
28
|
-
// eslint-disable-next-line no-unused-vars
|
|
29
|
-
|
|
30
|
-
// Running this to set schemas for validation, removing the redundant data from application-flavors tree: `flavors`
|
|
31
|
-
_JSONSchemasInterface.default.setSchemas(_schemas.default);
|
|
32
|
-
|
|
33
|
-
/*
|
|
34
|
-
Workflow construction follows these rules:
|
|
35
|
-
1. Workflow is constructed as a collection of subworkflows defined in JSON
|
|
36
|
-
2. A "units" key should contain at least one object referencing the workflow itself
|
|
37
|
-
3. Additional workflows are added in order specified in the same "units" array
|
|
38
|
-
4. map units are added along with their workflows according to data in "units"
|
|
39
|
-
5. top-level subworkflows are added directly in the order also specified by "units"
|
|
40
|
-
*/
|
|
41
|
-
function createWorkflows({
|
|
42
|
-
appName = null,
|
|
43
|
-
workflowCls = _workflow.Workflow,
|
|
44
|
-
workflowSubworkflowMapByApplication,
|
|
45
|
-
...swArgs
|
|
46
|
-
}) {
|
|
47
|
-
let apps = appName !== null ? [appName] : _ade.allApplications;
|
|
48
|
-
const allApplicationsFromWorkflowData = Object.keys(workflowSubworkflowMapByApplication.workflows);
|
|
49
|
-
// output warning if allApplications and allApplicationsFromWorkflowData do not match
|
|
50
|
-
if (appName === null) {
|
|
51
|
-
if (apps && apps.sort().join(",") !== allApplicationsFromWorkflowData.sort().join(",")) {
|
|
52
|
-
// eslint-disable-next-line no-console
|
|
53
|
-
console.warn(`Warning: allApplications and allApplicationsFromWorkflowData do not match:
|
|
54
|
-
${apps.sort().join(",")} !== ${allApplicationsFromWorkflowData.sort().join(",")}`);
|
|
55
|
-
console.warn("Using allApplicationsFromWorkflowData");
|
|
56
|
-
}
|
|
57
|
-
apps = allApplicationsFromWorkflowData;
|
|
58
|
-
}
|
|
59
|
-
const wfs = [];
|
|
60
|
-
const {
|
|
61
|
-
workflows
|
|
62
|
-
} = workflowSubworkflowMapByApplication;
|
|
63
|
-
apps.map(name => {
|
|
64
|
-
const {
|
|
65
|
-
[name]: dataByApp
|
|
66
|
-
} = workflows;
|
|
67
|
-
Object.values(dataByApp).map(workflowDataForApp => {
|
|
68
|
-
wfs.push((0, _create.createWorkflow)({
|
|
69
|
-
appName: name,
|
|
70
|
-
workflowData: workflowDataForApp,
|
|
71
|
-
workflowSubworkflowMapByApplication,
|
|
72
|
-
workflowCls,
|
|
73
|
-
...swArgs
|
|
74
|
-
}));
|
|
75
|
-
return null;
|
|
76
|
-
});
|
|
77
|
-
return null;
|
|
78
|
-
});
|
|
79
|
-
return wfs;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @summary Create workflow configurations for all applications
|
|
84
|
-
* @param applications {Array<String>} array of application names
|
|
85
|
-
* @param workflowCls {*} workflow class to instantiate
|
|
86
|
-
* @param workflowSubworkflowMapByApplication {Object} object containing all workflow/subworkflow map by application
|
|
87
|
-
* @param swArgs {Object} other classes for instantiation
|
|
88
|
-
* @returns {Array<Object>} array of workflow configurations
|
|
89
|
-
*/
|
|
90
|
-
function createWorkflowConfigs({
|
|
91
|
-
applications,
|
|
92
|
-
workflowCls = _workflow.Workflow,
|
|
93
|
-
workflowSubworkflowMapByApplication,
|
|
94
|
-
...swArgs
|
|
95
|
-
}) {
|
|
96
|
-
const configs = [];
|
|
97
|
-
applications.forEach(app => {
|
|
98
|
-
const workflows = createWorkflows({
|
|
99
|
-
appName: app,
|
|
100
|
-
workflowCls,
|
|
101
|
-
workflowSubworkflowMapByApplication,
|
|
102
|
-
...swArgs
|
|
103
|
-
});
|
|
104
|
-
workflows.forEach(wf => {
|
|
105
|
-
configs.push({
|
|
106
|
-
application: app,
|
|
107
|
-
name: wf.prop("name"),
|
|
108
|
-
config: wf.toJSON()
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
return configs;
|
|
113
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.RelaxationLogicMixin = void 0;
|
|
7
|
-
var _standata = require("@mat3ra/standata");
|
|
8
|
-
const RelaxationLogicMixin = superclass => class extends superclass {
|
|
9
|
-
get relaxationSubworkflow() {
|
|
10
|
-
const appName = this.subworkflows[0]?.application?.name;
|
|
11
|
-
if (!appName) return undefined;
|
|
12
|
-
const subworkflowStandata = new _standata.SubworkflowStandata();
|
|
13
|
-
const relaxationSubworkflow = subworkflowStandata.getRelaxationSubworkflowByApplication(appName);
|
|
14
|
-
if (!relaxationSubworkflow) return undefined;
|
|
15
|
-
return new this._Subworkflow(relaxationSubworkflow);
|
|
16
|
-
}
|
|
17
|
-
isRelaxationSubworkflow(subworkflow) {
|
|
18
|
-
const {
|
|
19
|
-
relaxationSubworkflow
|
|
20
|
-
} = this;
|
|
21
|
-
return relaxationSubworkflow?.systemName !== undefined && relaxationSubworkflow.systemName === subworkflow.systemName;
|
|
22
|
-
}
|
|
23
|
-
get hasRelaxation() {
|
|
24
|
-
return this.subworkflows.some(subworkflow => this.isRelaxationSubworkflow(subworkflow));
|
|
25
|
-
}
|
|
26
|
-
toggleRelaxation() {
|
|
27
|
-
if (this.hasRelaxation) {
|
|
28
|
-
const relaxSubworkflow = this.subworkflows.find(sw => this.isRelaxationSubworkflow(sw));
|
|
29
|
-
this.removeSubworkflow(relaxSubworkflow.id);
|
|
30
|
-
} else {
|
|
31
|
-
const vcRelax = this.relaxationSubworkflow;
|
|
32
|
-
if (vcRelax) {
|
|
33
|
-
this.addSubworkflow(vcRelax, true);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.RelaxationLogicMixin = RelaxationLogicMixin;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { BoundaryConditionsFormDataProvider } from "./providers/BoundaryConditionsFormDataProvider";
|
|
2
|
-
import QENEBContextProvider from "./providers/by_application/espresso/QENEBContextProvider";
|
|
3
|
-
import QEPWXContextProvider from "./providers/by_application/espresso/QEPWXContextProvider";
|
|
4
|
-
import NWChemTotalEnergyContextProvider from "./providers/by_application/nwchem/NWChemTotalEnergyContextProvider";
|
|
5
|
-
import VASPContextProvider from "./providers/by_application/vasp/VASPContextProvider";
|
|
6
|
-
import VASPNEBContextProvider from "./providers/by_application/vasp/VASPNEBContextProvider";
|
|
7
|
-
import { CollinearMagnetizationContextProvider } from "./providers/CollinearMagnetizationContextProvider";
|
|
8
|
-
import { HubbardContextProviderLegacy } from "./providers/HubbardContextProviderLegacy";
|
|
9
|
-
import { HubbardJContextProvider } from "./providers/HubbardJContextProvider";
|
|
10
|
-
import { HubbardUContextProvider } from "./providers/HubbardUContextProvider";
|
|
11
|
-
import { HubbardVContextProvider } from "./providers/HubbardVContextProvider";
|
|
12
|
-
import { IonDynamicsContextProvider } from "./providers/IonDynamicsContextProvider";
|
|
13
|
-
import { MLSettingsContextProvider } from "./providers/MLSettingsContextProvider";
|
|
14
|
-
import { MLTrainTestSplitContextProvider } from "./providers/MLTrainTestSplitContextProvider";
|
|
15
|
-
import { NEBFormDataProvider } from "./providers/NEBFormDataProvider";
|
|
16
|
-
import { NonCollinearMagnetizationContextProvider } from "./providers/NonCollinearMagnetizationContextProvider";
|
|
17
|
-
import { PlanewaveCutoffsContextProvider } from "./providers/PlanewaveCutoffsContextProvider";
|
|
18
|
-
import { PointsGridFormDataProvider } from "./providers/PointsGridFormDataProvider";
|
|
19
|
-
import {
|
|
20
|
-
ExplicitPointsPath2PIBAFormDataProvider,
|
|
21
|
-
ExplicitPointsPathFormDataProvider,
|
|
22
|
-
PointsPathFormDataProvider,
|
|
23
|
-
} from "./providers/PointsPathFormDataProvider";
|
|
24
|
-
|
|
25
|
-
export default {
|
|
26
|
-
BoundaryConditionsFormDataProvider,
|
|
27
|
-
MLSettingsContextProvider,
|
|
28
|
-
MLTrainTestSplitContextProvider,
|
|
29
|
-
NEBFormDataProvider,
|
|
30
|
-
PlanewaveCutoffsContextProvider,
|
|
31
|
-
PointsGridFormDataProvider,
|
|
32
|
-
PointsPathFormDataProvider,
|
|
33
|
-
ExplicitPointsPathFormDataProvider,
|
|
34
|
-
ExplicitPointsPath2PIBAFormDataProvider,
|
|
35
|
-
HubbardJContextProvider,
|
|
36
|
-
HubbardUContextProvider,
|
|
37
|
-
HubbardVContextProvider,
|
|
38
|
-
HubbardContextProviderLegacy,
|
|
39
|
-
IonDynamicsContextProvider,
|
|
40
|
-
CollinearMagnetizationContextProvider,
|
|
41
|
-
NonCollinearMagnetizationContextProvider,
|
|
42
|
-
VASPContextProvider,
|
|
43
|
-
VASPNEBContextProvider,
|
|
44
|
-
QEPWXContextProvider,
|
|
45
|
-
QENEBContextProvider,
|
|
46
|
-
NWChemTotalEnergyContextProvider,
|
|
47
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { globalSettings } from "../providers/settings";
|
|
2
|
-
|
|
3
|
-
export function applicationContextMixin(item) {
|
|
4
|
-
const properties = {
|
|
5
|
-
_application: undefined,
|
|
6
|
-
|
|
7
|
-
initApplicationContextMixin() {
|
|
8
|
-
this._application =
|
|
9
|
-
(this.config.context && this.config.context.application) ||
|
|
10
|
-
globalSettings.Application.createDefault();
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
get application() {
|
|
14
|
-
return this._application;
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
19
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const defaultJob = {
|
|
2
|
-
workflow: {
|
|
3
|
-
subworkflows: [],
|
|
4
|
-
units: [],
|
|
5
|
-
},
|
|
6
|
-
status: "pre-submission",
|
|
7
|
-
compute: {
|
|
8
|
-
queue: "D",
|
|
9
|
-
nodes: 1,
|
|
10
|
-
ppn: 1,
|
|
11
|
-
timeLimit: "3600",
|
|
12
|
-
},
|
|
13
|
-
_project: {
|
|
14
|
-
_id: "",
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export function jobContextMixin(item) {
|
|
19
|
-
const properties = {
|
|
20
|
-
isEdited: false,
|
|
21
|
-
|
|
22
|
-
_job: defaultJob,
|
|
23
|
-
|
|
24
|
-
get job() {
|
|
25
|
-
return this._job;
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
initJobContextMixin() {
|
|
29
|
-
const { config } = this;
|
|
30
|
-
this._job = (config.context && config.context.job) || defaultJob;
|
|
31
|
-
this.isEdited = false; // we always get the `defaultData` (recalculated from scratch, not persistent)
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
36
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { globalSettings } from "../providers/settings";
|
|
2
|
-
|
|
3
|
-
export function materialContextMixin(item) {
|
|
4
|
-
const properties = {
|
|
5
|
-
_material: undefined,
|
|
6
|
-
|
|
7
|
-
updateMaterialHash() {
|
|
8
|
-
if (this.isEditedIsSetToFalseOnMaterialUpdate) this.isEdited = false;
|
|
9
|
-
this.extraData = { materialHash: this.material.hash };
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
// Workaround: Material.createDefault() used to initiate workflow reducer and hence here too
|
|
13
|
-
// does not have an id. Here we catch when such material is used and avoid resetting isEdited
|
|
14
|
-
get isMaterialCreatedDefault() {
|
|
15
|
-
return !this.material.id;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
get isMaterialUpdated() {
|
|
19
|
-
return Boolean(this.extraData && this.extraData.materialHash !== this.material.hash);
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
get material() {
|
|
23
|
-
if (!this._material) {
|
|
24
|
-
throw new Error("Material is not set");
|
|
25
|
-
}
|
|
26
|
-
return this._material;
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
initMaterialContextMixin() {
|
|
30
|
-
this._material = this.config.context && this.config.context.material;
|
|
31
|
-
|
|
32
|
-
if (!this._material) {
|
|
33
|
-
this._material = globalSettings.Material.createDefault();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
this.updateMaterialHash();
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
41
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { globalSettings } from "../providers/settings";
|
|
2
|
-
|
|
3
|
-
export function materialsContextMixin(item) {
|
|
4
|
-
const properties = {
|
|
5
|
-
get materials() {
|
|
6
|
-
return this._materials;
|
|
7
|
-
},
|
|
8
|
-
initMaterialsContextMixin() {
|
|
9
|
-
const materials = this.config.context?.materials;
|
|
10
|
-
this._materials =
|
|
11
|
-
materials && materials.length
|
|
12
|
-
? materials
|
|
13
|
-
: [globalSettings.Material.createDefault()];
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
18
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { compareEntitiesInOrderedSetForSorting } from "@mat3ra/code/dist/js/entity/set/ordered/utils";
|
|
2
|
-
|
|
3
|
-
export function materialsSetContextMixin(item) {
|
|
4
|
-
const properties = {
|
|
5
|
-
_materialsSet: undefined,
|
|
6
|
-
|
|
7
|
-
get materialsSet() {
|
|
8
|
-
return this._materialsSet;
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
initMaterialsSetContextMixin() {
|
|
12
|
-
this._materialsSet = this.config.context?.materialsSet;
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
sortMaterialsByIndexInSet(materials = []) {
|
|
16
|
-
// DO NOT SORT IN PLACE AS IT CHANGES THE ORDER IN `this.materials` AND HAS SIDE EFFECTS (MaterialViewer).
|
|
17
|
-
return materials.concat().sort((a, b) => {
|
|
18
|
-
return compareEntitiesInOrderedSetForSorting(a, b, this.materialsSet._id, false);
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
24
|
-
}
|