@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,4 +1,5 @@
|
|
|
1
|
-
import JSONSchemaFormDataProvider from "@mat3ra/ade
|
|
1
|
+
import { JSONSchemaFormDataProvider } from "@mat3ra/ade";
|
|
2
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
2
3
|
|
|
3
4
|
import { materialContextMixin } from "../mixins/MaterialContextMixin";
|
|
4
5
|
|
|
@@ -9,6 +10,8 @@ const defaultHubbardConfig = {
|
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export class HubbardUContextProvider extends JSONSchemaFormDataProvider {
|
|
13
|
+
jsonSchemaId = "context-providers-directory/hubbard-u-context-provider";
|
|
14
|
+
|
|
12
15
|
constructor(config) {
|
|
13
16
|
super(config);
|
|
14
17
|
|
|
@@ -50,6 +53,22 @@ export class HubbardUContextProvider extends JSONSchemaFormDataProvider {
|
|
|
50
53
|
];
|
|
51
54
|
}
|
|
52
55
|
|
|
56
|
+
get jsonSchemaPatchConfig() {
|
|
57
|
+
return {
|
|
58
|
+
"items.properties.atomicSpecies": {
|
|
59
|
+
enum: this.uniqueElementsWithLabels,
|
|
60
|
+
default: this.firstElement,
|
|
61
|
+
},
|
|
62
|
+
"items.properties.atomicOrbital": {
|
|
63
|
+
enum: this.orbitalList,
|
|
64
|
+
default: defaultHubbardConfig.atomicOrbital,
|
|
65
|
+
},
|
|
66
|
+
"items.properties.hubbardUValue": {
|
|
67
|
+
default: defaultHubbardConfig.hubbardUValue,
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
53
72
|
get uiSchemaStyled() {
|
|
54
73
|
return {
|
|
55
74
|
"ui:options": {
|
|
@@ -66,34 +85,10 @@ export class HubbardUContextProvider extends JSONSchemaFormDataProvider {
|
|
|
66
85
|
}
|
|
67
86
|
|
|
68
87
|
get jsonSchema() {
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
type: "array",
|
|
74
|
-
items: {
|
|
75
|
-
type: "object",
|
|
76
|
-
properties: {
|
|
77
|
-
atomicSpecies: {
|
|
78
|
-
type: "string",
|
|
79
|
-
title: "Atomic species",
|
|
80
|
-
enum: this.uniqueElementsWithLabels,
|
|
81
|
-
default: this.firstElement,
|
|
82
|
-
},
|
|
83
|
-
atomicOrbital: {
|
|
84
|
-
type: "string",
|
|
85
|
-
title: "Atomic orbital",
|
|
86
|
-
enum: this.orbitalList,
|
|
87
|
-
default: defaultHubbardConfig.atomicOrbital,
|
|
88
|
-
},
|
|
89
|
-
hubbardUValue: {
|
|
90
|
-
type: "number",
|
|
91
|
-
title: "Hubbard U (eV)",
|
|
92
|
-
default: defaultHubbardConfig.hubbardUValue,
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
};
|
|
88
|
+
return JSONSchemasInterface.getPatchedSchemaById(
|
|
89
|
+
this.jsonSchemaId,
|
|
90
|
+
this.jsonSchemaPatchConfig,
|
|
91
|
+
);
|
|
97
92
|
}
|
|
98
93
|
}
|
|
99
94
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
2
|
+
|
|
1
3
|
import { HubbardUContextProvider } from "./HubbardUContextProvider";
|
|
2
4
|
|
|
3
5
|
const defaultHubbardConfig = {
|
|
@@ -11,6 +13,8 @@ const defaultHubbardConfig = {
|
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
export class HubbardVContextProvider extends HubbardUContextProvider {
|
|
16
|
+
jsonSchemaId = "context-providers-directory/hubbard-v-context-provider";
|
|
17
|
+
|
|
14
18
|
get defaultData() {
|
|
15
19
|
return [
|
|
16
20
|
{
|
|
@@ -33,6 +37,37 @@ export class HubbardVContextProvider extends HubbardUContextProvider {
|
|
|
33
37
|
: this.firstSpecies;
|
|
34
38
|
}
|
|
35
39
|
|
|
40
|
+
get jsonSchemaPatchConfig() {
|
|
41
|
+
return {
|
|
42
|
+
"items.properties.atomicSpecies": {
|
|
43
|
+
enum: this.uniqueElementsWithLabels,
|
|
44
|
+
default: this.firstSpecies,
|
|
45
|
+
},
|
|
46
|
+
"items.properties.siteIndex": {
|
|
47
|
+
default: defaultHubbardConfig.siteIndex,
|
|
48
|
+
},
|
|
49
|
+
"items.properties.atomicOrbital": {
|
|
50
|
+
enum: this.orbitalList,
|
|
51
|
+
default: defaultHubbardConfig.atomicOrbital,
|
|
52
|
+
},
|
|
53
|
+
"items.properties.atomicSpecies2": {
|
|
54
|
+
enum: this.uniqueElementsWithLabels,
|
|
55
|
+
default: this.secondSpecies,
|
|
56
|
+
},
|
|
57
|
+
"items.properties.siteIndex2": {
|
|
58
|
+
default:
|
|
59
|
+
this.uniqueElementsWithLabels?.length > 1 ? 2 : defaultHubbardConfig.siteIndex2,
|
|
60
|
+
},
|
|
61
|
+
"items.properties.atomicOrbital2": {
|
|
62
|
+
enum: this.orbitalList,
|
|
63
|
+
default: defaultHubbardConfig.atomicOrbital,
|
|
64
|
+
},
|
|
65
|
+
"items.properties.hubbardVValue": {
|
|
66
|
+
default: defaultHubbardConfig.hubbardVValue,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
36
71
|
get uiSchemaStyled() {
|
|
37
72
|
return {
|
|
38
73
|
"ui:options": {
|
|
@@ -53,59 +88,9 @@ export class HubbardVContextProvider extends HubbardUContextProvider {
|
|
|
53
88
|
}
|
|
54
89
|
|
|
55
90
|
get jsonSchema() {
|
|
56
|
-
return
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
type: "array",
|
|
61
|
-
items: {
|
|
62
|
-
type: "object",
|
|
63
|
-
properties: {
|
|
64
|
-
atomicSpecies: {
|
|
65
|
-
type: "string",
|
|
66
|
-
title: "Species 1",
|
|
67
|
-
enum: this.uniqueElementsWithLabels,
|
|
68
|
-
default: this.firstSpecies,
|
|
69
|
-
},
|
|
70
|
-
siteIndex: {
|
|
71
|
-
type: "integer",
|
|
72
|
-
title: "Site no 1",
|
|
73
|
-
default: defaultHubbardConfig.siteIndex,
|
|
74
|
-
},
|
|
75
|
-
atomicOrbital: {
|
|
76
|
-
type: "string",
|
|
77
|
-
title: "Orbital 1",
|
|
78
|
-
enum: this.orbitalList,
|
|
79
|
-
default: defaultHubbardConfig.atomicOrbital,
|
|
80
|
-
},
|
|
81
|
-
atomicSpecies2: {
|
|
82
|
-
type: "string",
|
|
83
|
-
title: "Species 2",
|
|
84
|
-
enum: this.uniqueElementsWithLabels,
|
|
85
|
-
default: this.secondSpecies,
|
|
86
|
-
},
|
|
87
|
-
siteIndex2: {
|
|
88
|
-
type: "integer",
|
|
89
|
-
title: "Site no 2",
|
|
90
|
-
default:
|
|
91
|
-
this.uniqueElementsWithLabels?.length > 1
|
|
92
|
-
? 2
|
|
93
|
-
: defaultHubbardConfig.siteIndex2,
|
|
94
|
-
},
|
|
95
|
-
atomicOrbital2: {
|
|
96
|
-
type: "string",
|
|
97
|
-
title: "Orbital 2",
|
|
98
|
-
enum: this.orbitalList,
|
|
99
|
-
default: defaultHubbardConfig.atomicOrbital,
|
|
100
|
-
},
|
|
101
|
-
hubbardVValue: {
|
|
102
|
-
type: "number",
|
|
103
|
-
title: "V (eV)",
|
|
104
|
-
default: defaultHubbardConfig.hubbardVValue,
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
minItems: 1,
|
|
109
|
-
};
|
|
91
|
+
return JSONSchemasInterface.getPatchedSchemaById(
|
|
92
|
+
this.jsonSchemaId,
|
|
93
|
+
this.jsonSchemaPatchConfig,
|
|
94
|
+
);
|
|
110
95
|
}
|
|
111
96
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import JSONSchemaFormDataProvider from "@mat3ra/ade
|
|
1
|
+
import { JSONSchemaFormDataProvider } from "@mat3ra/ade";
|
|
2
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
2
3
|
|
|
3
4
|
const defaultMDConfig = {
|
|
4
5
|
numberOfSteps: 100,
|
|
@@ -8,11 +9,22 @@ const defaultMDConfig = {
|
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
export class IonDynamicsContextProvider extends JSONSchemaFormDataProvider {
|
|
12
|
+
jsonSchemaId = "context-providers-directory/ion-dynamics-context-provider";
|
|
13
|
+
|
|
11
14
|
// eslint-disable-next-line class-methods-use-this
|
|
12
15
|
get defaultData() {
|
|
13
16
|
return defaultMDConfig;
|
|
14
17
|
}
|
|
15
18
|
|
|
19
|
+
get jsonSchemaPatchConfig() {
|
|
20
|
+
return {
|
|
21
|
+
numberOfSteps: { default: this.defaultData.numberOfSteps },
|
|
22
|
+
timeStep: { default: this.defaultData.timeStep },
|
|
23
|
+
electronMass: { default: this.defaultData.electronMass },
|
|
24
|
+
temperature: { default: this.defaultData.temperature },
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
16
28
|
// eslint-disable-next-line class-methods-use-this
|
|
17
29
|
get uiSchema() {
|
|
18
30
|
return {
|
|
@@ -23,34 +35,10 @@ export class IonDynamicsContextProvider extends JSONSchemaFormDataProvider {
|
|
|
23
35
|
};
|
|
24
36
|
}
|
|
25
37
|
|
|
26
|
-
// eslint-disable-next-line class-methods-use-this
|
|
27
38
|
get jsonSchema() {
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
properties: {
|
|
33
|
-
numberOfSteps: {
|
|
34
|
-
type: "integer",
|
|
35
|
-
title: "numberOfSteps",
|
|
36
|
-
default: defaultMDConfig.numberOfSteps,
|
|
37
|
-
},
|
|
38
|
-
timeStep: {
|
|
39
|
-
type: "number",
|
|
40
|
-
title: "timeStep (Hartree a.u.)",
|
|
41
|
-
default: defaultMDConfig.timeStep,
|
|
42
|
-
},
|
|
43
|
-
electronMass: {
|
|
44
|
-
type: "number",
|
|
45
|
-
title: "Effective electron mass",
|
|
46
|
-
default: defaultMDConfig.electronMass,
|
|
47
|
-
},
|
|
48
|
-
temperature: {
|
|
49
|
-
type: "number",
|
|
50
|
-
title: "Ionic temperature (K)",
|
|
51
|
-
default: defaultMDConfig.temperature,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
};
|
|
39
|
+
return JSONSchemasInterface.getPatchedSchemaById(
|
|
40
|
+
this.jsonSchemaId,
|
|
41
|
+
this.jsonSchemaPatchConfig,
|
|
42
|
+
);
|
|
55
43
|
}
|
|
56
44
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import ContextProvider from "@mat3ra/ade
|
|
1
|
+
import { ContextProvider } from "@mat3ra/ade";
|
|
2
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
2
3
|
|
|
3
4
|
import { applicationContextMixin } from "../mixins/ApplicationContextMixin";
|
|
4
5
|
|
|
5
6
|
export class MLSettingsContextProvider extends ContextProvider {
|
|
7
|
+
jsonSchemaId = "context-providers-directory/ml-settings-context-provider";
|
|
8
|
+
|
|
6
9
|
constructor(config) {
|
|
7
10
|
super(config);
|
|
8
11
|
this.initApplicationContextMixin();
|
|
@@ -24,25 +27,19 @@ export class MLSettingsContextProvider extends ContextProvider {
|
|
|
24
27
|
};
|
|
25
28
|
}
|
|
26
29
|
|
|
27
|
-
get
|
|
30
|
+
get jsonSchemaPatchConfig() {
|
|
28
31
|
return {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
description: "Settings important to machine learning runs.",
|
|
32
|
-
type: "object",
|
|
33
|
-
properties: {
|
|
34
|
-
target_column_name: {
|
|
35
|
-
type: "string",
|
|
36
|
-
default: this.defaultData.target_column_name,
|
|
37
|
-
},
|
|
38
|
-
problem_category: {
|
|
39
|
-
type: "string",
|
|
40
|
-
default: this.defaultData.problem_category,
|
|
41
|
-
enum: ["regression", "classification", "clustering"],
|
|
42
|
-
},
|
|
43
|
-
},
|
|
32
|
+
target_column_name: { default: this.defaultData.target_column_name },
|
|
33
|
+
problem_category: { default: this.defaultData.problem_category },
|
|
44
34
|
};
|
|
45
35
|
}
|
|
36
|
+
|
|
37
|
+
get jsonSchema() {
|
|
38
|
+
return JSONSchemasInterface.getPatchedSchemaById(
|
|
39
|
+
this.jsonSchemaId,
|
|
40
|
+
this.jsonSchemaPatchConfig,
|
|
41
|
+
);
|
|
42
|
+
}
|
|
46
43
|
}
|
|
47
44
|
|
|
48
45
|
applicationContextMixin(MLSettingsContextProvider.prototype);
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import ContextProvider from "@mat3ra/ade
|
|
1
|
+
import { ContextProvider } from "@mat3ra/ade";
|
|
2
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
2
3
|
|
|
3
4
|
import { applicationContextMixin } from "../mixins/ApplicationContextMixin";
|
|
4
5
|
|
|
5
6
|
export class MLTrainTestSplitContextProvider extends ContextProvider {
|
|
7
|
+
jsonSchemaId = "context-providers-directory/ml-train-test-split-context-provider";
|
|
8
|
+
|
|
6
9
|
constructor(config) {
|
|
7
10
|
super(config);
|
|
8
11
|
this.initApplicationContextMixin();
|
|
@@ -23,23 +26,18 @@ export class MLTrainTestSplitContextProvider extends ContextProvider {
|
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
get
|
|
29
|
+
get jsonSchemaPatchConfig() {
|
|
27
30
|
return {
|
|
28
|
-
|
|
29
|
-
title: " ",
|
|
30
|
-
description:
|
|
31
|
-
"Fraction held as the test set. For example, a value of 0.2 corresponds to an 80/20 train/test split.",
|
|
32
|
-
type: "object",
|
|
33
|
-
properties: {
|
|
34
|
-
fraction_held_as_test_set: {
|
|
35
|
-
type: "number",
|
|
36
|
-
default: this.defaultData.fraction_held_as_test_set,
|
|
37
|
-
minimum: 0,
|
|
38
|
-
maximum: 1,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
31
|
+
fraction_held_as_test_set: { default: this.defaultData.fraction_held_as_test_set },
|
|
41
32
|
};
|
|
42
33
|
}
|
|
34
|
+
|
|
35
|
+
get jsonSchema() {
|
|
36
|
+
return JSONSchemasInterface.getPatchedSchemaById(
|
|
37
|
+
this.jsonSchemaId,
|
|
38
|
+
this.jsonSchemaPatchConfig,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
applicationContextMixin(MLTrainTestSplitContextProvider.prototype);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import JSONSchemaFormDataProvider from "@mat3ra/ade
|
|
1
|
+
import { JSONSchemaFormDataProvider } from "@mat3ra/ade";
|
|
2
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
2
3
|
|
|
3
4
|
export class NEBFormDataProvider extends JSONSchemaFormDataProvider {
|
|
5
|
+
jsonSchemaId = "context-providers-directory/neb-data-provider";
|
|
6
|
+
|
|
4
7
|
// eslint-disable-next-line class-methods-use-this
|
|
5
8
|
get defaultData() {
|
|
6
9
|
return {
|
|
@@ -8,6 +11,12 @@ export class NEBFormDataProvider extends JSONSchemaFormDataProvider {
|
|
|
8
11
|
};
|
|
9
12
|
}
|
|
10
13
|
|
|
14
|
+
get jsonSchemaPatchConfig() {
|
|
15
|
+
return {
|
|
16
|
+
nImages: { default: this.defaultData.nImages },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
11
20
|
// eslint-disable-next-line class-methods-use-this
|
|
12
21
|
get uiSchema() {
|
|
13
22
|
return {
|
|
@@ -16,17 +25,9 @@ export class NEBFormDataProvider extends JSONSchemaFormDataProvider {
|
|
|
16
25
|
}
|
|
17
26
|
|
|
18
27
|
get jsonSchema() {
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type: "object",
|
|
24
|
-
properties: {
|
|
25
|
-
nImages: {
|
|
26
|
-
type: "number",
|
|
27
|
-
default: this.defaultData.nImages,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
28
|
+
return JSONSchemasInterface.getPatchedSchemaById(
|
|
29
|
+
this.jsonSchemaId,
|
|
30
|
+
this.jsonSchemaPatchConfig,
|
|
31
|
+
);
|
|
31
32
|
}
|
|
32
33
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import JSONSchemaFormDataProvider from "@mat3ra/ade
|
|
1
|
+
import { JSONSchemaFormDataProvider } from "@mat3ra/ade";
|
|
2
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
2
3
|
import lodash from "lodash";
|
|
3
4
|
|
|
4
5
|
import { materialContextMixin } from "../mixins/MaterialContextMixin";
|
|
5
6
|
|
|
6
7
|
export class NonCollinearMagnetizationContextProvider extends JSONSchemaFormDataProvider {
|
|
8
|
+
jsonSchemaId = "context-providers-directory/non-collinear-magnetization-context-provider";
|
|
9
|
+
|
|
7
10
|
constructor(config) {
|
|
8
11
|
super(config);
|
|
9
12
|
this.initMaterialContextMixin();
|
|
@@ -133,137 +136,44 @@ export class NonCollinearMagnetizationContextProvider extends JSONSchemaFormData
|
|
|
133
136
|
};
|
|
134
137
|
}
|
|
135
138
|
|
|
136
|
-
get
|
|
139
|
+
get jsonSchemaPatchConfig() {
|
|
137
140
|
return {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
value: {
|
|
161
|
-
type: "number",
|
|
162
|
-
title: "Starting magnetization",
|
|
163
|
-
default: 0.0,
|
|
164
|
-
minimum: -1.0,
|
|
165
|
-
maximum: 1.0,
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
isExistingChargeDensity: {
|
|
171
|
-
type: "boolean",
|
|
172
|
-
title: "Start calculation from existing charge density",
|
|
173
|
-
default: false,
|
|
174
|
-
},
|
|
175
|
-
lforcet: {
|
|
176
|
-
title: "Set lforcet to",
|
|
177
|
-
type: "boolean",
|
|
178
|
-
oneOf: [
|
|
179
|
-
{ const: true, title: "True" },
|
|
180
|
-
{ const: false, title: "False" },
|
|
181
|
-
],
|
|
182
|
-
},
|
|
183
|
-
isArbitrarySpinDirection: {
|
|
184
|
-
type: "boolean",
|
|
185
|
-
title: "Set spin directions",
|
|
186
|
-
default: false,
|
|
187
|
-
},
|
|
188
|
-
spinAngles: {
|
|
189
|
-
type: "array",
|
|
190
|
-
minItems: this.uniqueElementsWithLabels.length,
|
|
191
|
-
maxItems: this.uniqueElementsWithLabels.length,
|
|
192
|
-
items: {
|
|
193
|
-
type: "object",
|
|
194
|
-
properties: {
|
|
195
|
-
atomicSpecies: {
|
|
196
|
-
type: "string",
|
|
197
|
-
title: "Atomic species",
|
|
198
|
-
},
|
|
199
|
-
angle1: {
|
|
200
|
-
type: "number",
|
|
201
|
-
title: "Angle1 (deg)",
|
|
202
|
-
default: 0.0,
|
|
203
|
-
},
|
|
204
|
-
angle2: {
|
|
205
|
-
type: "number",
|
|
206
|
-
title: "Angle2 (deg)",
|
|
207
|
-
default: 0.0,
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
isConstrainedMagnetization: {
|
|
213
|
-
type: "boolean",
|
|
214
|
-
title: "Set constrained magnetization",
|
|
215
|
-
default: false,
|
|
216
|
-
},
|
|
217
|
-
constrainedMagnetization: {
|
|
218
|
-
type: "object",
|
|
219
|
-
properties: {
|
|
220
|
-
constrainType: {
|
|
221
|
-
type: "string",
|
|
222
|
-
title: "Constrain type",
|
|
223
|
-
enum: [
|
|
224
|
-
"none",
|
|
225
|
-
"total",
|
|
226
|
-
"atomic",
|
|
227
|
-
"total direction",
|
|
228
|
-
"atomic direction",
|
|
229
|
-
],
|
|
230
|
-
default: "atomic direction",
|
|
231
|
-
},
|
|
232
|
-
lambda: {
|
|
233
|
-
type: "number",
|
|
234
|
-
title: "lambda",
|
|
235
|
-
default: 0.0,
|
|
236
|
-
},
|
|
237
|
-
},
|
|
238
|
-
},
|
|
239
|
-
isFixedMagnetization: {
|
|
240
|
-
type: "boolean",
|
|
241
|
-
title: "Set Fixed magnetization (only applicable to constrained magnetization of 'total' type)",
|
|
242
|
-
default: true,
|
|
243
|
-
},
|
|
244
|
-
fixedMagnetization: {
|
|
245
|
-
type: "object",
|
|
246
|
-
properties: {
|
|
247
|
-
x: {
|
|
248
|
-
type: "number",
|
|
249
|
-
title: "X-component",
|
|
250
|
-
default: 0.0,
|
|
251
|
-
},
|
|
252
|
-
y: {
|
|
253
|
-
type: "number",
|
|
254
|
-
title: "Y-component",
|
|
255
|
-
default: 0.0,
|
|
256
|
-
},
|
|
257
|
-
z: {
|
|
258
|
-
type: "number",
|
|
259
|
-
title: "Z-component",
|
|
260
|
-
default: 0.0,
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
|
-
},
|
|
141
|
+
isExistingChargeDensity: { default: false },
|
|
142
|
+
isStartingMagnetization: { default: true },
|
|
143
|
+
isArbitrarySpinAngle: { default: false },
|
|
144
|
+
isConstrainedMagnetization: { default: false },
|
|
145
|
+
isFixedMagnetization: { default: true },
|
|
146
|
+
startingMagnetization: {
|
|
147
|
+
minItems: this.uniqueElementsWithLabels.length,
|
|
148
|
+
maxItems: this.uniqueElementsWithLabels.length,
|
|
149
|
+
},
|
|
150
|
+
"startingMagnetization.items.properties.value": {
|
|
151
|
+
default: 0.0,
|
|
152
|
+
minimum: -1.0,
|
|
153
|
+
maximum: 1.0,
|
|
154
|
+
},
|
|
155
|
+
spinAngles: {
|
|
156
|
+
minItems: this.uniqueElementsWithLabels.length,
|
|
157
|
+
maxItems: this.uniqueElementsWithLabels.length,
|
|
158
|
+
},
|
|
159
|
+
"spinAngles.items.properties.angle1": { default: 0.0 },
|
|
160
|
+
"spinAngles.items.properties.angle2": { default: 0.0 },
|
|
161
|
+
"constrainedMagnetization.properties.constrainType": {
|
|
162
|
+
default: "atomic direction",
|
|
264
163
|
},
|
|
164
|
+
"constrainedMagnetization.properties.lambda": { default: 0.0 },
|
|
165
|
+
"fixedMagnetization.properties.x": { default: 0.0 },
|
|
166
|
+
"fixedMagnetization.properties.y": { default: 0.0 },
|
|
167
|
+
"fixedMagnetization.properties.z": { default: 0.0 },
|
|
265
168
|
};
|
|
266
169
|
}
|
|
170
|
+
|
|
171
|
+
get jsonSchema() {
|
|
172
|
+
return JSONSchemasInterface.getPatchedSchemaById(
|
|
173
|
+
this.jsonSchemaId,
|
|
174
|
+
this.jsonSchemaPatchConfig,
|
|
175
|
+
);
|
|
176
|
+
}
|
|
267
177
|
}
|
|
268
178
|
|
|
269
179
|
materialContextMixin(NonCollinearMagnetizationContextProvider.prototype);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import ContextProvider from "@mat3ra/ade
|
|
1
|
+
import { ContextProvider } from "@mat3ra/ade";
|
|
2
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
2
3
|
|
|
3
4
|
import { applicationContextMixin } from "../mixins/ApplicationContextMixin";
|
|
4
5
|
|
|
@@ -12,6 +13,8 @@ const cutoffConfig = {
|
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
export class PlanewaveCutoffsContextProvider extends ContextProvider {
|
|
16
|
+
jsonSchemaId = "context-providers-directory/planewave-cutoffs-context-provider";
|
|
17
|
+
|
|
15
18
|
constructor(config) {
|
|
16
19
|
super(config);
|
|
17
20
|
this.initApplicationContextMixin();
|
|
@@ -32,6 +35,13 @@ export class PlanewaveCutoffsContextProvider extends ContextProvider {
|
|
|
32
35
|
};
|
|
33
36
|
}
|
|
34
37
|
|
|
38
|
+
get jsonSchemaPatchConfig() {
|
|
39
|
+
return {
|
|
40
|
+
wavefunction: { default: this.defaultData.wavefunction },
|
|
41
|
+
density: { default: this.defaultData.density },
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
35
45
|
get _cutoffConfigPerApplication() {
|
|
36
46
|
return cutoffConfig[this.application.name];
|
|
37
47
|
}
|
|
@@ -45,23 +55,10 @@ export class PlanewaveCutoffsContextProvider extends ContextProvider {
|
|
|
45
55
|
}
|
|
46
56
|
|
|
47
57
|
get jsonSchema() {
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"Planewave cutoff parameters for electronic wavefunctions and density. Units are specific to simulation engine.",
|
|
53
|
-
type: "object",
|
|
54
|
-
properties: {
|
|
55
|
-
wavefunction: {
|
|
56
|
-
type: "number",
|
|
57
|
-
default: this.defaultECUTWFC,
|
|
58
|
-
},
|
|
59
|
-
density: {
|
|
60
|
-
type: "number",
|
|
61
|
-
default: this.defaultECUTRHO,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
};
|
|
58
|
+
return JSONSchemasInterface.getPatchedSchemaById(
|
|
59
|
+
this.jsonSchemaId,
|
|
60
|
+
this.jsonSchemaPatchConfig,
|
|
61
|
+
);
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
|