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 0baa0e8
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 17 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
2 changes: 1 addition & 1 deletion schema/core/reusable/atomic_data/per_orbital_pair.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"distance": {
"type": "number",
"description": "Distance between two sites in angstrom."
"description": "Distance between two sites in Bohr."
}
}
}
2 changes: 1 addition & 1 deletion schema/properties_directory/non-scalar/hubbard_u.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
5 changes: 3 additions & 2 deletions schema/properties_directory/non-scalar/hubbard_v.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
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 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"]
}

0 comments on commit 0baa0e8

Please sign in to comment.