From f3b67d6f851d40ab8550ecea198c1aa057c830f4 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 22 May 2024 10:59:13 -0700 Subject: [PATCH 1/6] feat: add supercell schema --- schema/material/supercell.json | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 schema/material/supercell.json diff --git a/schema/material/supercell.json b/schema/material/supercell.json new file mode 100644 index 000000000..d5f9c2458 --- /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" + } + ], + "properties": { + "supercell_config": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["supercell"] + }, + "source": { + "$ref": "material" + }, + "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"] +} From 3d96ee700056d9f632964f4d1684d9cb19648d3c Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 22 May 2024 10:59:25 -0700 Subject: [PATCH 2/6] feat: add slab schema --- schema/material/slab.json | 90 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 schema/material/slab.json diff --git a/schema/material/slab.json b/schema/material/slab.json new file mode 100644 index 000000000..e9e16047c --- /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" + } + ], + "properties": { + "slab_config": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["slab"] + }, + "source": { + "$ref": "material" + }, + "slab_parameters": { + "type": "object", + "properties": { + "miller_indices": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Miller indices defining the orientation of the slab." + }, + "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 to scale the slab in the xy plane." + }, + "scaling_matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "integer" + } + }, + "description": "Matrix used for scaling the slab." + }, + "termination": { + "type": "string", + "description": "Type of termination of the slab surface." + } + } + }, + "derived_properties": { + "type": "object", + "properties": { + "strain": { + "type": "number", + "description": "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"] +} From ec3d271ff54e1481c230ad3c6a72cf11582bc81a Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 22 May 2024 10:59:44 -0700 Subject: [PATCH 3/6] feat: add interface schema --- schema/material/interface.json | 69 ++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 schema/material/interface.json diff --git a/schema/material/interface.json b/schema/material/interface.json new file mode 100644 index 000000000..f795fb4d0 --- /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" + } + ], + "properties": { + "interface_config": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["interface"] + }, + "source": { + "type": "object", + "properties": { + "slab_config1": { + "$ref": "slab" + }, + "slab_config2": { + "$ref": "slab" + } + } + }, + "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 between the interfaces." + } + } + }, + "derived_properties": { + "type": "object", + "properties": { + "strain": { + "type": "number", + "description": "Strain induced due to the interface." + }, + "termination_pair": { + "type": "string", + "description": "Pair of terminations at the interface." + } + } + } + }, + "required": ["type", "source", "interface_parameters"] + } + }, + "required": ["interface_config"] +} From 329cb95cca17a25e80bac1ad01958cd6893a7d34 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 22 May 2024 11:21:15 -0700 Subject: [PATCH 4/6] update: fix refs --- schema/material/interface.json | 8 ++++---- schema/material/slab.json | 4 ++-- schema/material/supercell.json | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/schema/material/interface.json b/schema/material/interface.json index f795fb4d0..6cb863cc3 100644 --- a/schema/material/interface.json +++ b/schema/material/interface.json @@ -5,7 +5,7 @@ "type": "object", "allOf": [ { - "$ref": "material" + "$ref": "../material.json" } ], "properties": { @@ -20,10 +20,10 @@ "type": "object", "properties": { "slab_config1": { - "$ref": "slab" + "$ref": "slab.json" }, "slab_config2": { - "$ref": "slab" + "$ref": "slab.json" } } }, @@ -57,7 +57,7 @@ }, "termination_pair": { "type": "string", - "description": "Pair of terminations at the interface." + "description": "Pair of terminations at the interface. Written as a tuple of two strings, e.g `('C_P6/mmm_2', 'Ni_R-3m_1')`" } } } diff --git a/schema/material/slab.json b/schema/material/slab.json index e9e16047c..9ce8a3cc7 100644 --- a/schema/material/slab.json +++ b/schema/material/slab.json @@ -5,7 +5,7 @@ "type": "object", "allOf": [ { - "$ref": "material" + "$ref": "../material.json" } ], "properties": { @@ -17,7 +17,7 @@ "enum": ["slab"] }, "source": { - "$ref": "material" + "$ref": "../material.json" }, "slab_parameters": { "type": "object", diff --git a/schema/material/supercell.json b/schema/material/supercell.json index d5f9c2458..f7c06d526 100644 --- a/schema/material/supercell.json +++ b/schema/material/supercell.json @@ -5,7 +5,7 @@ "type": "object", "allOf": [ { - "$ref": "material" + "$ref": "../material.json" } ], "properties": { @@ -17,7 +17,7 @@ "enum": ["supercell"] }, "source": { - "$ref": "material" + "$ref": "../material.json" }, "supercell_parameters": { "type": "object", From 35a16325121ef1c03be24d49767cdca8f5bdc163 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 22 May 2024 11:25:57 -0700 Subject: [PATCH 5/6] chore: minor fix --- schema/material/slab.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/material/slab.json b/schema/material/slab.json index 9ce8a3cc7..058d940bc 100644 --- a/schema/material/slab.json +++ b/schema/material/slab.json @@ -52,7 +52,7 @@ "items": { "type": "array", "items": { - "type": "integer" + "type": "number" } }, "description": "Matrix used for scaling the slab." From 56125c66c07bc5074ae251a961286578e29b3661 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 22 May 2024 13:26:46 -0700 Subject: [PATCH 6/6] update: description fixes --- schema/material/interface.json | 8 ++++---- schema/material/slab.json | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/schema/material/interface.json b/schema/material/interface.json index 6cb863cc3..eeba2ffba 100644 --- a/schema/material/interface.json +++ b/schema/material/interface.json @@ -19,10 +19,10 @@ "source": { "type": "object", "properties": { - "slab_config1": { + "slab1_config": { "$ref": "slab.json" }, - "slab_config2": { + "slab2_config": { "$ref": "slab.json" } } @@ -44,7 +44,7 @@ }, "vacuum": { "type": "number", - "description": "Vacuum spacing added between the interfaces." + "description": "Vacuum spacing added above the second slab." } } }, @@ -53,7 +53,7 @@ "properties": { "strain": { "type": "number", - "description": "Strain induced due to the interface." + "description": "Strain of the second slab." }, "termination_pair": { "type": "string", diff --git a/schema/material/slab.json b/schema/material/slab.json index 058d940bc..0a4667c5d 100644 --- a/schema/material/slab.json +++ b/schema/material/slab.json @@ -27,7 +27,7 @@ "items": { "type": "integer" }, - "description": "Miller indices defining the orientation of the slab." + "description": "Miller indices of the slab surface." }, "thickness": { "type": "integer", @@ -45,9 +45,9 @@ "type": "integer" } }, - "description": "Matrix to scale the slab in the xy plane." + "description": "Matrix used for creating the xy supercell." }, - "scaling_matrix": { + "straining_matrix": { "type": "array", "items": { "type": "array", @@ -55,11 +55,11 @@ "type": "number" } }, - "description": "Matrix used for scaling the slab." + "description": "Matrix used for straining the slab." }, "termination": { "type": "string", - "description": "Type of termination of the slab surface." + "description": "Termination of the slab surface. e.g. 'C_P6/mmm_2'" } } }, @@ -68,7 +68,7 @@ "properties": { "strain": { "type": "number", - "description": "Strain applied to the slab." + "description": "Mean absolute strain applied to the slab." }, "transformation_matrix": { "type": "array",