Skip to content

Commit

Permalink
SOF-6892: refactoring atomic data per orbital and orbital pair
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed Dec 8, 2023
1 parent c08e946 commit e0cefa4
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 64 deletions.
25 changes: 0 additions & 25 deletions schema/core/reusable/atomic_data/numeric.json

This file was deleted.

13 changes: 13 additions & 0 deletions schema/core/reusable/atomic_data/numeric_value.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$id": "core/reusable/atomic-data/numeric-value",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Atomic data numeric properties",
"description": "Numeric value specific to atomic data",
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "Value related to a specific property, e.g., Hubbard U, V etc."
}
}
}
22 changes: 22 additions & 0 deletions schema/core/reusable/atomic_data/per_orbital.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$id": "core/reusable/atomic-data/per-orbital",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Atomic data per orbital",
"description": "Atomic properties per orbital e.g., Hubbard U parameters.",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Site number or index in the lattice"
},
"atomicSpecies": {
"type": "string",
"pattern": "^[a-zA-Z]{1,2}[\\d+]?$",
"description": "Example: Co1, Mn"
},
"orbitalName": {
"type": "string",
"pattern": "^[1-7][sSpPdDfF]$"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
{
"$id": "core/reusable/atomic-data/string-data",
"$id": "core/reusable/atomic-data/per-orbital-pair",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Atomic data string properties",
"description": "String fields used in atomic data",
"title": "Atomic data per orbital pair",
"description": "Atomic properties per orbital pair e.g., Hubbard V parameters.",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Site number or index in the lattice"
},
"id2": {
"type": "integer",
"description": "Site number or index in the lattice of second site"
},
"atomicSpecies": {
"type": "string",
"pattern": "^[a-zA-Z]{1,2}[\\d+]?$",
Expand All @@ -22,6 +30,10 @@
"orbitalName2": {
"type": "string",
"pattern": "^[1-7][sSpPdDfF]$"
},
"distance": {
"type": "number",
"description": "Distance between two sites in angstrom."
}
}
}
13 changes: 13 additions & 0 deletions schema/core/reusable/atomic_data/string_value.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$id": "core/reusable/atomic-data/string-value",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Atomic data string properties",
"description": "String value specific to atomic data",
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "String value specific to atomic data"
}
}
}
16 changes: 0 additions & 16 deletions schema/core/reusable/atomic_data_per_orbital.json

This file was deleted.

15 changes: 15 additions & 0 deletions schema/core/reusable/atomic_data_per_orbital_numeric.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$id": "core/reusable/atomic-data-per-orbital-numeric",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Atomic data per orbital numeric",
"description": "Atomic properties per orbital pair with numeric value e.g., Hubbard V parameters.",
"type": "object",
"allOf":[
{
"$ref": "atomic_data/per_orbital.json"
},
{
"$ref": "atomic_data/numeric_value.json"
}
]
}
16 changes: 0 additions & 16 deletions schema/core/reusable/atomic_data_per_orbital_pair.json

This file was deleted.

15 changes: 15 additions & 0 deletions schema/core/reusable/atomic_data_per_orbital_pair_numeric.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$id": "core/reusable/atomic-data-per-orbital-pair-numeric",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Atomic data per orbital pair numeric",
"description": "Atomic properties per orbital pair with numeric value e.g., Hubbard V parameters.",
"type": "object",
"allOf":[
{
"$ref": "atomic_data/per_orbital_pair.json"
},
{
"$ref": "atomic_data/numeric_value.json"
}
]
}
5 changes: 3 additions & 2 deletions schema/properties_directory/non-scalar/hubbard_u.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
"type": "object",
"allOf": [
{
"$ref": "../../core/reusable/atomic_data_per_orbital.json"
"$ref": "../../core/reusable/atomic_data_per_orbital_numeric.json"
}
]
],
"required": ["id", "atomicSpecies", "orbitalName", "value"]
}
}
},
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 @@ -16,9 +16,10 @@
"type": "object",
"allOf": [
{
"$ref": "../../core/reusable/atomic_data_per_orbital_pair.json"
"$ref": "../../core/reusable/atomic_data_per_orbital_pair_numeric.json"
}
]
],
"required": ["id", "id2", "atomicSpecies", "atomicSpecies2", "value"]
}
}
},
Expand Down

0 comments on commit e0cefa4

Please sign in to comment.