Skip to content

Commit

Permalink
SOF-7136: separate schemas for Hubbard V and V nearest neighbors for …
Browse files Browse the repository at this point in the history
…stricter validation
  • Loading branch information
pranabdas committed Dec 22, 2023
1 parent c913e3a commit 1735899
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 14 deletions.
20 changes: 8 additions & 12 deletions example/properties_directory/non-scalar/hubbard_v.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
24 changes: 24 additions & 0 deletions example/properties_directory/non-scalar/hubbard_v_nn.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
2 changes: 1 addition & 1 deletion manifest/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion schema/properties_directory/non-scalar/hubbard_v.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Hubbard V value in eV",
"properties": {
"name": {
"enum": ["hubbard_v", "hubbard_v_nn"]
"enum": ["hubbard_v"]
},
"units": {
"enum": ["eV"]
Expand All @@ -24,6 +24,7 @@
"id2",
"atomicSpecies",
"atomicSpecies2",
"distance",
"value"
]
}
Expand Down
35 changes: 35 additions & 0 deletions schema/properties_directory/non-scalar/hubbard_v_nn.json
Original file line number Diff line number Diff line change
@@ -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",
"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"]
}

0 comments on commit 1735899

Please sign in to comment.