# Core Schema Types¶

The core schema types are classified into primitive and abstract outlined below.

## Primitive¶

The primitive schemas are derived from the default JSON primitives and do not have physical meaning.

### 1D Data Series¶

Series is an array of arrays containing numbers or strings. It is used to store data

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "items": { "minItems": 1, "items": { "type": [ "number", "string" ] }, "type": "array" }, "schemaId": "core-primitive-1d-data-series", "type": "array", "$schema": "http://json-schema.org/draft-04/schema#", "title": "1 dimension data series schema" }    1 2 3 4 5 6 7 8 9 10 11 12 [ [ 0, 0.5, 1 ], [ 0, 2.5, 5 ] ]  ### 3D Lattice¶ Holds the information about the three-dimensional periodic lattice specified through lengths and angles between lattice vectors.   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 { "title": "3 dimensional lattice schema", "schemaId": "core-primitive-3d-lattice", "required": [ "a", "b", "c", "alpha", "beta", "gamma" ], "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "a": { "type": "number", "description": "length of the first lattice vector" }, "c": { "type": "number", "description": "length of the third lattice vector" }, "b": { "type": "number", "description": "length of the second lattice vector" }, "beta": { "type": "number", "description": "angle between second and third lattice vector" }, "alpha": { "type": "number", "description": "angle between first and second lattice vector" }, "gamma": { "type": "number", "description": "angle between first and third lattice vector" } } } 
 1 2 3 4 5 6 7 8 { "a": 5.14, "c": 5.14, "b": 5.14, "beta": 90.0, "alpha": 90.0, "gamma": 90.0 } 

### Axis¶

Used for plotting. It has a label to describe the type of data on the axis and units to describe the units of the data.

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "schemaId": "core-primitive-axis", "required": [ "label" ], "properties": { "units": { "type": "string", "description": "units for an axis" }, "label": { "type": "string", "description": "label of an axis object" } }, "$schema": "http://json-schema.org/draft-04/schema#", "title": "axis schema" }   1 2 3 4 { "units": "eV", "label": "energy" }  ## Abstract¶ The abstract schemas outline the data structure of abstract concepts (e.g. a point) and are derived from the primitive schemas. ### 2D Data¶ Data prepared for a two-dimensional plot.   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 { "title": "2 dimension data schema", "schemaId": "core-abstract-2d-data", "required": [ "xDataArray", "yDataSeries" ], "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "xDataArray": { "type": "array", "description": "array containing values of x Axis" }, "yDataSeries": { "items": { "minItems": 1, "items": { "type": [ "number", "string" ] }, "type": "array" }, "schemaId": "core-primitive-1d-data-series", "type": "array", "title": "1 dimension data series schema" } } } 
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 { "xDataArray": [ 0, 1, 2 ], "yDataSeries": [ [ 0, 0.5, 1 ], [ 0, 2.5, 5 ] ] } 

### 2D Plot¶

Two-dimensional data object, defined in conjunction with two axes.

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 { "allOf": [ { "schemaId": "core-abstract-2d-data", "required": [ "xDataArray", "yDataSeries" ], "type": "object", "properties": { "xDataArray": { "type": "array", "description": "array containing values of x Axis" }, "yDataSeries": { "items": { "minItems": 1, "items": { "type": [ "number", "string" ] }, "type": "array" }, "schemaId": "core-primitive-1d-data-series", "type": "array", "title": "1 dimension data series schema" } }, "title": "2 dimension data schema" } ], "schemaId": "core-abstract-2d-plot", "required": [ "xAxis", "yAxis" ], "title": "2 dimension plot schema", "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "legend": { "minItems": 1, "type": "array", "description": "Legend of y Axis data series" }, "xAxis": { "schemaId": "core-primitive-axis", "required": [ "label" ], "properties": { "units": { "type": "string", "description": "units for an axis" }, "label": { "type": "string", "description": "label of an axis object" } }, "description": "x Axis object", "title": "axis schema" }, "yAxis": { "schemaId": "core-primitive-axis", "required": [ "label" ], "properties": { "units": { "type": "string", "description": "units for an axis" }, "label": { "type": "string", "description": "label of an axis object" } }, "description": "y Axis object", "title": "axis schema" } } }    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 { "yDataSeries": [ [ 0, 0.5, 1 ], [ 0, 2.5, 5 ] ], "xDataArray": [ 0, 1, 2 ], "xAxis": { "label": "kpoint index" }, "yAxis": { "units": "eV", "label": "eigenvalues" } }  ### 3D Tensor¶ A tensor which can be represented as a 3x3 matrix (for example the stress tensor).   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "title": "3 dimensional tensor schema", "minItems": 3, "items": { "title": "array of 3 number elements schema", "minItems": 3, "items": { "type": "number" }, "schemaId": "core-primitive-array-of-3-numbers", "maxItems": 3, "type": "array" }, "schemaId": "core-abstract-3d-tensor", "maxItems": 3, "$schema": "http://json-schema.org/draft-04/schema#", "type": "array" } 
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] 

### 3D Vector Basis¶

Three non-collinear vectors in three-dimensional space that form a basis set.

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 { "title": "3 dimensional vector basis", "schemaId": "core-abstract-3d-vector-basis", "required": [ "a", "b", "c" ], "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "a": { "description": "first vector", "title": "array of 3 number elements schema", "minItems": 3, "items": { "type": "number" }, "schemaId": "core-primitive-array-of-3-numbers", "maxItems": 3, "type": "array" }, "c": { "description": "third vector", "title": "array of 3 number elements schema", "minItems": 3, "items": { "type": "number" }, "schemaId": "core-primitive-array-of-3-numbers", "maxItems": 3, "type": "array" }, "b": { "description": "second vector", "title": "array of 3 number elements schema", "minItems": 3, "items": { "type": "number" }, "schemaId": "core-primitive-array-of-3-numbers", "maxItems": 3, "type": "array" } } }    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 { "a": [ 5.0, 0.0, 0.0 ], "c": [ 0.0, 0.0, 5.0 ], "b": [ 0.0, 5.0, 0.0 ] }  ### Point¶ Point is a generic data type that is expected to be used by many different aspects of the database. It is an array holding three numbers.   1 2 3 4 5 6 7 8 9 10 11 { "title": "array of 3 number elements schema", "minItems": 3, "items": { "type": "number" }, "schemaId": "core-primitive-array-of-3-numbers", "maxItems": 3, "$schema": "http://json-schema.org/draft-04/schema#", "type": "array" } 
 1 2 3 4 5 [ 0.0, 5.5, 0.0 ] 

### Vector¶

Vector is a generic data type that is expected to be used by many different aspects of the database. It is an array holding three numbers.

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 { "schemaId": "core-abstract-vector", "anyOf": [ { "title": "array of 3 number elements schema", "minItems": 3, "items": { "type": "number" }, "schemaId": "core-primitive-array-of-3-numbers", "maxItems": 3, "type": "array" }, { "title": "array of 3 boolean elements schema", "minItems": 3, "items": { "type": "boolean" }, "schemaId": "core-primitive-array-of-3-booleans", "maxItems": 3, "type": "array" } ], "\$schema": "http://json-schema.org/draft-04/schema#", "title": "vector schema" } 
 1 2 3 4 5 [ 1.0, 0.0, 0.0 ]