@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
package/.babelrc
ADDED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright 2022 Exabyte Inc.
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
[](https://badge.fury.io/js/%40exabyte-io%2Fprode)
|
|
2
|
+
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
3
|
+
|
|
4
|
+
# prode
|
|
5
|
+
|
|
6
|
+
PROperty DEfinitions - prode - houses Property entity definitions for use in the Mat3ra platform.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Installation
|
|
10
|
+
|
|
11
|
+
For usage within a javascript project:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @exabyte-io/prode
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
For development:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
git clone https://github.com/Exabyte-io/prode.git
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Contribution
|
|
25
|
+
|
|
26
|
+
This repository is an [open-source](LICENSE.md) work-in-progress and we welcome contributions.
|
|
27
|
+
|
|
28
|
+
We regularly deploy the latest code containing all accepted contributions online as part of the
|
|
29
|
+
[Mat3ra.com](https://mat3ra.com) platform, so contributors will see their code in action there.
|
|
30
|
+
|
|
31
|
+
See [ESSE](https://github.com/Exabyte-io/esse) for additional context regarding the data schemas used here.
|
|
32
|
+
|
|
33
|
+
Useful commands for development:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# run linter without persistence
|
|
37
|
+
npm run lint
|
|
38
|
+
|
|
39
|
+
# run linter and save edits
|
|
40
|
+
npm run lint:fix
|
|
41
|
+
|
|
42
|
+
# compile the library
|
|
43
|
+
npm run transpile
|
|
44
|
+
|
|
45
|
+
# run tests
|
|
46
|
+
npm run test
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Using Linter
|
|
50
|
+
|
|
51
|
+
Linter setup will prevent committing files that don't adhere to the code standard. It will
|
|
52
|
+
attempt to fix what it can automatically prior to the commit in order to reduce diff noise. This can lead to "unexpected" behavior where a
|
|
53
|
+
file that is staged for commit is not identical to the file that actually gets committed. This happens
|
|
54
|
+
in the `lint-staged` directive of the `package.json` file (by using a `husky` pre-commit hook). For example,
|
|
55
|
+
if you add extra whitespace to a file, stage it, and try to commit it, you will see the following:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
➜ repo-js git:(feature/cool-feature) ✗ git commit -m "Awesome feature works great"
|
|
59
|
+
✔ Preparing...
|
|
60
|
+
✔ Running tasks...
|
|
61
|
+
✖ Prevented an empty git commit!
|
|
62
|
+
✔ Reverting to original state because of errors...
|
|
63
|
+
✔ Cleaning up...
|
|
64
|
+
|
|
65
|
+
⚠ lint-staged prevented an empty git commit.
|
|
66
|
+
Use the --allow-empty option to continue, or check your task configuration
|
|
67
|
+
|
|
68
|
+
husky - pre-commit hook exited with code 1 (error)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The staged change may remain but will not have been committed. Then it will look like you still have a staged
|
|
72
|
+
change to commit, but the pre-commit hook will not actually commit it for you, quite frustrating! Styling can
|
|
73
|
+
be applied manually and fixed by running:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npm run lint:fix
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
In which case, you may need to then add the linter edits to your staging, which in the example above, puts the
|
|
80
|
+
file back to identical with the base branch, resulting in no staged changes whatsoever.
|
|
81
|
+
|
|
82
|
+
ProDe
|
|
83
|
+
=====
|
|
84
|
+
|
|
85
|
+
The`ProDe` package is central to many other entities in the Mat3ra workflow
|
|
86
|
+
ecosystem, where `ProDe` houses entity definitions for:
|
|
87
|
+
|
|
88
|
+
- `Property` - the basic definition of a property
|
|
89
|
+
- properties can be of the following types:
|
|
90
|
+
- `scalar` `non_scalar` `tensor` `object`
|
|
91
|
+
- specific properties are implemented by subclassing `Property`
|
|
92
|
+
- more info at https://docs.mat3ra.com/properties/overview/
|
|
93
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
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 Property_1 = __importDefault(require("./Property"));
|
|
7
|
+
class MetaProperty extends Property_1.default {
|
|
8
|
+
}
|
|
9
|
+
exports.default = MetaProperty;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NamedInMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
|
|
3
|
+
import type { PropertyHolderSchema } from "@mat3ra/esse/dist/js/types";
|
|
4
|
+
import { type PropertyName, PropertyType } from "./settings";
|
|
5
|
+
export type PropertySchemaJSON = PropertyHolderSchema["data"] & AnyObject;
|
|
6
|
+
export type PropertyRowValue = PropertySchemaJSON & {
|
|
7
|
+
slug?: string;
|
|
8
|
+
group?: string;
|
|
9
|
+
};
|
|
10
|
+
export default class Property<TSchema extends object = object> extends NamedInMemoryEntity {
|
|
11
|
+
toJSON: (exclude?: string[]) => TSchema & AnyObject;
|
|
12
|
+
_json: TSchema & AnyObject;
|
|
13
|
+
name: `${PropertyName}`;
|
|
14
|
+
readonly prettyName: string;
|
|
15
|
+
static readonly propertyType: PropertyType;
|
|
16
|
+
static readonly propertyName: PropertyName;
|
|
17
|
+
static readonly isRefined: boolean;
|
|
18
|
+
static readonly isConvergence: boolean;
|
|
19
|
+
static readonly isAbleToReturnMultipleResults: boolean;
|
|
20
|
+
toRowValues(group: string | undefined, slug: string | undefined): (TSchema & AnyObject & {
|
|
21
|
+
slug?: string;
|
|
22
|
+
group?: string;
|
|
23
|
+
})[];
|
|
24
|
+
static prettifyName(name: string): string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const entity_1 = require("@mat3ra/code/dist/js/entity");
|
|
4
|
+
class Property extends entity_1.NamedInMemoryEntity {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.prettyName = Property.prettifyName(this.name);
|
|
8
|
+
}
|
|
9
|
+
toRowValues(group, slug) {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
...this.toJSON(),
|
|
13
|
+
slug,
|
|
14
|
+
group,
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
static prettifyName(name) {
|
|
19
|
+
return (name.charAt(0).toUpperCase() + name.slice(1)).replace("_", " ");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
Property.isRefined = false;
|
|
23
|
+
Property.isConvergence = false;
|
|
24
|
+
Property.isAbleToReturnMultipleResults = false;
|
|
25
|
+
exports.default = Property;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { MetaPropertyHolderSchema, PropertyHolderSchema, ProtoPropertyHolderSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import type MetaProperty from "./MetaProperty";
|
|
3
|
+
import AveragePotentialProfileProperty from "./properties/non-scalar/AveragePotentialProfileProperty";
|
|
4
|
+
import BandGapsProperty from "./properties/non-scalar/BandGapsProperty";
|
|
5
|
+
import BandStructureProperty from "./properties/non-scalar/BandStructureProperty";
|
|
6
|
+
import ChargeDensityProfileProperty from "./properties/non-scalar/ChargeDensityProfileProperty";
|
|
7
|
+
import ConvergenceElectronicProperty from "./properties/non-scalar/convergence/ConvergenceElectronicProperty";
|
|
8
|
+
import ConvergenceIonicProperty from "./properties/non-scalar/convergence/ConvergenceIonicProperty";
|
|
9
|
+
import DensityOfStatesProperty from "./properties/non-scalar/DensityOfStatesProperty";
|
|
10
|
+
import DielectricTensorProperty from "./properties/non-scalar/DielectricTensorProperty";
|
|
11
|
+
import FileContentProperty from "./properties/non-scalar/FileContentProperty";
|
|
12
|
+
import FinalStructureProperty from "./properties/non-scalar/FinalStructureProperty";
|
|
13
|
+
import HubbardUProperty from "./properties/non-scalar/HubbardUProperty";
|
|
14
|
+
import HubbardVNNProperty from "./properties/non-scalar/HubbardVNNProperty";
|
|
15
|
+
import HubbardVProperty from "./properties/non-scalar/HubbardVProperty";
|
|
16
|
+
import IsRelaxedProperty from "./properties/non-scalar/IsRelaxedProperty";
|
|
17
|
+
import JupyterNotebookEndpointProperty from "./properties/non-scalar/JupyterNotebookEndpointProperty";
|
|
18
|
+
import PhononDispersionsProperty from "./properties/non-scalar/PhononDispersionsProperty";
|
|
19
|
+
import PhononDOSProperty from "./properties/non-scalar/PhononDOSProperty";
|
|
20
|
+
import PotentialProfileProperty from "./properties/non-scalar/PotentialProfileProperty";
|
|
21
|
+
import ReactionEnergyProfileProperty from "./properties/non-scalar/ReactionEnergyProfileProperty";
|
|
22
|
+
import WorkflowProperty from "./properties/non-scalar/WorkflowProperty";
|
|
23
|
+
import TotalEnergyContributionsProperty from "./properties/object/TotalEnergyContributionsProperty";
|
|
24
|
+
import FermiEnergyProperty from "./properties/scalar/FermiEnergyProperty";
|
|
25
|
+
import IonizationPotentialElementalProperty from "./properties/scalar/IonizationPotentialElementalProperty";
|
|
26
|
+
import PressureProperty from "./properties/scalar/PressureProperty";
|
|
27
|
+
import ReactionEnergyBarrierProperty from "./properties/scalar/ReactionEnergyBarrierProperty";
|
|
28
|
+
import SurfaceEnergyProperty from "./properties/scalar/SurfaceEnergyProperty";
|
|
29
|
+
import TotalEnergyProperty from "./properties/scalar/TotalEnergyProperty";
|
|
30
|
+
import TotalForcesProperty from "./properties/scalar/TotalForceProperty";
|
|
31
|
+
import ValenceBandOffsetProperty from "./properties/scalar/ValenceBandOffsetProperty";
|
|
32
|
+
import ZeroPointEnergyProperty from "./properties/scalar/ZeroPointEnergyProperty";
|
|
33
|
+
import AtomicForcesProperty from "./properties/tensor/AtomicForcesProperty";
|
|
34
|
+
import MagneticMomentsProperty from "./properties/tensor/MagneticMomentsProperty";
|
|
35
|
+
import StressTensorProperty from "./properties/tensor/StressTensorProperty";
|
|
36
|
+
import AtomicConstraintsProperty from "./proto_properties/AtomicConstraintsProperty";
|
|
37
|
+
import BoundaryConditionsProperty from "./proto_properties/BoundaryConditionsProperty";
|
|
38
|
+
import { PropertyName } from "./settings";
|
|
39
|
+
type AnyProperty = PropertyHolderSchema["data"];
|
|
40
|
+
type AnyMetaProperty = MetaPropertyHolderSchema["data"];
|
|
41
|
+
type AnyProtoProperty = ProtoPropertyHolderSchema["data"];
|
|
42
|
+
export default class PropertyFactory {
|
|
43
|
+
static methodsTree: Record<string, () => void>;
|
|
44
|
+
static getRefinedPropertyNames(): PropertyName[];
|
|
45
|
+
static getConvergencePropertyNames(): PropertyName[];
|
|
46
|
+
static getMultipleResultsPropertyNames(): PropertyName[];
|
|
47
|
+
static getScalarPropertyNames(): PropertyName[];
|
|
48
|
+
static getNonScalarPropertyNames(): PropertyName[];
|
|
49
|
+
private static filterPropertyNames;
|
|
50
|
+
static createProperty(config: AnyProperty): AveragePotentialProfileProperty | BandGapsProperty | BandStructureProperty | ChargeDensityProfileProperty | ConvergenceElectronicProperty | ConvergenceIonicProperty | DensityOfStatesProperty | DielectricTensorProperty | FileContentProperty | FinalStructureProperty | HubbardUProperty | HubbardVNNProperty | HubbardVProperty | IsRelaxedProperty | JupyterNotebookEndpointProperty | PhononDispersionsProperty | PhononDOSProperty | PotentialProfileProperty | ReactionEnergyProfileProperty | WorkflowProperty | TotalEnergyContributionsProperty | FermiEnergyProperty | IonizationPotentialElementalProperty | PressureProperty | ReactionEnergyBarrierProperty | SurfaceEnergyProperty | TotalEnergyProperty | TotalForcesProperty | ValenceBandOffsetProperty | ZeroPointEnergyProperty | AtomicForcesProperty | MagneticMomentsProperty | StressTensorProperty;
|
|
51
|
+
static createMetaProperty(config: AnyMetaProperty): MetaProperty;
|
|
52
|
+
static createProtoProperty(config: AnyProtoProperty): AtomicConstraintsProperty | BoundaryConditionsProperty;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,137 @@
|
|
|
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 PseudopotentialMetaProperty_1 = __importDefault(require("./meta_properties/PseudopotentialMetaProperty"));
|
|
7
|
+
const AveragePotentialProfileProperty_1 = __importDefault(require("./properties/non-scalar/AveragePotentialProfileProperty"));
|
|
8
|
+
const BandGapsProperty_1 = __importDefault(require("./properties/non-scalar/BandGapsProperty"));
|
|
9
|
+
const BandStructureProperty_1 = __importDefault(require("./properties/non-scalar/BandStructureProperty"));
|
|
10
|
+
const ChargeDensityProfileProperty_1 = __importDefault(require("./properties/non-scalar/ChargeDensityProfileProperty"));
|
|
11
|
+
const ConvergenceElectronicProperty_1 = __importDefault(require("./properties/non-scalar/convergence/ConvergenceElectronicProperty"));
|
|
12
|
+
const ConvergenceIonicProperty_1 = __importDefault(require("./properties/non-scalar/convergence/ConvergenceIonicProperty"));
|
|
13
|
+
const DensityOfStatesProperty_1 = __importDefault(require("./properties/non-scalar/DensityOfStatesProperty"));
|
|
14
|
+
const DielectricTensorProperty_1 = __importDefault(require("./properties/non-scalar/DielectricTensorProperty"));
|
|
15
|
+
const FileContentProperty_1 = __importDefault(require("./properties/non-scalar/FileContentProperty"));
|
|
16
|
+
const FinalStructureProperty_1 = __importDefault(require("./properties/non-scalar/FinalStructureProperty"));
|
|
17
|
+
const HubbardUProperty_1 = __importDefault(require("./properties/non-scalar/HubbardUProperty"));
|
|
18
|
+
const HubbardVNNProperty_1 = __importDefault(require("./properties/non-scalar/HubbardVNNProperty"));
|
|
19
|
+
const HubbardVProperty_1 = __importDefault(require("./properties/non-scalar/HubbardVProperty"));
|
|
20
|
+
const IsRelaxedProperty_1 = __importDefault(require("./properties/non-scalar/IsRelaxedProperty"));
|
|
21
|
+
const JupyterNotebookEndpointProperty_1 = __importDefault(require("./properties/non-scalar/JupyterNotebookEndpointProperty"));
|
|
22
|
+
const PhononDispersionsProperty_1 = __importDefault(require("./properties/non-scalar/PhononDispersionsProperty"));
|
|
23
|
+
const PhononDOSProperty_1 = __importDefault(require("./properties/non-scalar/PhononDOSProperty"));
|
|
24
|
+
const PotentialProfileProperty_1 = __importDefault(require("./properties/non-scalar/PotentialProfileProperty"));
|
|
25
|
+
const ReactionEnergyProfileProperty_1 = __importDefault(require("./properties/non-scalar/ReactionEnergyProfileProperty"));
|
|
26
|
+
const WorkflowProperty_1 = __importDefault(require("./properties/non-scalar/WorkflowProperty"));
|
|
27
|
+
const TotalEnergyContributionsProperty_1 = __importDefault(require("./properties/object/TotalEnergyContributionsProperty"));
|
|
28
|
+
const FermiEnergyProperty_1 = __importDefault(require("./properties/scalar/FermiEnergyProperty"));
|
|
29
|
+
const IonizationPotentialElementalProperty_1 = __importDefault(require("./properties/scalar/IonizationPotentialElementalProperty"));
|
|
30
|
+
const PressureProperty_1 = __importDefault(require("./properties/scalar/PressureProperty"));
|
|
31
|
+
const ReactionEnergyBarrierProperty_1 = __importDefault(require("./properties/scalar/ReactionEnergyBarrierProperty"));
|
|
32
|
+
const SurfaceEnergyProperty_1 = __importDefault(require("./properties/scalar/SurfaceEnergyProperty"));
|
|
33
|
+
const TotalEnergyProperty_1 = __importDefault(require("./properties/scalar/TotalEnergyProperty"));
|
|
34
|
+
const TotalForceProperty_1 = __importDefault(require("./properties/scalar/TotalForceProperty"));
|
|
35
|
+
const ValenceBandOffsetProperty_1 = __importDefault(require("./properties/scalar/ValenceBandOffsetProperty"));
|
|
36
|
+
const ZeroPointEnergyProperty_1 = __importDefault(require("./properties/scalar/ZeroPointEnergyProperty"));
|
|
37
|
+
const AtomicForcesProperty_1 = __importDefault(require("./properties/tensor/AtomicForcesProperty"));
|
|
38
|
+
const MagneticMomentsProperty_1 = __importDefault(require("./properties/tensor/MagneticMomentsProperty"));
|
|
39
|
+
const StressTensorProperty_1 = __importDefault(require("./properties/tensor/StressTensorProperty"));
|
|
40
|
+
const AtomicConstraintsProperty_1 = __importDefault(require("./proto_properties/AtomicConstraintsProperty"));
|
|
41
|
+
const BoundaryConditionsProperty_1 = __importDefault(require("./proto_properties/BoundaryConditionsProperty"));
|
|
42
|
+
const settings_1 = require("./settings");
|
|
43
|
+
const PROPERTY_CLASS_MAP = {
|
|
44
|
+
[PressureProperty_1.default.propertyName]: PressureProperty_1.default,
|
|
45
|
+
[TotalForceProperty_1.default.propertyName]: TotalForceProperty_1.default,
|
|
46
|
+
[TotalEnergyProperty_1.default.propertyName]: TotalEnergyProperty_1.default,
|
|
47
|
+
[SurfaceEnergyProperty_1.default.propertyName]: SurfaceEnergyProperty_1.default,
|
|
48
|
+
[ConvergenceElectronicProperty_1.default.propertyName]: ConvergenceElectronicProperty_1.default,
|
|
49
|
+
[ConvergenceIonicProperty_1.default.propertyName]: ConvergenceIonicProperty_1.default,
|
|
50
|
+
[FermiEnergyProperty_1.default.propertyName]: FermiEnergyProperty_1.default,
|
|
51
|
+
[ZeroPointEnergyProperty_1.default.propertyName]: ZeroPointEnergyProperty_1.default,
|
|
52
|
+
[TotalEnergyContributionsProperty_1.default.propertyName]: TotalEnergyContributionsProperty_1.default,
|
|
53
|
+
[AtomicForcesProperty_1.default.propertyName]: AtomicForcesProperty_1.default,
|
|
54
|
+
[StressTensorProperty_1.default.propertyName]: StressTensorProperty_1.default,
|
|
55
|
+
[DensityOfStatesProperty_1.default.propertyName]: DensityOfStatesProperty_1.default,
|
|
56
|
+
[BandStructureProperty_1.default.propertyName]: BandStructureProperty_1.default,
|
|
57
|
+
[BandGapsProperty_1.default.propertyName]: BandGapsProperty_1.default,
|
|
58
|
+
[PhononDispersionsProperty_1.default.propertyName]: PhononDispersionsProperty_1.default,
|
|
59
|
+
[PhononDOSProperty_1.default.propertyName]: PhononDOSProperty_1.default,
|
|
60
|
+
[FinalStructureProperty_1.default.propertyName]: FinalStructureProperty_1.default,
|
|
61
|
+
[IsRelaxedProperty_1.default.propertyName]: IsRelaxedProperty_1.default,
|
|
62
|
+
[WorkflowProperty_1.default.propertyName]: WorkflowProperty_1.default,
|
|
63
|
+
[MagneticMomentsProperty_1.default.propertyName]: MagneticMomentsProperty_1.default,
|
|
64
|
+
[ReactionEnergyBarrierProperty_1.default.propertyName]: ReactionEnergyBarrierProperty_1.default,
|
|
65
|
+
[ReactionEnergyProfileProperty_1.default.propertyName]: ReactionEnergyProfileProperty_1.default,
|
|
66
|
+
[PotentialProfileProperty_1.default.propertyName]: PotentialProfileProperty_1.default,
|
|
67
|
+
[ChargeDensityProfileProperty_1.default.propertyName]: ChargeDensityProfileProperty_1.default,
|
|
68
|
+
[AveragePotentialProfileProperty_1.default.propertyName]: AveragePotentialProfileProperty_1.default,
|
|
69
|
+
[ValenceBandOffsetProperty_1.default.propertyName]: ValenceBandOffsetProperty_1.default,
|
|
70
|
+
[IonizationPotentialElementalProperty_1.default.propertyName]: IonizationPotentialElementalProperty_1.default,
|
|
71
|
+
[FileContentProperty_1.default.propertyName]: FileContentProperty_1.default,
|
|
72
|
+
[DielectricTensorProperty_1.default.propertyName]: DielectricTensorProperty_1.default,
|
|
73
|
+
[HubbardUProperty_1.default.propertyName]: HubbardUProperty_1.default,
|
|
74
|
+
[HubbardVNNProperty_1.default.propertyName]: HubbardVNNProperty_1.default,
|
|
75
|
+
[HubbardVProperty_1.default.propertyName]: HubbardVProperty_1.default,
|
|
76
|
+
[JupyterNotebookEndpointProperty_1.default.propertyName]: JupyterNotebookEndpointProperty_1.default,
|
|
77
|
+
};
|
|
78
|
+
const META_PROPERTY_CLASS_MAP = {
|
|
79
|
+
[PseudopotentialMetaProperty_1.default.propertyName]: PseudopotentialMetaProperty_1.default,
|
|
80
|
+
};
|
|
81
|
+
const PROTO_PROPERTY_CLASS_MAP = {
|
|
82
|
+
[BoundaryConditionsProperty_1.default.propertyName]: BoundaryConditionsProperty_1.default,
|
|
83
|
+
[AtomicConstraintsProperty_1.default.propertyName]: AtomicConstraintsProperty_1.default,
|
|
84
|
+
};
|
|
85
|
+
class PropertyFactory {
|
|
86
|
+
static getRefinedPropertyNames() {
|
|
87
|
+
return this.filterPropertyNames((PropertyClass) => {
|
|
88
|
+
return PropertyClass.isRefined;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
static getConvergencePropertyNames() {
|
|
92
|
+
return this.filterPropertyNames((PropertyClass) => {
|
|
93
|
+
return PropertyClass.isConvergence;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
static getMultipleResultsPropertyNames() {
|
|
97
|
+
return this.filterPropertyNames((PropertyClass) => {
|
|
98
|
+
return PropertyClass.isAbleToReturnMultipleResults;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
static getScalarPropertyNames() {
|
|
102
|
+
return this.filterPropertyNames((PropertyClass) => {
|
|
103
|
+
return PropertyClass.propertyType === settings_1.PropertyType.scalar;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
static getNonScalarPropertyNames() {
|
|
107
|
+
return this.filterPropertyNames((PropertyClass) => {
|
|
108
|
+
return PropertyClass.propertyType === settings_1.PropertyType.non_scalar;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
static filterPropertyNames(filterFn) {
|
|
112
|
+
const properties = Object.values({
|
|
113
|
+
...PROPERTY_CLASS_MAP,
|
|
114
|
+
...META_PROPERTY_CLASS_MAP,
|
|
115
|
+
...PROTO_PROPERTY_CLASS_MAP,
|
|
116
|
+
});
|
|
117
|
+
return properties.filter(filterFn).map((PropertyClass) => {
|
|
118
|
+
return PropertyClass.propertyName;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
static createProperty(config) {
|
|
122
|
+
const PropertyClass = PROPERTY_CLASS_MAP[config.name];
|
|
123
|
+
return new PropertyClass(config);
|
|
124
|
+
}
|
|
125
|
+
static createMetaProperty(config) {
|
|
126
|
+
const { name } = config;
|
|
127
|
+
const PropertyClass = META_PROPERTY_CLASS_MAP[name];
|
|
128
|
+
return new PropertyClass(config);
|
|
129
|
+
}
|
|
130
|
+
static createProtoProperty(config) {
|
|
131
|
+
const { name } = config;
|
|
132
|
+
const PropertyClass = PROTO_PROPERTY_CLASS_MAP[name];
|
|
133
|
+
return new PropertyClass(config);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
PropertyFactory.methodsTree = {};
|
|
137
|
+
exports.default = PropertyFactory;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 Property_1 = __importDefault(require("./Property"));
|
|
7
|
+
const settings_1 = require("./settings");
|
|
8
|
+
class ProtoProperty extends Property_1.default {
|
|
9
|
+
}
|
|
10
|
+
ProtoProperty.propertyType = settings_1.PropertyType.non_scalar;
|
|
11
|
+
exports.default = ProtoProperty;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { AxisOptions, IndividualSeriesOptions, Options, PlotLines } from "highcharts";
|
|
2
|
+
import type { XDataArray } from "../properties/include/mixins/2d_plot";
|
|
3
|
+
/**
|
|
4
|
+
* Callback JavaScript function to format the data label. Note that if a format is defined, the format takes
|
|
5
|
+
* precedence and the formatter is ignored.
|
|
6
|
+
* Available data are:
|
|
7
|
+
* - this.percentage Stacked series and pies only. The point's percentage of the total.
|
|
8
|
+
* - this.point The point object. The point name, if defined, is available through this.point.name.
|
|
9
|
+
* - this.series The series object. The series name is available through this.series.name.
|
|
10
|
+
* - this.total Stacked series only. The total value at this point's x value.
|
|
11
|
+
* - this.x: The x value.
|
|
12
|
+
* - this.y: The y value.
|
|
13
|
+
*/
|
|
14
|
+
export type FormatterScope = {
|
|
15
|
+
percentage: number;
|
|
16
|
+
point: {
|
|
17
|
+
name: string;
|
|
18
|
+
index: number;
|
|
19
|
+
};
|
|
20
|
+
series: {
|
|
21
|
+
name: string;
|
|
22
|
+
};
|
|
23
|
+
total: number;
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
key: number;
|
|
27
|
+
};
|
|
28
|
+
export type Formatter = (this: FormatterScope) => string;
|
|
29
|
+
export interface HighChartsConfigParams {
|
|
30
|
+
title?: string;
|
|
31
|
+
subtitle: string;
|
|
32
|
+
yAxisTitle?: string;
|
|
33
|
+
xAxisTitle?: string;
|
|
34
|
+
yAxisType: string;
|
|
35
|
+
series?: IndividualSeriesOptions[];
|
|
36
|
+
legend?: string[] | object[] | boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @description Base class for Highcharts configuration
|
|
40
|
+
*/
|
|
41
|
+
export declare abstract class HighChartsConfig implements HighChartsConfigParams {
|
|
42
|
+
readonly title: HighChartsConfigParams["title"];
|
|
43
|
+
readonly subtitle: HighChartsConfigParams["subtitle"];
|
|
44
|
+
readonly yAxisTitle: HighChartsConfigParams["yAxisTitle"];
|
|
45
|
+
readonly xAxisTitle: HighChartsConfigParams["xAxisTitle"];
|
|
46
|
+
readonly yAxisType: HighChartsConfigParams["yAxisType"];
|
|
47
|
+
readonly legend: HighChartsConfigParams["legend"];
|
|
48
|
+
readonly _series: HighChartsConfigParams["series"];
|
|
49
|
+
constructor({ title, subtitle, yAxisTitle, xAxisTitle, yAxisType, series, legend, }: HighChartsConfigParams);
|
|
50
|
+
yAxis(): AxisOptions;
|
|
51
|
+
xAxis(): AxisOptions;
|
|
52
|
+
abstract tooltipFormatter(_xDataArray?: XDataArray): (this: FormatterScope) => string;
|
|
53
|
+
plotSingleLine({ value, width, label, color, dashStyle, }: PlotLines): PlotLines[];
|
|
54
|
+
get series(): IndividualSeriesOptions[] | undefined;
|
|
55
|
+
get config(): Options;
|
|
56
|
+
get overrideConfig(): Options;
|
|
57
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable class-methods-use-this */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.HighChartsConfig = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* @description Base class for Highcharts configuration
|
|
7
|
+
*/
|
|
8
|
+
class HighChartsConfig {
|
|
9
|
+
constructor({ title, subtitle, yAxisTitle, xAxisTitle, yAxisType, series, legend, }) {
|
|
10
|
+
this.title = title;
|
|
11
|
+
this.subtitle = subtitle;
|
|
12
|
+
this.yAxisTitle = yAxisTitle;
|
|
13
|
+
this.xAxisTitle = xAxisTitle;
|
|
14
|
+
this.yAxisType = yAxisType;
|
|
15
|
+
this._series = series;
|
|
16
|
+
this.legend = legend;
|
|
17
|
+
}
|
|
18
|
+
yAxis() {
|
|
19
|
+
return {
|
|
20
|
+
title: {
|
|
21
|
+
text: this.yAxisTitle,
|
|
22
|
+
},
|
|
23
|
+
type: this.yAxisType,
|
|
24
|
+
gridLineColor: "#eee",
|
|
25
|
+
plotLines: [
|
|
26
|
+
{
|
|
27
|
+
value: 0,
|
|
28
|
+
width: 1,
|
|
29
|
+
color: "#808080",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
xAxis() {
|
|
35
|
+
return {
|
|
36
|
+
title: {
|
|
37
|
+
text: this.xAxisTitle,
|
|
38
|
+
},
|
|
39
|
+
tickPixelInterval: 200,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
plotSingleLine({ value, width = 1, label, color = "red", dashStyle = "dash", }) {
|
|
43
|
+
return [
|
|
44
|
+
{
|
|
45
|
+
value,
|
|
46
|
+
width,
|
|
47
|
+
label,
|
|
48
|
+
color,
|
|
49
|
+
dashStyle,
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
get series() {
|
|
54
|
+
return this._series;
|
|
55
|
+
}
|
|
56
|
+
get config() {
|
|
57
|
+
return {
|
|
58
|
+
credits: {
|
|
59
|
+
enabled: false,
|
|
60
|
+
},
|
|
61
|
+
chart: {
|
|
62
|
+
animation: false,
|
|
63
|
+
zoomType: "xy",
|
|
64
|
+
},
|
|
65
|
+
title: {
|
|
66
|
+
text: "",
|
|
67
|
+
x: -20, // center
|
|
68
|
+
},
|
|
69
|
+
subtitle: {
|
|
70
|
+
text: this.subtitle,
|
|
71
|
+
x: -20,
|
|
72
|
+
},
|
|
73
|
+
yAxis: this.yAxis(),
|
|
74
|
+
xAxis: this.xAxis(),
|
|
75
|
+
tooltip: {
|
|
76
|
+
formatter: this.tooltipFormatter(),
|
|
77
|
+
},
|
|
78
|
+
plotOptions: {
|
|
79
|
+
series: {
|
|
80
|
+
animation: false,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
legend: {
|
|
84
|
+
enabled: Boolean(this.legend),
|
|
85
|
+
maxHeight: 70,
|
|
86
|
+
},
|
|
87
|
+
series: this.series,
|
|
88
|
+
...this.overrideConfig,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
// use in child classes to add/override default config props
|
|
92
|
+
get overrideConfig() {
|
|
93
|
+
return {};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.HighChartsConfig = HighChartsConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { AtomicConstraintsPropertySchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
export type AtomicConstraintsPropertySchemaMixin = Omit<AtomicConstraintsPropertySchema, "_id" | "slug" | "systemName" | "schemaVersion">;
|
|
4
|
+
export type AtomicConstraintsPropertyInMemoryEntity = InMemoryEntity & AtomicConstraintsPropertySchemaMixin;
|
|
5
|
+
export declare function atomicConstraintsPropertySchemaMixin(item: InMemoryEntity): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.atomicConstraintsPropertySchemaMixin = atomicConstraintsPropertySchemaMixin;
|
|
4
|
+
function atomicConstraintsPropertySchemaMixin(item) {
|
|
5
|
+
// @ts-expect-error
|
|
6
|
+
const properties = {
|
|
7
|
+
get name() {
|
|
8
|
+
return this.requiredProp("name");
|
|
9
|
+
},
|
|
10
|
+
get values() {
|
|
11
|
+
return this.requiredProp("values");
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
15
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { AtomicForcesPropertySchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
export type AtomicForcesPropertySchemaMixin = Omit<AtomicForcesPropertySchema, "_id" | "slug" | "systemName" | "schemaVersion">;
|
|
4
|
+
export type AtomicForcesPropertyInMemoryEntity = InMemoryEntity & AtomicForcesPropertySchemaMixin;
|
|
5
|
+
export declare function atomicForcesPropertySchemaMixin(item: InMemoryEntity): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.atomicForcesPropertySchemaMixin = atomicForcesPropertySchemaMixin;
|
|
4
|
+
function atomicForcesPropertySchemaMixin(item) {
|
|
5
|
+
// @ts-expect-error
|
|
6
|
+
const properties = {
|
|
7
|
+
get name() {
|
|
8
|
+
return this.requiredProp("name");
|
|
9
|
+
},
|
|
10
|
+
get values() {
|
|
11
|
+
return this.requiredProp("values");
|
|
12
|
+
},
|
|
13
|
+
get units() {
|
|
14
|
+
return this.requiredProp("units");
|
|
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 { AveragePotentialProfilePropertySchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
export type AveragePotentialProfilePropertySchemaMixin = Omit<AveragePotentialProfilePropertySchema, "_id" | "slug" | "systemName" | "schemaVersion">;
|
|
4
|
+
export type AveragePotentialProfilePropertyInMemoryEntity = InMemoryEntity & AveragePotentialProfilePropertySchemaMixin;
|
|
5
|
+
export declare function averagePotentialProfilePropertySchemaMixin(item: InMemoryEntity): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.averagePotentialProfilePropertySchemaMixin = averagePotentialProfilePropertySchemaMixin;
|
|
4
|
+
function averagePotentialProfilePropertySchemaMixin(item) {
|
|
5
|
+
// @ts-expect-error
|
|
6
|
+
const properties = {
|
|
7
|
+
get xAxis() {
|
|
8
|
+
return this.requiredProp("xAxis");
|
|
9
|
+
},
|
|
10
|
+
get yAxis() {
|
|
11
|
+
return this.requiredProp("yAxis");
|
|
12
|
+
},
|
|
13
|
+
get name() {
|
|
14
|
+
return this.requiredProp("name");
|
|
15
|
+
},
|
|
16
|
+
get xDataArray() {
|
|
17
|
+
return this.requiredProp("xDataArray");
|
|
18
|
+
},
|
|
19
|
+
get yDataSeries() {
|
|
20
|
+
return this.requiredProp("yDataSeries");
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
24
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { BandGapsPropertySchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
export type BandGapsPropertySchemaMixin = Omit<BandGapsPropertySchema, "_id" | "slug" | "systemName" | "schemaVersion">;
|
|
4
|
+
export type BandGapsPropertyInMemoryEntity = InMemoryEntity & BandGapsPropertySchemaMixin;
|
|
5
|
+
export declare function bandGapsPropertySchemaMixin(item: InMemoryEntity): void;
|