@mat3ra/prode 2025.11.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.
- package/.babelrc +17 -0
- package/LICENSE.md +15 -0
- package/README.md +93 -0
- package/dist/js/MetaProperty.d.ts +3 -0
- package/dist/js/MetaProperty.js +9 -0
- package/dist/js/Property.d.ts +25 -0
- package/dist/js/Property.js +25 -0
- package/dist/js/PropertyFactory.d.ts +54 -0
- package/dist/js/PropertyFactory.js +137 -0
- package/dist/js/ProtoProperty.d.ts +5 -0
- package/dist/js/ProtoProperty.js +11 -0
- package/dist/js/charts/highcharts.d.ts +57 -0
- package/dist/js/charts/highcharts.js +96 -0
- package/dist/js/generated/AtomicConstraintsPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/AtomicConstraintsPropertySchemaMixin.js +15 -0
- package/dist/js/generated/AtomicForcesPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/AtomicForcesPropertySchemaMixin.js +18 -0
- package/dist/js/generated/AveragePotentialProfilePropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/AveragePotentialProfilePropertySchemaMixin.js +24 -0
- package/dist/js/generated/BandGapsPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/BandGapsPropertySchemaMixin.js +18 -0
- package/dist/js/generated/BandStructurePropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/BandStructurePropertySchemaMixin.js +27 -0
- package/dist/js/generated/BoundaryConditionsPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/BoundaryConditionsPropertySchemaMixin.js +18 -0
- package/dist/js/generated/ChargeDensityProfilePropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/ChargeDensityProfilePropertySchemaMixin.js +24 -0
- package/dist/js/generated/ConvergenceElectronicPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/ConvergenceElectronicPropertySchemaMixin.js +18 -0
- package/dist/js/generated/ConvergenceIonicPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/ConvergenceIonicPropertySchemaMixin.js +21 -0
- package/dist/js/generated/DensityOfStatesPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/DensityOfStatesPropertySchemaMixin.js +27 -0
- package/dist/js/generated/DielectricTensorPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/DielectricTensorPropertySchemaMixin.js +15 -0
- package/dist/js/generated/FermiEnergyPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/FermiEnergyPropertySchemaMixin.js +18 -0
- package/dist/js/generated/FileContentPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/FileContentPropertySchemaMixin.js +24 -0
- package/dist/js/generated/FinalStructurePropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/FinalStructurePropertySchemaMixin.js +18 -0
- package/dist/js/generated/HubbardUPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/HubbardUPropertySchemaMixin.js +18 -0
- package/dist/js/generated/HubbardVNNPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/HubbardVNNPropertySchemaMixin.js +18 -0
- package/dist/js/generated/HubbardVPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/HubbardVPropertySchemaMixin.js +18 -0
- package/dist/js/generated/IonizationPotentialElementalPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/IonizationPotentialElementalPropertySchemaMixin.js +18 -0
- package/dist/js/generated/IsRelaxedPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/IsRelaxedPropertySchemaMixin.js +18 -0
- package/dist/js/generated/JupyterNotebookEndpointPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/JupyterNotebookEndpointPropertySchemaMixin.js +21 -0
- package/dist/js/generated/MagneticMomentsPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/MagneticMomentsPropertySchemaMixin.js +18 -0
- package/dist/js/generated/MetaPropertyHolderSchemaMixin.d.ts +5 -0
- package/dist/js/generated/MetaPropertyHolderSchemaMixin.js +15 -0
- package/dist/js/generated/PhononDOSPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/PhononDOSPropertySchemaMixin.js +24 -0
- package/dist/js/generated/PhononDispersionsPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/PhononDispersionsPropertySchemaMixin.js +24 -0
- package/dist/js/generated/PotentialProfilePropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/PotentialProfilePropertySchemaMixin.js +24 -0
- package/dist/js/generated/PressurePropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/PressurePropertySchemaMixin.js +18 -0
- package/dist/js/generated/PropertyHolderSchemaMixin.d.ts +5 -0
- package/dist/js/generated/PropertyHolderSchemaMixin.js +30 -0
- package/dist/js/generated/ProtoPropertyHolderSchemaMixin.d.ts +5 -0
- package/dist/js/generated/ProtoPropertyHolderSchemaMixin.js +15 -0
- package/dist/js/generated/PseudopotentialMetaPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/PseudopotentialMetaPropertySchemaMixin.js +45 -0
- package/dist/js/generated/ReactionEnergyBarrierPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/ReactionEnergyBarrierPropertySchemaMixin.js +18 -0
- package/dist/js/generated/ReactionEnergyProfilePropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/ReactionEnergyProfilePropertySchemaMixin.js +24 -0
- package/dist/js/generated/StressTensorPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/StressTensorPropertySchemaMixin.js +18 -0
- package/dist/js/generated/SurfaceEnergyPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/SurfaceEnergyPropertySchemaMixin.js +18 -0
- package/dist/js/generated/TotalEnergyContributionsPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/TotalEnergyContributionsPropertySchemaMixin.js +57 -0
- package/dist/js/generated/TotalEnergyPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/TotalEnergyPropertySchemaMixin.js +18 -0
- package/dist/js/generated/TotalForcePropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/TotalForcePropertySchemaMixin.js +18 -0
- package/dist/js/generated/ValenceBandOffsetPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/ValenceBandOffsetPropertySchemaMixin.js +18 -0
- package/dist/js/generated/WorkflowPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/WorkflowPropertySchemaMixin.js +33 -0
- package/dist/js/generated/ZeroPointEnergyPropertySchemaMixin.d.ts +5 -0
- package/dist/js/generated/ZeroPointEnergyPropertySchemaMixin.js +18 -0
- package/dist/js/holders/MetaPropertyHolder.d.ts +10 -0
- package/dist/js/holders/MetaPropertyHolder.js +12 -0
- package/dist/js/holders/PropertyHolder.d.ts +10 -0
- package/dist/js/holders/PropertyHolder.js +12 -0
- package/dist/js/holders/ProtoPropertyHolder.d.ts +10 -0
- package/dist/js/holders/ProtoPropertyHolder.js +12 -0
- package/dist/js/holders/mixins/MetaPropertyHolderMixin.d.ts +12 -0
- package/dist/js/holders/mixins/MetaPropertyHolderMixin.js +18 -0
- package/dist/js/holders/mixins/PropertyHolderMixin.d.ts +16 -0
- package/dist/js/holders/mixins/PropertyHolderMixin.js +37 -0
- package/dist/js/holders/mixins/ProtoPropertyHolderMixin.d.ts +12 -0
- package/dist/js/holders/mixins/ProtoPropertyHolderMixin.js +18 -0
- package/dist/js/index.d.ts +20 -0
- package/dist/js/index.js +60 -0
- package/dist/js/meta_properties/PseudopotentialMetaProperty.d.ts +78 -0
- package/dist/js/meta_properties/PseudopotentialMetaProperty.js +157 -0
- package/dist/js/properties/include/mixins/2d_plot.d.ts +27 -0
- package/dist/js/properties/include/mixins/2d_plot.js +79 -0
- package/dist/js/properties/non-scalar/AveragePotentialProfileProperty.d.ts +38 -0
- package/dist/js/properties/non-scalar/AveragePotentialProfileProperty.js +54 -0
- package/dist/js/properties/non-scalar/BandGapsProperty.d.ts +59 -0
- package/dist/js/properties/non-scalar/BandGapsProperty.js +52 -0
- package/dist/js/properties/non-scalar/BandStructureProperty.d.ts +186 -0
- package/dist/js/properties/non-scalar/BandStructureProperty.js +218 -0
- package/dist/js/properties/non-scalar/ChargeDensityProfileProperty.d.ts +25 -0
- package/dist/js/properties/non-scalar/ChargeDensityProfileProperty.js +34 -0
- package/dist/js/properties/non-scalar/DensityOfStatesProperty.d.ts +145 -0
- package/dist/js/properties/non-scalar/DensityOfStatesProperty.js +126 -0
- package/dist/js/properties/non-scalar/DielectricTensorProperty.d.ts +49 -0
- package/dist/js/properties/non-scalar/DielectricTensorProperty.js +119 -0
- package/dist/js/properties/non-scalar/FileContentProperty.d.ts +15 -0
- package/dist/js/properties/non-scalar/FileContentProperty.js +18 -0
- package/dist/js/properties/non-scalar/FinalStructureProperty.d.ts +14 -0
- package/dist/js/properties/non-scalar/FinalStructureProperty.js +17 -0
- package/dist/js/properties/non-scalar/HubbardUProperty.d.ts +14 -0
- package/dist/js/properties/non-scalar/HubbardUProperty.js +17 -0
- package/dist/js/properties/non-scalar/HubbardVNNProperty.d.ts +14 -0
- package/dist/js/properties/non-scalar/HubbardVNNProperty.js +17 -0
- package/dist/js/properties/non-scalar/HubbardVProperty.d.ts +14 -0
- package/dist/js/properties/non-scalar/HubbardVProperty.js +17 -0
- package/dist/js/properties/non-scalar/IsRelaxedProperty.d.ts +15 -0
- package/dist/js/properties/non-scalar/IsRelaxedProperty.js +18 -0
- package/dist/js/properties/non-scalar/JupyterNotebookEndpointProperty.d.ts +14 -0
- package/dist/js/properties/non-scalar/JupyterNotebookEndpointProperty.js +17 -0
- package/dist/js/properties/non-scalar/PhononDOSProperty.d.ts +19 -0
- package/dist/js/properties/non-scalar/PhononDOSProperty.js +37 -0
- package/dist/js/properties/non-scalar/PhononDispersionsProperty.d.ts +21 -0
- package/dist/js/properties/non-scalar/PhononDispersionsProperty.js +28 -0
- package/dist/js/properties/non-scalar/PotentialProfileProperty.d.ts +38 -0
- package/dist/js/properties/non-scalar/PotentialProfileProperty.js +58 -0
- package/dist/js/properties/non-scalar/ReactionEnergyProfileProperty.d.ts +25 -0
- package/dist/js/properties/non-scalar/ReactionEnergyProfileProperty.js +34 -0
- package/dist/js/properties/non-scalar/WorkflowProperty.d.ts +14 -0
- package/dist/js/properties/non-scalar/WorkflowProperty.js +17 -0
- package/dist/js/properties/non-scalar/convergence/ConvergenceElectronicProperty.d.ts +17 -0
- package/dist/js/properties/non-scalar/convergence/ConvergenceElectronicProperty.js +63 -0
- package/dist/js/properties/non-scalar/convergence/ConvergenceIonicProperty.d.ts +17 -0
- package/dist/js/properties/non-scalar/convergence/ConvergenceIonicProperty.js +45 -0
- package/dist/js/properties/object/TotalEnergyContributionsProperty.d.ts +18 -0
- package/dist/js/properties/object/TotalEnergyContributionsProperty.js +20 -0
- package/dist/js/properties/scalar/FermiEnergyProperty.d.ts +14 -0
- package/dist/js/properties/scalar/FermiEnergyProperty.js +17 -0
- package/dist/js/properties/scalar/IonizationPotentialElementalProperty.d.ts +14 -0
- package/dist/js/properties/scalar/IonizationPotentialElementalProperty.js +17 -0
- package/dist/js/properties/scalar/PressureProperty.d.ts +15 -0
- package/dist/js/properties/scalar/PressureProperty.js +18 -0
- package/dist/js/properties/scalar/ReactionEnergyBarrierProperty.d.ts +15 -0
- package/dist/js/properties/scalar/ReactionEnergyBarrierProperty.js +18 -0
- package/dist/js/properties/scalar/SurfaceEnergyProperty.d.ts +15 -0
- package/dist/js/properties/scalar/SurfaceEnergyProperty.js +18 -0
- package/dist/js/properties/scalar/TotalEnergyProperty.d.ts +15 -0
- package/dist/js/properties/scalar/TotalEnergyProperty.js +18 -0
- package/dist/js/properties/scalar/TotalForceProperty.d.ts +14 -0
- package/dist/js/properties/scalar/TotalForceProperty.js +17 -0
- package/dist/js/properties/scalar/ValenceBandOffsetProperty.d.ts +15 -0
- package/dist/js/properties/scalar/ValenceBandOffsetProperty.js +18 -0
- package/dist/js/properties/scalar/ZeroPointEnergyProperty.d.ts +14 -0
- package/dist/js/properties/scalar/ZeroPointEnergyProperty.js +17 -0
- package/dist/js/properties/tensor/AtomicForcesProperty.d.ts +14 -0
- package/dist/js/properties/tensor/AtomicForcesProperty.js +17 -0
- package/dist/js/properties/tensor/MagneticMomentsProperty.d.ts +14 -0
- package/dist/js/properties/tensor/MagneticMomentsProperty.js +17 -0
- package/dist/js/properties/tensor/StressTensorProperty.d.ts +14 -0
- package/dist/js/properties/tensor/StressTensorProperty.js +17 -0
- package/dist/js/proto_properties/AtomicConstraintsProperty.d.ts +13 -0
- package/dist/js/proto_properties/AtomicConstraintsProperty.js +16 -0
- package/dist/js/proto_properties/BoundaryConditionsProperty.d.ts +13 -0
- package/dist/js/proto_properties/BoundaryConditionsProperty.js +16 -0
- package/dist/js/settings.d.ts +48 -0
- package/dist/js/settings.js +56 -0
- package/dist/js/types.d.ts +14 -0
- package/dist/js/types.js +2 -0
- package/package.json +101 -0
- package/src/js/MetaProperty.ts +3 -0
- package/src/js/Property.ts +49 -0
- package/src/js/PropertyFactory.ts +208 -0
- package/src/js/ProtoProperty.ts +6 -0
- package/src/js/charts/highcharts.ts +172 -0
- package/src/js/generated/AtomicConstraintsPropertySchemaMixin.ts +24 -0
- package/src/js/generated/AtomicForcesPropertySchemaMixin.ts +26 -0
- package/src/js/generated/AveragePotentialProfilePropertySchemaMixin.ts +37 -0
- package/src/js/generated/BandGapsPropertySchemaMixin.ts +26 -0
- package/src/js/generated/BandStructurePropertySchemaMixin.ts +35 -0
- package/src/js/generated/BoundaryConditionsPropertySchemaMixin.ts +27 -0
- package/src/js/generated/ChargeDensityProfilePropertySchemaMixin.ts +37 -0
- package/src/js/generated/ConvergenceElectronicPropertySchemaMixin.ts +27 -0
- package/src/js/generated/ConvergenceIonicPropertySchemaMixin.ts +30 -0
- package/src/js/generated/DensityOfStatesPropertySchemaMixin.ts +36 -0
- package/src/js/generated/DielectricTensorPropertySchemaMixin.ts +24 -0
- package/src/js/generated/FermiEnergyPropertySchemaMixin.ts +26 -0
- package/src/js/generated/FileContentPropertySchemaMixin.ts +32 -0
- package/src/js/generated/FinalStructurePropertySchemaMixin.ts +27 -0
- package/src/js/generated/HubbardUPropertySchemaMixin.ts +26 -0
- package/src/js/generated/HubbardVNNPropertySchemaMixin.ts +26 -0
- package/src/js/generated/HubbardVPropertySchemaMixin.ts +26 -0
- package/src/js/generated/IonizationPotentialElementalPropertySchemaMixin.ts +27 -0
- package/src/js/generated/IsRelaxedPropertySchemaMixin.ts +26 -0
- package/src/js/generated/JupyterNotebookEndpointPropertySchemaMixin.ts +30 -0
- package/src/js/generated/MagneticMomentsPropertySchemaMixin.ts +27 -0
- package/src/js/generated/MetaPropertyHolderSchemaMixin.ts +23 -0
- package/src/js/generated/PhononDOSPropertySchemaMixin.ts +36 -0
- package/src/js/generated/PhononDispersionsPropertySchemaMixin.ts +35 -0
- package/src/js/generated/PotentialProfilePropertySchemaMixin.ts +33 -0
- package/src/js/generated/PressurePropertySchemaMixin.ts +26 -0
- package/src/js/generated/PropertyHolderSchemaMixin.ts +38 -0
- package/src/js/generated/ProtoPropertyHolderSchemaMixin.ts +23 -0
- package/src/js/generated/PseudopotentialMetaPropertySchemaMixin.ts +54 -0
- package/src/js/generated/README.md +27 -0
- package/src/js/generated/ReactionEnergyBarrierPropertySchemaMixin.ts +27 -0
- package/src/js/generated/ReactionEnergyProfilePropertySchemaMixin.ts +37 -0
- package/src/js/generated/StressTensorPropertySchemaMixin.ts +26 -0
- package/src/js/generated/SurfaceEnergyPropertySchemaMixin.ts +26 -0
- package/src/js/generated/TotalEnergyContributionsPropertySchemaMixin.ts +80 -0
- package/src/js/generated/TotalEnergyPropertySchemaMixin.ts +26 -0
- package/src/js/generated/TotalForcePropertySchemaMixin.ts +26 -0
- package/src/js/generated/ValenceBandOffsetPropertySchemaMixin.ts +27 -0
- package/src/js/generated/WorkflowPropertySchemaMixin.ts +41 -0
- package/src/js/generated/ZeroPointEnergyPropertySchemaMixin.ts +27 -0
- package/src/js/holders/MetaPropertyHolder.ts +19 -0
- package/src/js/holders/PropertyHolder.ts +17 -0
- package/src/js/holders/ProtoPropertyHolder.ts +17 -0
- package/src/js/holders/mixins/MetaPropertyHolderMixin.ts +31 -0
- package/src/js/holders/mixins/PropertyHolderMixin.ts +55 -0
- package/src/js/holders/mixins/ProtoPropertyHolderMixin.ts +31 -0
- package/src/js/index.ts +21 -0
- package/src/js/meta_properties/PseudopotentialMetaProperty.ts +206 -0
- package/src/js/properties/include/mixins/2d_plot.ts +105 -0
- package/src/js/properties/non-scalar/AveragePotentialProfileProperty.ts +69 -0
- package/src/js/properties/non-scalar/BandGapsProperty.ts +65 -0
- package/src/js/properties/non-scalar/BandStructureProperty.ts +284 -0
- package/src/js/properties/non-scalar/ChargeDensityProfileProperty.ts +48 -0
- package/src/js/properties/non-scalar/DensityOfStatesProperty.ts +174 -0
- package/src/js/properties/non-scalar/DielectricTensorProperty.ts +153 -0
- package/src/js/properties/non-scalar/FileContentProperty.ts +27 -0
- package/src/js/properties/non-scalar/FinalStructureProperty.ts +25 -0
- package/src/js/properties/non-scalar/HubbardUProperty.ts +25 -0
- package/src/js/properties/non-scalar/HubbardVNNProperty.ts +25 -0
- package/src/js/properties/non-scalar/HubbardVProperty.ts +25 -0
- package/src/js/properties/non-scalar/IsRelaxedProperty.ts +27 -0
- package/src/js/properties/non-scalar/JupyterNotebookEndpointProperty.ts +26 -0
- package/src/js/properties/non-scalar/PhononDOSProperty.ts +57 -0
- package/src/js/properties/non-scalar/PhononDispersionsProperty.ts +46 -0
- package/src/js/properties/non-scalar/PotentialProfileProperty.ts +76 -0
- package/src/js/properties/non-scalar/ReactionEnergyProfileProperty.ts +48 -0
- package/src/js/properties/non-scalar/WorkflowProperty.ts +25 -0
- package/src/js/properties/non-scalar/convergence/ConvergenceElectronicProperty.ts +82 -0
- package/src/js/properties/non-scalar/convergence/ConvergenceIonicProperty.ts +62 -0
- package/src/js/properties/object/TotalEnergyContributionsProperty.ts +29 -0
- package/src/js/properties/scalar/FermiEnergyProperty.ts +25 -0
- package/src/js/properties/scalar/IonizationPotentialElementalProperty.ts +27 -0
- package/src/js/properties/scalar/PressureProperty.ts +27 -0
- package/src/js/properties/scalar/ReactionEnergyBarrierProperty.ts +29 -0
- package/src/js/properties/scalar/SurfaceEnergyProperty.ts +27 -0
- package/src/js/properties/scalar/TotalEnergyProperty.ts +27 -0
- package/src/js/properties/scalar/TotalForceProperty.ts +25 -0
- package/src/js/properties/scalar/ValenceBandOffsetProperty.ts +27 -0
- package/src/js/properties/scalar/ZeroPointEnergyProperty.ts +25 -0
- package/src/js/properties/tensor/AtomicForcesProperty.ts +27 -0
- package/src/js/properties/tensor/MagneticMomentsProperty.ts +27 -0
- package/src/js/properties/tensor/StressTensorProperty.ts +25 -0
- package/src/js/proto_properties/AtomicConstraintsProperty.ts +25 -0
- package/src/js/proto_properties/BoundaryConditionsProperty.ts +25 -0
- package/src/js/settings.ts +52 -0
- package/src/js/types.ts +24 -0
- package/tsconfig.json +3 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
|
|
2
|
+
import type { FileDataItem as Schema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
import uniqBy from "lodash/uniqBy";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
type PseudopotentialMetaPropertySchemaMixin,
|
|
7
|
+
pseudopotentialMetaPropertySchemaMixin,
|
|
8
|
+
} from "../generated/PseudopotentialMetaPropertySchemaMixin";
|
|
9
|
+
import MetaProperty from "../MetaProperty";
|
|
10
|
+
import { PropertyName, PropertyType } from "../settings";
|
|
11
|
+
|
|
12
|
+
type RawDataObject = {
|
|
13
|
+
path: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
enum CompatibleExchangeCorrelationKey {
|
|
17
|
+
hse06 = "hse06",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type Base = typeof MetaProperty & Constructor<PseudopotentialMetaPropertySchemaMixin>;
|
|
21
|
+
|
|
22
|
+
export default class PseudopotentialMetaProperty extends (MetaProperty as Base) implements Schema {
|
|
23
|
+
static readonly propertyName = PropertyName.pseudopotential;
|
|
24
|
+
|
|
25
|
+
static readonly propertyType = PropertyType.non_scalar;
|
|
26
|
+
|
|
27
|
+
static readonly compatibleExchangeCorrelation = {
|
|
28
|
+
hse06: ["pbe", "hse06"],
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare _json: Omit<Schema, "name">;
|
|
32
|
+
|
|
33
|
+
declare toJSON: () => Omit<Schema, "name">;
|
|
34
|
+
|
|
35
|
+
constructor(config: Omit<Schema, "name">) {
|
|
36
|
+
super({ ...config, name: PseudopotentialMetaProperty.propertyName });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
get isCustom() {
|
|
40
|
+
return this.source === "user";
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @summary Attempts filtering raw data by search text, split by "," into multiple regular expressions,
|
|
45
|
+
* splitting to multiple regexps allows to control the order of filtered items
|
|
46
|
+
* if raw data is not empty but filtered data is, returns first element of raw data (assumed to be default)
|
|
47
|
+
* @note Filters by path!
|
|
48
|
+
*/
|
|
49
|
+
static safelyFilterRawDataBySearchText(
|
|
50
|
+
rawData: PseudopotentialMetaProperty[],
|
|
51
|
+
searchText: string,
|
|
52
|
+
separator = ",",
|
|
53
|
+
) {
|
|
54
|
+
if (!searchText) return rawData;
|
|
55
|
+
const filteredData: PseudopotentialMetaProperty[] = [];
|
|
56
|
+
searchText.split(separator).forEach((txt) => {
|
|
57
|
+
const text = txt.trim(); // remove whitespace and do nothing if empty string
|
|
58
|
+
if (!text) return;
|
|
59
|
+
try {
|
|
60
|
+
const regexp = new RegExp(text);
|
|
61
|
+
const filteredData_ = rawData.filter((el) => el.path.match(regexp));
|
|
62
|
+
filteredData.push(...filteredData_);
|
|
63
|
+
} catch (e: unknown) {
|
|
64
|
+
if (e instanceof Error) {
|
|
65
|
+
console.error(e.message);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return filteredData.length ? filteredData : rawData.splice(0, 1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
static isCompatibleWithOther(
|
|
73
|
+
functional: string,
|
|
74
|
+
): functional is CompatibleExchangeCorrelationKey {
|
|
75
|
+
return Object.keys(this.compatibleExchangeCorrelation).includes(functional);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @summary Exclusive filter of raw data by all fields of the passed object
|
|
80
|
+
*/
|
|
81
|
+
static filterRawDataByExchangeCorrelation(
|
|
82
|
+
rawData: PseudopotentialMetaProperty[],
|
|
83
|
+
exchangeCorrelation: {
|
|
84
|
+
functional: string;
|
|
85
|
+
approximation: string;
|
|
86
|
+
},
|
|
87
|
+
) {
|
|
88
|
+
const { functional } = exchangeCorrelation;
|
|
89
|
+
|
|
90
|
+
return rawData.filter((item) => {
|
|
91
|
+
return this.isCompatibleWithOther(functional)
|
|
92
|
+
? this.compatibleExchangeCorrelation[functional].includes(
|
|
93
|
+
item.exchangeCorrelation?.functional || "",
|
|
94
|
+
)
|
|
95
|
+
: functional === item.exchangeCorrelation?.functional;
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// filter unique (assuming that path is always unique)
|
|
100
|
+
static filterUnique(array: PseudopotentialMetaProperty[]) {
|
|
101
|
+
return uniqBy(array, (item) => item.path);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// filter unique by apps (assuming that path is always unique)
|
|
105
|
+
static filterUniqueByAppName(array: PseudopotentialMetaProperty[], appName: string) {
|
|
106
|
+
return PseudopotentialMetaProperty.filterUnique(this.filterByAppName(array, appName));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
static filterRawDataByPath(rawData: RawDataObject[], pseudoPath = "") {
|
|
110
|
+
const regexp = new RegExp(pseudoPath);
|
|
111
|
+
return rawData.filter((el) => el.path.match(regexp));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
static filterByAppName(pseudos: PseudopotentialMetaProperty[], appName: string) {
|
|
115
|
+
return pseudos.filter((pseudo) => pseudo.apps.includes(appName));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
static filterByElements(pseudos: PseudopotentialMetaProperty[], elements: string[]) {
|
|
119
|
+
return pseudos.filter((pseudo) => elements.includes(pseudo.element));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Apply several filters at once.
|
|
123
|
+
* @example
|
|
124
|
+
* // filter object
|
|
125
|
+
* {
|
|
126
|
+
* exchangeCorrelation: {
|
|
127
|
+
* approximation: "gga",
|
|
128
|
+
* functional: "pbe"
|
|
129
|
+
* },
|
|
130
|
+
* searchText: "gbrv",
|
|
131
|
+
* appName: "vasp",
|
|
132
|
+
* elements: ["Si", "Ne", "Fe"],
|
|
133
|
+
* }
|
|
134
|
+
*/
|
|
135
|
+
static applyPseudoFilters(
|
|
136
|
+
pseudos: PseudopotentialMetaProperty[],
|
|
137
|
+
pseudoFilter: {
|
|
138
|
+
searchText?: string;
|
|
139
|
+
appName?: string;
|
|
140
|
+
type?: string;
|
|
141
|
+
exchangeCorrelation?: {
|
|
142
|
+
functional: keyof typeof PseudopotentialMetaProperty.compatibleExchangeCorrelation;
|
|
143
|
+
approximation: string;
|
|
144
|
+
};
|
|
145
|
+
elements?: string[];
|
|
146
|
+
},
|
|
147
|
+
) {
|
|
148
|
+
let filteredPseudos = [...pseudos];
|
|
149
|
+
|
|
150
|
+
Object.entries(pseudoFilter).forEach(([fKey, fValue]) => {
|
|
151
|
+
if (typeof fValue === "string") {
|
|
152
|
+
if (fKey === "searchText") {
|
|
153
|
+
filteredPseudos = this.safelyFilterRawDataBySearchText(filteredPseudos, fValue);
|
|
154
|
+
} else if (fKey === "appName") {
|
|
155
|
+
filteredPseudos = this.filterByAppName(filteredPseudos, fValue);
|
|
156
|
+
} else if (fKey === "type") {
|
|
157
|
+
filteredPseudos = this.filterByType(filteredPseudos, fValue);
|
|
158
|
+
}
|
|
159
|
+
} else if (
|
|
160
|
+
typeof fValue === "object" &&
|
|
161
|
+
"functional" in fValue &&
|
|
162
|
+
"approximation" in fValue
|
|
163
|
+
) {
|
|
164
|
+
filteredPseudos = this.filterRawDataByExchangeCorrelation(filteredPseudos, fValue);
|
|
165
|
+
} else if (Array.isArray(fValue)) {
|
|
166
|
+
filteredPseudos = this.filterByElements(filteredPseudos, fValue);
|
|
167
|
+
} else {
|
|
168
|
+
throw new Error(`Invalid filter value: ${fValue}`);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
return filteredPseudos;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Sorts pseudos by the given pattern.
|
|
177
|
+
* NOTE: This is currently used to prioritize gbrv pseudopotentials over norm-conserving ones for QE.
|
|
178
|
+
*/
|
|
179
|
+
static sortPseudosByPattern(pseudos: PseudopotentialMetaProperty[], pattern = "/gbrv/") {
|
|
180
|
+
return pseudos.concat([]).sort((a, b) => {
|
|
181
|
+
return (b.path.includes(pattern) ? 1 : 0) - (a.path.includes(pattern) ? 1 : 0);
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Prioritizes pseudos with 'default' and '5.2' (version) in path (VASP)
|
|
187
|
+
*/
|
|
188
|
+
static sortByPathVASP(pseudos: PseudopotentialMetaProperty[], version = "5.2") {
|
|
189
|
+
return pseudos.concat([]).sort((a, b) => {
|
|
190
|
+
if (a.path.includes("default") && a.path.includes(version)) {
|
|
191
|
+
return -1;
|
|
192
|
+
}
|
|
193
|
+
if (b.path.includes("default") && b.path.includes(version)) {
|
|
194
|
+
return 1;
|
|
195
|
+
}
|
|
196
|
+
return 0;
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
static filterByType(pseudos: PseudopotentialMetaProperty[], pseudoType?: string) {
|
|
201
|
+
if (pseudoType === undefined || pseudoType === "any") return pseudos;
|
|
202
|
+
return pseudos.filter((pseudo) => pseudo.type.includes(pseudoType));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
pseudopotentialMetaPropertySchemaMixin(PseudopotentialMetaProperty.prototype);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { DimensionPlotSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import zip from "lodash/zip";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
type FormatterScope,
|
|
6
|
+
type HighChartsConfigParams,
|
|
7
|
+
HighChartsConfig,
|
|
8
|
+
} from "../../../charts/highcharts";
|
|
9
|
+
|
|
10
|
+
export type XDataArray = DimensionPlotSchema["xDataArray"];
|
|
11
|
+
export type XDataArraySimple = number[];
|
|
12
|
+
export type XDataArrayNested = XDataArraySimple[];
|
|
13
|
+
export type YDataSeries = DimensionPlotSchema["yDataSeries"];
|
|
14
|
+
|
|
15
|
+
export type TwoDimensionalHighChartConfigMixinParams = {
|
|
16
|
+
subtitle: string;
|
|
17
|
+
yAxisTitle: string;
|
|
18
|
+
xAxisTitle: string;
|
|
19
|
+
xDataArray: XDataArray;
|
|
20
|
+
yDataSeries: YDataSeries;
|
|
21
|
+
legend?: HighChartsConfigParams["legend"];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export class TwoDimensionalHighChartConfigMixin extends HighChartsConfig {
|
|
25
|
+
readonly xDataArray: XDataArray;
|
|
26
|
+
|
|
27
|
+
readonly yDataSeries: YDataSeries;
|
|
28
|
+
|
|
29
|
+
// override upon inheritance
|
|
30
|
+
readonly tooltipXAxisName: string = "";
|
|
31
|
+
|
|
32
|
+
// override upon inheritance
|
|
33
|
+
readonly tooltipYAxisName: string = "";
|
|
34
|
+
|
|
35
|
+
constructor(property: TwoDimensionalHighChartConfigMixinParams) {
|
|
36
|
+
super({
|
|
37
|
+
subtitle: property.subtitle,
|
|
38
|
+
yAxisTitle: property.yAxisTitle,
|
|
39
|
+
xAxisTitle: property.xAxisTitle,
|
|
40
|
+
yAxisType: "linear",
|
|
41
|
+
legend: property.legend || false,
|
|
42
|
+
});
|
|
43
|
+
this.xDataArray = property.xDataArray;
|
|
44
|
+
this.yDataSeries = property.yDataSeries;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
get series() {
|
|
48
|
+
return this.yDataSeries.map((item) => {
|
|
49
|
+
return {
|
|
50
|
+
animation: false,
|
|
51
|
+
data: zip(this.xDataArray, item) as [number, number][],
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
tooltipFormatter(xDataArray: XDataArray = []) {
|
|
57
|
+
const { tooltipXAxisName, tooltipYAxisName } = this;
|
|
58
|
+
|
|
59
|
+
// eslint-disable-next-line func-names
|
|
60
|
+
return function (this: FormatterScope) {
|
|
61
|
+
const xValue = xDataArray[this.point.index];
|
|
62
|
+
return (
|
|
63
|
+
"<b>" +
|
|
64
|
+
tooltipXAxisName +
|
|
65
|
+
"</b> " +
|
|
66
|
+
(Array.isArray(xValue) ? xValue.join(", ") : xValue.toFixed(4)) +
|
|
67
|
+
"<br><b>" +
|
|
68
|
+
tooltipYAxisName +
|
|
69
|
+
": </b> " +
|
|
70
|
+
this.y.toFixed(4)
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
get overrideConfig(): object {
|
|
76
|
+
const { xDataArray } = this;
|
|
77
|
+
return {
|
|
78
|
+
chart: {
|
|
79
|
+
animation: false,
|
|
80
|
+
type: "spline",
|
|
81
|
+
zoomType: "xy",
|
|
82
|
+
},
|
|
83
|
+
plotOptions: {
|
|
84
|
+
spline: {
|
|
85
|
+
lineWidth: 2,
|
|
86
|
+
states: {
|
|
87
|
+
hover: {
|
|
88
|
+
lineWidth: 6,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
marker: {
|
|
92
|
+
enabled: false,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
tooltip: {
|
|
97
|
+
valueSuffix: "",
|
|
98
|
+
formatter: this.tooltipFormatter(xDataArray),
|
|
99
|
+
},
|
|
100
|
+
legend: {
|
|
101
|
+
enabled: false,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* eslint-disable max-classes-per-file */
|
|
2
|
+
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
|
|
3
|
+
import type { AveragePotentialProfilePropertySchema } from "@mat3ra/esse/dist/js/types";
|
|
4
|
+
import type { Options } from "highcharts";
|
|
5
|
+
import zip from "lodash/zip";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
type AveragePotentialProfilePropertySchemaMixin,
|
|
9
|
+
averagePotentialProfilePropertySchemaMixin,
|
|
10
|
+
} from "../../generated/AveragePotentialProfilePropertySchemaMixin";
|
|
11
|
+
import Property from "../../Property";
|
|
12
|
+
import { PropertyName, PropertyType } from "../../settings";
|
|
13
|
+
import { TwoDimensionalHighChartConfigMixin } from "../include/mixins/2d_plot";
|
|
14
|
+
|
|
15
|
+
const NAMES = ["planar average", "macroscopic average"];
|
|
16
|
+
|
|
17
|
+
export class AveragePotentialProfileConfig extends TwoDimensionalHighChartConfigMixin {
|
|
18
|
+
readonly tooltipXAxisName: string = "z coordinate";
|
|
19
|
+
|
|
20
|
+
readonly tooltipYAxisName: string = "energy";
|
|
21
|
+
|
|
22
|
+
get series() {
|
|
23
|
+
return this.yDataSeries.map((item, index) => {
|
|
24
|
+
return {
|
|
25
|
+
animation: false,
|
|
26
|
+
name: NAMES[index],
|
|
27
|
+
data: zip(this.xDataArray, item) as [number, number][],
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
get overrideConfig() {
|
|
33
|
+
return {
|
|
34
|
+
...super.overrideConfig,
|
|
35
|
+
legend: {
|
|
36
|
+
layout: "horizontal",
|
|
37
|
+
align: "center",
|
|
38
|
+
verticalAlign: "bottom",
|
|
39
|
+
borderWidth: 0,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type Schema = AveragePotentialProfilePropertySchema;
|
|
46
|
+
|
|
47
|
+
type Base = typeof Property<Schema> & Constructor<AveragePotentialProfilePropertySchemaMixin>;
|
|
48
|
+
|
|
49
|
+
export default class AveragePotentialProfileProperty extends (Property as Base) implements Schema {
|
|
50
|
+
readonly subtitle: string = "Average Potential Profile";
|
|
51
|
+
|
|
52
|
+
readonly yAxisTitle: string = `Energy (${this.yAxis.units})`;
|
|
53
|
+
|
|
54
|
+
readonly xAxisTitle: string = `Coordinate (${this.xAxis.units})`;
|
|
55
|
+
|
|
56
|
+
readonly chartConfig: Options = new AveragePotentialProfileConfig(this).config;
|
|
57
|
+
|
|
58
|
+
static readonly isRefined = true;
|
|
59
|
+
|
|
60
|
+
static readonly propertyName = PropertyName.average_potential_profile;
|
|
61
|
+
|
|
62
|
+
static readonly propertyType = PropertyType.non_scalar;
|
|
63
|
+
|
|
64
|
+
constructor(config: Omit<Schema, "name">) {
|
|
65
|
+
super({ ...config, name: AveragePotentialProfileProperty.propertyName });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
averagePotentialProfilePropertySchemaMixin(AveragePotentialProfileProperty.prototype);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { deepClone, flattenObject } from "@mat3ra/code/dist/js/utils";
|
|
2
|
+
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
|
|
3
|
+
import type { BandGapsPropertySchema } from "@mat3ra/esse/dist/js/types";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
type BandGapsPropertySchemaMixin,
|
|
7
|
+
bandGapsPropertySchemaMixin,
|
|
8
|
+
} from "../../generated/BandGapsPropertySchemaMixin";
|
|
9
|
+
import Property from "../../Property";
|
|
10
|
+
import { PropertyName, PropertyType } from "../../settings";
|
|
11
|
+
|
|
12
|
+
type Schema = BandGapsPropertySchema;
|
|
13
|
+
|
|
14
|
+
type Base = typeof Property<Schema> & Constructor<BandGapsPropertySchemaMixin>;
|
|
15
|
+
|
|
16
|
+
export default class BandGapsProperty extends (Property as Base) implements Schema {
|
|
17
|
+
static readonly isRefined = true;
|
|
18
|
+
|
|
19
|
+
static readonly propertyName = PropertyName.band_gaps;
|
|
20
|
+
|
|
21
|
+
static readonly propertyType = PropertyType.non_scalar;
|
|
22
|
+
|
|
23
|
+
constructor(config: Omit<Schema, "name">) {
|
|
24
|
+
super({ ...config, name: BandGapsProperty.propertyName });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
toRowValues(group?: string) {
|
|
28
|
+
return [this.toJSONByType("direct", group), this.toJSONByType("indirect", group)];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
flattenProperties() {
|
|
32
|
+
return this.values
|
|
33
|
+
.map((x) => {
|
|
34
|
+
return {
|
|
35
|
+
name: `${this.name}:${x.type}`,
|
|
36
|
+
value: x.value,
|
|
37
|
+
};
|
|
38
|
+
})
|
|
39
|
+
.map((x) => flattenObject(x));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @summary Gets specified band gap (direct/indirect) and returns it in simplified form (as pressure).
|
|
44
|
+
* Characteristic name will be `band_gaps:<type>`
|
|
45
|
+
* @param type {String}
|
|
46
|
+
*/
|
|
47
|
+
private toJSONByType(type: string, group?: string) {
|
|
48
|
+
const ch = this.toJSON();
|
|
49
|
+
const bandGapByType = deepClone(ch) as BandGapsPropertySchema;
|
|
50
|
+
const directData = this.values.find((x) => x.type === type);
|
|
51
|
+
const name = `band_gaps:${type}`;
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
...bandGapByType,
|
|
55
|
+
data: {
|
|
56
|
+
...directData,
|
|
57
|
+
name,
|
|
58
|
+
},
|
|
59
|
+
slug: name,
|
|
60
|
+
group,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
bandGapsPropertySchemaMixin(BandGapsProperty.prototype);
|