@mat3ra/prode 2026.2.25-0 → 2026.3.25-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.
@@ -23,7 +23,9 @@ import WavefunctionAmplitudeProperty from "./properties/non-scalar/WavefunctionA
23
23
  import WorkflowProperty from "./properties/non-scalar/WorkflowProperty";
24
24
  import TotalEnergyContributionsProperty from "./properties/object/TotalEnergyContributionsProperty";
25
25
  import FermiEnergyProperty from "./properties/scalar/FermiEnergyProperty";
26
+ import HOMOEnergyProperty from "./properties/scalar/HOMOEnergyProperty";
26
27
  import IonizationPotentialElementalProperty from "./properties/scalar/IonizationPotentialElementalProperty";
28
+ import LUMOEnergyProperty from "./properties/scalar/LUMOEnergyProperty";
27
29
  import PressureProperty from "./properties/scalar/PressureProperty";
28
30
  import ReactionEnergyBarrierProperty from "./properties/scalar/ReactionEnergyBarrierProperty";
29
31
  import SurfaceEnergyProperty from "./properties/scalar/SurfaceEnergyProperty";
@@ -48,7 +50,7 @@ export default class PropertyFactory {
48
50
  static getScalarPropertyNames(): PropertyName[];
49
51
  static getNonScalarPropertyNames(): PropertyName[];
50
52
  private static filterPropertyNames;
51
- 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 | IonizationPotentialElementalProperty | PressureProperty | ReactionEnergyBarrierProperty | SurfaceEnergyProperty | TotalEnergyProperty | TotalForcesProperty | ValenceBandOffsetProperty | ZeroPointEnergyProperty | AtomicForcesProperty | MagneticMomentsProperty | StressTensorProperty;
53
+ 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 | HOMOEnergyProperty | IonizationPotentialElementalProperty | LUMOEnergyProperty | PressureProperty | ReactionEnergyBarrierProperty | SurfaceEnergyProperty | TotalEnergyProperty | TotalForcesProperty | ValenceBandOffsetProperty | ZeroPointEnergyProperty | AtomicForcesProperty | MagneticMomentsProperty | StressTensorProperty;
52
54
  static createMetaProperty(config: AnyMetaProperty): MetaProperty;
53
55
  static createProtoProperty(config: AnyProtoProperty): AtomicConstraintsProperty | BoundaryConditionsProperty;
54
56
  }
