Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOF-7136: property manifest for Hubbard V nearest neighbors #284

Merged
merged 4 commits into from
Dec 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
SOF-7136: separate schemas for Hubbard V and V nearest neighbors for …
…stricter validation
  • Loading branch information
pranabdas committed Dec 22, 2023
commit 0baa0e8040de1982b937ac52b8c3b747b3e68160
20 changes: 8 additions & 12 deletions example/properties_directory/non-scalar/hubbard_v.json
Original file line number Diff line number Diff line change
@@ -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
@@ -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
@@ -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
@@ -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"]
5 changes: 3 additions & 2 deletions schema/properties_directory/non-scalar/hubbard_v.json
Original file line number Diff line number Diff line change
@@ -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"]
@@ -24,6 +24,7 @@
"id2",
"atomicSpecies",
"atomicSpecies2",
"distance",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have v and v_nn to be identical from the data structure standpoint, the latter is just for convenience purposes.

We could do one of the following:

"value"
]
}
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": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's just reuse allOf:

                "allOf": [
                    {
                        "$ref": "hubbard_v.json"
                    }

And keep description

"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"]
}
Loading