diff --git a/schema/material/interface.json b/schema/material/interface.json new file mode 100644 index 000000000..eeba2ffba --- /dev/null +++ b/schema/material/interface.json @@ -0,0 +1,69 @@ +{ + "$id": "interface", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Interface Schema", + "type": "object", + "allOf": [ + { + "$ref": "../material.json" + } + ], + "properties": { + "interface_config": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["interface"] + }, + "source": { + "type": "object", + "properties": { + "slab1_config": { + "$ref": "slab.json" + }, + "slab2_config": { + "$ref": "slab.json" + } + } + }, + "interface_parameters": { + "type": "object", + "properties": { + "distance_z": { + "type": "number", + "description": "Vertical distance between the two slabs." + }, + "shift_x": { + "type": "number", + "description": "Horizontal shift along the x-axis of the second slab with respect to the first slab." + }, + "shift_y": { + "type": "number", + "description": "Horizontal shift along the y-axis of the second slab with respect to the first slab." + }, + "vacuum": { + "type": "number", + "description": "Vacuum spacing added above the second slab." + } + } + }, + "derived_properties": { + "type": "object", + "properties": { + "strain": { + "type": "number", + "description": "Strain of the second slab." + }, + "termination_pair": { + "type": "string", + "description": "Pair of terminations at the interface. Written as a tuple of two strings, e.g `('C_P6/mmm_2', 'Ni_R-3m_1')`" + } + } + } + }, + "required": ["type", "source", "interface_parameters"] + } + }, + "required": ["interface_config"] +} diff --git a/schema/material/slab.json b/schema/material/slab.json new file mode 100644 index 000000000..0a4667c5d --- /dev/null +++ b/schema/material/slab.json @@ -0,0 +1,90 @@ +{ + "$id": "slab", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Slab Schema", + "type": "object", + "allOf": [ + { + "$ref": "../material.json" + } + ], + "properties": { + "slab_config": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["slab"] + }, + "source": { + "$ref": "../material.json" + }, + "slab_parameters": { + "type": "object", + "properties": { + "miller_indices": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Miller indices of the slab surface." + }, + "thickness": { + "type": "integer", + "description": "Thickness of the slab in layers." + }, + "vacuum": { + "type": "number", + "description": "Vacuum spacing added above the slab." + }, + "xy_supercell_matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "integer" + } + }, + "description": "Matrix used for creating the xy supercell." + }, + "straining_matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + }, + "description": "Matrix used for straining the slab." + }, + "termination": { + "type": "string", + "description": "Termination of the slab surface. e.g. 'C_P6/mmm_2'" + } + } + }, + "derived_properties": { + "type": "object", + "properties": { + "strain": { + "type": "number", + "description": "Mean absolute strain applied to the slab." + }, + "transformation_matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + }, + "description": "Matrix describing the slab transformation." + } + } + } + }, + "required": ["type", "source", "slab_parameters"] + } + }, + "required": ["slab_config"] +} diff --git a/schema/material/supercell.json b/schema/material/supercell.json new file mode 100644 index 000000000..f7c06d526 --- /dev/null +++ b/schema/material/supercell.json @@ -0,0 +1,42 @@ +{ + "$id": "supercell", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Supercell Schema", + "type": "object", + "allOf": [ + { + "$ref": "../material.json" + } + ], + "properties": { + "supercell_config": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["supercell"] + }, + "source": { + "$ref": "../material.json" + }, + "supercell_parameters": { + "type": "object", + "properties": { + "supercell_matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "integer" + } + }, + "description": "Matrix defining the supercell transformation." + } + } + } + }, + "required": ["type", "source", "supercell_parameters"] + } + }, + "required": ["supercell_config"] +}