From f84fe50beb0607e283e2fec713dcd91fa2aaae77 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 14 Dec 2023 20:40:49 +0800 Subject: [PATCH 1/4] SOF-7136: property manifest for Hubbard V nearest neighbors --- manifest/properties.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/manifest/properties.yaml b/manifest/properties.yaml index 25af2e7ea..e7c6d9900 100644 --- a/manifest/properties.yaml +++ b/manifest/properties.yaml @@ -269,3 +269,9 @@ hubbard_v: units: eV schemaId: properties-directory/non-scalar/hubbard-v isResult: true + +hubbard_v_nn: + defaults: + units: eV + schemaId: properties-directory/non-scalar/hubbard-v + isResult: true From c913e3aa7406c6f9f02485bbaad1cdd4958c232c Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 14 Dec 2023 20:54:36 +0800 Subject: [PATCH 2/4] SOF-7136: include hubbard_v_nn property name --- schema/properties_directory/non-scalar/hubbard_v.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/properties_directory/non-scalar/hubbard_v.json b/schema/properties_directory/non-scalar/hubbard_v.json index 527862b71..b1339d8d7 100644 --- a/schema/properties_directory/non-scalar/hubbard_v.json +++ b/schema/properties_directory/non-scalar/hubbard_v.json @@ -5,7 +5,7 @@ "description": "Hubbard V value in eV", "properties": { "name": { - "enum": ["hubbard_v"] + "enum": ["hubbard_v", "hubbard_v_nn"] }, "units": { "enum": ["eV"] From 0baa0e8040de1982b937ac52b8c3b747b3e68160 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 22 Dec 2023 10:28:18 +0800 Subject: [PATCH 3/4] SOF-7136: separate schemas for Hubbard V and V nearest neighbors for stricter validation --- .../non-scalar/hubbard_v.json | 20 +++++------ .../non-scalar/hubbard_v_nn.json | 24 +++++++++++++ manifest/properties.yaml | 2 +- .../atomic_data/per_orbital_pair.json | 2 +- .../non-scalar/hubbard_u.json | 2 +- .../non-scalar/hubbard_v.json | 5 +-- .../non-scalar/hubbard_v_nn.json | 35 +++++++++++++++++++ 7 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 example/properties_directory/non-scalar/hubbard_v_nn.json create mode 100644 schema/properties_directory/non-scalar/hubbard_v_nn.json diff --git a/example/properties_directory/non-scalar/hubbard_v.json b/example/properties_directory/non-scalar/hubbard_v.json index 58a7554c2..2b0d7c1a6 100644 --- a/example/properties_directory/non-scalar/hubbard_v.json +++ b/example/properties_directory/non-scalar/hubbard_v.json @@ -5,22 +5,18 @@ { "id": 1, "atomicSpecies": "Co", - "orbitalName": "3d", "id2": 1, "atomicSpecies2": "Co", - "orbitalName2": "3d", - "distance": 0, - "value": 6.7553 - }, - { + "distance": 0.0, + "value": 7.7514 + }, + { "id": 1, "atomicSpecies": "Co", - "orbitalName": "3d", - "id2": 2, + "id2": 19, "atomicSpecies2": "O", - "orbitalName2": "3p", - "distance": 3.5423, - "value": 2.2438 - } + "distance": 3.630748, + "value": 0.7573 + } ] } diff --git a/example/properties_directory/non-scalar/hubbard_v_nn.json b/example/properties_directory/non-scalar/hubbard_v_nn.json new file mode 100644 index 000000000..5ae22ba03 --- /dev/null +++ b/example/properties_directory/non-scalar/hubbard_v_nn.json @@ -0,0 +1,24 @@ +{ + "name": "hubbard_v_nn", + "units": "eV", + "values": [ + { + "id": 1, + "atomicSpecies": "Co", + "orbitalName": "3d", + "id2": 1, + "atomicSpecies2": "Co", + "orbitalName2": "3d", + "value": 7.7514 + }, + { + "id": 1, + "atomicSpecies": "Co", + "orbitalName": "3d", + "id2": 19, + "atomicSpecies2": "O", + "orbitalName2": "2p", + "value": 0.7573 + } + ] +} diff --git a/manifest/properties.yaml b/manifest/properties.yaml index e7c6d9900..ff76840d5 100644 --- a/manifest/properties.yaml +++ b/manifest/properties.yaml @@ -273,5 +273,5 @@ hubbard_v: hubbard_v_nn: defaults: units: eV - schemaId: properties-directory/non-scalar/hubbard-v + schemaId: properties-directory/non-scalar/hubbard-v-nn isResult: true diff --git a/schema/core/reusable/atomic_data/per_orbital_pair.json b/schema/core/reusable/atomic_data/per_orbital_pair.json index edb91a1b5..987c62217 100644 --- a/schema/core/reusable/atomic_data/per_orbital_pair.json +++ b/schema/core/reusable/atomic_data/per_orbital_pair.json @@ -33,7 +33,7 @@ }, "distance": { "type": "number", - "description": "Distance between two sites in angstrom." + "description": "Distance between two sites in Bohr." } } } diff --git a/schema/properties_directory/non-scalar/hubbard_u.json b/schema/properties_directory/non-scalar/hubbard_u.json index 0feadc3bc..8b2a4ffb3 100644 --- a/schema/properties_directory/non-scalar/hubbard_u.json +++ b/schema/properties_directory/non-scalar/hubbard_u.json @@ -2,7 +2,7 @@ "$id": "properties-directory/non-scalar/hubbard-u", "$schema": "http://json-schema.org/draft-04/schema#", "title": "Hubbard U parameters", - "description": "Hubbard U value in eV", + "description": "Hubbard U values in eV corresponding to atomic species, orbital and site number.", "properties": { "name": { "enum": ["hubbard_u"] diff --git a/schema/properties_directory/non-scalar/hubbard_v.json b/schema/properties_directory/non-scalar/hubbard_v.json index b1339d8d7..ff4051667 100644 --- a/schema/properties_directory/non-scalar/hubbard_v.json +++ b/schema/properties_directory/non-scalar/hubbard_v.json @@ -2,10 +2,10 @@ "$id": "properties-directory/non-scalar/hubbard-v", "$schema": "http://json-schema.org/draft-04/schema#", "title": "Hubbard V parameters", - "description": "Hubbard V value in eV", + "description": "Hubbard V values corresponding to atomic pairs", "properties": { "name": { - "enum": ["hubbard_v", "hubbard_v_nn"] + "enum": ["hubbard_v"] }, "units": { "enum": ["eV"] @@ -24,6 +24,7 @@ "id2", "atomicSpecies", "atomicSpecies2", + "distance", "value" ] } diff --git a/schema/properties_directory/non-scalar/hubbard_v_nn.json b/schema/properties_directory/non-scalar/hubbard_v_nn.json new file mode 100644 index 000000000..35496de1a --- /dev/null +++ b/schema/properties_directory/non-scalar/hubbard_v_nn.json @@ -0,0 +1,35 @@ +{ + "$id": "properties-directory/non-scalar/hubbard-v-nn", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Hubbard V parameters for nearest neighbors", + "description": "Hubbard V value in eV for nearest neighbors used in hp.x output parsing", + "properties": { + "name": { + "enum": ["hubbard_v_nn"] + }, + "units": { + "enum": ["eV"] + }, + "values": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "../../core/reusable/atomic_data_per_orbital_pair_numeric.json" + } + ], + "required": [ + "id", + "id2", + "atomicSpecies", + "atomicSpecies2", + "orbitalName", + "orbitalName2", + "value" + ] + } + } + }, + "required": ["name"] +} From 5503b9bb8a0474bd0b6821e01dc3d593b98e88a8 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Sat, 23 Dec 2023 10:31:54 +0800 Subject: [PATCH 4/4] SOF-7136: reuse hubbard_v as hubbard_v_nn keep the datastructures same, remove properties in difference set from being required --- .../non-scalar/hubbard_v.json | 3 +- .../non-scalar/hubbard_v_nn.json | 32 +++---------------- 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/schema/properties_directory/non-scalar/hubbard_v.json b/schema/properties_directory/non-scalar/hubbard_v.json index ff4051667..a3275fd1a 100644 --- a/schema/properties_directory/non-scalar/hubbard_v.json +++ b/schema/properties_directory/non-scalar/hubbard_v.json @@ -5,7 +5,7 @@ "description": "Hubbard V values corresponding to atomic pairs", "properties": { "name": { - "enum": ["hubbard_v"] + "enum": ["hubbard_v", "hubbard_v_nn"] }, "units": { "enum": ["eV"] @@ -24,7 +24,6 @@ "id2", "atomicSpecies", "atomicSpecies2", - "distance", "value" ] } diff --git a/schema/properties_directory/non-scalar/hubbard_v_nn.json b/schema/properties_directory/non-scalar/hubbard_v_nn.json index 35496de1a..197e058df 100644 --- a/schema/properties_directory/non-scalar/hubbard_v_nn.json +++ b/schema/properties_directory/non-scalar/hubbard_v_nn.json @@ -3,33 +3,9 @@ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Hubbard V parameters for nearest neighbors", "description": "Hubbard V value in eV for nearest neighbors used in hp.x output parsing", - "properties": { - "name": { - "enum": ["hubbard_v_nn"] - }, - "units": { - "enum": ["eV"] - }, - "values": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "../../core/reusable/atomic_data_per_orbital_pair_numeric.json" - } - ], - "required": [ - "id", - "id2", - "atomicSpecies", - "atomicSpecies2", - "orbitalName", - "orbitalName2", - "value" - ] - } + "allOf": [ + { + "$ref": "hubbard_v.json" } - }, - "required": ["name"] + ] }