@mat3ra/prode 2026.6.5-0 → 2026.6.12-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.
@@ -1,5 +1,6 @@
1
1
  import type { MetaPropertyHolderSchema, PropertyHolderSchema, ProtoPropertyHolderSchema } from "@mat3ra/esse/dist/js/types";
2
2
  import type MetaProperty from "./MetaProperty";
3
+ import FormationEnergyContributionsProperty from "./properties/array-of-objects/FormationEnergyContributionsProperty";
3
4
  import AveragePotentialProfileProperty from "./properties/non-scalar/AveragePotentialProfileProperty";
4
5
  import BandGapsProperty from "./properties/non-scalar/BandGapsProperty";
5
6
  import BandStructureProperty from "./properties/non-scalar/BandStructureProperty";
@@ -52,8 +53,9 @@ export default class PropertyFactory {
52
53
  static getMultipleResultsPropertyNames(): PropertyName[];
53
54
  static getScalarPropertyNames(): PropertyName[];
54
55
  static getNonScalarPropertyNames(): PropertyName[];
56
+ static getArrayOfObjectsPropertyNames(): PropertyName[];
55
57
  private static filterPropertyNames;
56
- static createProperty(config: AnyProperty): AveragePotentialProfileProperty | BandGapsProperty | BandStructureProperty | ChargeDensityProfileProperty | ConvergenceElectronicProperty | ConvergenceIonicProperty | DensityOfStatesProperty | DielectricTensorProperty | FileContentProperty | FinalStructureProperty | HubbardUProperty | HubbardVNNProperty | HubbardVProperty | IsRelaxedProperty | JupyterNotebookEndpointProperty | PhononDispersionsProperty | PhononDOSProperty | PotentialProfileProperty | ReactionEnergyProfileProperty | WavefunctionAmplitudeProperty | WorkflowProperty | TotalEnergyContributionsProperty | FermiEnergyProperty | FormationEnergyProperty | HOMOEnergyProperty | IonizationPotentialElementalProperty | LUMOEnergyProperty | PressureProperty | ReactionEnergyBarrierProperty | SurfaceEnergyProperty | ThermalCorrectionToEnergyProperty | ThermalCorrectionToEnthalpyProperty | TotalEnergyProperty | TotalForcesProperty | ValenceBandOffsetProperty | ZeroPointEnergyProperty | AtomicForcesProperty | MagneticMomentsProperty | StressTensorProperty;
58
+ static createProperty(config: AnyProperty): FormationEnergyContributionsProperty | AveragePotentialProfileProperty | BandGapsProperty | BandStructureProperty | ChargeDensityProfileProperty | ConvergenceElectronicProperty | ConvergenceIonicProperty | DensityOfStatesProperty | DielectricTensorProperty | FileContentProperty | FinalStructureProperty | HubbardUProperty | HubbardVNNProperty | HubbardVProperty | IsRelaxedProperty | JupyterNotebookEndpointProperty | PhononDispersionsProperty | PhononDOSProperty | PotentialProfileProperty | ReactionEnergyProfileProperty | WavefunctionAmplitudeProperty | WorkflowProperty | TotalEnergyContributionsProperty | FermiEnergyProperty | FormationEnergyProperty | HOMOEnergyProperty | IonizationPotentialElementalProperty | LUMOEnergyProperty | PressureProperty | ReactionEnergyBarrierProperty | SurfaceEnergyProperty | ThermalCorrectionToEnergyProperty | ThermalCorrectionToEnthalpyProperty | TotalEnergyProperty | TotalForcesProperty | ValenceBandOffsetProperty | ZeroPointEnergyProperty | AtomicForcesProperty | MagneticMomentsProperty | StressTensorProperty;
57
59
  static createMetaProperty(config: AnyMetaProperty): MetaProperty;
58
60
  static createProtoProperty(config: AnyProtoProperty): AtomicConstraintsProperty | BoundaryConditionsProperty;
59
61
  }
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const PseudopotentialMetaProperty_1 = __importDefault(require("./meta_properties/PseudopotentialMetaProperty"));
7
+ const FormationEnergyContributionsProperty_1 = __importDefault(require("./properties/array-of-objects/FormationEnergyContributionsProperty"));
7
8
  const AveragePotentialProfileProperty_1 = __importDefault(require("./properties/non-scalar/AveragePotentialProfileProperty"));
