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 f240a45
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 66 deletions.
14 changes: 1 addition & 13 deletions schema/core/reusable/atomic_data/numeric.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,9 @@
"$id": "core/reusable/atomic-data/numeric-data",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Atomic data numeric properties",
"description": "Numeric fields used in atomic data",
"description": "Numeric value specific to atomic data",
"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"
},
"distance": {
"type": "number",
"description": "Distance between two sites in angstrom."
},
"value": {
"type": "number",
"description": "Value related to a specific property, e.g., Hubbard U, V etc."
Expand Down
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]$"
}
}
}
39 changes: 39 additions & 0 deletions schema/core/reusable/atomic_data/per_orbital_pair.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$id": "core/reusable/atomic-data/per-orbital-pair",
"$schema": "http://json-schema.org/draft-04/schema#",
"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+]?$",
"description": "Example: Co1, Mn"
},
"atomicSpecies2": {
"type": "string",
"pattern": "^[a-zA-Z]{1,2}[\\d+]?$",
"description": "Example: Co2, O"
},
"orbitalName": {
"type": "string",
"pattern": "^[1-7][sSpPdDfF]$"
},
"orbitalName2": {
"type": "string",
"pattern": "^[1-7][sSpPdDfF]$"
},
"distance": {
"type": "number",
"description": "Distance between two sites in angstrom."
}
}
}
20 changes: 3 additions & 17 deletions schema/core/reusable/atomic_data/string.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,12 @@
"$id": "core/reusable/atomic-data/string-data",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Atomic data string properties",
"description": "String fields used in atomic data",
"description": "String value specific to atomic data",
"type": "object",
"properties": {
"atomicSpecies": {
"value": {
"type": "string",
"pattern": "^[a-zA-Z]{1,2}[\\d+]?$",
"description": "Example: Co1, Mn"
},
"atomicSpecies2": {
"type": "string",
"pattern": "^[a-zA-Z]{1,2}[\\d+]?$",
"description": "Example: Co2, O"
},
"orbitalName": {
"type": "string",
"pattern": "^[1-7][sSpPdDfF]$"
},
"orbitalName2": {
"type": "string",
"pattern": "^[1-7][sSpPdDfF]$"
"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.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.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 f240a45

Please sign in to comment.