diff --git a/schema/core/reusable/frequency_function_matrix.json b/schema/core/reusable/frequency_function_matrix.json new file mode 100644 index 000000000..5086acde1 --- /dev/null +++ b/schema/core/reusable/frequency_function_matrix.json @@ -0,0 +1,23 @@ +{ + "$id": "core/reusable/frequency-function-matrix", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "", + "description": "Schema for a function of frequency yielding a nx3 matrix", + "type": "object", + "properties": { + "frequencies": { + "description": "Frequencies", + "type": "array", + "items": { + "type": "number" + } + }, + "components": { + "description": "Matrix with 3 columns, e.g. x, y, z", + "type": "array", + "items": { + "$ref": "../primitive/array_of_3_numbers.json" + } + } + } +} diff --git a/schema/properties_directory/non-scalar/dielectric_tensor.json b/schema/properties_directory/non-scalar/dielectric_tensor.json index 12599880c..823836ea4 100644 --- a/schema/properties_directory/non-scalar/dielectric_tensor.json +++ b/schema/properties_directory/non-scalar/dielectric_tensor.json @@ -10,32 +10,17 @@ }, "diagonalReal": { "description": "Real parts of the dielectric tensor diagonal components", - "$ref": "#/definitions/dielectric-function" + "$ref": "../../core/reusable/frequency_function_matrix.json" }, "diagonalImaginary": { "description": "Imaginary parts of the dielectric tensor diagonal components", - "$ref": "#/definitions/dielectric-function" + "$ref": "../../core/reusable/frequency_function_matrix.json" + }, + "spin": { + "type": "number" } }, - "definitions": { - "dielectric-function": { - "type": "object", - "properties": { - "frequencies": { - "description": "Frequencies in eV", - "type": "array", - "items": { - "type": "number" - } - }, - "dielectricComponents": { - "description": "Dielectric components, e.g. espr_x, espr_y, espr_z", - "type": "array", - "items": { - "$ref": "../../core/primitive/array_of_3_numbers.json" - } - } - } - } - } + "required": [ + "name" + ] }