Skip to content

Primitive Schema Types

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
{
    "items": {
        "minItems": 1, 
        "items": {
            "type": [
                "number", 
                "string"
            ]
        }, 
        "type": "array"
    }, 
    "$schema": "http://json-schema.org/draft-04/schema#", 
    "type": "array", 
    "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
    ]
]

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
{
    "$schema": "http://json-schema.org/draft-04/schema#", 
    "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"
            }, 
            "type": "array", 
            "title": "1 dimension data series schema"
        }
    }, 
    "title": "2 dimension data 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
{
    "required": [
        "xAxis", 
        "yAxis"
    ], 
    "$schema": "http://json-schema.org/draft-04/schema#", 
    "allOf": [
        {
            "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"
                    }, 
                    "type": "array", 
                    "title": "1 dimension data series schema"
                }
            }, 
            "title": "2 dimension data schema"
        }
    ], 
    "properties": {
        "legend": {
            "minItems": 1, 
            "type": "array", 
            "description": "Legend of y Axis data series"
        }, 
        "xAxis": {
            "properties": {
                "units": {
                    "type": "string", 
                    "description": "units for an axis"
                }, 
                "label": {
                    "type": "string", 
                    "description": "label of an axis object"
                }
            }, 
            "required": [
                "label"
            ], 
            "description": "x Axis object", 
            "title": "axis schema"
        }, 
        "yAxis": {
            "properties": {
                "units": {
                    "type": "string", 
                    "description": "units for an axis"
                }, 
                "label": {
                    "type": "string", 
                    "description": "label of an axis object"
                }
            }, 
            "required": [
                "label"
            ], 
            "description": "y Axis object", 
            "title": "axis schema"
        }
    }, 
    "title": "2 dimension plot 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 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
{
    "$schema": "http://json-schema.org/draft-04/schema#", 
    "required": [
        "a", 
        "b", 
        "c", 
        "alpha", 
        "beta", 
        "gamma"
    ], 
    "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"
        }
    }, 
    "title": "3 dimensional lattice schema"
}
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
}

3D Plane

Holds the information about a plane incline in three-dimensions specified through the surface normal of the plane and its origin.

 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
{
    "$schema": "http://json-schema.org/draft-04/schema#", 
    "required": [
        "normal", 
        "origin"
    ], 
    "properties": {
        "origin": {
            "description": "origin of normal vector to the plane", 
            "title": "vector schema", 
            "minItems": 3, 
            "items": {
                "type": "number"
            }, 
            "maxItems": 3, 
            "type": "array"
        }, 
        "normal": {
            "description": "surface normal of plane", 
            "title": "vector schema", 
            "minItems": 3, 
            "items": {
                "type": "number"
            }, 
            "maxItems": 3, 
            "type": "array"
        }
    }, 
    "title": "3 dimensional plane schema"
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
    "origin": [
        0, 
        0, 
        0
    ], 
    "normal": [
        1, 
        0, 
        0
    ]
}

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
{
    "title": "3 dimensional tensor schema", 
    "minItems": 3, 
    "items": {
        "minItems": 3, 
        "items": {
            "type": "number"
        }, 
        "type": "array", 
        "maxItems": 3, 
        "title": "vector schema"
    }, 
    "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
{
    "$schema": "http://json-schema.org/draft-04/schema#", 
    "required": [
        "a", 
        "b", 
        "c"
    ], 
    "type": "object", 
    "properties": {
        "a": {
            "description": "first vector", 
            "title": "vector schema", 
            "minItems": 3, 
            "items": {
                "type": "number"
            }, 
            "maxItems": 3, 
            "type": "array"
        }, 
        "c": {
            "description": "third vector", 
            "title": "vector schema", 
            "minItems": 3, 
            "items": {
                "type": "number"
            }, 
            "maxItems": 3, 
            "type": "array"
        }, 
        "b": {
            "description": "second vector", 
            "title": "vector schema", 
            "minItems": 3, 
            "items": {
                "type": "number"
            }, 
            "maxItems": 3, 
            "type": "array"
        }
    }, 
    "title": "3 dimensional vector basis"
}
 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
    ]
}

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
{
    "$schema": "http://json-schema.org/draft-04/schema#", 
    "required": [
        "label"
    ], 
    "properties": {
        "units": {
            "type": "string", 
            "description": "units for an axis"
        }, 
        "label": {
            "type": "string", 
            "description": "label of an axis object"
        }
    }, 
    "title": "axis schema"
}
1
2
3
4
{
    "units": "eV", 
    "label": "energy"
}

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
{
    "title": "vector schema", 
    "minItems": 3, 
    "items": {
        "type": "number"
    }, 
    "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
{
    "title": "vector schema", 
    "minItems": 3, 
    "items": {
        "type": "number"
    }, 
    "maxItems": 3, 
    "$schema": "http://json-schema.org/draft-04/schema#", 
    "type": "array"
}
1
2
3
4
5
[
    1.0, 
    0.0, 
    0.0
]