From 8d503f5bc8da68842d9a6f212ebd014349c58f88 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:15:47 +0800 Subject: [PATCH] fix/SOF-6896: data field under psp/file is an object not array + avoid duplication of file.json content, use include to reuse in psp.json --- example/methods_directory/physical/psp.json | 44 +------------------ .../methods_directory/physical/psp/file.json | 6 +-- 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/example/methods_directory/physical/psp.json b/example/methods_directory/physical/psp.json index fc55a2358..46c0fb2ec 100644 --- a/example/methods_directory/physical/psp.json +++ b/example/methods_directory/physical/psp.json @@ -10,49 +10,7 @@ }, "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" - } + "...": "include(psp/file.json)" } ] } diff --git a/schema/methods_directory/physical/psp/file.json b/schema/methods_directory/physical/psp/file.json index fc6d3948e..2e2e97e48 100644 --- a/schema/methods_directory/physical/psp/file.json +++ b/schema/methods_directory/physical/psp/file.json @@ -7,10 +7,8 @@ "enum": ["pseudopotential"] }, "data": { - "items": { - "description": "Specific data based on pseudopotential file.", - "$ref": "file_data_item.json" - } + "description": "Specific data based on pseudopotential file.", + "$ref": "file_data_item.json" }, "source": { "type": "object",