@mat3ra/esse 2025.11.19-0 → 2025.11.25-1

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.
Files changed (42) hide show
  1. package/dist/js/esse/JSONSchemasInterface.d.ts +13 -0
  2. package/dist/js/esse/JSONSchemasInterface.js +22 -0
  3. package/dist/js/esse/utils.d.ts +2 -0
  4. package/dist/js/esse/utils.js +50 -1
  5. package/dist/js/schema/context_provider.json +93 -0
  6. package/dist/js/schema/context_providers_directory/boundary_conditions_data_provider.json +30 -0
  7. package/dist/js/schema/context_providers_directory/collinear_magnetization_context_provider.json +35 -0
  8. package/dist/js/schema/context_providers_directory/enum.json +62 -0
  9. package/dist/js/schema/context_providers_directory/hubbard_j_context_provider.json +36 -0
  10. package/dist/js/schema/context_providers_directory/hubbard_legacy_context_provider.json +26 -0
  11. package/dist/js/schema/context_providers_directory/hubbard_u_context_provider.json +24 -0
  12. package/dist/js/schema/context_providers_directory/hubbard_v_context_provider.json +41 -0
  13. package/dist/js/schema/context_providers_directory/ion_dynamics_context_provider.json +25 -0
  14. package/dist/js/schema/context_providers_directory/ml_settings_context_provider.json +20 -0
  15. package/dist/js/schema/context_providers_directory/ml_train_test_split_context_provider.json +14 -0
  16. package/dist/js/schema/context_providers_directory/neb_data_provider.json +12 -0
  17. package/dist/js/schema/context_providers_directory/non_collinear_magnetization_context_provider.json +110 -0
  18. package/dist/js/schema/context_providers_directory/planewave_cutoffs_context_provider.json +15 -0
  19. package/dist/js/schema/context_providers_directory/points_grid_data_provider.json +46 -0
  20. package/dist/js/schema/context_providers_directory/points_path_data_provider.json +19 -0
  21. package/dist/js/schemas.json +1 -1
  22. package/dist/js/types.d.ts +297 -0
  23. package/dist/js/types.js +61 -1
  24. package/package.json +2 -1
  25. package/schema/context_provider.json +39 -0
  26. package/schema/context_providers_directory/boundary_conditions_provider.json +22 -0
  27. package/schema/context_providers_directory/collinear_magnetization_provider.json +35 -0
  28. package/schema/context_providers_directory/enum.json +62 -0
  29. package/schema/context_providers_directory/hubbard_j_provider.json +30 -0
  30. package/schema/context_providers_directory/hubbard_legacy_provider.json +26 -0
  31. package/schema/context_providers_directory/hubbard_u_provider.json +24 -0
  32. package/schema/context_providers_directory/hubbard_v_provider.json +41 -0
  33. package/schema/context_providers_directory/ion_dynamics_provider.json +25 -0
  34. package/schema/context_providers_directory/ml_settings_provider.json +16 -0
  35. package/schema/context_providers_directory/ml_train_test_split_provider.json +14 -0
  36. package/schema/context_providers_directory/neb_provider.json +12 -0
  37. package/schema/context_providers_directory/non_collinear_magnetization_provider.json +110 -0
  38. package/schema/context_providers_directory/planewave_cutoffs_provider.json +15 -0
  39. package/schema/context_providers_directory/points_grid_provider.json +43 -0
  40. package/schema/context_providers_directory/points_path_provider.json +19 -0
  41. package/src/js/esse/JSONSchemasInterface.ts +33 -1
  42. package/src/js/esse/utils.ts +58 -0
@@ -28,4 +28,17 @@ export default class JSONSchemasInterface {
28
28
  * })
29
29
  */
30
30
  static matchSchema(query: JSONSchemasInterfaceQuery): import("json-schema").JSONSchema7 | undefined;
31
+ /**
32
+ * Get a patched copy of a schema without modifying the cached version
33
+ * @param schemaId - The ID of the schema to patch
34
+ * @param propertyPatches - Object with property names as keys and patch objects as values
35
+ * @returns A new schema with patched properties
36
+ *
37
+ * @example
38
+ * JSONSchemasInterface.getPatchedSchema("boundary-conditions-provider", {
39
+ * type: { default: "pbc" },
40
+ * offset: { default: 0 }
41
+ * });
42
+ */
43
+ static getPatchedSchemaById(schemaId: string, patchConfig: Record<string, unknown>): JSONSchema | undefined;
31
44
  }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("./utils");
