Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dist/js/PropertyFactory.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import PhononDispersionsProperty from "./properties/non-scalar/PhononDispersions
import PhononDOSProperty from "./properties/non-scalar/PhononDOSProperty";
import PotentialProfileProperty from "./properties/non-scalar/PotentialProfileProperty";
import ReactionEnergyProfileProperty from "./properties/non-scalar/ReactionEnergyProfileProperty";
import WavefunctionAmplitudeProperty from "./properties/non-scalar/WavefunctionAmplitudeProperty";
import WorkflowProperty from "./properties/non-scalar/WorkflowProperty";
import TotalEnergyContributionsProperty from "./properties/object/TotalEnergyContributionsProperty";
import FermiEnergyProperty from "./properties/scalar/FermiEnergyProperty";
Expand Down Expand Up @@ -47,7 +48,7 @@ export default class PropertyFactory {
static getScalarPropertyNames(): PropertyName[];
static getNonScalarPropertyNames(): PropertyName[];
private static filterPropertyNames;
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;
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;
static createMetaProperty(config: AnyMetaProperty): MetaProperty;
static createProtoProperty(config: AnyProtoProperty): AtomicConstraintsProperty | BoundaryConditionsProperty;
}
Expand Down
2 changes: 2 additions & 0 deletions dist/js/PropertyFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const PhononDispersionsProperty_1 = __importDefault(require("./properties/non-sc
const PhononDOSProperty_1 = __importDefault(require("./properties/non-scalar/PhononDOSProperty"));
const PotentialProfileProperty_1 = __importDefault(require("./properties/non-scalar/PotentialProfileProperty"));
const ReactionEnergyProfileProperty_1 = __importDefault(require("./properties/non-scalar/ReactionEnergyProfileProperty"));
const WavefunctionAmplitudeProperty_1 = __importDefault(require("./properties/non-scalar/WavefunctionAmplitudeProperty"));
const WorkflowProperty_1 = __importDefault(require("./properties/non-scalar/WorkflowProperty"));
const TotalEnergyContributionsProperty_1 = __importDefault(require("./properties/object/TotalEnergyContributionsProperty"));
const FermiEnergyProperty_1 = __importDefault(require("./properties/scalar/FermiEnergyProperty"));
Expand Down Expand Up @@ -64,6 +65,7 @@ const PROPERTY_CLASS_MAP = {
[ReactionEnergyBarrierProperty_1.default.propertyName]: ReactionEnergyBarrierProperty_1.default,
[ReactionEnergyProfileProperty_1.default.propertyName]: ReactionEnergyProfileProperty_1.default,
[PotentialProfileProperty_1.default.propertyName]: PotentialProfileProperty_1.default,
[WavefunctionAmplitudeProperty_1.default.propertyName]: WavefunctionAmplitudeProperty_1.default,
[ChargeDensityProfileProperty_1.default.propertyName]: ChargeDensityProfileProperty_1.default,
[AveragePotentialProfileProperty_1.default.propertyName]: AveragePotentialProfileProperty_1.default,
[ValenceBandOffsetProperty_1.default.propertyName]: ValenceBandOffsetProperty_1.default,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
import type { WavefunctionAmplitudePropertySchema } from "@mat3ra/esse/dist/js/types";
export type WavefunctionAmplitudePropertySchemaMixin = Omit<WavefunctionAmplitudePropertySchema, "_id" | "slug" | "systemName" | "schemaVersion">;
export type WavefunctionAmplitudePropertyInMemoryEntity = InMemoryEntity & WavefunctionAmplitudePropertySchemaMixin;
export declare function wavefunctionAmplitudePropertySchemaMixin(item: InMemoryEntity): void;
24 changes: 24 additions & 0 deletions dist/js/generated/WavefunctionAmplitudePropertySchemaMixin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wavefunctionAmplitudePropertySchemaMixin = wavefunctionAmplitudePropertySchemaMixin;
function wavefunctionAmplitudePropertySchemaMixin(item) {
// @ts-expect-error
const properties = {
get xAxis() {
return this.requiredProp("xAxis");
},
get yAxis() {
return this.requiredProp("yAxis");
},
get name() {
return this.requiredProp("name");
},
get xDataArray() {
return this.requiredProp("xDataArray");
},
get yDataSeries() {
return this.requiredProp("yDataSeries");
},
};
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
}
1 change: 1 addition & 0 deletions dist/js/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export { default as TotalEnergyProperty } from "./properties/scalar/TotalEnergyP
export { default as BandStructureProperty } from "./properties/non-scalar/BandStructureProperty";
export { default as ChargeDensityProfileProperty } from "./properties/non-scalar/ChargeDensityProfileProperty";
export { default as PotentialProfileProperty } from "./properties/non-scalar/PotentialProfileProperty";
export { default as WavefunctionAmplitudeProperty } from "./properties/non-scalar/WavefunctionAmplitudeProperty";
export { default as ReactionEnergyProfileProperty } from "./properties/non-scalar/ReactionEnergyProfileProperty";
export { protoPropertyHolderMixin } from "./holders/mixins/ProtoPropertyHolderMixin";
export { propertyHolderMixin } from "./holders/mixins/PropertyHolderMixin";
Expand Down
4 changes: 3 additions & 1 deletion dist/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.metaPropertyHolderMixin = exports.propertyHolderMixin = exports.protoPropertyHolderMixin = exports.ReactionEnergyProfileProperty = 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;
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;
var PropertyFactory_1 = require("./PropertyFactory");
Object.defineProperty(exports, "PropertyFactory", { enumerable: true, get: function () { return __importDefault(PropertyFactory_1).default; } });
var settings_1 = require("./settings");
Expand Down Expand Up @@ -49,6 +49,8 @@ var ChargeDensityProfileProperty_1 = require("./properties/non-scalar/ChargeDens
Object.defineProperty(exports, "ChargeDensityProfileProperty", { enumerable: true, get: function () { return __importDefault(ChargeDensityProfileProperty_1).default; } });
var PotentialProfileProperty_1 = require("./properties/non-scalar/PotentialProfileProperty");
Object.defineProperty(exports, "PotentialProfileProperty", { enumerable: true, get: function () { return __importDefault(PotentialProfileProperty_1).default; } });
var WavefunctionAmplitudeProperty_1 = require("./properties/non-scalar/WavefunctionAmplitudeProperty");
Object.defineProperty(exports, "WavefunctionAmplitudeProperty", { enumerable: true, get: function () { return __importDefault(WavefunctionAmplitudeProperty_1).default; } });
var ReactionEnergyProfileProperty_1 = require("./properties/non-scalar/ReactionEnergyProfileProperty");
Object.defineProperty(exports, "ReactionEnergyProfileProperty", { enumerable: true, get: function () { return __importDefault(ReactionEnergyProfileProperty_1).default; } });
var ProtoPropertyHolderMixin_1 = require("./holders/mixins/ProtoPropertyHolderMixin");
Expand Down
38 changes: 38 additions & 0 deletions dist/js/properties/non-scalar/WavefunctionAmplitudeProperty.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
import type { WavefunctionAmplitudePropertySchema } from "@mat3ra/esse/dist/js/types";
import type { Options } from "highcharts";
import { WavefunctionAmplitudePropertySchemaMixin } from "../../generated/WavefunctionAmplitudePropertySchemaMixin";
import Property from "../../Property";
import { PropertyName, PropertyType } from "../../settings";
import { TwoDimensionalHighChartConfigMixin } from "../include/mixins/2d_plot";
type Schema = WavefunctionAmplitudePropertySchema;
export declare class WavefunctionAmplitudeConfig extends TwoDimensionalHighChartConfigMixin {
readonly tooltipXAxisName: string;
readonly tooltipYAxisName: string;
get series(): {
animation: boolean;
name: string;
data: [number, number][];
}[];
get overrideConfig(): {
legend: {
layout: string;
align: string;
verticalAlign: string;
borderWidth: number;
};
};
}
type Base = typeof Property<Schema> & Constructor<WavefunctionAmplitudePropertySchemaMixin>;
declare const WavefunctionAmplitudeProperty_base: Base;
declare class WavefunctionAmplitudeProperty extends WavefunctionAmplitudeProperty_base implements Schema {
readonly subtitle: string;
readonly yAxisTitle: string;
readonly xAxisTitle: string;
readonly chartConfig: Options;
static readonly isRefined = true;
static readonly propertyName = PropertyName.wavefunction_amplitude;
static readonly propertyType = PropertyType.non_scalar;
constructor(config: Omit<Schema, "name">);
}
export default WavefunctionAmplitudeProperty;
53 changes: 53 additions & 0 deletions dist/js/properties/non-scalar/WavefunctionAmplitudeProperty.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WavefunctionAmplitudeConfig = void 0;
const zip_1 = __importDefault(require("lodash/zip"));
const WavefunctionAmplitudePropertySchemaMixin_1 = require("../../generated/WavefunctionAmplitudePropertySchemaMixin");
const Property_1 = __importDefault(require("../../Property"));
const settings_1 = require("../../settings");
const _2d_plot_1 = require("../include/mixins/2d_plot");
class WavefunctionAmplitudeConfig extends _2d_plot_1.TwoDimensionalHighChartConfigMixin {
constructor() {
super(...arguments);
this.tooltipXAxisName = "z coordinate";
this.tooltipYAxisName = "amplitude";
}
get series() {
return this.yDataSeries.map((item, index) => {
return {
animation: false,
name: `wavefunction ${index + 1}`,
data: (0, zip_1.default)(this.xDataArray, item),
};
});
}
get overrideConfig() {
return {
...super.overrideConfig,
legend: {
layout: "horizontal",
align: "center",
verticalAlign: "bottom",
borderWidth: 0,
},
};
}
}
exports.WavefunctionAmplitudeConfig = WavefunctionAmplitudeConfig;
class WavefunctionAmplitudeProperty extends Property_1.default {
constructor(config) {
super({ ...config, name: WavefunctionAmplitudeProperty.propertyName });
this.subtitle = "Wavefunction Amplitude";
this.yAxisTitle = "Amplitude";
this.xAxisTitle = "Z Coordinate";
this.chartConfig = new WavefunctionAmplitudeConfig(this).config;
}
}
WavefunctionAmplitudeProperty.isRefined = true;
WavefunctionAmplitudeProperty.propertyName = settings_1.PropertyName.wavefunction_amplitude;
WavefunctionAmplitudeProperty.propertyType = settings_1.PropertyType.non_scalar;
(0, WavefunctionAmplitudePropertySchemaMixin_1.wavefunctionAmplitudePropertySchemaMixin)(WavefunctionAmplitudeProperty.prototype);
exports.default = WavefunctionAmplitudeProperty;
1 change: 1 addition & 0 deletions dist/js/settings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export declare enum PropertyName {
reaction_energy_barrier = "reaction_energy_barrier",
reaction_energy_profile = "reaction_energy_profile",
potential_profile = "potential_profile",
wavefunction_amplitude = "wavefunction_amplitude",
charge_density_profile = "charge_density_profile",
jupyter_notebook_endpoint = "jupyter_notebook_endpoint",
average_potential_profile = "average_potential_profile",
Expand Down
1 change: 1 addition & 0 deletions dist/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var PropertyName;
PropertyName["reaction_energy_barrier"] = "reaction_energy_barrier";
PropertyName["reaction_energy_profile"] = "reaction_energy_profile";
PropertyName["potential_profile"] = "potential_profile";
PropertyName["wavefunction_amplitude"] = "wavefunction_amplitude";
PropertyName["charge_density_profile"] = "charge_density_profile";
PropertyName["jupyter_notebook_endpoint"] = "jupyter_notebook_endpoint";
PropertyName["average_potential_profile"] = "average_potential_profile";
Expand Down
Loading
Loading