Skip to content

Commit

Permalink
SOF-6892: store numeric and string atomic data in separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed Dec 7, 2023
1 parent 84c77d6 commit 1ec3913
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 44 deletions.
8 changes: 7 additions & 1 deletion example/properties_directory/non-scalar/hubbard_u.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@
"values": [
{
"id": 1,
"atomicSpecies": "Co",
"atomicSpecies": "Co1",
"orbitalName": "3d",
"value": 6.7553
},
{
"id": 2,
"atomicSpecies": "Co2",
"orbitalName": "3d",
"value": 6.7553
},
{
"id": 3,
"atomicSpecies": "O",
"orbitalName": "3p",
"value": 2.2438
Expand Down
25 changes: 25 additions & 0 deletions schema/core/reusable/atomic_data/numeric.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$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",
"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."
}
}
}
27 changes: 27 additions & 0 deletions schema/core/reusable/atomic_data/string.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$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",
"type": "object",
"properties": {
"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]$"
}
}
}
21 changes: 7 additions & 14 deletions schema/core/reusable/atomic_data_per_orbital.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@
"title": "Atomic data per orbital",
"description": "Atomic properties per orbital e.g., Hubbard U parameters.",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Site number in the lattice"
"allOf": [
{
"$ref": "atomic_data/numeric.json"
},
"atomicSpecies": {
"type": "string",
"description": "Atomic species name. Example: Co, Ni1, O"
},
"orbitalName": {
"type": "string",
"pattern": "^[1-7][sSpPdDfF]$",
"description": "Atomic orbital or Hubbard manifold."
{
"$ref": "atomic_data/string.json"
}
},
"required": ["id", "atomicSpecies", "orbitalName"]
],
"required": ["id", "atomicSpecies", "orbitalName", "value"]
}
36 changes: 7 additions & 29 deletions schema/core/reusable/atomic_data_per_orbital_pair.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,13 @@
"title": "Atomic data per orbital pair",
"description": "Atomic properties per orbital pair e.g., Hubbard V parameters.",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Site number or index in the lattice"
"allOf": [
{
"$ref": "atomic_data/numeric.json"
},
"id2": {
"type": "number",
"description": "Site number or index in the lattice of second site"
},
"atomicSpecies": {
"type": "string",
"description": "Example: Co1"
},
"atomicSpecies2": {
"type": "string",
"description": "Example: 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."
{
"$ref": "atomic_data/string.json"
}
},
"required": ["id", "id2", "atomicSpecies", "atomicSpecies2"]
],
"required": ["id", "id2", "atomicSpecies", "atomicSpecies2", "value"]
}

0 comments on commit 1ec3913

Please sign in to comment.