@mat3ra/wode 2025.11.13-0 → 2025.11.26-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/dist/js/context/providers/BoundaryConditionsFormDataProvider.js +26 -28
- package/dist/js/context/providers/CollinearMagnetizationContextProvider.js +25 -42
- package/dist/js/context/providers/HubbardContextProviderLegacy.js +14 -27
- package/dist/js/context/providers/HubbardJContextProvider.js +28 -35
- package/dist/js/context/providers/HubbardUContextProvider.js +23 -30
- package/dist/js/context/providers/HubbardVContextProvider.js +39 -51
- package/dist/js/context/providers/IonDynamicsContextProvider.js +27 -31
- package/dist/js/context/providers/MLSettingsContextProvider.js +16 -17
- package/dist/js/context/providers/MLTrainTestSplitContextProvider.js +13 -14
- package/dist/js/context/providers/NEBFormDataProvider.js +18 -14
- package/dist/js/context/providers/NonCollinearMagnetizationContextProvider.js +59 -125
- package/dist/js/context/providers/PlanewaveCutoffsContextProvider.js +18 -18
- package/dist/js/context/providers/PointsGridFormDataProvider.js +23 -32
- package/dist/js/context/providers/PointsPathFormDataProvider.js +17 -25
- package/dist/js/context/providers/by_application/ExecutableContextProvider.js +2 -3
- package/dist/js/index.js +113 -0
- package/dist/js/subworkflows/create.js +2 -2
- package/dist/js/units/builders/ExecutionUnitConfigBuilder.js +3 -4
- package/dist/js/units/execution.js +7 -8
- package/dist/js/workflows/index.js +6 -0
- package/dist/js/workflows/workflow.js +1 -1
- package/package.json +6 -7
- package/src/js/context/providers/BoundaryConditionsFormDataProvider.js +19 -27
- package/src/js/context/providers/CollinearMagnetizationContextProvider.js +29 -41
- package/src/js/context/providers/HubbardContextProviderLegacy.js +19 -27
- package/src/js/context/providers/HubbardJContextProvider.js +27 -35
- package/src/js/context/providers/HubbardUContextProvider.js +24 -29
- package/src/js/context/providers/HubbardVContextProvider.js +39 -54
- package/src/js/context/providers/IonDynamicsContextProvider.js +17 -29
- package/src/js/context/providers/MLSettingsContextProvider.js +14 -17
- package/src/js/context/providers/MLTrainTestSplitContextProvider.js +13 -15
- package/src/js/context/providers/NEBFormDataProvider.js +14 -13
- package/src/js/context/providers/NonCollinearMagnetizationContextProvider.js +38 -128
- package/src/js/context/providers/PlanewaveCutoffsContextProvider.js +15 -18
- package/src/js/context/providers/PointsGridFormDataProvider.js +23 -37
- package/src/js/context/providers/PointsPathFormDataProvider.js +19 -21
- package/src/js/context/providers/by_application/ExecutableContextProvider.js +1 -1
- package/src/js/index.js +42 -2
- package/src/js/subworkflows/create.js +1 -1
- package/src/js/units/builders/ExecutionUnitConfigBuilder.js +1 -1
- package/src/js/units/execution.js +1 -2
- package/src/js/workflows/index.js +1 -1
- package/src/js/workflows/workflow.js +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import JSONSchemaFormDataProvider from "@mat3ra/ade
|
|
1
|
+
import { JSONSchemaFormDataProvider } from "@mat3ra/ade";
|
|
2
2
|
import { units as UNITS } from "@mat3ra/code/dist/js/constants";
|
|
3
3
|
import { math as codeJSMath } from "@mat3ra/code/dist/js/math";
|
|
4
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
4
5
|
import { Made } from "@mat3ra/made";
|
|
5
6
|
import lodash from "lodash";
|
|
6
7
|
|
|
@@ -8,6 +9,8 @@ import { materialContextMixin } from "../mixins/MaterialContextMixin";
|
|
|
8
9
|
import { globalSettings } from "./settings";
|
|
9
10
|
|
|
10
11
|
export class PointsGridFormDataProvider extends JSONSchemaFormDataProvider {
|
|
12
|
+
jsonSchemaId = "context-providers-directory/points-grid-data-provider";
|
|
13
|
+
|
|
11
14
|
constructor(config) {
|
|
12
15
|
super(config);
|
|
13
16
|
this.initMaterialContextMixin();
|
|
@@ -91,58 +94,37 @@ export class PointsGridFormDataProvider extends JSONSchemaFormDataProvider {
|
|
|
91
94
|
);
|
|
92
95
|
}
|
|
93
96
|
|
|
94
|
-
get
|
|
95
|
-
|
|
96
|
-
type: "array",
|
|
97
|
-
items: {
|
|
98
|
-
type: "number",
|
|
99
|
-
},
|
|
100
|
-
minItems: 3,
|
|
101
|
-
maxItems: 3,
|
|
102
|
-
};
|
|
103
|
-
|
|
97
|
+
get jsonSchemaPatchConfig() {
|
|
98
|
+
// Helper function to create vector schema with defaults
|
|
104
99
|
const vector_ = (defaultValue, isStringType = false) => {
|
|
105
100
|
const isArray = Array.isArray(defaultValue);
|
|
106
101
|
return {
|
|
107
|
-
|
|
102
|
+
type: "array",
|
|
108
103
|
items: {
|
|
109
104
|
type: isStringType ? "string" : "number",
|
|
110
105
|
...(isArray ? {} : { default: defaultValue }),
|
|
111
106
|
},
|
|
107
|
+
minItems: 3,
|
|
108
|
+
maxItems: 3,
|
|
112
109
|
...(isArray ? { default: defaultValue } : {}),
|
|
113
110
|
};
|
|
114
111
|
};
|
|
115
112
|
|
|
116
113
|
return {
|
|
117
|
-
|
|
114
|
+
dimensions: vector_(this._defaultDimensions, this.isUsingJinjaVariables),
|
|
115
|
+
shifts: vector_(this.getDefaultShift()),
|
|
116
|
+
reciprocalVectorRatios: vector_(this.reciprocalVectorRatios),
|
|
117
|
+
gridMetricType: { default: "KPPRA" },
|
|
118
118
|
description: `3D grid with shifts. Default min value for ${
|
|
119
119
|
this._metricDescription[this.gridMetricType]
|
|
120
120
|
} is ${this._getDefaultGridMetricValue(this.gridMetricType)}.`,
|
|
121
|
-
|
|
122
|
-
properties: {
|
|
123
|
-
dimensions: vector_(this._defaultDimensions, this.isUsingJinjaVariables),
|
|
124
|
-
shifts: vector_(this.getDefaultShift()),
|
|
125
|
-
reciprocalVectorRatios: vector_(this.reciprocalVectorRatios),
|
|
126
|
-
gridMetricType: {
|
|
127
|
-
type: "string",
|
|
128
|
-
enum: ["KPPRA", "spacing"],
|
|
129
|
-
default: "KPPRA",
|
|
130
|
-
},
|
|
131
|
-
gridMetricValue: {
|
|
132
|
-
type: "number",
|
|
133
|
-
},
|
|
134
|
-
preferGridMetric: {
|
|
135
|
-
type: "boolean",
|
|
136
|
-
},
|
|
137
|
-
},
|
|
121
|
+
required: ["dimensions", "shifts"],
|
|
138
122
|
dependencies: {
|
|
139
123
|
gridMetricType: {
|
|
140
124
|
oneOf: [
|
|
141
125
|
{
|
|
142
126
|
properties: {
|
|
143
|
-
gridMetricType: {
|
|
144
|
-
enum: ["KPPRA"],
|
|
145
|
-
},
|
|
127
|
+
gridMetricType: { enum: ["KPPRA"] },
|
|
146
128
|
gridMetricValue: {
|
|
147
129
|
type: "integer",
|
|
148
130
|
minimum: 1,
|
|
@@ -158,9 +140,7 @@ export class PointsGridFormDataProvider extends JSONSchemaFormDataProvider {
|
|
|
158
140
|
},
|
|
159
141
|
{
|
|
160
142
|
properties: {
|
|
161
|
-
gridMetricType: {
|
|
162
|
-
enum: ["spacing"],
|
|
163
|
-
},
|
|
143
|
+
gridMetricType: { enum: ["spacing"] },
|
|
164
144
|
gridMetricValue: {
|
|
165
145
|
type: "number",
|
|
166
146
|
minimum: 0,
|
|
@@ -177,10 +157,16 @@ export class PointsGridFormDataProvider extends JSONSchemaFormDataProvider {
|
|
|
177
157
|
],
|
|
178
158
|
},
|
|
179
159
|
},
|
|
180
|
-
required: ["dimensions", "shifts"],
|
|
181
160
|
};
|
|
182
161
|
}
|
|
183
162
|
|
|
163
|
+
get jsonSchema() {
|
|
164
|
+
return JSONSchemasInterface.getPatchedSchemaById(
|
|
165
|
+
this.jsonSchemaId,
|
|
166
|
+
this.jsonSchemaPatchConfig,
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
184
170
|
get uiSchema() {
|
|
185
171
|
const _arraySubStyle = (emptyValue = 0) => {
|
|
186
172
|
return {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* eslint-disable max-classes-per-file */
|
|
2
2
|
/* eslint react/prop-types: 0 */
|
|
3
|
-
import JSONSchemaFormDataProvider from "@mat3ra/ade
|
|
3
|
+
import { JSONSchemaFormDataProvider } from "@mat3ra/ade";
|
|
4
4
|
import { math as codeJSMath } from "@mat3ra/code/dist/js/math";
|
|
5
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
5
6
|
import { Made } from "@mat3ra/made";
|
|
6
7
|
import s from "underscore.string";
|
|
7
8
|
|
|
@@ -12,6 +13,8 @@ const defaultPoint = "Г";
|
|
|
12
13
|
const defaultSteps = 10;
|
|
13
14
|
|
|
14
15
|
export class PointsPathFormDataProvider extends JSONSchemaFormDataProvider {
|
|
16
|
+
jsonSchemaId = "context-providers-directory/points-path-data-provider";
|
|
17
|
+
|
|
15
18
|
constructor(config) {
|
|
16
19
|
super(config);
|
|
17
20
|
this.initMaterialContextMixin();
|
|
@@ -32,32 +35,27 @@ export class PointsPathFormDataProvider extends JSONSchemaFormDataProvider {
|
|
|
32
35
|
return this.reciprocalLattice.symmetryPoints;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
get
|
|
36
|
-
// no need to pass context to get symmetry points on client
|
|
38
|
+
get jsonSchemaPatchConfig() {
|
|
37
39
|
const points = [].concat(this.symmetryPoints).map((x) => x.point);
|
|
40
|
+
|
|
38
41
|
return {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
items: {
|
|
44
|
-
|
|
45
|
-
properties: {
|
|
46
|
-
point: {
|
|
47
|
-
type: "string",
|
|
48
|
-
default: defaultPoint,
|
|
49
|
-
enum: points,
|
|
50
|
-
},
|
|
51
|
-
steps: {
|
|
52
|
-
type: "integer",
|
|
53
|
-
default: defaultSteps,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
42
|
+
"items.properties.point": {
|
|
43
|
+
default: defaultPoint,
|
|
44
|
+
enum: points,
|
|
45
|
+
},
|
|
46
|
+
"items.properties.steps": {
|
|
47
|
+
default: defaultSteps,
|
|
56
48
|
},
|
|
57
|
-
minItems: 1,
|
|
58
49
|
};
|
|
59
50
|
}
|
|
60
51
|
|
|
52
|
+
get jsonSchema() {
|
|
53
|
+
return JSONSchemasInterface.getPatchedSchemaById(
|
|
54
|
+
this.jsonSchemaId,
|
|
55
|
+
this.jsonSchemaPatchConfig,
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
61
59
|
// eslint-disable-next-line class-methods-use-this
|
|
62
60
|
get uiSchema() {
|
|
63
61
|
return {
|
package/src/js/index.js
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wodeProviders } from "./context/providers";
|
|
2
|
+
import { PointsPathFormDataProvider } from "./context/providers/PointsPathFormDataProvider";
|
|
3
|
+
import { globalSettings } from "./context/providers/settings";
|
|
4
|
+
import {
|
|
5
|
+
TAB_NAVIGATION_CONFIG,
|
|
6
|
+
UNIT_NAME_INVALID_CHARS,
|
|
7
|
+
UNIT_STATUSES,
|
|
8
|
+
UNIT_TYPES,
|
|
9
|
+
WORKFLOW_STATUSES,
|
|
10
|
+
} from "./enums";
|
|
2
11
|
import { createSubworkflowByName, Subworkflow } from "./subworkflows";
|
|
12
|
+
import {
|
|
13
|
+
AssertionUnit,
|
|
14
|
+
AssignmentUnit,
|
|
15
|
+
BaseUnit,
|
|
16
|
+
ConditionUnit,
|
|
17
|
+
ExecutionUnit,
|
|
18
|
+
IOUnit,
|
|
19
|
+
MapUnit,
|
|
20
|
+
ProcessingUnit,
|
|
21
|
+
ReduceUnit,
|
|
22
|
+
SubworkflowUnit,
|
|
23
|
+
} from "./units";
|
|
3
24
|
import { builders } from "./units/builders";
|
|
4
25
|
import { UnitFactory } from "./units/factory";
|
|
5
|
-
import {
|
|
26
|
+
import { defaultMapConfig } from "./units/map";
|
|
27
|
+
import { createWorkflow, createWorkflowConfigs, createWorkflows, Workflow } from "./workflows";
|
|
6
28
|
|
|
7
29
|
export {
|
|
8
30
|
Subworkflow,
|
|
9
31
|
Workflow,
|
|
32
|
+
createWorkflow,
|
|
10
33
|
createWorkflows,
|
|
11
34
|
createWorkflowConfigs,
|
|
12
35
|
createSubworkflowByName,
|
|
@@ -14,4 +37,21 @@ export {
|
|
|
14
37
|
builders,
|
|
15
38
|
UNIT_TYPES,
|
|
16
39
|
UNIT_STATUSES,
|
|
40
|
+
TAB_NAVIGATION_CONFIG,
|
|
41
|
+
UNIT_NAME_INVALID_CHARS,
|
|
42
|
+
WORKFLOW_STATUSES,
|
|
43
|
+
BaseUnit,
|
|
44
|
+
ExecutionUnit,
|
|
45
|
+
AssertionUnit,
|
|
46
|
+
AssignmentUnit,
|
|
47
|
+
ConditionUnit,
|
|
48
|
+
IOUnit,
|
|
49
|
+
MapUnit,
|
|
50
|
+
ProcessingUnit,
|
|
51
|
+
ReduceUnit,
|
|
52
|
+
SubworkflowUnit,
|
|
53
|
+
defaultMapConfig,
|
|
54
|
+
wodeProviders,
|
|
55
|
+
PointsPathFormDataProvider,
|
|
56
|
+
globalSettings,
|
|
17
57
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable class-methods-use-this */
|
|
2
|
-
import ApplicationRegistry from "@mat3ra/ade
|
|
2
|
+
import { ApplicationRegistry } from "@mat3ra/ade";
|
|
3
3
|
|
|
4
4
|
import { UNIT_TYPES } from "../../enums";
|
|
5
5
|
import { UnitConfigBuilder } from "./UnitConfigBuilder";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-classes-per-file */
|
|
2
|
-
import { ComputedEntityMixin, getDefaultComputeConfig } from "@exabyte-io/ide.js";
|
|
3
2
|
import { NamedDefaultableRepetitionContextAndRenderInMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
4
3
|
import workflowSchema from "@mat3ra/esse/dist/js/schema/workflow.json";
|
|
4
|
+
import { ComputedEntityMixin, getDefaultComputeConfig } from "@mat3ra/ide";
|
|
5
5
|
import { tree } from "@mat3ra/mode";
|
|
6
6
|
import { Utils } from "@mat3ra/utils";
|
|
7
7
|
import lodash from "lodash";
|