From ce6b2d9aaa22a0a64e749af8e9a4347552c4378c Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 23 Nov 2023 19:19:09 +0800 Subject: [PATCH] SOF-6892: separate schemas for Hubbard U and V --- .../non-scalar/hubbard_parameters.json | 37 --------------- .../non-scalar/hubbard_u.json | 18 ++++++++ .../non-scalar/hubbard_v.json | 26 +++++++++++ package-lock.json | 21 +++------ .../reusable/atomic_data_per_orbital.json | 10 ++-- .../atomic_data_per_orbital_pair.json | 7 ++- .../non-scalar/hubbard_parameters.json | 46 ------------------- .../non-scalar/hubbard_u.json | 32 +++++++++++++ .../non-scalar/hubbard_v.json | 32 +++++++++++++ 9 files changed, 124 insertions(+), 105 deletions(-) delete mode 100644 example/properties_directory/non-scalar/hubbard_parameters.json create mode 100644 example/properties_directory/non-scalar/hubbard_u.json create mode 100644 example/properties_directory/non-scalar/hubbard_v.json delete mode 100644 schema/properties_directory/non-scalar/hubbard_parameters.json create mode 100644 schema/properties_directory/non-scalar/hubbard_u.json create mode 100644 schema/properties_directory/non-scalar/hubbard_v.json diff --git a/example/properties_directory/non-scalar/hubbard_parameters.json b/example/properties_directory/non-scalar/hubbard_parameters.json deleted file mode 100644 index 393353e62..000000000 --- a/example/properties_directory/non-scalar/hubbard_parameters.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "hubbard_parameters", - "units": "eV", - "values": [ - { - "category": "hubbard_u", - "headers": ["Site no.", "Atomic species", "Orbital/manifold", "U (eV)"], - "siteProperty": { - "id": 1, - "siteName": "Co1", - "orbitalName": "3d" - }, - "value": 6.7553 - }, - { - "category": "hubbard_v", - "headers": [ - "Site no. 1", - "Site no. 2", - "Atomic species1", - "Atomic species2", - "Orbital1", - "Orbital2", - "V (eV)" - ], - "siteProperty": { - "id": 1, - "id2": 2, - "siteName": "Co1", - "siteName2": "O", - "orbitalName": "3d", - "orbitalName2": "3p" - }, - "value": 8.3245 - } - ] -} diff --git a/example/properties_directory/non-scalar/hubbard_u.json b/example/properties_directory/non-scalar/hubbard_u.json new file mode 100644 index 000000000..efc516b71 --- /dev/null +++ b/example/properties_directory/non-scalar/hubbard_u.json @@ -0,0 +1,18 @@ +{ + "name": "hubbard_u", + "units": "eV", + "values": [ + { + "id": 1, + "siteName": "Co", + "orbitalName": "3d", + "value": 6.7553 + }, + { + "id": 2, + "siteName": "O", + "orbitalName": "3p", + "value": 2.2438 + } + ] +} diff --git a/example/properties_directory/non-scalar/hubbard_v.json b/example/properties_directory/non-scalar/hubbard_v.json new file mode 100644 index 000000000..bd9dbc440 --- /dev/null +++ b/example/properties_directory/non-scalar/hubbard_v.json @@ -0,0 +1,26 @@ +{ + "name": "hubbard_v", + "units": "eV", + "values": [ + { + "id": 1, + "siteName": "Co", + "orbitalName": "3d", + "id2": 1, + "siteName2": "Co", + "orbitalName2": "3d", + "distance": 0, + "value": 6.7553 + }, + { + "id": 1, + "siteName": "Co", + "orbitalName": "3d", + "id2": 2, + "siteName2": "O", + "orbitalName2": "3p", + "distance": 3.5423, + "value": 2.2438 + } + ] +} diff --git a/package-lock.json b/package-lock.json index 3fabbfec3..f64ea92c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1600,7 +1600,7 @@ "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, "@ungap/promise-all-settled": { @@ -1724,6 +1724,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -3711,7 +3712,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, "requires": { "argparse": "^2.0.1" }, @@ -3719,8 +3719,7 @@ "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" } } }, @@ -4382,7 +4381,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true }, "object-inspect": { @@ -4999,7 +4998,8 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true }, "string-argv": { "version": "0.3.1", @@ -5435,15 +5435,6 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, - "yamljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", - "integrity": "sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==", - "requires": { - "argparse": "^1.0.7", - "glob": "^7.0.5" - } - }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/schema/core/reusable/atomic_data_per_orbital.json b/schema/core/reusable/atomic_data_per_orbital.json index f649ed278..fd2a058a2 100644 --- a/schema/core/reusable/atomic_data_per_orbital.json +++ b/schema/core/reusable/atomic_data_per_orbital.json @@ -7,16 +7,16 @@ "properties": { "id": { "type": "number", - "description": "Site number or index in the lattice" + "description": "Site number in the lattice" }, "siteName": { "type": "string", - "description": "Example: Co, Ni1, O" + "description": "Atomic species name. Example: Co, Ni1, O" }, "orbitalName": { "type": "string", - "pattern": "^[1-7][sSpPdDfF]$" + "pattern": "^[1-7][sSpPdDfF]$", + "description": "Atomic orbital or Hubbard manifold." } - }, - "additionalProperties": false + } } diff --git a/schema/core/reusable/atomic_data_per_orbital_pair.json b/schema/core/reusable/atomic_data_per_orbital_pair.json index b1311d02e..9b1dcd6db 100644 --- a/schema/core/reusable/atomic_data_per_orbital_pair.json +++ b/schema/core/reusable/atomic_data_per_orbital_pair.json @@ -28,7 +28,10 @@ "orbitalName2": { "type": "string", "pattern": "^[1-7][sSpPdDfF]$" + }, + "distance": { + "type": "number", + "description": "Distance between to sites in angstrom." } - }, - "additionalProperties": false + } } diff --git a/schema/properties_directory/non-scalar/hubbard_parameters.json b/schema/properties_directory/non-scalar/hubbard_parameters.json deleted file mode 100644 index 611c521f1..000000000 --- a/schema/properties_directory/non-scalar/hubbard_parameters.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$id": "properties-directory/non-scalar/hubbard-parameters", - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Hubbard parameters", - "description": "Values of Hubbard U, V parameters in eV", - "properties": { - "name": { - "enum": ["hubbard_parameters"] - }, - "units": { - "enum": ["eV"] - }, - "values": { - "type": "array", - "items": { - "type": "object", - "properties": { - "headers": { - "type": "array", - "items": { - "type": "string" - } - }, - "category": { - "enum": ["hubbard_u", "hubbard_v"] - }, - "siteProperty": { - "anyOf": [ - { - "$ref": "../../core/reusable/atomic_data_per_orbital.json" - }, - { - "$ref": "../../core/reusable/atomic_data_per_orbital_pair.json" - } - ] - }, - "value": { - "type": "number", - "description": "Hubbard U/V values in eV" - } - } - } - } - }, - "required": ["name"] -} diff --git a/schema/properties_directory/non-scalar/hubbard_u.json b/schema/properties_directory/non-scalar/hubbard_u.json new file mode 100644 index 000000000..7d11d9b19 --- /dev/null +++ b/schema/properties_directory/non-scalar/hubbard_u.json @@ -0,0 +1,32 @@ +{ + "$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", + "properties": { + "name": { + "enum": ["hubbard_u"] + }, + "units": { + "enum": ["eV"] + }, + "values": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "../../core/reusable/atomic_data_per_orbital.json" + } + ], + "properties": { + "value": { + "type": "number", + "description": "Hubbard U values in eV" + } + } + } + } + }, + "required": ["name"] +} diff --git a/schema/properties_directory/non-scalar/hubbard_v.json b/schema/properties_directory/non-scalar/hubbard_v.json new file mode 100644 index 000000000..67fb68503 --- /dev/null +++ b/schema/properties_directory/non-scalar/hubbard_v.json @@ -0,0 +1,32 @@ +{ + "$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", + "properties": { + "name": { + "enum": ["hubbard_v"] + }, + "units": { + "enum": ["eV"] + }, + "values": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "../../core/reusable/atomic_data_per_orbital_pair.json" + } + ], + "properties": { + "value": { + "type": "number", + "description": "Hubbard V values in eV" + } + } + } + } + }, + "required": ["name"] +}