3
4
  class JSONSchemasInterface {
4
5
  static setSchemas(schema) {
5
6
  schema.forEach((schema) => this.addSchema(schema));
@@ -43,6 +44,27 @@ class JSONSchemasInterface {
43
44
  });
44
45
  });
45
46
  }
47
+ /**
48
+ * Get a patched copy of a schema without modifying the cached version
49
+ * @param schemaId - The ID of the schema to patch
50
+ * @param propertyPatches - Object with property names as keys and patch objects as values
51
+ * @returns A new schema with patched properties
52
+ *
53
+ * @example
54
+ * JSONSchemasInterface.getPatchedSchema("boundary-conditions-provider", {
55
+ * type: { default: "pbc" },
56
+ * offset: { default: 0 }
57
+ * });
58
+ */
59
+ static getPatchedSchemaById(schemaId, patchConfig) {
60
+ const baseSchema = this.getSchemaById(schemaId);
61
+ if (!baseSchema) {
62
+ return undefined;
63
+ }
64
+ const patchedSchema = JSON.parse(JSON.stringify(baseSchema));
65
+ (0, utils_1.applyPatchTree)(patchedSchema, patchConfig, []);
66
+ return patchedSchema;
67
+ }
46
68
  }
47
69
  exports.default = JSONSchemasInterface;
48
70
  JSONSchemasInterface.schemasCache = new Map();
@@ -12,3 +12,5 @@ export interface JSONSchemaWithPath {
12
12
  }
13
13
  export declare function parseIncludeReferenceStatementsByDir(dirPath: string, wrapInDataAndPath: true): JSONSchemaWithPath[];
14
14
  export declare function parseIncludeReferenceStatementsByDir(dirPath: string, wrapInDataAndPath?: false): JSONSchema[];
15
+ export declare function applyPatchWithDotNotation(target: Record<string, unknown>, path: string, patchValue: unknown): void;
16
+ export declare function applyPatchTree(schema: Record<string, unknown>, patchNode: Record<string, unknown>, pathPrefix: string[]): void;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.parseIncludeReferenceStatementsByDir = exports.parseIncludeReferenceStatements = void 0;
6
+ exports.applyPatchTree = exports.applyPatchWithDotNotation = exports.parseIncludeReferenceStatementsByDir = exports.parseIncludeReferenceStatements = void 0;
7
7
  // @ts-ignore
8
8
  const json_schema_deref_sync_1 = __importDefault(require("json-schema-deref-sync"));
9
9
  const path_1 = __importDefault(require("path"));
@@ -59,3 +59,52 @@ function parseIncludeReferenceStatementsByDir(dirPath, wrapInDataAndPath = false
59
59
  return wrapInDataAndPath ? schemasWithPath : schemas;
60
60
  }
61
61
  exports.parseIncludeReferenceStatementsByDir = parseIncludeReferenceStatementsByDir;
