@mat3ra/esse 2026.6.5-0 → 2026.6.16-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/esse/JSONSchemasInterface.js +1 -1
- package/dist/js/esse/JSONSchemasInterfaceServer.js +3 -2
- package/dist/js/esse/schemaUtils.js +2 -1
- package/dist/js/esse/server/utils.js +3 -2
- package/dist/js/esse/utils.js +3 -2
- package/dist/js/example/core/reusable/formation_energy_contribution.json +9 -0
- package/dist/js/example/properties_directory/non_scalar/formation_energy_contributions.json +32 -0
- package/dist/js/schema/core/reusable/formation_energy_contribution.json +53 -0
- package/dist/js/schema/job.json +378 -0
- package/dist/js/schema/properties_directory/enum_options.json +8 -1
- package/dist/js/schema/properties_directory/non_scalar/formation_energy_contributions.json +73 -0
- package/dist/js/schema/properties_directory/non_scalar/workflow.json +378 -0
- package/dist/js/schema/property/holder.json +450 -0
- package/dist/js/schema/workflow/base.json +378 -0
- package/dist/js/schema/workflow/subworkflow/mixin.json +189 -0
- package/dist/js/schema/workflow/subworkflow/unit.json +189 -0
- package/dist/js/schema/workflow/subworkflow.json +189 -0
- package/dist/js/schema/workflow/unit/error.json +190 -0
- package/dist/js/schema/workflow/unit/mixins/error.json +18 -0
- package/dist/js/schema/workflow/unit.json +189 -0
- package/dist/js/schema/workflow.json +378 -0
- package/dist/js/schemas.json +1 -1
- package/dist/js/scripts/compileTs.js +1 -1
- package/dist/js/scripts/setSchemaIds.js +1 -1
- package/dist/js/types.d.ts +1694 -76
- package/dist/js/types.js +5 -5
- package/dist/js/utils/ajv.js +5 -4
- package/dist/js/utils/common.js +3 -2
- package/dist/js/utils/filesystem.js +3 -2
- package/example/core/reusable/formation_energy_contribution.json +9 -0
- package/example/properties_directory/non-scalar/formation_energy_contributions.json +32 -0
- package/manifest/properties.yaml +5 -0
- package/package.json +1 -1
- package/schema/core/reusable/formation_energy_contribution.json +53 -0
- package/schema/properties_directory/enum_options.json +8 -1
- package/schema/properties_directory/non-scalar/formation_energy_contributions.json +24 -0
- package/schema/property/holder.json +3 -0
- package/schema/workflow/subworkflow/unit.json +3 -0
- package/schema/workflow/unit/error.json +14 -0
- package/schema/workflow/unit/mixins/error.json +18 -0
- package/schema/workflow/unit.json +3 -0
package/dist/js/types.js
CHANGED
|
@@ -29,7 +29,7 @@ var Name;
|
|
|
29
29
|
Name["VASPInputDataManager"] = "VASPInputDataManager";
|
|
30
30
|
Name["VASPNEBInputDataManager"] = "VASPNEBInputDataManager";
|
|
31
31
|
Name["NWChemInputDataManager"] = "NWChemInputDataManager";
|
|
32
|
-
})(Name
|
|
32
|
+
})(Name = exports.Name || (exports.Name = {}));
|
|
33
33
|
/**
|
|
34
34
|
* This interface was referenced by `ContextProvidersDirectoryEnum`'s JSON-Schema
|
|
35
35
|
* via the `definition` "ContextProviderNameEnum".
|
|
@@ -61,7 +61,7 @@ var ContextProviderNameEnum;
|
|
|
61
61
|
ContextProviderNameEnum["VASPInputDataManager"] = "VASPInputDataManager";
|
|
62
62
|
ContextProviderNameEnum["VASPNEBInputDataManager"] = "VASPNEBInputDataManager";
|
|
63
63
|
ContextProviderNameEnum["NWChemInputDataManager"] = "NWChemInputDataManager";
|
|
64
|
-
})(ContextProviderNameEnum
|
|
64
|
+
})(ContextProviderNameEnum = exports.ContextProviderNameEnum || (exports.ContextProviderNameEnum = {}));
|
|
65
65
|
/**
|
|
66
66
|
* The type of the message to distinguish the direction of the message.
|
|
67
67
|
*/
|
|
@@ -69,7 +69,7 @@ var Type;
|
|
|
69
69
|
(function (Type) {
|
|
70
70
|
Type["fromIframeToHost"] = "from-iframe-to-host";
|
|
71
71
|
Type["fromHostToIframe"] = "from-host-to-iframe";
|
|
72
|
-
})(Type
|
|
72
|
+
})(Type = exports.Type || (exports.Type = {}));
|
|
73
73
|
/**
|
|
74
74
|
* The action to be performed upon receiving the message.
|
|
75
75
|
*/
|
|
@@ -78,7 +78,7 @@ var Action;
|
|
|
78
78
|
Action["setData"] = "set-data";
|
|
79
79
|
Action["getData"] = "get-data";
|
|
80
80
|
Action["info"] = "info";
|
|
81
|
-
})(Action
|
|
81
|
+
})(Action = exports.Action || (exports.Action = {}));
|
|
82
82
|
/**
|
|
83
83
|
* This interface was referenced by `WorkflowSubworkflowConvergenceEnumOptions`'s JSON-Schema
|
|
84
84
|
* via the `definition` "ConvergenceParameterNameEnum".
|
|
@@ -88,4 +88,4 @@ var ConvergenceParameterNameEnum;
|
|
|
88
88
|
ConvergenceParameterNameEnum["N_k"] = "N_k";
|
|
89
89
|
ConvergenceParameterNameEnum["N_k_nonuniform"] = "N_k_nonuniform";
|
|
90
90
|
ConvergenceParameterNameEnum["N_k_nonuniform_2D"] = "N_k_nonuniform_2D";
|
|
91
|
-
})(ConvergenceParameterNameEnum
|
|
91
|
+
})(ConvergenceParameterNameEnum = exports.ConvergenceParameterNameEnum || (exports.ConvergenceParameterNameEnum = {}));
|
package/dist/js/utils/ajv.js
CHANGED
|
@@ -3,9 +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.getValidator =
|
|
7
|
-
exports.validate = validate;
|
|
8
|
-
exports.validateAndClean = validateAndClean;
|
|
6
|
+
exports.validateAndClean = exports.validate = exports.getValidator = void 0;
|
|
9
7
|
const ajv_1 = __importDefault(require("ajv"));
|
|
10
8
|
const ajv_formats_1 = __importDefault(require("ajv-formats"));
|
|
11
9
|
const schemaUtils_1 = require("../esse/schemaUtils");
|
|
@@ -25,7 +23,7 @@ function addAdditionalPropertiesToSchema(schema, additionalProperties = false) {
|
|
|
25
23
|
});
|
|
26
24
|
}
|
|
27
25
|
const ajvConfig = {
|
|
28
|
-
strict: false,
|
|
26
|
+
strict: false,
|
|
29
27
|
useDefaults: true,
|
|
30
28
|
/**
|
|
31
29
|
* discriminator fixes default values in oneOf
|
|
@@ -82,6 +80,7 @@ function getValidator(jsonSchema, { clean, coerceTypes, useDefaults = true, }) {
|
|
|
82
80
|
}
|
|
83
81
|
return validate;
|
|
84
82
|
}
|
|
83
|
+
exports.getValidator = getValidator;
|
|
85
84
|
/**
|
|
86
85
|
* Validates a given example against the schema.
|
|
87
86
|
* @param example example to validate.
|
|
@@ -96,6 +95,7 @@ function validate(data, jsonSchema) {
|
|
|
96
95
|
errors: validator.errors,
|
|
97
96
|
};
|
|
98
97
|
}
|
|
98
|
+
exports.validate = validate;
|
|
99
99
|
/**
|
|
100
100
|
* Validates and clean a given example against the schema
|
|
101
101
|
* @param example example to validate.
|
|
@@ -110,3 +110,4 @@ function validateAndClean(data, jsonSchema, { coerceTypes = false, useDefaults =
|
|
|
110
110
|
errors: validator.errors,
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
+
exports.validateAndClean = validateAndClean;
|
package/dist/js/utils/common.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isInstanceOf =
|
|
4
|
-
exports.safeParseJSON = safeParseJSON;
|
|
3
|
+
exports.safeParseJSON = exports.isInstanceOf = void 0;
|
|
5
4
|
function isInstanceOf(object, type) {
|
|
6
5
|
return Object.prototype.toString.call(object).slice(8, -1) === type;
|
|
7
6
|
}
|
|
7
|
+
exports.isInstanceOf = isInstanceOf;
|
|
8
8
|
/**
|
|
9
9
|
* Makes sure that text representing arrays is parsed into Arrays.
|
|
10
10
|
*/
|
|
@@ -12,3 +12,4 @@ function safeParseJSON(string) {
|
|
|
12
12
|
const obj = JSON.parse(string);
|
|
13
13
|
return string[0] === "[" ? Object.keys(obj).map((key) => obj[key]) : obj;
|
|
14
14
|
}
|
|
15
|
+
exports.safeParseJSON = safeParseJSON;
|
|
@@ -3,8 +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.walkDir =
|
|
7
|
-
exports.walkDirSync = walkDirSync;
|
|
6
|
+
exports.walkDirSync = exports.walkDir = void 0;
|
|
8
7
|
/* eslint-disable no-await-in-loop */
|
|
9
8
|
/* eslint-disable no-restricted-syntax */
|
|
10
9
|
const fs_1 = __importDefault(require("fs"));
|
|
@@ -22,6 +21,7 @@ async function walkDir(dir, callback) {
|
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
}
|
|
24
|
+
exports.walkDir = walkDir;
|
|
25
25
|
function walkDirSync(dir, callback) {
|
|
26
26
|
const subDirs = fs_1.default.readdirSync(dir);
|
|
27
27
|
for (const subDir of subDirs) {
|
|
@@ -35,3 +35,4 @@ function walkDirSync(dir, callback) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
exports.walkDirSync = walkDirSync;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "formation_energy_contributions",
|
|
3
|
+
"values": [
|
|
4
|
+
{
|
|
5
|
+
"formula": "SiC",
|
|
6
|
+
"n_atoms": 4,
|
|
7
|
+
"is_elemental": false,
|
|
8
|
+
"total_energy": -520.003969643439,
|
|
9
|
+
"total_energy_per_atom": -130.00099241085975,
|
|
10
|
+
"precision_value": 8192,
|
|
11
|
+
"precision_metric": "KPPRA"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"formula": "Si",
|
|
15
|
+
"n_atoms": 2,
|
|
16
|
+
"is_elemental": true,
|
|
17
|
+
"total_energy": -261.003969643439,
|
|
18
|
+
"total_energy_per_atom": -130.5019848217195,
|
|
19
|
+
"precision_value": 8192,
|
|
20
|
+
"precision_metric": "KPPRA"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"formula": "C",
|
|
24
|
+
"n_atoms": 2,
|
|
25
|
+
"is_elemental": true,
|
|
26
|
+
"total_energy": -321.003969643439,
|
|
27
|
+
"total_energy_per_atom": -160.5019848217195,
|
|
28
|
+
"precision_value": 8000,
|
|
29
|
+
"precision_metric": "KPPRA"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
package/manifest/properties.yaml
CHANGED
|
@@ -129,6 +129,11 @@ total_energy_contributions:
|
|
|
129
129
|
schemaId: properties-directory/non-scalar/total-energy-contributions
|
|
130
130
|
isResult: true
|
|
131
131
|
|
|
132
|
+
formation_energy_contributions:
|
|
133
|
+
defaults:
|
|
134
|
+
schemaId: properties-directory/non-scalar/formation-energy-contributions
|
|
135
|
+
isResult: true
|
|
136
|
+
|
|
132
137
|
band_gaps:
|
|
133
138
|
types:
|
|
134
139
|
- direct
|
package/package.json
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "core/reusable/formation-energy-contribution",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"title": "Formation energy contribution schema",
|
|
5
|
+
"description": "Total energy contribution of one material used in formation energy calculation.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"formula": {
|
|
9
|
+
"description": "formula or label for the material used in the formation energy calculation",
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"n_atoms": {
|
|
13
|
+
"description": "number of atoms in the material",
|
|
14
|
+
"type": "integer"
|
|
15
|
+
},
|
|
16
|
+
"is_elemental": {
|
|
17
|
+
"description": "whether the material is an elemental reference",
|
|
18
|
+
"type": "boolean"
|
|
19
|
+
},
|
|
20
|
+
"total_energy": {
|
|
21
|
+
"description": "total energy of the material",
|
|
22
|
+
"type": "number"
|
|
23
|
+
},
|
|
24
|
+
"total_energy_per_atom": {
|
|
25
|
+
"description": "total energy per atom of the material",
|
|
26
|
+
"type": "number"
|
|
27
|
+
},
|
|
28
|
+
"precision_value": {
|
|
29
|
+
"description": "precision value for the total energy property",
|
|
30
|
+
"type": "number",
|
|
31
|
+
"default": -1
|
|
32
|
+
},
|
|
33
|
+
"precision_metric": {
|
|
34
|
+
"description": "metric used to report total energy precision",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": [
|
|
37
|
+
"unknown",
|
|
38
|
+
"KPPRA",
|
|
39
|
+
"spacing"
|
|
40
|
+
],
|
|
41
|
+
"default": "unknown"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"required": [
|
|
45
|
+
"formula",
|
|
46
|
+
"n_atoms",
|
|
47
|
+
"is_elemental",
|
|
48
|
+
"total_energy",
|
|
49
|
+
"total_energy_per_atom",
|
|
50
|
+
"precision_metric",
|
|
51
|
+
"precision_value"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"scalar",
|
|
16
16
|
"non-scalar",
|
|
17
17
|
"tensor",
|
|
18
|
-
"object"
|
|
18
|
+
"object",
|
|
19
|
+
"array-of-objects"
|
|
19
20
|
]
|
|
20
21
|
},
|
|
21
22
|
"ScalarPropertyEnum": {
|
|
@@ -77,6 +78,12 @@
|
|
|
77
78
|
"total_energy_contributions"
|
|
78
79
|
]
|
|
79
80
|
},
|
|
81
|
+
"ArrayOfObjectsPropertyEnum": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"enum": [
|
|
84
|
+
"formation_energy_contributions"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
80
87
|
"ProtoPropertyEnum": {
|
|
81
88
|
"type": "string",
|
|
82
89
|
"enum": [
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "properties-directory/non-scalar/formation-energy-contributions",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"title": "Formation energy contributions property schema",
|
|
5
|
+
"description": "Elemental reference total energies used to calculate formation energy.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"enum": [
|
|
10
|
+
"formation_energy_contributions"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"values": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"$ref": "../../core/reusable/formation_energy_contribution.json"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": [
|
|
21
|
+
"name",
|
|
22
|
+
"values"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -75,6 +75,9 @@
|
|
|
75
75
|
{
|
|
76
76
|
"$ref": "../properties_directory/non-scalar/total_energy_contributions.json"
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
"$ref": "../properties_directory/non-scalar/formation_energy_contributions.json"
|
|
80
|
+
},
|
|
78
81
|
{
|
|
79
82
|
"$ref": "../properties_directory/non-scalar/phonon_dos.json"
|
|
80
83
|
},
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "workflow/unit/mixins/error",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"title": "error unit mixin schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"type": {
|
|
8
|
+
"const": "error"
|
|
9
|
+
},
|
|
10
|
+
"reason": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "JSON string with validation/hydration details: { error, json, schema }"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": [
|
|
16
|
+
"reason"
|
|
17
|
+
]
|
|
18
|
+
}
|