@@ -27,7 +27,9 @@ const WavefunctionAmplitudeProperty_1 = __importDefault(require("./properties/no
27
27
  const WorkflowProperty_1 = __importDefault(require("./properties/non-scalar/WorkflowProperty"));
28
28
  const TotalEnergyContributionsProperty_1 = __importDefault(require("./properties/object/TotalEnergyContributionsProperty"));
29
29
  const FermiEnergyProperty_1 = __importDefault(require("./properties/scalar/FermiEnergyProperty"));
30
+ const HOMOEnergyProperty_1 = __importDefault(require("./properties/scalar/HOMOEnergyProperty"));
30
31
  const IonizationPotentialElementalProperty_1 = __importDefault(require("./properties/scalar/IonizationPotentialElementalProperty"));
32
+ const LUMOEnergyProperty_1 = __importDefault(require("./properties/scalar/LUMOEnergyProperty"));
31
33
  const PressureProperty_1 = __importDefault(require("./properties/scalar/PressureProperty"));
32
34
  const ReactionEnergyBarrierProperty_1 = __importDefault(require("./properties/scalar/ReactionEnergyBarrierProperty"));
33
35
  const SurfaceEnergyProperty_1 = __importDefault(require("./properties/scalar/SurfaceEnergyProperty"));
@@ -45,6 +47,8 @@ const PROPERTY_CLASS_MAP = {
45
47
  [PressureProperty_1.default.propertyName]: PressureProperty_1.default,
46
48
  [TotalForceProperty_1.default.propertyName]: TotalForceProperty_1.default,
47
49
  [TotalEnergyProperty_1.default.propertyName]: TotalEnergyProperty_1.default,
50
+ [HOMOEnergyProperty_1.default.propertyName]: HOMOEnergyProperty_1.default,
51
+ [LUMOEnergyProperty_1.default.propertyName]: LUMOEnergyProperty_1.default,
48
52
  [SurfaceEnergyProperty_1.default.propertyName]: SurfaceEnergyProperty_1.default,
49
53
  [ConvergenceElectronicProperty_1.default.propertyName]: ConvergenceElectronicProperty_1.default,
50
54
  [ConvergenceIonicProperty_1.default.propertyName]: ConvergenceIonicProperty_1.default,
@@ -0,0 +1,5 @@
1
+ import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
+ import type { HOMOEnergyPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+ export type HOMOEnergyPropertySchemaMixin = Omit<HOMOEnergyPropertySchema, "_id" | "slug" | "systemName" | "schemaVersion">;
4
+ export type HOMOEnergyPropertyInMemoryEntity = InMemoryEntity & HOMOEnergyPropertySchemaMixin;
5
+ export declare function hOMOEnergyPropertySchemaMixin(item: InMemoryEntity): void;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hOMOEnergyPropertySchemaMixin = hOMOEnergyPropertySchemaMixin;
4
+ function hOMOEnergyPropertySchemaMixin(item) {
5
+ // @ts-expect-error
6
+ const properties = {
7
+ get name() {
8
+ return this.requiredProp("name");
9
+ },
10
+ get units() {
11
+ return this.requiredProp("units");
12
+ },
13
+ get value() {
14
+ return this.requiredProp("value");
15
+ },
16
+ };
17
+ Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
18
+ }
@@ -0,0 +1,5 @@
1
+ import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
+ import type { LUMOEnergyPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+ export type LUMOEnergyPropertySchemaMixin = Omit<LUMOEnergyPropertySchema, "_id" | "slug" | "systemName" | "schemaVersion">;
4
+ export type LUMOEnergyPropertyInMemoryEntity = InMemoryEntity & LUMOEnergyPropertySchemaMixin;
5
+ export declare function lUMOEnergyPropertySchemaMixin(item: InMemoryEntity): void;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lUMOEnergyPropertySchemaMixin = lUMOEnergyPropertySchemaMixin;
4
+ function lUMOEnergyPropertySchemaMixin(item) {
5
+ // @ts-expect-error
6
+ const properties = {
7
+ get name() {
8
+ return this.requiredProp("name");
9
+ },
10
+ get units() {
11
+ return this.requiredProp("units");
12
+ },
13
+ get value() {
14
+ return this.requiredProp("value");
15
+ },
16
+ };
17
+ Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
18
+ }
@@ -10,6 +10,8 @@ export { default as PressureProperty } from "./properties/scalar/PressurePropert
10
10
  export { default as ReactionEnergyBarrierProperty } from "./properties/scalar/ReactionEnergyBarrierProperty";
11
11
  export { default as SurfaceEnergyProperty } from "./properties/scalar/SurfaceEnergyProperty";
12
12
  export { default as TotalEnergyProperty } from "./properties/scalar/TotalEnergyProperty";
13
+ export { default as HOMOEnergyProperty } from "./properties/scalar/HOMOEnergyProperty";
14
+ export { default as LUMOEnergyProperty } from "./properties/scalar/LUMOEnergyProperty";
13
15
  export { default as BandStructureProperty } from "./properties/non-scalar/BandStructureProperty";
14
16
  export { default as ChargeDensityProfileProperty } from "./properties/non-scalar/ChargeDensityProfileProperty";
15
17
  export { default as PotentialProfileProperty } from "./properties/non-scalar/PotentialProfileProperty";
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.metaPropertyHolderMixin = exports.propertyHolderMixin = exports.protoPropertyHolderMixin = exports.ReactionEnergyProfileProperty = exports.WavefunctionAmplitudeProperty = exports.PotentialProfileProperty = exports.ChargeDensityProfileProperty = exports.BandStructureProperty = exports.TotalEnergyProperty = exports.SurfaceEnergyProperty = 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.metaPropertyHolderMixin = exports.propertyHolderMixin = exports.protoPropertyHolderMixin = exports.ReactionEnergyProfileProperty = exports.WavefunctionAmplitudeProperty = exports.PotentialProfileProperty = exports.ChargeDensityProfileProperty = exports.BandStructureProperty = exports.LUMOEnergyProperty = exports.HOMOEnergyProperty = exports.TotalEnergyProperty = exports.SurfaceEnergyProperty = exports.ReactionEnergyBarrierProperty = exports.PressureProperty = exports.IsRelaxedProperty = exports.BandGapsProperty = exports.FinalStructureProperty = 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");
@@ -43,6 +43,10 @@ var SurfaceEnergyProperty_1 = require("./properties/scalar/SurfaceEnergyProperty
43
43
  Object.defineProperty(exports, "SurfaceEnergyProperty", { enumerable: true, get: function () { return __importDefault(SurfaceEnergyProperty_1).default; } });
44
44
  var TotalEnergyProperty_1 = require("./properties/scalar/TotalEnergyProperty");
45
45
  Object.defineProperty(exports, "TotalEnergyProperty", { enumerable: true, get: function () { return __importDefault(TotalEnergyProperty_1).default; } });
46
+ var HOMOEnergyProperty_1 = require("./properties/scalar/HOMOEnergyProperty");
47
+ Object.defineProperty(exports, "HOMOEnergyProperty", { enumerable: true, get: function () { return __importDefault(HOMOEnergyProperty_1).default; } });
48
+ var LUMOEnergyProperty_1 = require("./properties/scalar/LUMOEnergyProperty");
49
+ Object.defineProperty(exports, "LUMOEnergyProperty", { enumerable: true, get: function () { return __importDefault(LUMOEnergyProperty_1).default; } });
46
50
  var BandStructureProperty_1 = require("./properties/non-scalar/BandStructureProperty");
47
51
  Object.defineProperty(exports, "BandStructureProperty", { enumerable: true, get: function () { return __importDefault(BandStructureProperty_1).default; } });
48
52
  var ChargeDensityProfileProperty_1 = require("./properties/non-scalar/ChargeDensityProfileProperty");
@@ -27,7 +27,7 @@ export declare class BandStructureConfig extends HighChartsConfig {
27
27
  });
28
28
  cleanXDataArray(rawData?: XDataArray): XDataArrayNested;
29
29
  calculatePointsDistance(listOfPoints?: XDataArrayNested): number[];
30
- findSymmetryPointIndex(xDataArray: XDataArrayNested, point: number[]): number;
30
+ findSymmetryPointIndex(xDataArray: XDataArrayNested, point: number[], tolerance?: number): number;
31
31
  plotXLines(): PlotLines[];
32
32
  plotXLineAtPoint({ point, distance }: {
33
33
  point: string;
@@ -53,8 +53,8 @@ class BandStructureConfig extends highcharts_1.HighChartsConfig {
53
53
  });
54
54
  }
55
55
  // find index of a point inside an array of points
56
- findSymmetryPointIndex(xDataArray, point) {
57
- return xDataArray.findIndex((p) => math_1.math.vDist(p, point) === 0);
56
+ findSymmetryPointIndex(xDataArray, point, tolerance = 10 ** -exports._POINT_COORDINATES_PRECISION_) {
57
+ return xDataArray.findIndex((p) => math_1.math.vEqualWithTolerance(p, point, tolerance));
58
58
  }
59
59
  // create config for vertical lines at high symmetry points
60
60
  plotXLines() {
@@ -0,0 +1,15 @@
1
+ import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
+ import type { HOMOEnergyPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+ import { HOMOEnergyPropertySchemaMixin } from "../../generated/HOMOEnergyPropertySchemaMixin";
4
+ import Property from "../../Property";
5
+ import { PropertyName, PropertyType } from "../../settings";
6
+ type Schema = HOMOEnergyPropertySchema;
7
+ type Base = typeof Property<Schema> & Constructor<HOMOEnergyPropertySchemaMixin>;
8
+ declare const HOMOEnergyProperty_base: Base;
9
+ export default class HOMOEnergyProperty extends HOMOEnergyProperty_base implements Schema {
10
+ static readonly isRefined = true;
11
+ static readonly propertyName = PropertyName.homo_energy;
12
+ static readonly propertyType = PropertyType.scalar;
13
+ constructor(config: Omit<Schema, "name">);
14
+ }
15
+ 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 HOMOEnergyPropertySchemaMixin_1 = require("../../generated/HOMOEnergyPropertySchemaMixin");
7
+ const Property_1 = __importDefault(require("../../Property"));
8
+ const settings_1 = require("../../settings");
9
+ class HOMOEnergyProperty extends Property_1.default {
10
+ constructor(config) {
11
+ super({ ...config, name: HOMOEnergyProperty.propertyName });
12
+ }
13
+ }
14
+ HOMOEnergyProperty.isRefined = true;
15
+ HOMOEnergyProperty.propertyName = settings_1.PropertyName.homo_energy;
16
+ HOMOEnergyProperty.propertyType = settings_1.PropertyType.scalar;
17
+ exports.default = HOMOEnergyProperty;
18
+ (0, HOMOEnergyPropertySchemaMixin_1.hOMOEnergyPropertySchemaMixin)(HOMOEnergyProperty.prototype);
@@ -0,0 +1,15 @@
1
+ import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
+ import type { LUMOEnergyPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+ import { LUMOEnergyPropertySchemaMixin } from "../../generated/LUMOEnergyPropertySchemaMixin";
4
+ import Property from "../../Property";
5
+ import { PropertyName, PropertyType } from "../../settings";
6
+ type Schema = LUMOEnergyPropertySchema;
7
+ type Base = typeof Property<Schema> & Constructor<LUMOEnergyPropertySchemaMixin>;
8
+ declare const LUMOEnergyProperty_base: Base;
9
+ export default class LUMOEnergyProperty extends LUMOEnergyProperty_base implements Schema {
10
+ static readonly isRefined = true;
11
+ static readonly propertyName = PropertyName.lumo_energy;
12
+ static readonly propertyType = PropertyType.scalar;
13
+ constructor(config: Omit<Schema, "name">);
14
+ }
15
+ 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 LUMOEnergyPropertySchemaMixin_1 = require("../../generated/LUMOEnergyPropertySchemaMixin");
7
+ const Property_1 = __importDefault(require("../../Property"));
8
+ const settings_1 = require("../../settings");
9
+ class LUMOEnergyProperty extends Property_1.default {
10
+ constructor(config) {
11
+ super({ ...config, name: LUMOEnergyProperty.propertyName });
12
+ }
13
+ }
14
+ LUMOEnergyProperty.isRefined = true;
15
+ LUMOEnergyProperty.propertyName = settings_1.PropertyName.lumo_energy;
16
+ LUMOEnergyProperty.propertyType = settings_1.PropertyType.scalar;
17
+ exports.default = LUMOEnergyProperty;
18
+ (0, LUMOEnergyPropertySchemaMixin_1.lUMOEnergyPropertySchemaMixin)(LUMOEnergyProperty.prototype);
@@ -12,6 +12,8 @@ export declare enum PropertyName {
12
12
  pressure = "pressure",
13
13
  total_force = "total_force",
14
14
  total_energy = "total_energy",
15
+ homo_energy = "homo_energy",
16
+ lumo_energy = "lumo_energy",
15
17
  surface_energy = "surface_energy",
16
18
  convergence_electronic = "convergence_electronic",
17
19
  convergence_ionic = "convergence_ionic",
@@ -20,6 +20,8 @@ var PropertyName;
20
20
  PropertyName["pressure"] = "pressure";
21
21
  PropertyName["total_force"] = "total_force";
22
22
  PropertyName["total_energy"] = "total_energy";
23
+ PropertyName["homo_energy"] = "homo_energy";
24
+ PropertyName["lumo_energy"] = "lumo_energy";
23
25
  PropertyName["surface_energy"] = "surface_energy";
24
26
  PropertyName["convergence_electronic"] = "convergence_electronic";
25
27
  PropertyName["convergence_ionic"] = "convergence_ionic";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mat3ra/prode",
3
- "version": "2026.2.25-0",
3
+ "version": "2026.3.25-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": "2025.10.8-0",
55
- "@mat3ra/esse": "2026.1.23-0",
55
+ "@mat3ra/esse": "2026.3.25-0",
56
56
  "@mat3ra/made": "2025.10.7-0",
57
57
  "@mat3ra/tsconfig": "2024.6.3-0",
58
58
  "@typescript-eslint/eslint-plugin": "^5.9.1",
@@ -30,7 +30,9 @@ import WavefunctionAmplitudeProperty from "./properties/non-scalar/WavefunctionA
30
30
  import WorkflowProperty from "./properties/non-scalar/WorkflowProperty";
31
31
  import TotalEnergyContributionsProperty from "./properties/object/TotalEnergyContributionsProperty";
32
32
  import FermiEnergyProperty from "./properties/scalar/FermiEnergyProperty";
33
+ import HOMOEnergyProperty from "./properties/scalar/HOMOEnergyProperty";
33
34
  import IonizationPotentialElementalProperty from "./properties/scalar/IonizationPotentialElementalProperty";
35
+ import LUMOEnergyProperty from "./properties/scalar/LUMOEnergyProperty";
34
36
  import PressureProperty from "./properties/scalar/PressureProperty";
35
37
  import ReactionEnergyBarrierProperty from "./properties/scalar/ReactionEnergyBarrierProperty";
36
38
  import SurfaceEnergyProperty from "./properties/scalar/SurfaceEnergyProperty";
@@ -55,6 +57,8 @@ type PropertyClassMap = {
55
57
  | Constructor<PressureProperty>
56
58
  | Constructor<TotalForcesProperty>
57
59
  | Constructor<TotalEnergyProperty>
60
+ | Constructor<HOMOEnergyProperty>
61
+ | Constructor<LUMOEnergyProperty>
58
62
  | Constructor<SurfaceEnergyProperty>
59
63
  | Constructor<ConvergenceElectronicProperty>
60
64
  | Constructor<ConvergenceIonicProperty>
@@ -102,6 +106,8 @@ const PROPERTY_CLASS_MAP: PropertyClassMap = {
102
106
  [PressureProperty.propertyName]: PressureProperty,
103
107
  [TotalForcesProperty.propertyName]: TotalForcesProperty,
104
108
  [TotalEnergyProperty.propertyName]: TotalEnergyProperty,
109
+ [HOMOEnergyProperty.propertyName]: HOMOEnergyProperty,
110
+ [LUMOEnergyProperty.propertyName]: LUMOEnergyProperty,
105
111
  [SurfaceEnergyProperty.propertyName]: SurfaceEnergyProperty,
106
112
  [ConvergenceElectronicProperty.propertyName]: ConvergenceElectronicProperty,
107
113
  [ConvergenceIonicProperty.propertyName]: ConvergenceIonicProperty,
@@ -0,0 +1,26 @@
1
+ import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
+ import type { HOMOEnergyPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+
4
+ export type HOMOEnergyPropertySchemaMixin = Omit<
5
+ HOMOEnergyPropertySchema,
6
+ "_id" | "slug" | "systemName" | "schemaVersion"
7
+ >;
8
+
9
+ export type HOMOEnergyPropertyInMemoryEntity = InMemoryEntity & HOMOEnergyPropertySchemaMixin;
10
+
11
+ export function hOMOEnergyPropertySchemaMixin(item: InMemoryEntity) {
12
+ // @ts-expect-error
13
+ const properties: InMemoryEntity & HOMOEnergyPropertySchemaMixin = {
14
+ get name() {
15
+ return this.requiredProp<HOMOEnergyPropertySchema["name"]>("name");
16
+ },
17
+ get units() {
18
+ return this.requiredProp<HOMOEnergyPropertySchema["units"]>("units");
19
+ },
20
+ get value() {
21
+ return this.requiredProp<HOMOEnergyPropertySchema["value"]>("value");
22
+ },
23
+ };
24
+
25
+ Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
26
+ }
@@ -0,0 +1,26 @@
1
+ import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
+ import type { LUMOEnergyPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+
4
+ export type LUMOEnergyPropertySchemaMixin = Omit<
5
+ LUMOEnergyPropertySchema,
6
+ "_id" | "slug" | "systemName" | "schemaVersion"
7
+ >;
8
+
9
+ export type LUMOEnergyPropertyInMemoryEntity = InMemoryEntity & LUMOEnergyPropertySchemaMixin;
10
+
11
+ export function lUMOEnergyPropertySchemaMixin(item: InMemoryEntity) {
12
+ // @ts-expect-error
13
+ const properties: InMemoryEntity & LUMOEnergyPropertySchemaMixin = {
14
+ get name() {
15
+ return this.requiredProp<LUMOEnergyPropertySchema["name"]>("name");
16
+ },
17
+ get units() {
18
+ return this.requiredProp<LUMOEnergyPropertySchema["units"]>("units");
19
+ },
20
+ get value() {
21
+ return this.requiredProp<LUMOEnergyPropertySchema["value"]>("value");
22
+ },
23
+ };
24
+
25
+ Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
26
+ }
package/src/js/index.ts CHANGED
@@ -10,6 +10,8 @@ export { default as PressureProperty } from "./properties/scalar/PressurePropert
10
10
  export { default as ReactionEnergyBarrierProperty } from "./properties/scalar/ReactionEnergyBarrierProperty";
11
11
  export { default as SurfaceEnergyProperty } from "./properties/scalar/SurfaceEnergyProperty";
12
12
  export { default as TotalEnergyProperty } from "./properties/scalar/TotalEnergyProperty";
13
+ export { default as HOMOEnergyProperty } from "./properties/scalar/HOMOEnergyProperty";
14
+ export { default as LUMOEnergyProperty } from "./properties/scalar/LUMOEnergyProperty";
13
15
  export { default as BandStructureProperty } from "./properties/non-scalar/BandStructureProperty";
14
16
  export { default as ChargeDensityProfileProperty } from "./properties/non-scalar/ChargeDensityProfileProperty";
15
17
  export { default as PotentialProfileProperty } from "./properties/non-scalar/PotentialProfileProperty";
@@ -92,8 +92,12 @@ export class BandStructureConfig extends HighChartsConfig {
92
92
  }
93
93
 
94
94
  // find index of a point inside an array of points
95
- findSymmetryPointIndex(xDataArray: XDataArrayNested, point: number[]) {
96
- return xDataArray.findIndex((p) => codeJSMath.vDist(p, point) === 0);
95
+ findSymmetryPointIndex(
96
+ xDataArray: XDataArrayNested,
97
+ point: number[],
98
+ tolerance = 10 ** -_POINT_COORDINATES_PRECISION_,
99
+ ): number {
100
+ return xDataArray.findIndex((p) => codeJSMath.vEqualWithTolerance(p, point, tolerance));
97
101
  }
98
102
 
99
103
  // create config for vertical lines at high symmetry points
@@ -0,0 +1,28 @@
1
+ import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
+ import type { HOMOEnergyPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+
4
+ import {
5
+ HOMOEnergyPropertySchemaMixin,
6
+ // The generated helper lowercases only the first character of leading acronyms.
7
+ hOMOEnergyPropertySchemaMixin as homoEnergyPropertySchemaMixin,
8
+ } from "../../generated/HOMOEnergyPropertySchemaMixin";
9
+ import Property from "../../Property";
10
+ import { PropertyName, PropertyType } from "../../settings";
11
+
12
+ type Schema = HOMOEnergyPropertySchema;
13
+
14
+ type Base = typeof Property<Schema> & Constructor<HOMOEnergyPropertySchemaMixin>;
15
+
16
+ export default class HOMOEnergyProperty extends (Property as Base) implements Schema {
17
+ static readonly isRefined = true;
18
+
19
+ static readonly propertyName = PropertyName.homo_energy;
20
+
21
+ static readonly propertyType = PropertyType.scalar;
22
+
23
+ constructor(config: Omit<Schema, "name">) {
24
+ super({ ...config, name: HOMOEnergyProperty.propertyName });
25
+ }
26
+ }
27
+
28
+ homoEnergyPropertySchemaMixin(HOMOEnergyProperty.prototype);
@@ -0,0 +1,28 @@
1
+ import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
+ import type { LUMOEnergyPropertySchema } from "@mat3ra/esse/dist/js/types";
3
+
4
+ import {
5
+ LUMOEnergyPropertySchemaMixin,
6
+ // The generated helper lowercases only the first character of leading acronyms.
7
+ lUMOEnergyPropertySchemaMixin as lumoEnergyPropertySchemaMixin,
8
+ } from "../../generated/LUMOEnergyPropertySchemaMixin";
9
+ import Property from "../../Property";
10
+ import { PropertyName, PropertyType } from "../../settings";
11
+
12
+ type Schema = LUMOEnergyPropertySchema;
13
+
14
+ type Base = typeof Property<Schema> & Constructor<LUMOEnergyPropertySchemaMixin>;
15
+
16
+ export default class LUMOEnergyProperty extends (Property as Base) implements Schema {
17
+ static readonly isRefined = true;
18
+
19
+ static readonly propertyName = PropertyName.lumo_energy;
20
+
21
+ static readonly propertyType = PropertyType.scalar;
22
+
23
+ constructor(config: Omit<Schema, "name">) {
24
+ super({ ...config, name: LUMOEnergyProperty.propertyName });
25
+ }
26
+ }
27
+
28
+ lumoEnergyPropertySchemaMixin(LUMOEnergyProperty.prototype);
@@ -16,6 +16,8 @@ export enum PropertyName {
16
16
  pressure = "pressure",
17
17
  total_force = "total_force",
18
18
  total_energy = "total_energy",
19
+ homo_energy = "homo_energy",
20
+ lumo_energy = "lumo_energy",
19
21
  surface_energy = "surface_energy",
20
22
  convergence_electronic = "convergence_electronic",
21
23
  convergence_ionic = "convergence_ionic",