62
+ function isPlainObject(value) {
63
+ return value !== null && typeof value === "object" && !Array.isArray(value);
64
+ }
65
+ function applyPatchWithDotNotation(target, path, patchValue) {
66
+ const keys = path.split(".");
67
+ let current = target;
68
+ // Navigate to parent of final key
69
+ for (let index = 0; index < keys.length - 1; index += 1) {
70
+ const key = keys[index];
71
+ if (!isPlainObject(current[key])) {
72
+ // Path does not exist or is not an object → skip patch
73
+ return;
74
+ }
75
+ current = current[key];
76
+ }
77
+ const finalKey = keys[keys.length - 1];
78
+ const existingValue = current[finalKey];
79
+ if (isPlainObject(existingValue) && isPlainObject(patchValue)) {
80
+ // Merge object into existing object
81
+ Object.assign(existingValue, patchValue);
82
+ }
83
+ else if (existingValue !== undefined) {
84
+ // Overwrite leaf value
85
+ current[finalKey] = patchValue;
86
+ }
87
+ // If existingValue is undefined, we skip;
88
+ }
89
+ exports.applyPatchWithDotNotation = applyPatchWithDotNotation;
90
+ function applyPatchTree(schema, patchNode, pathPrefix) {
91
+ Object.entries(patchNode).forEach(([key, value]) => {
92
+ if (key.includes(".")) {
93
+ // Dot notation relative to current prefix
94
+ const fullPathSegments = [...pathPrefix, ...key.split(".")];
95
+ const fullPath = fullPathSegments.join(".");
96
+ applyPatchWithDotNotation(schema, fullPath, value);
97
+ }
98
+ else if (isPlainObject(value)) {
99
+ // Nested subtree → recurse with extended prefix
100
+ applyPatchTree(schema, value, [...pathPrefix, key]);
101
+ }
102
+ else {
103
+ // Leaf patch (primitive / array) → treat as direct field patch
104
+ const fullPathSegments = [...pathPrefix, key];
105
+ const fullPath = fullPathSegments.join(".");
106
+ applyPatchWithDotNotation(schema, fullPath, value);
107
+ }
108
+ });
109
+ }
110
+ exports.applyPatchTree = applyPatchTree;
@@ -0,0 +1,93 @@
1
+ {
2
+ "$id": "context-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "context provider schema",
5
+ "type": "object",
6
+ "required": [
7
+ "name"
8
+ ],
9
+ "additionalProperties": true,
10
+ "properties": {
11
+ "name": {
12
+ "type": "string",
13
+ "enum": [
14
+ "PlanewaveCutoffDataManager",
15
+ "KGridFormDataManager",
16
+ "QGridFormDataManager",
17
+ "IGridFormDataManager",
18
+ "QPathFormDataManager",
19
+ "IPathFormDataManager",
20
+ "KPathFormDataManager",
21
+ "ExplicitKPathFormDataManager",
22
+ "ExplicitKPath2PIBAFormDataManager",
23
+ "HubbardJContextManager",
24
+ "HubbardUContextManager",
25
+ "HubbardVContextManager",
26
+ "HubbardContextManagerLegacy",
27
+ "NEBFormDataManager",
28
+ "BoundaryConditionsFormDataManager",
29
+ "MLSettingsDataManager",
30
+ "MLTrainTestSplitDataManager",
31
+ "IonDynamicsContextProvider",
32
+ "CollinearMagnetizationDataManager",
33
+ "NonCollinearMagnetizationDataManager",
34
+ "QEPWXInputDataManager",
35
+ "QENEBInputDataManager",
36
+ "VASPInputDataManager",
37
+ "VASPNEBInputDataManager",
38
+ "NWChemInputDataManager"
39
+ ],
40
+ "tsEnumNames": [
41
+ "PlanewaveCutoffDataManager",
42
+ "KGridFormDataManager",
43
+ "QGridFormDataManager",
44
+ "IGridFormDataManager",
45
+ "QPathFormDataManager",
46
+ "IPathFormDataManager",
47
+ "KPathFormDataManager",
48
+ "ExplicitKPathFormDataManager",
49
+ "ExplicitKPath2PIBAFormDataManager",
50
+ "HubbardJContextManager",
51
+ "HubbardUContextManager",
52
+ "HubbardVContextManager",
53
+ "HubbardContextManagerLegacy",
54
+ "NEBFormDataManager",
55
+ "BoundaryConditionsFormDataManager",
56
+ "MLSettingsDataManager",
57
+ "MLTrainTestSplitDataManager",
58
+ "IonDynamicsContextProvider",
59
+ "CollinearMagnetizationDataManager",
60
+ "NonCollinearMagnetizationDataManager",
61
+ "QEPWXInputDataManager",
62
+ "QENEBInputDataManager",
63
+ "VASPInputDataManager",
64
+ "VASPNEBInputDataManager",
65
+ "NWChemInputDataManager"
66
+ ]
67
+ },
68
+ "domain": {
69
+ "description": "domain of the context provider",
70
+ "type": "string"
71
+ },
72
+ "entityName": {
73
+ "description": "entity name associated with the context provider",
74
+ "type": "string"
75
+ },
76
+ "data": {
77
+ "description": "data object for the context provider",
78
+ "type": "object"
79
+ },
80
+ "extraData": {
81
+ "description": "additional data object for the context provider",
82
+ "type": "object"
83
+ },
84
+ "isEdited": {
85
+ "description": "flag indicating if the context provider has been edited",
86
+ "type": "boolean"
87
+ },
88
+ "context": {
89
+ "description": "context object for the context provider",
90
+ "type": "object"
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$id": "context-providers-directory/boundary-conditions-data-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Boundary Conditions Provider Schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "enum": [
10
+ "pbc",
11
+ "bc1",
12
+ "bc2",
13
+ "bc3"
14
+ ],
15
+ "default": "pbc",
16
+ "description": "If assume_isolated = 'esm', determines the boundary conditions used for either side of the slab."
17
+ },
18
+ "offset": {
19
+ "type": "number"
20
+ },
21
+ "electricField": {
22
+ "type": "number",
23
+ "title": "Electric Field (eV/A)"
24
+ },
25
+ "targetFermiEnergy": {
26
+ "type": "number",
27
+ "title": "Target Fermi Energy (eV)"
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$id": "context-providers-directory/collinear-magnetization-context-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Collinear Magnetization Provider Schema",
5
+ "description": "Set starting magnetization, can have values in the range [-1, +1].",
6
+ "type": "object",
7
+ "properties": {
8
+ "startingMagnetization": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "properties": {
13
+ "atomicSpecies": {
14
+ "type": "string",
15
+ "title": "Atomic species"
16
+ },
17
+ "value": {
18
+ "type": "number",
19
+ "title": "Starting magnetization",
20
+ "minimum": -1,
21
+ "maximum": 1
22
+ }
23
+ }
24
+ }
25
+ },
26
+ "isTotalMagnetization": {
27
+ "type": "boolean",
28
+ "title": "Set total magnetization instead"
29
+ },
30
+ "totalMagnetization": {
31
+ "type": "number",
32
+ "title": "Total magnetization"
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "$id": "context-providers-directory/enum",
3
+ "definitions": {
4
+ "ContextProviderNameEnum": {
5
+ "type": "string",
6
+ "enum": [
7
+ "PlanewaveCutoffDataManager",
8
+ "KGridFormDataManager",
9
+ "QGridFormDataManager",
10
+ "IGridFormDataManager",
11
+ "QPathFormDataManager",
12
+ "IPathFormDataManager",
13
+ "KPathFormDataManager",
14
+ "ExplicitKPathFormDataManager",
15
+ "ExplicitKPath2PIBAFormDataManager",
16
+ "HubbardJContextManager",
17
+ "HubbardUContextManager",
18
+ "HubbardVContextManager",
19
+ "HubbardContextManagerLegacy",
20
+ "NEBFormDataManager",
21
+ "BoundaryConditionsFormDataManager",
22
+ "MLSettingsDataManager",
23
+ "MLTrainTestSplitDataManager",
24
+ "IonDynamicsContextProvider",
25
+ "CollinearMagnetizationDataManager",
26
+ "NonCollinearMagnetizationDataManager",
27
+ "QEPWXInputDataManager",
28
+ "QENEBInputDataManager",
29
+ "VASPInputDataManager",
30
+ "VASPNEBInputDataManager",
31
+ "NWChemInputDataManager"
32
+ ],
33
+ "tsEnumNames": [
34
+ "PlanewaveCutoffDataManager",
35
+ "KGridFormDataManager",
36
+ "QGridFormDataManager",
37
+ "IGridFormDataManager",
38
+ "QPathFormDataManager",
39
+ "IPathFormDataManager",
40
+ "KPathFormDataManager",
41
+ "ExplicitKPathFormDataManager",
42
+ "ExplicitKPath2PIBAFormDataManager",
43
+ "HubbardJContextManager",
44
+ "HubbardUContextManager",
45
+ "HubbardVContextManager",
46
+ "HubbardContextManagerLegacy",
47
+ "NEBFormDataManager",
48
+ "BoundaryConditionsFormDataManager",
49
+ "MLSettingsDataManager",
50
+ "MLTrainTestSplitDataManager",
51
+ "IonDynamicsContextProvider",
52
+ "CollinearMagnetizationDataManager",
53
+ "NonCollinearMagnetizationDataManager",
54
+ "QEPWXInputDataManager",
55
+ "QENEBInputDataManager",
56
+ "VASPInputDataManager",
57
+ "VASPNEBInputDataManager",
58
+ "NWChemInputDataManager"
59
+ ]
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$id": "context-providers-directory/hubbard-j-context-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Hubbard J Provider Schema",
5
+ "description": "Hubbard parameters for DFT+U+J calculation.",
6
+ "type": "array",
7
+ "minItems": 1,
8
+ "items": {
9
+ "type": "object",
10
+ "properties": {
11
+ "paramType": {
12
+ "type": "string",
13
+ "title": "Species",
14
+ "enum": [
15
+ "U",
16
+ "J",
17
+ "B",
18
+ "E2",
19
+ "E3"
20
+ ]
21
+ },
22
+ "atomicSpecies": {
23
+ "type": "string",
24
+ "title": "Species"
25
+ },
26
+ "atomicOrbital": {
27
+ "type": "string",
28
+ "title": "Orbital"
29
+ },
30
+ "value": {
31
+ "type": "number",
32
+ "title": "Value (eV)"
33
+ }
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$id": "context-providers-directory/hubbard-legacy-context-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Hubbard Legacy Provider Schema",
5
+ "description": "Hubbard parameters for DFT+U calculation.",
6
+ "type": "array",
7
+ "uniqueItems": true,
8
+ "minItems": 1,
9
+ "items": {
10
+ "type": "object",
11
+ "properties": {
12
+ "atomicSpecies": {
13
+ "type": "string",
14
+ "title": "Atomic species"
15
+ },
16
+ "atomicSpeciesIndex": {
17
+ "type": "integer",
18
+ "title": "Species index"
19
+ },
20
+ "hubbardUValue": {
21
+ "type": "number",
22
+ "title": "Hubbard U (eV)"
23
+ }
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$id": "context-providers-directory/hubbard-u-context-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Hubbard U Provider Schema",
5
+ "description": "Hubbard U parameters for DFT+U or DFT+U+V calculation.",
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "atomicSpecies": {
11
+ "type": "string",
12
+ "title": "Atomic species"
13
+ },
14
+ "atomicOrbital": {
15
+ "type": "string",
16
+ "title": "Atomic orbital"
17
+ },
18
+ "hubbardUValue": {
19
+ "type": "number",
20
+ "title": "Hubbard U (eV)"
21
+ }
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$id": "context-providers-directory/hubbard-v-context-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Hubbard V Provider Schema",
5
+ "description": "Hubbard V parameters for DFT+U+V calculation.",
6
+ "type": "array",
7
+ "minItems": 1,
8
+ "items": {
9
+ "type": "object",
10
+ "properties": {
11
+ "atomicSpecies": {
12
+ "type": "string",
13
+ "title": "Species 1"
14
+ },
15
+ "siteIndex": {
16
+ "type": "integer",
17
+ "title": "Site no 1"
18
+ },
19
+ "atomicOrbital": {
20
+ "type": "string",
21
+ "title": "Orbital 1"
22
+ },
23
+ "atomicSpecies2": {
24
+ "type": "string",
25
+ "title": "Species 2"
26
+ },
27
+ "siteIndex2": {
28
+ "type": "integer",
29
+ "title": "Site no 2"
30
+ },
31
+ "atomicOrbital2": {
32
+ "type": "string",
33
+ "title": "Orbital 2"
34
+ },
35
+ "hubbardVValue": {
36
+ "type": "number",
37
+ "title": "V (eV)"
38
+ }
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$id": "context-providers-directory/ion-dynamics-context-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Ion Dynamics Provider Schema",
5
+ "description": "Important parameters for molecular dynamics calculation",
6
+ "type": "object",
7
+ "properties": {
8
+ "numberOfSteps": {
9
+ "type": "integer",
10
+ "title": "numberOfSteps"
11
+ },
12
+ "timeStep": {
13
+ "type": "number",
14
+ "title": "timeStep (Hartree a.u.)"
15
+ },
16
+ "electronMass": {
17
+ "type": "number",
18
+ "title": "Effective electron mass"
19
+ },
20
+ "temperature": {
21
+ "type": "number",
22
+ "title": "Ionic temperature (K)"
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$id": "context-providers-directory/ml-settings-context-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "ML Settings Provider Schema",
5
+ "description": "Settings important to machine learning runs.",
6
+ "type": "object",
7
+ "properties": {
8
+ "target_column_name": {
9
+ "type": "string"
10
+ },
11
+ "problem_category": {
12
+ "type": "string",
13
+ "enum": [
14
+ "regression",
15
+ "classification",
16
+ "clustering"
17
+ ]
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$id": "context-providers-directory/ml-train-test-split-context-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "ML Train Test Split Provider Schema",
5
+ "description": "Fraction held as the test set. For example, a value of 0.2 corresponds to an 80/20 train/test split.",
6
+ "type": "object",
7
+ "properties": {
8
+ "fraction_held_as_test_set": {
9
+ "type": "number",
10
+ "minimum": 0,
11
+ "maximum": 1
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$id": "context-providers-directory/neb-data-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "NEB Provider Schema",
5
+ "description": "Number of intermediate NEB images.",
6
+ "type": "object",
7
+ "properties": {
8
+ "nImages": {
9
+ "type": "number"
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,110 @@
1
+ {
2
+ "$id": "context-providers-directory/non-collinear-magnetization-context-provider",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Non Collinear Magnetization Provider Schema",
5
+ "description": "Non-collinear magnetization parameters including starting magnetization, spin angles, and constraints.",
6
+ "type": "object",
7
+ "properties": {
8
+ "isExistingChargeDensity": {
9
+ "type": "boolean",
10
+ "title": "Use existing charge density"
11
+ },
12
+ "isStartingMagnetization": {
13
+ "type": "boolean",
14
+ "title": "Set starting magnetization"
15
+ },
16
+ "startingMagnetization": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "object",
20
+ "properties": {
21
+ "index": {
22
+ "type": "integer",
23
+ "title": "Index"
24
+ },
25
+ "atomicSpecies": {
26
+ "type": "string",
27
+ "title": "Atomic species"
28
+ },
29
+ "value": {
30
+ "type": "number",
31
+ "title": "Starting magnetization"
32
+ }
33
+ }
34
+ }
35
+ },
36
+ "isArbitrarySpinAngle": {
37
+ "type": "boolean",
38
+ "title": "Set arbitrary spin angle"
39
+ },
40
+ "spinAngles": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "object",
44
+ "properties": {
45
+ "index": {
46
+ "type": "integer",
47
+ "title": "Index"
48
+ },
49
+ "atomicSpecies": {
50
+ "type": "string",
51
+ "title": "Atomic species"
52
+ },
53
+ "angle1": {
54
+ "type": "number",
55
+ "title": "Angle1 (deg)"
56
+ },
57
+ "angle2": {
58
+ "type": "number",
59
+ "title": "Angle2 (deg)"
60
+ }
61
+ }
62
+ }
63
+ },
64
+ "isConstrainedMagnetization": {
65
+ "type": "boolean",
66
+ "title": "Set constrained magnetization"
67
+ },
68
+ "constrainedMagnetization": {
69
+ "type": "object",
70
+ "properties": {
71
+ "constrainType": {
72
+ "type": "string",
73
+ "title": "Constrain type",
74
+ "enum": [
75
+ "none",
76
+ "total",
77
+ "atomic",
78
+ "total direction",
79
+ "atomic direction"
80
+ ]
81
+ },
82
+ "lambda": {
83
+ "type": "number",
84
+ "title": "lambda"
85
+ }
86
+ }
87
+ },
88
+ "isFixedMagnetization": {
89
+ "type": "boolean",
90
+ "title": "Set Fixed magnetization (only applicable to constrained magnetization of 'total' type)"
91
+ },
92
+ "fixedMagnetization": {
93
+ "type": "object",
94
+ "properties": {
95
+ "x": {
96
+ "type": "number",
97
+ "title": "X-component"
98
+ },
99
+ "y": {
100
+ "type": "number",
101
+ "title": "Y-component"
102
+ },
103
+ "z": {
104
+ "type": "number",
105
+ "title": "Z-component"
106
+ }
107
+ }
108
+ }
109
+ }
110
+ }