8
9
  const BandGapsProperty_1 = __importDefault(require("./properties/non-scalar/BandGapsProperty"));
9
10
  const BandStructureProperty_1 = __importDefault(require("./properties/non-scalar/BandStructureProperty"));
@@ -61,6 +62,7 @@ const PROPERTY_CLASS_MAP = {
61
62
  [ThermalCorrectionToEnthalpyProperty_1.default.propertyName]: ThermalCorrectionToEnthalpyProperty_1.default,
62
63
  [ZeroPointEnergyProperty_1.default.propertyName]: ZeroPointEnergyProperty_1.default,
63
64
  [TotalEnergyContributionsProperty_1.default.propertyName]: TotalEnergyContributionsProperty_1.default,
65
+ [FormationEnergyContributionsProperty_1.default.propertyName]: FormationEnergyContributionsProperty_1.default,
64
66
  [AtomicForcesProperty_1.default.propertyName]: AtomicForcesProperty_1.default,
65
67
  [StressTensorProperty_1.default.propertyName]: StressTensorProperty_1.default,
66
68
  [DensityOfStatesProperty_1.default.propertyName]: DensityOfStatesProperty_1.default,
@@ -120,6 +122,11 @@ class PropertyFactory {
120
122
  return PropertyClass.propertyType === settings_1.PropertyType.non_scalar;
121
123
  });
122
124
  }
