From 820ea1481c5914bd8a6de0fdc90b9cddc95178c2 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Sun, 19 Nov 2023 09:17:15 +0800 Subject: [PATCH 1/5] SOF-6896: more adjustments to psp and pseudopotential file schemas --- example/methods_directory/physical/psp.json | 125 ++++++++++------ schema/methods_directory/physical/psp.json | 6 +- .../methods_directory/physical/psp/file.json | 135 ++++++++++-------- 3 files changed, 157 insertions(+), 109 deletions(-) diff --git a/example/methods_directory/physical/psp.json b/example/methods_directory/physical/psp.json index 8ca42ef8f..75ce65a85 100644 --- a/example/methods_directory/physical/psp.json +++ b/example/methods_directory/physical/psp.json @@ -1,55 +1,98 @@ { "name": "PAW Pseudopotential method", "path": "/qm/wf/psp/paw", - "slug": "pseudopotential", "categories": { "tier1": "qm", "tier2": "wf", "type": "psp", "subtype": "paw" }, - "data": [ + "metaProperties": [ { - "element": "Ru", - "hash": "3349af97451e04faae570056fb6a110b", - "filename": "ru_pbe_dojo-oncv_0.4.upf", - "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", - "valenceConfiguration": [ - { - "orbitalName": "4S", - "orbitalIndex": 1, - "principalNumber": 4, - "angularMomentum": 0, - "occupation": 2.0 - }, - { - "orbitalName": "4P", - "orbitalIndex": 2, - "principalNumber": 4, - "angularMomentum": 1, - "occupation": 6.0 - }, - { - "orbitalName": "4D", - "orbitalIndex": 3, - "principalNumber": 4, - "angularMomentum": 2, - "occupation": 7.0 + "slug": "pseudopotential", + "data": { + "element": "Ru", + "hash": "3349af97451e04faae570056fb6a110b", + "filename": "ru_pbe_dojo-oncv_0.4.upf", + "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", + "valenceConfiguration": [ + { + "orbitalName": "4S", + "orbitalIndex": 1, + "principalNumber": 4, + "angularMomentum": 0, + "occupation": 2.0 + }, + { + "orbitalName": "4P", + "orbitalIndex": 2, + "principalNumber": 4, + "angularMomentum": 1, + "occupation": 6.0 + }, + { + "orbitalName": "4D", + "orbitalIndex": 3, + "principalNumber": 4, + "angularMomentum": 2, + "occupation": 7.0 + }, + { + "orbitalName": "5S", + "orbitalIndex": 4, + "principalNumber": 5, + "angularMomentum": 0, + "occupation": 1.0 + } + ], + "apps": ["espresso"], + "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, + "name": "pseudopotential", + "source": "dojo-oncv", + "type": "nc", + "version": "0.4" + } + }, + { + "slug": "pseudopotential", + "data": { + "element": "Rb", + "hash": "43c180bf64dcab4d78c412dc7c20744c", + "filename": "rb_pbe_dojo-oncv_0.4.upf", + "path": "/export/share/pseudo/rb/gga/pbe/dojo-oncv/0.4/nc/rb_pbe_dojo-oncv_0.4.upf", + "valenceConfiguration": [ + { + "orbitalName": "4S", + "orbitalIndex": 1, + "principalNumber": 4, + "angularMomentum": 0, + "occupation": 2.0 + }, + { + "orbitalName": "4P", + "orbitalIndex": 2, + "principalNumber": 4, + "angularMomentum": 1, + "occupation": 6.0 + }, + { + "orbitalName": "5S", + "orbitalIndex": 3, + "principalNumber": 5, + "angularMomentum": 0, + "occupation": 1.0 + } + ], + "apps": ["espresso"], + "exchangeCorrelation": { + "functional": "pbe", + "approximation": "gga" }, - { - "orbitalName": "5S", - "orbitalIndex": 4, - "principalNumber": 5, - "angularMomentum": 0, - "occupation": 1.0 - } - ], - "apps": ["espresso"], - "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, - "name": "pseudopotential", - "source": "dojo-oncv", - "type": "nc", - "version": "0.4" + "name": "pseudopotential", + "source": "dojo-oncv", + "type": "nc", + "version": "0.4" + } } ] } diff --git a/schema/methods_directory/physical/psp.json b/schema/methods_directory/physical/psp.json index e4b28b1d2..2faa1d887 100644 --- a/schema/methods_directory/physical/psp.json +++ b/schema/methods_directory/physical/psp.json @@ -12,11 +12,7 @@ "categories": { "$ref": "../../methods_category/physical/qm/wf/psp.json" }, - "slug": { - "type": "string", - "description": "pseudopotential" - }, - "data": { + "metaProperties": { "type": "array", "items": { "description": "Specific data based on pseudopotential file.", diff --git a/schema/methods_directory/physical/psp/file.json b/schema/methods_directory/physical/psp/file.json index 736bf8e47..e4b0ddc4d 100644 --- a/schema/methods_directory/physical/psp/file.json +++ b/schema/methods_directory/physical/psp/file.json @@ -2,76 +2,85 @@ "$id": "methods-directory/physical/psp/file", "$schema": "http://json-schema.org/draft-04/schema#", "title": "pseudopotential file", + "description": "Data parsed from specific pseudopotential file (UPF or POTCAR)", "properties": { - "element": { - "type": "string", - "description": "chemical element" - }, - "hash": { - "type": "string", - "description": "MD5 hash of the pseudopotential file" - }, - "type": { - "type": "string", - "description": "type of pseudization", - "$ref": "../../../methods_category/physical/qm/wf/enum_options.json#/pseudoSubtypes" - }, - "source": { - "type": "string", - "description": "explains where this came from" - }, - "version": { - "type": "string", - "description": "explains the version of where this came from" + "slug": { + "enum": ["pseudopotential"] }, - "exchangeCorrelation": { + "data": { "type": "object", "properties": { - "approximation": { - "description": "DFT approximation", - "type": "string" + "element": { + "type": "string", + "description": "chemical element" + }, + "hash": { + "type": "string", + "description": "MD5 hash of the pseudopotential file" + }, + "type": { + "type": "string", + "description": "type of pseudization", + "$ref": "../../../methods_category/physical/qm/wf/enum_options.json#/pseudoSubtypes" + }, + "source": { + "type": "string", + "description": "explains where this came from" + }, + "version": { + "type": "string", + "description": "explains the version of where this came from" + }, + "exchangeCorrelation": { + "type": "object", + "properties": { + "approximation": { + "description": "DFT approximation", + "type": "string" + }, + "functional": { + "description": "Exchange correlation functional", + "type": "string" + }, + "path": { + "description": "DFT model path, e.g. '/pb/qm/dft/ksdft/gga?functional=pbe'", + "$ref": "../../../core/reusable/category_path.json" + } + } }, - "functional": { - "description": "Exchange correlation functional", - "type": "string" + "valenceConfiguration": { + "type": "array", + "description": "contains pseudo orbital information, including orbital names and occupations", + "items": { + "$ref": "../../../core/reusable/atomic_orbital.json" + } }, "path": { - "description": "DFT model path, e.g. '/pb/qm/dft/ksdft/gga?functional=pbe'", - "$ref": "../../../core/reusable/category_path.json" + "type": "string", + "description": "location of the pseudopotential file on filesystem" + }, + "apps": { + "type": "array", + "description": "simulation engines that can use this pseudopotential" + }, + "filename": { + "type": "string", + "description": "filename of pseudopotential file on filesystem" + }, + "name": { + "type": "string", + "description": "name of the data category", + "enum": ["pseudopotential"] } - } - }, - "valenceConfiguration": { - "type": "array", - "description": "contains pseudo orbital information, including orbital names and occupations", - "items": { - "$ref": "../../../core/reusable/atomic_orbital.json" - } - }, - "path": { - "type": "string", - "description": "location of the pseudopotential file on filesystem" - }, - "apps": { - "type": "array", - "description": "simulation engines that can use this pseudopotential" - }, - "filename": { - "type": "string", - "description": "filename of pseudopotential file on filesystem" - }, - "name": { - "type": "string", - "description": "name of the data category", - "enum": ["pseudopotential"] + }, + "required": [ + "element", + "type", + "exchangeCorrelation", + "source", + "path", + "apps" + ] } - }, - "required": [ - "element", - "type", - "exchangeCorrelation", - "source", - "path", - "apps" - ] + } } From caf356a1c705ee99fb273fc7b17b3df627ea3cfc Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Sun, 19 Nov 2023 09:40:08 +0800 Subject: [PATCH 2/5] SOF-6896: add example/test schema for pseudopotential file --- .../methods_directory/physical/psp/file.json | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 example/methods_directory/physical/psp/file.json diff --git a/example/methods_directory/physical/psp/file.json b/example/methods_directory/physical/psp/file.json new file mode 100644 index 000000000..8b21d5094 --- /dev/null +++ b/example/methods_directory/physical/psp/file.json @@ -0,0 +1,45 @@ +{ + "slug": "pseudopotential", + "data": { + "element": "Ru", + "hash": "3349af97451e04faae570056fb6a110b", + "filename": "ru_pbe_dojo-oncv_0.4.upf", + "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", + "valenceConfiguration": [ + { + "orbitalName": "4S", + "orbitalIndex": 1, + "principalNumber": 4, + "angularMomentum": 0, + "occupation": 2.0 + }, + { + "orbitalName": "4P", + "orbitalIndex": 2, + "principalNumber": 4, + "angularMomentum": 1, + "occupation": 6.0 + }, + { + "orbitalName": "4D", + "orbitalIndex": 3, + "principalNumber": 4, + "angularMomentum": 2, + "occupation": 7.0 + }, + { + "orbitalName": "5S", + "orbitalIndex": 4, + "principalNumber": 5, + "angularMomentum": 0, + "occupation": 1.0 + } + ], + "apps": ["espresso"], + "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, + "name": "pseudopotential", + "source": "dojo-oncv", + "type": "nc", + "version": "0.4" + } +} From 53d1a4f85527143216f85de80f5d60372fa1b92d Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Tue, 21 Nov 2023 08:50:50 +0800 Subject: [PATCH 3/5] Revert "SOF-6896: more adjustments to psp and pseudopotential file schemas" This reverts commit 820ea1481c5914bd8a6de0fdc90b9cddc95178c2. --- example/methods_directory/physical/psp.json | 125 ++++++---------- schema/methods_directory/physical/psp.json | 6 +- .../methods_directory/physical/psp/file.json | 135 ++++++++---------- 3 files changed, 109 insertions(+), 157 deletions(-) diff --git a/example/methods_directory/physical/psp.json b/example/methods_directory/physical/psp.json index 75ce65a85..8ca42ef8f 100644 --- a/example/methods_directory/physical/psp.json +++ b/example/methods_directory/physical/psp.json @@ -1,98 +1,55 @@ { "name": "PAW Pseudopotential method", "path": "/qm/wf/psp/paw", + "slug": "pseudopotential", "categories": { "tier1": "qm", "tier2": "wf", "type": "psp", "subtype": "paw" }, - "metaProperties": [ + "data": [ { - "slug": "pseudopotential", - "data": { - "element": "Ru", - "hash": "3349af97451e04faae570056fb6a110b", - "filename": "ru_pbe_dojo-oncv_0.4.upf", - "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", - "valenceConfiguration": [ - { - "orbitalName": "4S", - "orbitalIndex": 1, - "principalNumber": 4, - "angularMomentum": 0, - "occupation": 2.0 - }, - { - "orbitalName": "4P", - "orbitalIndex": 2, - "principalNumber": 4, - "angularMomentum": 1, - "occupation": 6.0 - }, - { - "orbitalName": "4D", - "orbitalIndex": 3, - "principalNumber": 4, - "angularMomentum": 2, - "occupation": 7.0 - }, - { - "orbitalName": "5S", - "orbitalIndex": 4, - "principalNumber": 5, - "angularMomentum": 0, - "occupation": 1.0 - } - ], - "apps": ["espresso"], - "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, - "name": "pseudopotential", - "source": "dojo-oncv", - "type": "nc", - "version": "0.4" - } - }, - { - "slug": "pseudopotential", - "data": { - "element": "Rb", - "hash": "43c180bf64dcab4d78c412dc7c20744c", - "filename": "rb_pbe_dojo-oncv_0.4.upf", - "path": "/export/share/pseudo/rb/gga/pbe/dojo-oncv/0.4/nc/rb_pbe_dojo-oncv_0.4.upf", - "valenceConfiguration": [ - { - "orbitalName": "4S", - "orbitalIndex": 1, - "principalNumber": 4, - "angularMomentum": 0, - "occupation": 2.0 - }, - { - "orbitalName": "4P", - "orbitalIndex": 2, - "principalNumber": 4, - "angularMomentum": 1, - "occupation": 6.0 - }, - { - "orbitalName": "5S", - "orbitalIndex": 3, - "principalNumber": 5, - "angularMomentum": 0, - "occupation": 1.0 - } - ], - "apps": ["espresso"], - "exchangeCorrelation": { - "functional": "pbe", - "approximation": "gga" + "element": "Ru", + "hash": "3349af97451e04faae570056fb6a110b", + "filename": "ru_pbe_dojo-oncv_0.4.upf", + "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", + "valenceConfiguration": [ + { + "orbitalName": "4S", + "orbitalIndex": 1, + "principalNumber": 4, + "angularMomentum": 0, + "occupation": 2.0 + }, + { + "orbitalName": "4P", + "orbitalIndex": 2, + "principalNumber": 4, + "angularMomentum": 1, + "occupation": 6.0 + }, + { + "orbitalName": "4D", + "orbitalIndex": 3, + "principalNumber": 4, + "angularMomentum": 2, + "occupation": 7.0 }, - "name": "pseudopotential", - "source": "dojo-oncv", - "type": "nc", - "version": "0.4" - } + { + "orbitalName": "5S", + "orbitalIndex": 4, + "principalNumber": 5, + "angularMomentum": 0, + "occupation": 1.0 + } + ], + "apps": ["espresso"], + "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, + "name": "pseudopotential", + "source": "dojo-oncv", + "type": "nc", + "version": "0.4" } ] } diff --git a/schema/methods_directory/physical/psp.json b/schema/methods_directory/physical/psp.json index 2faa1d887..e4b28b1d2 100644 --- a/schema/methods_directory/physical/psp.json +++ b/schema/methods_directory/physical/psp.json @@ -12,7 +12,11 @@ "categories": { "$ref": "../../methods_category/physical/qm/wf/psp.json" }, - "metaProperties": { + "slug": { + "type": "string", + "description": "pseudopotential" + }, + "data": { "type": "array", "items": { "description": "Specific data based on pseudopotential file.", diff --git a/schema/methods_directory/physical/psp/file.json b/schema/methods_directory/physical/psp/file.json index e4b0ddc4d..736bf8e47 100644 --- a/schema/methods_directory/physical/psp/file.json +++ b/schema/methods_directory/physical/psp/file.json @@ -2,85 +2,76 @@ "$id": "methods-directory/physical/psp/file", "$schema": "http://json-schema.org/draft-04/schema#", "title": "pseudopotential file", - "description": "Data parsed from specific pseudopotential file (UPF or POTCAR)", "properties": { - "slug": { - "enum": ["pseudopotential"] + "element": { + "type": "string", + "description": "chemical element" + }, + "hash": { + "type": "string", + "description": "MD5 hash of the pseudopotential file" + }, + "type": { + "type": "string", + "description": "type of pseudization", + "$ref": "../../../methods_category/physical/qm/wf/enum_options.json#/pseudoSubtypes" + }, + "source": { + "type": "string", + "description": "explains where this came from" + }, + "version": { + "type": "string", + "description": "explains the version of where this came from" }, - "data": { + "exchangeCorrelation": { "type": "object", "properties": { - "element": { - "type": "string", - "description": "chemical element" - }, - "hash": { - "type": "string", - "description": "MD5 hash of the pseudopotential file" - }, - "type": { - "type": "string", - "description": "type of pseudization", - "$ref": "../../../methods_category/physical/qm/wf/enum_options.json#/pseudoSubtypes" - }, - "source": { - "type": "string", - "description": "explains where this came from" - }, - "version": { - "type": "string", - "description": "explains the version of where this came from" - }, - "exchangeCorrelation": { - "type": "object", - "properties": { - "approximation": { - "description": "DFT approximation", - "type": "string" - }, - "functional": { - "description": "Exchange correlation functional", - "type": "string" - }, - "path": { - "description": "DFT model path, e.g. '/pb/qm/dft/ksdft/gga?functional=pbe'", - "$ref": "../../../core/reusable/category_path.json" - } - } + "approximation": { + "description": "DFT approximation", + "type": "string" }, - "valenceConfiguration": { - "type": "array", - "description": "contains pseudo orbital information, including orbital names and occupations", - "items": { - "$ref": "../../../core/reusable/atomic_orbital.json" - } + "functional": { + "description": "Exchange correlation functional", + "type": "string" }, "path": { - "type": "string", - "description": "location of the pseudopotential file on filesystem" - }, - "apps": { - "type": "array", - "description": "simulation engines that can use this pseudopotential" - }, - "filename": { - "type": "string", - "description": "filename of pseudopotential file on filesystem" - }, - "name": { - "type": "string", - "description": "name of the data category", - "enum": ["pseudopotential"] + "description": "DFT model path, e.g. '/pb/qm/dft/ksdft/gga?functional=pbe'", + "$ref": "../../../core/reusable/category_path.json" } - }, - "required": [ - "element", - "type", - "exchangeCorrelation", - "source", - "path", - "apps" - ] + } + }, + "valenceConfiguration": { + "type": "array", + "description": "contains pseudo orbital information, including orbital names and occupations", + "items": { + "$ref": "../../../core/reusable/atomic_orbital.json" + } + }, + "path": { + "type": "string", + "description": "location of the pseudopotential file on filesystem" + }, + "apps": { + "type": "array", + "description": "simulation engines that can use this pseudopotential" + }, + "filename": { + "type": "string", + "description": "filename of pseudopotential file on filesystem" + }, + "name": { + "type": "string", + "description": "name of the data category", + "enum": ["pseudopotential"] } - } + }, + "required": [ + "element", + "type", + "exchangeCorrelation", + "source", + "path", + "apps" + ] } From 6b705d9783e6935088405f116bc58dd916d3ff2e Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Tue, 21 Nov 2023 09:02:05 +0800 Subject: [PATCH 4/5] SOF-6896: move data field from psp/file to psp schema --- example/methods_directory/physical/psp.json | 83 ++++++++++--------- .../methods_directory/physical/psp/file.json | 83 +++++++++---------- schema/methods_directory/physical/psp.json | 17 ++-- 3 files changed, 94 insertions(+), 89 deletions(-) diff --git a/example/methods_directory/physical/psp.json b/example/methods_directory/physical/psp.json index 8ca42ef8f..fc55a2358 100644 --- a/example/methods_directory/physical/psp.json +++ b/example/methods_directory/physical/psp.json @@ -10,46 +10,49 @@ }, "data": [ { - "element": "Ru", - "hash": "3349af97451e04faae570056fb6a110b", - "filename": "ru_pbe_dojo-oncv_0.4.upf", - "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", - "valenceConfiguration": [ - { - "orbitalName": "4S", - "orbitalIndex": 1, - "principalNumber": 4, - "angularMomentum": 0, - "occupation": 2.0 - }, - { - "orbitalName": "4P", - "orbitalIndex": 2, - "principalNumber": 4, - "angularMomentum": 1, - "occupation": 6.0 - }, - { - "orbitalName": "4D", - "orbitalIndex": 3, - "principalNumber": 4, - "angularMomentum": 2, - "occupation": 7.0 - }, - { - "orbitalName": "5S", - "orbitalIndex": 4, - "principalNumber": 5, - "angularMomentum": 0, - "occupation": 1.0 - } - ], - "apps": ["espresso"], - "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, - "name": "pseudopotential", - "source": "dojo-oncv", - "type": "nc", - "version": "0.4" + "slug": "pseudopotential", + "data": { + "element": "Ru", + "hash": "3349af97451e04faae570056fb6a110b", + "filename": "ru_pbe_dojo-oncv_0.4.upf", + "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", + "valenceConfiguration": [ + { + "orbitalName": "4S", + "orbitalIndex": 1, + "principalNumber": 4, + "angularMomentum": 0, + "occupation": 2.0 + }, + { + "orbitalName": "4P", + "orbitalIndex": 2, + "principalNumber": 4, + "angularMomentum": 1, + "occupation": 6.0 + }, + { + "orbitalName": "4D", + "orbitalIndex": 3, + "principalNumber": 4, + "angularMomentum": 2, + "occupation": 7.0 + }, + { + "orbitalName": "5S", + "orbitalIndex": 4, + "principalNumber": 5, + "angularMomentum": 0, + "occupation": 1.0 + } + ], + "apps": ["espresso"], + "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, + "name": "pseudopotential", + "source": "dojo-oncv", + "type": "nc", + "version": "0.4" + } } ] } diff --git a/example/methods_directory/physical/psp/file.json b/example/methods_directory/physical/psp/file.json index 8b21d5094..fc6dec866 100644 --- a/example/methods_directory/physical/psp/file.json +++ b/example/methods_directory/physical/psp/file.json @@ -1,45 +1,42 @@ { - "slug": "pseudopotential", - "data": { - "element": "Ru", - "hash": "3349af97451e04faae570056fb6a110b", - "filename": "ru_pbe_dojo-oncv_0.4.upf", - "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", - "valenceConfiguration": [ - { - "orbitalName": "4S", - "orbitalIndex": 1, - "principalNumber": 4, - "angularMomentum": 0, - "occupation": 2.0 - }, - { - "orbitalName": "4P", - "orbitalIndex": 2, - "principalNumber": 4, - "angularMomentum": 1, - "occupation": 6.0 - }, - { - "orbitalName": "4D", - "orbitalIndex": 3, - "principalNumber": 4, - "angularMomentum": 2, - "occupation": 7.0 - }, - { - "orbitalName": "5S", - "orbitalIndex": 4, - "principalNumber": 5, - "angularMomentum": 0, - "occupation": 1.0 - } - ], - "apps": ["espresso"], - "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, - "name": "pseudopotential", - "source": "dojo-oncv", - "type": "nc", - "version": "0.4" - } + "element": "Ru", + "hash": "3349af97451e04faae570056fb6a110b", + "filename": "ru_pbe_dojo-oncv_0.4.upf", + "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", + "valenceConfiguration": [ + { + "orbitalName": "4S", + "orbitalIndex": 1, + "principalNumber": 4, + "angularMomentum": 0, + "occupation": 2.0 + }, + { + "orbitalName": "4P", + "orbitalIndex": 2, + "principalNumber": 4, + "angularMomentum": 1, + "occupation": 6.0 + }, + { + "orbitalName": "4D", + "orbitalIndex": 3, + "principalNumber": 4, + "angularMomentum": 2, + "occupation": 7.0 + }, + { + "orbitalName": "5S", + "orbitalIndex": 4, + "principalNumber": 5, + "angularMomentum": 0, + "occupation": 1.0 + } + ], + "apps": ["espresso"], + "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, + "name": "pseudopotential", + "source": "dojo-oncv", + "type": "nc", + "version": "0.4" } diff --git a/schema/methods_directory/physical/psp.json b/schema/methods_directory/physical/psp.json index e4b28b1d2..ff62c8195 100644 --- a/schema/methods_directory/physical/psp.json +++ b/schema/methods_directory/physical/psp.json @@ -12,15 +12,20 @@ "categories": { "$ref": "../../methods_category/physical/qm/wf/psp.json" }, - "slug": { - "type": "string", - "description": "pseudopotential" - }, "data": { "type": "array", "items": { - "description": "Specific data based on pseudopotential file.", - "$ref": "./psp/file.json" + "type": "object", + "properties": { + "slug": { + "description": "pseudopotential", + "enum": ["pseudopotential"] + }, + "data": { + "description": "Specific data based on pseudopotential file.", + "$ref": "./psp/file.json" + } + } } } }, From 6773ddcd30be3e0bbb1058bedfec331b0c755b91 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Tue, 21 Nov 2023 13:02:00 +0800 Subject: [PATCH 5/5] SOF-6896: make it follow current web-app convention --- .../methods_directory/physical/psp/file.json | 87 ++++++++++--------- schema/methods_directory/physical/psp.json | 13 +-- .../methods_directory/physical/psp/file.json | 75 +++------------- .../physical/psp/file_data_item.json | 77 ++++++++++++++++ 4 files changed, 139 insertions(+), 113 deletions(-) create mode 100644 schema/methods_directory/physical/psp/file_data_item.json diff --git a/example/methods_directory/physical/psp/file.json b/example/methods_directory/physical/psp/file.json index fc6dec866..4243aadc8 100644 --- a/example/methods_directory/physical/psp/file.json +++ b/example/methods_directory/physical/psp/file.json @@ -1,42 +1,49 @@ { - "element": "Ru", - "hash": "3349af97451e04faae570056fb6a110b", - "filename": "ru_pbe_dojo-oncv_0.4.upf", - "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", - "valenceConfiguration": [ - { - "orbitalName": "4S", - "orbitalIndex": 1, - "principalNumber": 4, - "angularMomentum": 0, - "occupation": 2.0 - }, - { - "orbitalName": "4P", - "orbitalIndex": 2, - "principalNumber": 4, - "angularMomentum": 1, - "occupation": 6.0 - }, - { - "orbitalName": "4D", - "orbitalIndex": 3, - "principalNumber": 4, - "angularMomentum": 2, - "occupation": 7.0 - }, - { - "orbitalName": "5S", - "orbitalIndex": 4, - "principalNumber": 5, - "angularMomentum": 0, - "occupation": 1.0 - } - ], - "apps": ["espresso"], - "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, - "name": "pseudopotential", - "source": "dojo-oncv", - "type": "nc", - "version": "0.4" + "slug": "pseudopotential", + "source": { + "info": {}, + "type": "exabyte" + }, + "data": { + "element": "Ru", + "hash": "3349af97451e04faae570056fb6a110b", + "filename": "ru_pbe_dojo-oncv_0.4.upf", + "path": "/export/share/pseudo/ru/gga/pbe/dojo-oncv/0.4/nc/ru_pbe_dojo-oncv_0.4.upf", + "valenceConfiguration": [ + { + "orbitalName": "4S", + "orbitalIndex": 1, + "principalNumber": 4, + "angularMomentum": 0, + "occupation": 2.0 + }, + { + "orbitalName": "4P", + "orbitalIndex": 2, + "principalNumber": 4, + "angularMomentum": 1, + "occupation": 6.0 + }, + { + "orbitalName": "4D", + "orbitalIndex": 3, + "principalNumber": 4, + "angularMomentum": 2, + "occupation": 7.0 + }, + { + "orbitalName": "5S", + "orbitalIndex": 4, + "principalNumber": 5, + "angularMomentum": 0, + "occupation": 1.0 + } + ], + "apps": ["espresso"], + "exchangeCorrelation": { "functional": "pbe", "approximation": "gga" }, + "name": "pseudopotential", + "source": "dojo-oncv", + "type": "nc", + "version": "0.4" + } } diff --git a/schema/methods_directory/physical/psp.json b/schema/methods_directory/physical/psp.json index ff62c8195..62cde0bad 100644 --- a/schema/methods_directory/physical/psp.json +++ b/schema/methods_directory/physical/psp.json @@ -15,17 +15,8 @@ "data": { "type": "array", "items": { - "type": "object", - "properties": { - "slug": { - "description": "pseudopotential", - "enum": ["pseudopotential"] - }, - "data": { - "description": "Specific data based on pseudopotential file.", - "$ref": "./psp/file.json" - } - } + "description": "Specific data based on pseudopotential file.", + "$ref": "./psp/file.json" } } }, diff --git a/schema/methods_directory/physical/psp/file.json b/schema/methods_directory/physical/psp/file.json index 736bf8e47..fc6d3948e 100644 --- a/schema/methods_directory/physical/psp/file.json +++ b/schema/methods_directory/physical/psp/file.json @@ -1,77 +1,28 @@ { "$id": "methods-directory/physical/psp/file", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "pseudopotential file", + "title": "Pseudopotential file", "properties": { - "element": { - "type": "string", - "description": "chemical element" - }, - "hash": { - "type": "string", - "description": "MD5 hash of the pseudopotential file" + "slug": { + "enum": ["pseudopotential"] }, - "type": { - "type": "string", - "description": "type of pseudization", - "$ref": "../../../methods_category/physical/qm/wf/enum_options.json#/pseudoSubtypes" + "data": { + "items": { + "description": "Specific data based on pseudopotential file.", + "$ref": "file_data_item.json" + } }, "source": { - "type": "string", - "description": "explains where this came from" - }, - "version": { - "type": "string", - "description": "explains the version of where this came from" - }, - "exchangeCorrelation": { "type": "object", + "description": "TODO: remove in the future", "properties": { - "approximation": { - "description": "DFT approximation", - "type": "string" + "info": { + "type": "object" }, - "functional": { - "description": "Exchange correlation functional", + "type": { "type": "string" - }, - "path": { - "description": "DFT model path, e.g. '/pb/qm/dft/ksdft/gga?functional=pbe'", - "$ref": "../../../core/reusable/category_path.json" } } - }, - "valenceConfiguration": { - "type": "array", - "description": "contains pseudo orbital information, including orbital names and occupations", - "items": { - "$ref": "../../../core/reusable/atomic_orbital.json" - } - }, - "path": { - "type": "string", - "description": "location of the pseudopotential file on filesystem" - }, - "apps": { - "type": "array", - "description": "simulation engines that can use this pseudopotential" - }, - "filename": { - "type": "string", - "description": "filename of pseudopotential file on filesystem" - }, - "name": { - "type": "string", - "description": "name of the data category", - "enum": ["pseudopotential"] } - }, - "required": [ - "element", - "type", - "exchangeCorrelation", - "source", - "path", - "apps" - ] + } } diff --git a/schema/methods_directory/physical/psp/file_data_item.json b/schema/methods_directory/physical/psp/file_data_item.json new file mode 100644 index 000000000..1f11b941a --- /dev/null +++ b/schema/methods_directory/physical/psp/file_data_item.json @@ -0,0 +1,77 @@ +{ + "$id": "methods-directory/physical/psp/file-data-item", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "File data item", + "properties": { + "element": { + "type": "string", + "description": "chemical element" + }, + "hash": { + "type": "string", + "description": "MD5 hash of the pseudopotential file" + }, + "type": { + "type": "string", + "description": "type of pseudization", + "$ref": "../../../methods_category/physical/qm/wf/enum_options.json#/pseudoSubtypes" + }, + "source": { + "type": "string", + "description": "explains where this came from" + }, + "version": { + "type": "string", + "description": "explains the version of where this came from" + }, + "exchangeCorrelation": { + "type": "object", + "properties": { + "approximation": { + "description": "DFT approximation", + "type": "string" + }, + "functional": { + "description": "Exchange correlation functional", + "type": "string" + }, + "path": { + "description": "DFT model path, e.g. '/pb/qm/dft/ksdft/gga?functional=pbe'", + "$ref": "../../../core/reusable/category_path.json" + } + } + }, + "valenceConfiguration": { + "type": "array", + "description": "contains pseudo orbital information, including orbital names and occupations", + "items": { + "$ref": "../../../core/reusable/atomic_orbital.json" + } + }, + "path": { + "type": "string", + "description": "location of the pseudopotential file on filesystem" + }, + "apps": { + "type": "array", + "description": "simulation engines that can use this pseudopotential" + }, + "filename": { + "type": "string", + "description": "filename of pseudopotential file on filesystem" + }, + "name": { + "type": "string", + "description": "name of the data category", + "enum": ["pseudopotential"] + } + }, + "required": [ + "element", + "type", + "exchangeCorrelation", + "source", + "path", + "apps" + ] +}