@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
|
@@ -4,14 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BoundaryConditionsFormDataProvider = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _ade = require("@mat3ra/ade");
|
|
8
|
+
var _JSONSchemasInterface = _interopRequireDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
8
9
|
var _made = require("@mat3ra/made");
|
|
9
10
|
var _utils = require("@mat3ra/utils");
|
|
10
11
|
var _MaterialContextMixin = require("../mixins/MaterialContextMixin");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
+
class BoundaryConditionsFormDataProvider extends _ade.JSONSchemaFormDataProvider {
|
|
13
17
|
constructor(config) {
|
|
14
18
|
super(config);
|
|
19
|
+
_defineProperty(this, "jsonSchemaId", "context-providers-directory/boundary-conditions-data-provider");
|
|
15
20
|
this.initMaterialContextMixin();
|
|
16
21
|
}
|
|
17
22
|
get boundaryConditions() {
|
|
@@ -27,7 +32,25 @@ class BoundaryConditionsFormDataProvider extends _JSONSchemaFormDataProvider.def
|
|
|
27
32
|
targetFermiEnergy: 0
|
|
28
33
|
};
|
|
29
34
|
}
|
|
35
|
+
get jsonSchemaPatchConfig() {
|
|
36
|
+
const defaults = this.defaultData;
|
|
37
|
+
return {
|
|
38
|
+
type: {
|
|
39
|
+
default: defaults.type
|
|
40
|
+
},
|
|
41
|
+
offset: {
|
|
42
|
+
default: defaults.offset
|
|
43
|
+
},
|
|
44
|
+
electricField: {
|
|
45
|
+
default: defaults.electricField
|
|
46
|
+
},
|
|
47
|
+
targetFermiEnergy: {
|
|
48
|
+
default: defaults.targetFermiEnergy
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
30
52
|
|
|
53
|
+
// TODO: MOVE to WA/wove instantiation
|
|
31
54
|
// eslint-disable-next-line class-methods-use-this
|
|
32
55
|
get uiSchema() {
|
|
33
56
|
return {
|
|
@@ -54,32 +77,7 @@ class BoundaryConditionsFormDataProvider extends _JSONSchemaFormDataProvider.def
|
|
|
54
77
|
return data;
|
|
55
78
|
}
|
|
56
79
|
get jsonSchema() {
|
|
57
|
-
return
|
|
58
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
59
|
-
type: "object",
|
|
60
|
-
properties: {
|
|
61
|
-
type: {
|
|
62
|
-
type: "string",
|
|
63
|
-
title: "Type",
|
|
64
|
-
default: this.defaultData.type
|
|
65
|
-
},
|
|
66
|
-
offset: {
|
|
67
|
-
type: "number",
|
|
68
|
-
title: "Offset (A)",
|
|
69
|
-
default: this.defaultData.offset
|
|
70
|
-
},
|
|
71
|
-
electricField: {
|
|
72
|
-
type: "number",
|
|
73
|
-
title: "Electric Field (eV/A)",
|
|
74
|
-
default: this.defaultData.electricField
|
|
75
|
-
},
|
|
76
|
-
targetFermiEnergy: {
|
|
77
|
-
type: "number",
|
|
78
|
-
title: "Target Fermi Energy (eV)",
|
|
79
|
-
default: this.defaultData.targetFermiEnergy
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
};
|
|
80
|
+
return _JSONSchemasInterface.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig);
|
|
83
81
|
}
|
|
84
82
|
}
|
|
85
83
|
exports.BoundaryConditionsFormDataProvider = BoundaryConditionsFormDataProvider;
|
|
@@ -4,16 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CollinearMagnetizationContextProvider = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _ade = require("@mat3ra/ade");
|
|
8
|
+
var _JSONSchemasInterface = _interopRequireDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
8
9
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
9
10
|
var _MaterialContextMixin = require("../mixins/MaterialContextMixin");
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
12
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
12
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
14
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
|
-
class CollinearMagnetizationContextProvider extends
|
|
15
|
+
class CollinearMagnetizationContextProvider extends _ade.JSONSchemaFormDataProvider {
|
|
15
16
|
constructor(config) {
|
|
16
17
|
super(config);
|
|
18
|
+
_defineProperty(this, "jsonSchemaId", "context-providers-directory/collinear-magnetization-context-provider");
|
|
17
19
|
_defineProperty(this, "indexOfElement", element => {
|
|
18
20
|
return this.uniqueElementsWithLabels.indexOf(element) + 1;
|
|
19
21
|
});
|
|
@@ -46,6 +48,26 @@ class CollinearMagnetizationContextProvider extends _JSONSchemaFormDataProvider.
|
|
|
46
48
|
totalMagnetization: 0.0
|
|
47
49
|
};
|
|
48
50
|
}
|
|
51
|
+
get jsonSchemaPatchConfig() {
|
|
52
|
+
return {
|
|
53
|
+
"properties.startingMagnetization": {
|
|
54
|
+
maxItems: this.uniqueElementsWithLabels.length
|
|
55
|
+
},
|
|
56
|
+
"properties.startingMagnetization.items.properties.atomicSpecies": {
|
|
57
|
+
enum: this.uniqueElementsWithLabels,
|
|
58
|
+
default: this.firstElement
|
|
59
|
+
},
|
|
60
|
+
"properties.startingMagnetization.items.properties.value": {
|
|
61
|
+
default: 0.0
|
|
62
|
+
},
|
|
63
|
+
"properties.isTotalMagnetization": {
|
|
64
|
+
default: false
|
|
65
|
+
},
|
|
66
|
+
"properties.totalMagnetization": {
|
|
67
|
+
default: 0.0
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
49
71
|
get uiSchemaStyled() {
|
|
50
72
|
return {
|
|
51
73
|
startingMagnetization: {
|
|
@@ -67,46 +89,7 @@ class CollinearMagnetizationContextProvider extends _JSONSchemaFormDataProvider.
|
|
|
67
89
|
};
|
|
68
90
|
}
|
|
69
91
|
get jsonSchema() {
|
|
70
|
-
return
|
|
71
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
72
|
-
title: "",
|
|
73
|
-
description: "Set starting magnetization, can have values in the range [-1, +1].",
|
|
74
|
-
type: "object",
|
|
75
|
-
properties: {
|
|
76
|
-
startingMagnetization: {
|
|
77
|
-
type: "array",
|
|
78
|
-
maxItems: this.uniqueElementsWithLabels.length,
|
|
79
|
-
items: {
|
|
80
|
-
type: "object",
|
|
81
|
-
properties: {
|
|
82
|
-
atomicSpecies: {
|
|
83
|
-
type: "string",
|
|
84
|
-
title: "Atomic species",
|
|
85
|
-
enum: this.uniqueElementsWithLabels,
|
|
86
|
-
default: this.firstElement
|
|
87
|
-
},
|
|
88
|
-
value: {
|
|
89
|
-
type: "number",
|
|
90
|
-
title: "Starting magnetization",
|
|
91
|
-
default: 0.0,
|
|
92
|
-
minimum: -1.0,
|
|
93
|
-
maximum: 1.0
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
isTotalMagnetization: {
|
|
99
|
-
type: "boolean",
|
|
100
|
-
title: "Set total magnetization instead",
|
|
101
|
-
default: false
|
|
102
|
-
},
|
|
103
|
-
totalMagnetization: {
|
|
104
|
-
type: "number",
|
|
105
|
-
title: "Total magnetization",
|
|
106
|
-
default: 0.0
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
};
|
|
92
|
+
return _JSONSchemasInterface.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig);
|
|
110
93
|
}
|
|
111
94
|
}
|
|
112
95
|
exports.CollinearMagnetizationContextProvider = CollinearMagnetizationContextProvider;
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HubbardContextProviderLegacy = void 0;
|
|
7
|
+
var _JSONSchemasInterface = _interopRequireDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
7
8
|
var _HubbardUContextProvider = require("./HubbardUContextProvider");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
10
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
10
12
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -14,6 +16,7 @@ const defaultHubbardConfig = {
|
|
|
14
16
|
class HubbardContextProviderLegacy extends _HubbardUContextProvider.HubbardUContextProvider {
|
|
15
17
|
constructor(...args) {
|
|
16
18
|
super(...args);
|
|
19
|
+
_defineProperty(this, "jsonSchemaId", "context-providers-directory/hubbard-legacy-context-provider");
|
|
17
20
|
_defineProperty(this, "speciesIndexFromSpecies", species => {
|
|
18
21
|
return this.uniqueElementsWithLabels?.length > 0 ? this.uniqueElementsWithLabels.indexOf(species) + 1 : null;
|
|
19
22
|
});
|
|
@@ -31,6 +34,16 @@ class HubbardContextProviderLegacy extends _HubbardUContextProvider.HubbardUCont
|
|
|
31
34
|
atomicSpeciesIndex: this.uniqueElementsWithLabels?.length > 0 ? 1 : null
|
|
32
35
|
}];
|
|
33
36
|
}
|
|
37
|
+
get jsonSchemaPatchConfig() {
|
|
38
|
+
return {
|
|
39
|
+
"items.properties.atomicSpecies": {
|
|
40
|
+
enum: this.uniqueElementsWithLabels
|
|
41
|
+
},
|
|
42
|
+
"items.properties.hubbardUValue": {
|
|
43
|
+
default: defaultHubbardConfig.hubbardUValue
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
34
47
|
get uiSchemaStyled() {
|
|
35
48
|
return {
|
|
36
49
|
"ui:options": {
|
|
@@ -49,33 +62,7 @@ class HubbardContextProviderLegacy extends _HubbardUContextProvider.HubbardUCont
|
|
|
49
62
|
};
|
|
50
63
|
}
|
|
51
64
|
get jsonSchema() {
|
|
52
|
-
return
|
|
53
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
54
|
-
title: "",
|
|
55
|
-
description: "Hubbard parameters for DFT+U calculation.",
|
|
56
|
-
type: "array",
|
|
57
|
-
uniqueItems: true,
|
|
58
|
-
minItems: 1,
|
|
59
|
-
items: {
|
|
60
|
-
type: "object",
|
|
61
|
-
properties: {
|
|
62
|
-
atomicSpecies: {
|
|
63
|
-
type: "string",
|
|
64
|
-
title: "Atomic species",
|
|
65
|
-
enum: this.uniqueElementsWithLabels
|
|
66
|
-
},
|
|
67
|
-
atomicSpeciesIndex: {
|
|
68
|
-
type: "integer",
|
|
69
|
-
title: "Species index"
|
|
70
|
-
},
|
|
71
|
-
hubbardUValue: {
|
|
72
|
-
type: "number",
|
|
73
|
-
title: "Hubbard U (eV)",
|
|
74
|
-
default: defaultHubbardConfig.hubbardUValue
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
};
|
|
65
|
+
return _JSONSchemasInterface.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig);
|
|
79
66
|
}
|
|
80
67
|
}
|
|
81
68
|
exports.HubbardContextProviderLegacy = HubbardContextProviderLegacy;
|
|
@@ -4,7 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HubbardJContextProvider = void 0;
|
|
7
|
+
var _JSONSchemasInterface = _interopRequireDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
7
8
|
var _HubbardUContextProvider = require("./HubbardUContextProvider");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
13
|
const defaultHubbardConfig = {
|
|
9
14
|
paramType: "U",
|
|
10
15
|
atomicSpecies: "",
|
|
@@ -12,12 +17,34 @@ const defaultHubbardConfig = {
|
|
|
12
17
|
value: 1.0
|
|
13
18
|
};
|
|
14
19
|
class HubbardJContextProvider extends _HubbardUContextProvider.HubbardUContextProvider {
|
|
20
|
+
constructor(...args) {
|
|
21
|
+
super(...args);
|
|
22
|
+
_defineProperty(this, "jsonSchemaId", "context-providers-directory/hubbard-j-context-provider");
|
|
23
|
+
}
|
|
15
24
|
get defaultData() {
|
|
16
25
|
return [{
|
|
17
26
|
...defaultHubbardConfig,
|
|
18
27
|
atomicSpecies: this.firstElement
|
|
19
28
|
}];
|
|
20
29
|
}
|
|
30
|
+
get jsonSchemaPatchConfig() {
|
|
31
|
+
return {
|
|
32
|
+
"items.properties.paramType": {
|
|
33
|
+
default: defaultHubbardConfig.paramType
|
|
34
|
+
},
|
|
35
|
+
"items.properties.atomicSpecies": {
|
|
36
|
+
enum: this.uniqueElementsWithLabels,
|
|
37
|
+
default: this.firstElement
|
|
38
|
+
},
|
|
39
|
+
"items.properties.atomicOrbital": {
|
|
40
|
+
enum: this.orbitalList,
|
|
41
|
+
default: defaultHubbardConfig.atomicOrbital
|
|
42
|
+
},
|
|
43
|
+
"items.properties.value": {
|
|
44
|
+
default: defaultHubbardConfig.value
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
21
48
|
get uiSchemaStyled() {
|
|
22
49
|
return {
|
|
23
50
|
"ui:options": {
|
|
@@ -34,41 +61,7 @@ class HubbardJContextProvider extends _HubbardUContextProvider.HubbardUContextPr
|
|
|
34
61
|
};
|
|
35
62
|
}
|
|
36
63
|
get jsonSchema() {
|
|
37
|
-
return
|
|
38
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
39
|
-
title: "",
|
|
40
|
-
description: "Hubbard parameters for DFT+U+J calculation.",
|
|
41
|
-
type: "array",
|
|
42
|
-
items: {
|
|
43
|
-
type: "object",
|
|
44
|
-
properties: {
|
|
45
|
-
paramType: {
|
|
46
|
-
type: "string",
|
|
47
|
-
title: "Species",
|
|
48
|
-
enum: ["U", "J", "B", "E2", "E3"],
|
|
49
|
-
default: defaultHubbardConfig.paramType
|
|
50
|
-
},
|
|
51
|
-
atomicSpecies: {
|
|
52
|
-
type: "string",
|
|
53
|
-
title: "Species",
|
|
54
|
-
enum: this.uniqueElementsWithLabels,
|
|
55
|
-
default: this.firstElement
|
|
56
|
-
},
|
|
57
|
-
atomicOrbital: {
|
|
58
|
-
type: "string",
|
|
59
|
-
title: "Orbital",
|
|
60
|
-
enum: this.orbitalList,
|
|
61
|
-
default: defaultHubbardConfig.atomicOrbital
|
|
62
|
-
},
|
|
63
|
-
value: {
|
|
64
|
-
type: "number",
|
|
65
|
-
title: "Value (eV)",
|
|
66
|
-
default: defaultHubbardConfig.value
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
minItems: 1
|
|
71
|
-
};
|
|
64
|
+
return _JSONSchemasInterface.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig);
|
|
72
65
|
}
|
|
73
66
|
}
|
|
74
67
|
exports.HubbardJContextProvider = HubbardJContextProvider;
|
|
@@ -4,17 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HubbardUContextProvider = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _ade = require("@mat3ra/ade");
|
|
8
|
+
var _JSONSchemasInterface = _interopRequireDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
8
9
|
var _MaterialContextMixin = require("../mixins/MaterialContextMixin");
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
14
|
const defaultHubbardConfig = {
|
|
11
15
|
atomicSpecies: "",
|
|
12
16
|
atomicOrbital: "2p",
|
|
13
17
|
hubbardUValue: 1.0
|
|
14
18
|
};
|
|
15
|
-
class HubbardUContextProvider extends
|
|
19
|
+
class HubbardUContextProvider extends _ade.JSONSchemaFormDataProvider {
|
|
16
20
|
constructor(config) {
|
|
17
21
|
super(config);
|
|
22
|
+
_defineProperty(this, "jsonSchemaId", "context-providers-directory/hubbard-u-context-provider");
|
|
18
23
|
this.initMaterialContextMixin();
|
|
19
24
|
this.uniqueElements = this.material?.Basis?.uniqueElements || [];
|
|
20
25
|
this.orbitalList = ["2p", "3s", "3p", "3d", "4s", "4p", "4d", "4f", "5s", "5p", "5d", "5f", "6s", "6p", "6d", "7s", "7p", "7d"];
|
|
@@ -28,6 +33,21 @@ class HubbardUContextProvider extends _JSONSchemaFormDataProvider.default {
|
|
|
28
33
|
atomicSpecies: this.firstElement
|
|
29
34
|
}];
|
|
30
35
|
}
|
|
36
|
+
get jsonSchemaPatchConfig() {
|
|
37
|
+
return {
|
|
38
|
+
"items.properties.atomicSpecies": {
|
|
39
|
+
enum: this.uniqueElementsWithLabels,
|
|
40
|
+
default: this.firstElement
|
|
41
|
+
},
|
|
42
|
+
"items.properties.atomicOrbital": {
|
|
43
|
+
enum: this.orbitalList,
|
|
44
|
+
default: defaultHubbardConfig.atomicOrbital
|
|
45
|
+
},
|
|
46
|
+
"items.properties.hubbardUValue": {
|
|
47
|
+
default: defaultHubbardConfig.hubbardUValue
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
31
51
|
get uiSchemaStyled() {
|
|
32
52
|
return {
|
|
33
53
|
"ui:options": {
|
|
@@ -43,34 +63,7 @@ class HubbardUContextProvider extends _JSONSchemaFormDataProvider.default {
|
|
|
43
63
|
};
|
|
44
64
|
}
|
|
45
65
|
get jsonSchema() {
|
|
46
|
-
return
|
|
47
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
48
|
-
title: "",
|
|
49
|
-
description: "Hubbard U parameters for DFT+U or DFT+U+V calculation.",
|
|
50
|
-
type: "array",
|
|
51
|
-
items: {
|
|
52
|
-
type: "object",
|
|
53
|
-
properties: {
|
|
54
|
-
atomicSpecies: {
|
|
55
|
-
type: "string",
|
|
56
|
-
title: "Atomic species",
|
|
57
|
-
enum: this.uniqueElementsWithLabels,
|
|
58
|
-
default: this.firstElement
|
|
59
|
-
},
|
|
60
|
-
atomicOrbital: {
|
|
61
|
-
type: "string",
|
|
62
|
-
title: "Atomic orbital",
|
|
63
|
-
enum: this.orbitalList,
|
|
64
|
-
default: defaultHubbardConfig.atomicOrbital
|
|
65
|
-
},
|
|
66
|
-
hubbardUValue: {
|
|
67
|
-
type: "number",
|
|
68
|
-
title: "Hubbard U (eV)",
|
|
69
|
-
default: defaultHubbardConfig.hubbardUValue
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
66
|
+
return _JSONSchemasInterface.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig);
|
|
74
67
|
}
|
|
75
68
|
}
|
|
76
69
|
exports.HubbardUContextProvider = HubbardUContextProvider;
|
|
@@ -4,7 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HubbardVContextProvider = void 0;
|
|
7
|
+
var _JSONSchemasInterface = _interopRequireDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
7
8
|
var _HubbardUContextProvider = require("./HubbardUContextProvider");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
13
|
const defaultHubbardConfig = {
|
|
9
14
|
atomicSpecies: "",
|
|
10
15
|
atomicOrbital: "2p",
|
|
@@ -15,6 +20,10 @@ const defaultHubbardConfig = {
|
|
|
15
20
|
hubbardVValue: 1.0
|
|
16
21
|
};
|
|
17
22
|
class HubbardVContextProvider extends _HubbardUContextProvider.HubbardUContextProvider {
|
|
23
|
+
constructor(...args) {
|
|
24
|
+
super(...args);
|
|
25
|
+
_defineProperty(this, "jsonSchemaId", "context-providers-directory/hubbard-v-context-provider");
|
|
26
|
+
}
|
|
18
27
|
get defaultData() {
|
|
19
28
|
return [{
|
|
20
29
|
...defaultHubbardConfig,
|
|
@@ -29,6 +38,35 @@ class HubbardVContextProvider extends _HubbardUContextProvider.HubbardUContextPr
|
|
|
29
38
|
get secondSpecies() {
|
|
30
39
|
return this.uniqueElementsWithLabels?.length > 1 ? this.uniqueElementsWithLabels[1] : this.firstSpecies;
|
|
31
40
|
}
|
|
41
|
+
get jsonSchemaPatchConfig() {
|
|
42
|
+
return {
|
|
43
|
+
"items.properties.atomicSpecies": {
|
|
44
|
+
enum: this.uniqueElementsWithLabels,
|
|
45
|
+
default: this.firstSpecies
|
|
46
|
+
},
|
|
47
|
+
"items.properties.siteIndex": {
|
|
48
|
+
default: defaultHubbardConfig.siteIndex
|
|
49
|
+
},
|
|
50
|
+
"items.properties.atomicOrbital": {
|
|
51
|
+
enum: this.orbitalList,
|
|
52
|
+
default: defaultHubbardConfig.atomicOrbital
|
|
53
|
+
},
|
|
54
|
+
"items.properties.atomicSpecies2": {
|
|
55
|
+
enum: this.uniqueElementsWithLabels,
|
|
56
|
+
default: this.secondSpecies
|
|
57
|
+
},
|
|
58
|
+
"items.properties.siteIndex2": {
|
|
59
|
+
default: 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
|
+
}
|
|
32
70
|
get uiSchemaStyled() {
|
|
33
71
|
return {
|
|
34
72
|
"ui:options": {
|
|
@@ -48,57 +86,7 @@ class HubbardVContextProvider extends _HubbardUContextProvider.HubbardUContextPr
|
|
|
48
86
|
};
|
|
49
87
|
}
|
|
50
88
|
get jsonSchema() {
|
|
51
|
-
return
|
|
52
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
53
|
-
title: "",
|
|
54
|
-
description: "Hubbard V parameters for DFT+U+V calculation.",
|
|
55
|
-
type: "array",
|
|
56
|
-
items: {
|
|
57
|
-
type: "object",
|
|
58
|
-
properties: {
|
|
59
|
-
atomicSpecies: {
|
|
60
|
-
type: "string",
|
|
61
|
-
title: "Species 1",
|
|
62
|
-
enum: this.uniqueElementsWithLabels,
|
|
63
|
-
default: this.firstSpecies
|
|
64
|
-
},
|
|
65
|
-
siteIndex: {
|
|
66
|
-
type: "integer",
|
|
67
|
-
title: "Site no 1",
|
|
68
|
-
default: defaultHubbardConfig.siteIndex
|
|
69
|
-
},
|
|
70
|
-
atomicOrbital: {
|
|
71
|
-
type: "string",
|
|
72
|
-
title: "Orbital 1",
|
|
73
|
-
enum: this.orbitalList,
|
|
74
|
-
default: defaultHubbardConfig.atomicOrbital
|
|
75
|
-
},
|
|
76
|
-
atomicSpecies2: {
|
|
77
|
-
type: "string",
|
|
78
|
-
title: "Species 2",
|
|
79
|
-
enum: this.uniqueElementsWithLabels,
|
|
80
|
-
default: this.secondSpecies
|
|
81
|
-
},
|
|
82
|
-
siteIndex2: {
|
|
83
|
-
type: "integer",
|
|
84
|
-
title: "Site no 2",
|
|
85
|
-
default: this.uniqueElementsWithLabels?.length > 1 ? 2 : defaultHubbardConfig.siteIndex2
|
|
86
|
-
},
|
|
87
|
-
atomicOrbital2: {
|
|
88
|
-
type: "string",
|
|
89
|
-
title: "Orbital 2",
|
|
90
|
-
enum: this.orbitalList,
|
|
91
|
-
default: defaultHubbardConfig.atomicOrbital
|
|
92
|
-
},
|
|
93
|
-
hubbardVValue: {
|
|
94
|
-
type: "number",
|
|
95
|
-
title: "V (eV)",
|
|
96
|
-
default: defaultHubbardConfig.hubbardVValue
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
minItems: 1
|
|
101
|
-
};
|
|
89
|
+
return _JSONSchemasInterface.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig);
|
|
102
90
|
}
|
|
103
91
|
}
|
|
104
92
|
exports.HubbardVContextProvider = HubbardVContextProvider;
|
|
@@ -4,19 +4,43 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.IonDynamicsContextProvider = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _ade = require("@mat3ra/ade");
|
|
8
|
+
var _JSONSchemasInterface = _interopRequireDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
13
|
const defaultMDConfig = {
|
|
10
14
|
numberOfSteps: 100,
|
|
11
15
|
timeStep: 5.0,
|
|
12
16
|
electronMass: 100.0,
|
|
13
17
|
temperature: 300.0
|
|
14
18
|
};
|
|
15
|
-
class IonDynamicsContextProvider extends
|
|
19
|
+
class IonDynamicsContextProvider extends _ade.JSONSchemaFormDataProvider {
|
|
20
|
+
constructor(...args) {
|
|
21
|
+
super(...args);
|
|
22
|
+
_defineProperty(this, "jsonSchemaId", "context-providers-directory/ion-dynamics-context-provider");
|
|
23
|
+
}
|
|
16
24
|
// eslint-disable-next-line class-methods-use-this
|
|
17
25
|
get defaultData() {
|
|
18
26
|
return defaultMDConfig;
|
|
19
27
|
}
|
|
28
|
+
get jsonSchemaPatchConfig() {
|
|
29
|
+
return {
|
|
30
|
+
numberOfSteps: {
|
|
31
|
+
default: this.defaultData.numberOfSteps
|
|
32
|
+
},
|
|
33
|
+
timeStep: {
|
|
34
|
+
default: this.defaultData.timeStep
|
|
35
|
+
},
|
|
36
|
+
electronMass: {
|
|
37
|
+
default: this.defaultData.electronMass
|
|
38
|
+
},
|
|
39
|
+
temperature: {
|
|
40
|
+
default: this.defaultData.temperature
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
20
44
|
|
|
21
45
|
// eslint-disable-next-line class-methods-use-this
|
|
22
46
|
get uiSchema() {
|
|
@@ -27,36 +51,8 @@ class IonDynamicsContextProvider extends _JSONSchemaFormDataProvider.default {
|
|
|
27
51
|
temperature: {}
|
|
28
52
|
};
|
|
29
53
|
}
|
|
30
|
-
|
|
31
|
-
// eslint-disable-next-line class-methods-use-this
|
|
32
54
|
get jsonSchema() {
|
|
33
|
-
return
|
|
34
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
35
|
-
type: "object",
|
|
36
|
-
description: "Important parameters for molecular dynamics calculation",
|
|
37
|
-
properties: {
|
|
38
|
-
numberOfSteps: {
|
|
39
|
-
type: "integer",
|
|
40
|
-
title: "numberOfSteps",
|
|
41
|
-
default: defaultMDConfig.numberOfSteps
|
|
42
|
-
},
|
|
43
|
-
timeStep: {
|
|
44
|
-
type: "number",
|
|
45
|
-
title: "timeStep (Hartree a.u.)",
|
|
46
|
-
default: defaultMDConfig.timeStep
|
|
47
|
-
},
|
|
48
|
-
electronMass: {
|
|
49
|
-
type: "number",
|
|
50
|
-
title: "Effective electron mass",
|
|
51
|
-
default: defaultMDConfig.electronMass
|
|
52
|
-
},
|
|
53
|
-
temperature: {
|
|
54
|
-
type: "number",
|
|
55
|
-
title: "Ionic temperature (K)",
|
|
56
|
-
default: defaultMDConfig.temperature
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
55
|
+
return _JSONSchemasInterface.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig);
|
|
60
56
|
}
|
|
61
57
|
}
|
|
62
58
|
exports.IonDynamicsContextProvider = IonDynamicsContextProvider;
|
|
@@ -4,12 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MLSettingsContextProvider = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _ade = require("@mat3ra/ade");
|
|
8
|
+
var _JSONSchemasInterface = _interopRequireDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
8
9
|
var _ApplicationContextMixin = require("../mixins/ApplicationContextMixin");
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
|
|
11
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
|
+
class MLSettingsContextProvider extends _ade.ContextProvider {
|
|
11
15
|
constructor(config) {
|
|
12
16
|
super(config);
|
|
17
|
+
_defineProperty(this, "jsonSchemaId", "context-providers-directory/ml-settings-context-provider");
|
|
13
18
|
this.initApplicationContextMixin();
|
|
14
19
|
}
|
|
15
20
|
|
|
@@ -28,25 +33,19 @@ class MLSettingsContextProvider extends _ContextProvider.default {
|
|
|
28
33
|
problem_category: "regression"
|
|
29
34
|
};
|
|
30
35
|
}
|
|
31
|
-
get
|
|
36
|
+
get jsonSchemaPatchConfig() {
|
|
32
37
|
return {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
target_column_name: {
|
|
39
|
-
type: "string",
|
|
40
|
-
default: this.defaultData.target_column_name
|
|
41
|
-
},
|
|
42
|
-
problem_category: {
|
|
43
|
-
type: "string",
|
|
44
|
-
default: this.defaultData.problem_category,
|
|
45
|
-
enum: ["regression", "classification", "clustering"]
|
|
46
|
-
}
|
|
38
|
+
target_column_name: {
|
|
39
|
+
default: this.defaultData.target_column_name
|
|
40
|
+
},
|
|
41
|
+
problem_category: {
|
|
42
|
+
default: this.defaultData.problem_category
|
|
47
43
|
}
|
|
48
44
|
};
|
|
49
45
|
}
|
|
46
|
+
get jsonSchema() {
|
|
47
|
+
return _JSONSchemasInterface.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig);
|
|
48
|
+
}
|
|
50
49
|
}
|
|
51
50
|
exports.MLSettingsContextProvider = MLSettingsContextProvider;
|
|
52
51
|
(0, _ApplicationContextMixin.applicationContextMixin)(MLSettingsContextProvider.prototype);
|