125
+ static getArrayOfObjectsPropertyNames() {
126
+ return this.filterPropertyNames((PropertyClass) => {
127
+ return (PropertyClass.propertyType === settings_1.PropertyType.array_of_objects);
128
+ });
129
+ }
123
130
  static filterPropertyNames(filterFn) {
124
131
  const properties = Object.values({
125
132
  ...PROPERTY_CLASS_MAP,
@@ -0,0 +1,5 @@
1
+ import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
+ import type { FormationEnergyContributionsPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+ export type FormationEnergyContributionsPropertySchemaMixin = Omit<FormationEnergyContributionsPropertySchema, "_id" | "slug" | "systemName" | "schemaVersion">;
4
+ export type FormationEnergyContributionsPropertyInMemoryEntity = InMemoryEntity & FormationEnergyContributionsPropertySchemaMixin;
5
+ export declare function formationEnergyContributionsPropertySchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & FormationEnergyContributionsPropertySchemaMixin;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formationEnergyContributionsPropertySchemaMixin = formationEnergyContributionsPropertySchemaMixin;
4
+ function formationEnergyContributionsPropertySchemaMixin(item) {
5
+ // @ts-expect-error
6
+ const properties = {
7
+ get name() {
8
+ return this.requiredProp("name");
9
+ },
10
+ set name(value) {
11
+ this.setProp("name", value);
12
+ },
13
+ get values() {
14
+ return this.requiredProp("values");
15
+ },
16
+ set values(value) {
17
+ this.setProp("values", value);
18
+ },
19
+ };
20
+ Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
21
+ }
@@ -3,6 +3,7 @@ export { PropertyName, PropertyType } from "./settings";
3
3
  export { default as Property } from "./Property";
4
4
  export { default as MetaProperty } from "./MetaProperty";
5
5
  export { default as PseudopotentialMetaProperty } from "./meta_properties/PseudopotentialMetaProperty";
6
+ export { default as FormationEnergyContributionsProperty } from "./properties/array-of-objects/FormationEnergyContributionsProperty";
6
7
  export { default as FinalStructureProperty } from "./properties/non-scalar/FinalStructureProperty";
7
8
  export { default as BandGapsProperty } from "./properties/non-scalar/BandGapsProperty";
8
9
  export { default as IsRelaxedProperty } from "./properties/non-scalar/IsRelaxedProperty";
package/dist/js/index.js CHANGED
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.ProtoPropertyHolder = exports.MetaPropertyHolder = exports.PropertyHolder = exports.metaPropertyHolderMixin = exports.propertyHolderMixin = exports.protoPropertyHolderMixin = exports.ReactionEnergyProfileProperty = exports.WavefunctionAmplitudeProperty = exports.PotentialProfileProperty = exports.ChargeDensityProfileProperty = exports.BandStructureProperty = exports.ThermalCorrectionToEnthalpyProperty = exports.ThermalCorrectionToEnergyProperty = exports.LUMOEnergyProperty = exports.HOMOEnergyProperty = exports.TotalEnergyProperty = exports.SurfaceEnergyProperty = exports.FormationEnergyProperty = exports.ReactionEnergyBarrierProperty = exports.PressureProperty = exports.IsRelaxedProperty = exports.BandGapsProperty = exports.FinalStructureProperty = exports.PseudopotentialMetaProperty = exports.MetaProperty = exports.Property = exports.PropertyType = exports.PropertyName = exports.PropertyFactory = void 0;
20
+ exports.ProtoPropertyHolder = exports.MetaPropertyHolder = exports.PropertyHolder = exports.metaPropertyHolderMixin = exports.propertyHolderMixin = exports.protoPropertyHolderMixin = exports.ReactionEnergyProfileProperty = exports.WavefunctionAmplitudeProperty = exports.PotentialProfileProperty = exports.ChargeDensityProfileProperty = exports.BandStructureProperty = exports.ThermalCorrectionToEnthalpyProperty = exports.ThermalCorrectionToEnergyProperty = exports.LUMOEnergyProperty = exports.HOMOEnergyProperty = exports.TotalEnergyProperty = exports.SurfaceEnergyProperty = exports.FormationEnergyProperty = exports.ReactionEnergyBarrierProperty = exports.PressureProperty = exports.IsRelaxedProperty = exports.BandGapsProperty = exports.FinalStructureProperty = exports.FormationEnergyContributionsProperty = exports.PseudopotentialMetaProperty = exports.MetaProperty = exports.Property = exports.PropertyType = exports.PropertyName = exports.PropertyFactory = void 0;
21
21
  var PropertyFactory_1 = require("./PropertyFactory");
22
22
  Object.defineProperty(exports, "PropertyFactory", { enumerable: true, get: function () { return __importDefault(PropertyFactory_1).default; } });
23
23
  var settings_1 = require("./settings");
@@ -29,6 +29,8 @@ var MetaProperty_1 = require("./MetaProperty");
29
29
  Object.defineProperty(exports, "MetaProperty", { enumerable: true, get: function () { return __importDefault(MetaProperty_1).default; } });
30
30
  var PseudopotentialMetaProperty_1 = require("./meta_properties/PseudopotentialMetaProperty");
31
31
  Object.defineProperty(exports, "PseudopotentialMetaProperty", { enumerable: true, get: function () { return __importDefault(PseudopotentialMetaProperty_1).default; } });
32
+ var FormationEnergyContributionsProperty_1 = require("./properties/array-of-objects/FormationEnergyContributionsProperty");
33
+ Object.defineProperty(exports, "FormationEnergyContributionsProperty", { enumerable: true, get: function () { return __importDefault(FormationEnergyContributionsProperty_1).default; } });
32
34
  var FinalStructureProperty_1 = require("./properties/non-scalar/FinalStructureProperty");
33
35
  Object.defineProperty(exports, "FinalStructureProperty", { enumerable: true, get: function () { return __importDefault(FinalStructureProperty_1).default; } });
34
36
  var BandGapsProperty_1 = require("./properties/non-scalar/BandGapsProperty");
@@ -0,0 +1,14 @@
1
+ import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
+ import type { FormationEnergyContributionsPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+ import { FormationEnergyContributionsPropertySchemaMixin } from "../../generated/FormationEnergyContributionsPropertySchemaMixin";
4
+ import Property from "../../Property";
5
+ import { PropertyName, PropertyType } from "../../settings";
6
+ type Schema = FormationEnergyContributionsPropertySchema;
7
+ type Base = typeof Property<Schema> & Constructor<FormationEnergyContributionsPropertySchemaMixin>;
8
+ declare const PropertyBase: Base;
9
+ export default class FormationEnergyContributionsProperty extends PropertyBase implements Schema {
10
+ static readonly propertyType = PropertyType.array_of_objects;
11
+ static readonly propertyName = PropertyName.formation_energy_contributions;
12
+ constructor(config: Omit<Schema, "name">);
13
+ }
14
+ export {};
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const FormationEnergyContributionsPropertySchemaMixin_1 = require("../../generated/FormationEnergyContributionsPropertySchemaMixin");
7
+ const Property_1 = __importDefault(require("../../Property"));
8
+ const settings_1 = require("../../settings");
9
+ const PropertyBase = Property_1.default;
10
+ class FormationEnergyContributionsProperty extends PropertyBase {
11
+ constructor(config) {
12
+ super({ ...config, name: FormationEnergyContributionsProperty.propertyName });
13
+ }
14
+ }
15
+ FormationEnergyContributionsProperty.propertyType = settings_1.PropertyType.array_of_objects;
16
+ FormationEnergyContributionsProperty.propertyName = settings_1.PropertyName.formation_energy_contributions;
17
+ exports.default = FormationEnergyContributionsProperty;
18
+ (0, FormationEnergyContributionsPropertySchemaMixin_1.formationEnergyContributionsPropertySchemaMixin)(FormationEnergyContributionsProperty.prototype);
@@ -6,7 +6,8 @@ export declare enum PropertyType {
6
6
  scalar = "scalar",
7
7
  non_scalar = "non-scalar",
8
8
  tensor = "tensor",
9
- object = "object"
9
+ object = "object",
10
+ array_of_objects = "array-of-objects"
10
11
  }
11
12
  export declare enum PropertyName {
12
13
  pressure = "pressure",
@@ -23,6 +24,7 @@ export declare enum PropertyName {
23
24
  thermal_correction_to_energy = "thermal_correction_to_energy",
24
25
  thermal_correction_to_enthalpy = "thermal_correction_to_enthalpy",
25
26
  total_energy_contributions = "total_energy_contributions",
27
+ formation_energy_contributions = "formation_energy_contributions",
26
28
  atomic_forces = "atomic_forces",
27
29
  atomic_constraints = "atomic_constraints",
28
30
  stress_tensor = "stress_tensor",
@@ -14,6 +14,7 @@ var PropertyType;
14
14
  // non-scalar subtypes
15
15
  PropertyType["tensor"] = "tensor";
16
16
  PropertyType["object"] = "object";
17
+ PropertyType["array_of_objects"] = "array-of-objects";
17
18
  })(PropertyType || (exports.PropertyType = PropertyType = {}));
18
19
  var PropertyName;
19
20
  (function (PropertyName) {
@@ -31,6 +32,7 @@ var PropertyName;
31
32
  PropertyName["thermal_correction_to_energy"] = "thermal_correction_to_energy";
32
33
  PropertyName["thermal_correction_to_enthalpy"] = "thermal_correction_to_enthalpy";
33
34
  PropertyName["total_energy_contributions"] = "total_energy_contributions";
35
+ PropertyName["formation_energy_contributions"] = "formation_energy_contributions";
34
36
  PropertyName["atomic_forces"] = "atomic_forces";
35
37
  PropertyName["atomic_constraints"] = "atomic_constraints";
36
38
  PropertyName["stress_tensor"] = "stress_tensor";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mat3ra/prode",
3
- "version": "2026.6.5-0",
3
+ "version": "2026.6.12-0",
4
4
  "description": "PROperty DEfinitions",
5
5
  "scripts": {
6
6
  "test": "nyc --reporter=text mocha --recursive --bail",
@@ -52,7 +52,7 @@
52
52
  "@babel/eslint-parser": "^7.16.3",
53
53
  "@exabyte-io/eslint-config": "2025.5.13-0",
54
54
  "@mat3ra/code": "2026.5.27-0",
55
- "@mat3ra/esse": "2026.6.5-0",
55
+ "@mat3ra/esse": "2026.6.12-0",
56
56
  "@mat3ra/made": "2026.5.28-0",
57
57
  "@mat3ra/tsconfig": "2024.6.3-0",
58
58
  "@types/lodash": "^4.17.20",
@@ -7,6 +7,7 @@ import type {
7
7
 
8
8
  import PseudopotentialProperty from "./meta_properties/PseudopotentialMetaProperty";
9
9
  import type MetaProperty from "./MetaProperty";
10
+ import FormationEnergyContributionsProperty from "./properties/array-of-objects/FormationEnergyContributionsProperty";
10
11
  import AveragePotentialProfileProperty from "./properties/non-scalar/AveragePotentialProfileProperty";
11
12
  import BandGapsProperty from "./properties/non-scalar/BandGapsProperty";
12
13
  import BandStructureProperty from "./properties/non-scalar/BandStructureProperty";
@@ -71,6 +72,7 @@ type PropertyClassMap = {
71
72
  | Constructor<ThermalCorrectionToEnthalpyProperty>
72
73
  | Constructor<ZeroPointEnergyProperty>
73
74
  | Constructor<TotalEnergyContributionsProperty>
75
+ | Constructor<FormationEnergyContributionsProperty>
74
76
  | Constructor<AtomicForcesProperty>
75
77
  | Constructor<StressTensorProperty>
76
78
  | Constructor<DensityOfStatesProperty>
@@ -123,6 +125,7 @@ const PROPERTY_CLASS_MAP: PropertyClassMap = {
123
125
  [ThermalCorrectionToEnthalpyProperty.propertyName]: ThermalCorrectionToEnthalpyProperty,
124
126
  [ZeroPointEnergyProperty.propertyName]: ZeroPointEnergyProperty,
125
127
  [TotalEnergyContributionsProperty.propertyName]: TotalEnergyContributionsProperty,
128
+ [FormationEnergyContributionsProperty.propertyName]: FormationEnergyContributionsProperty,
126
129
  [AtomicForcesProperty.propertyName]: AtomicForcesProperty,
127
130
  [StressTensorProperty.propertyName]: StressTensorProperty,
128
131
  [DensityOfStatesProperty.propertyName]: DensityOfStatesProperty,
@@ -192,6 +195,14 @@ export default class PropertyFactory {
192
195
  });
193
196
  }
194
197
 
198
+ static getArrayOfObjectsPropertyNames(): PropertyName[] {
199
+ return this.filterPropertyNames((PropertyClass) => {
200
+ return (
201
+ (PropertyClass as typeof Property).propertyType === PropertyType.array_of_objects
202
+ );
203
+ });
204
+ }
205
+
195
206
  private static filterPropertyNames(
196
207
  filterFn: (PropertyClass: Constructor<Property>) => boolean,
197
208
  ): PropertyName[] {
@@ -0,0 +1,34 @@
1
+ import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
+ import type { FormationEnergyContributionsPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+
4
+ export type FormationEnergyContributionsPropertySchemaMixin = Omit<
5
+ FormationEnergyContributionsPropertySchema,
6
+ "_id" | "slug" | "systemName" | "schemaVersion"
7
+ >;
8
+
9
+ export type FormationEnergyContributionsPropertyInMemoryEntity = InMemoryEntity &
10
+ FormationEnergyContributionsPropertySchemaMixin;
11
+
12
+ export function formationEnergyContributionsPropertySchemaMixin<T extends InMemoryEntity>(
13
+ item: InMemoryEntity,
14
+ ): asserts item is T & FormationEnergyContributionsPropertySchemaMixin {
15
+ // @ts-expect-error
16
+ const properties: InMemoryEntity & FormationEnergyContributionsPropertySchemaMixin = {
17
+ get name() {
18
+ return this.requiredProp<FormationEnergyContributionsPropertySchema["name"]>("name");
19
+ },
20
+ set name(value: FormationEnergyContributionsPropertySchema["name"]) {
21
+ this.setProp("name", value);
22
+ },
23
+ get values() {
24
+ return this.requiredProp<FormationEnergyContributionsPropertySchema["values"]>(
25
+ "values",
26
+ );
27
+ },
28
+ set values(value: FormationEnergyContributionsPropertySchema["values"]) {
29
+ this.setProp("values", value);
30
+ },
31
+ };
32
+
33
+ Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
34
+ }
package/src/js/index.ts CHANGED
@@ -3,6 +3,7 @@ export { PropertyName, PropertyType } from "./settings";
3
3
  export { default as Property } from "./Property";
4
4
  export { default as MetaProperty } from "./MetaProperty";
5
5
  export { default as PseudopotentialMetaProperty } from "./meta_properties/PseudopotentialMetaProperty";
6
+ export { default as FormationEnergyContributionsProperty } from "./properties/array-of-objects/FormationEnergyContributionsProperty";
6
7
  export { default as FinalStructureProperty } from "./properties/non-scalar/FinalStructureProperty";
7
8
  export { default as BandGapsProperty } from "./properties/non-scalar/BandGapsProperty";
8
9
  export { default as IsRelaxedProperty } from "./properties/non-scalar/IsRelaxedProperty";
@@ -0,0 +1,27 @@
1
+ import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
+ import type { FormationEnergyContributionsPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+
4
+ import {
5
+ FormationEnergyContributionsPropertySchemaMixin,
6
+ formationEnergyContributionsPropertySchemaMixin,
7
+ } from "../../generated/FormationEnergyContributionsPropertySchemaMixin";
8
+ import Property from "../../Property";
9
+ import { PropertyName, PropertyType } from "../../settings";
10
+
11
+ type Schema = FormationEnergyContributionsPropertySchema;
12
+
13
+ type Base = typeof Property<Schema> & Constructor<FormationEnergyContributionsPropertySchemaMixin>;
14
+
15
+ const PropertyBase = Property as Base;
16
+
17
+ export default class FormationEnergyContributionsProperty extends PropertyBase implements Schema {
18
+ static readonly propertyType = PropertyType.array_of_objects;
19
+
20
+ static readonly propertyName = PropertyName.formation_energy_contributions;
21
+
22
+ constructor(config: Omit<Schema, "name">) {
23
+ super({ ...config, name: FormationEnergyContributionsProperty.propertyName });
24
+ }
25
+ }
26
+
27
+ formationEnergyContributionsPropertySchemaMixin(FormationEnergyContributionsProperty.prototype);
@@ -10,6 +10,7 @@ export enum PropertyType {
10
10
  // non-scalar subtypes
11
11
  tensor = "tensor",
12
12
  object = "object",
13
+ array_of_objects = "array-of-objects",
13
14
  }
14
15
 
15
16
  export enum PropertyName {
@@ -27,6 +28,7 @@ export enum PropertyName {
27
28
  thermal_correction_to_energy = "thermal_correction_to_energy",
28
29
  thermal_correction_to_enthalpy = "thermal_correction_to_enthalpy",
29
30
  total_energy_contributions = "total_energy_contributions",
31
+ formation_energy_contributions = "formation_energy_contributions",
30
32
  atomic_forces = "atomic_forces",
31
33
  atomic_constraints = "atomic_constraints",
32
34
  stress_tensor = "stress_tensor",