From 07e620ef43659ad51b6bac0bbc9acd4dbc81231a Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:08:38 -0700 Subject: [PATCH 01/25] wip: coarse idea --- src/py/mat3ra/standata/__init__.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/py/mat3ra/standata/__init__.py b/src/py/mat3ra/standata/__init__.py index 7f11e04..869d872 100644 --- a/src/py/mat3ra/standata/__init__.py +++ b/src/py/mat3ra/standata/__init__.py @@ -1 +1,22 @@ +from typing import List + from .base import Standata +from .materials import materials_data + + +class StandataMaterials: + + def __init__(self): + self.entities = materials_data + + def get_by_name(self, name: str) -> List[dict]: + """Returns entity by name. + + Args: + name: Name of the entity. + """ + matching_entities = [] + for key, entity in self.entities["filesMapByName"].items(): + if name in key: + matching_entities.append(entity) + return matching_entities From f190484fc5a7ea84c8f26366107ecd6feaa335a6 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 24 Oct 2024 18:13:49 -0700 Subject: [PATCH 02/25] chore: remove old files --- src/py/mat3ra/__init__.py | 0 src/py/mat3ra/standata/__init__.py | 20 +++++++++----- src/py/mat3ra/standata/applications.py | 3 --- .../mat3ra/standata/{base.py => builder.py} | 0 src/py/mat3ra/standata/data/__init__.py | 27 +++++++++++++++++++ src/py/mat3ra/standata/{ => data}/cli.py | 0 src/py/mat3ra/standata/materials.py | 3 --- src/py/mat3ra/standata/properties.py | 3 --- src/py/mat3ra/standata/workflows.py | 3 --- 9 files changed, 41 insertions(+), 18 deletions(-) delete mode 100644 src/py/mat3ra/__init__.py delete mode 100644 src/py/mat3ra/standata/applications.py rename src/py/mat3ra/standata/{base.py => builder.py} (100%) create mode 100644 src/py/mat3ra/standata/data/__init__.py rename src/py/mat3ra/standata/{ => data}/cli.py (100%) delete mode 100644 src/py/mat3ra/standata/materials.py delete mode 100644 src/py/mat3ra/standata/properties.py delete mode 100644 src/py/mat3ra/standata/workflows.py diff --git a/src/py/mat3ra/__init__.py b/src/py/mat3ra/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/py/mat3ra/standata/__init__.py b/src/py/mat3ra/standata/__init__.py index 869d872..54e8606 100644 --- a/src/py/mat3ra/standata/__init__.py +++ b/src/py/mat3ra/standata/__init__.py @@ -1,22 +1,30 @@ +import re from typing import List from .base import Standata from .materials import materials_data -class StandataMaterials: +class Standata: - def __init__(self): - self.entities = materials_data + # Override in children + data = {"filesMapByName": []} + files_map_by_name = data["filesMapByName"] - def get_by_name(self, name: str) -> List[dict]: + @classmethod + def get_as_list(cls): + return cls.files_map_by_name + + @classmethod + def get_by_name(cls, name: str) -> List[dict]: """Returns entity by name. Args: name: Name of the entity. """ matching_entities = [] - for key, entity in self.entities["filesMapByName"].items(): - if name in key: + for key, entity in cls.files_map_by_name.items(): + regex = re.compile(name, re.IGNORECASE) + if re.match(regex, key): matching_entities.append(entity) return matching_entities diff --git a/src/py/mat3ra/standata/applications.py b/src/py/mat3ra/standata/applications.py deleted file mode 100644 index f82dc2a..0000000 --- a/src/py/mat3ra/standata/applications.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -applications_data = json.loads(r'''{"standataConfig":{"categories":{"model":["atomistic","macroscopic","mesoscopic","quantum-mechanical","statistical"],"language_type":["scripting","compiled"],"purpose":["command_line_interface","interactive_computing_environment","programming_language"]},"entities":[{"filename":"espresso_gnu_540.json","categories":["quantum-mechanical"]},{"filename":"python_386.json","categories":["scripting","programming_language"]}]},"filesMapByName":{"espresso_gnu_540.json":{"name":"espresso","shortName":"qe","summary":"Quantum Espresso","version":"5.4.0","build":"GNU","hasAdvancedComputeOptions":true,"isLicensed":false},"python_386.json":{"name":"python","shortName":"py","summary":"Python Script","version":"3.8.6","build":"Default","hasAdvancedComputeOptions":false,"isLicensed":false}}}''') diff --git a/src/py/mat3ra/standata/base.py b/src/py/mat3ra/standata/builder.py similarity index 100% rename from src/py/mat3ra/standata/base.py rename to src/py/mat3ra/standata/builder.py diff --git a/src/py/mat3ra/standata/data/__init__.py b/src/py/mat3ra/standata/data/__init__.py new file mode 100644 index 0000000..1a220ee --- /dev/null +++ b/src/py/mat3ra/standata/data/__init__.py @@ -0,0 +1,27 @@ +import re +from typing import List + +from .base import Standata +from .materials import materials_data + + +class StandataMaterials: + + def __init__(self): + self.entities = materials_data + + def get_json(self): + return self.entities["filesMapByName"] + + def get_by_name(self, name: str) -> List[dict]: + """Returns entity by name. + + Args: + name: Name of the entity. + """ + matching_entities = [] + for key, entity in self.entities["filesMapByName"].items(): + regex = re.compile(name, re.IGNORECASE) + if re.match(regex, key): + matching_entities.append(entity) + return matching_entities diff --git a/src/py/mat3ra/standata/cli.py b/src/py/mat3ra/standata/data/cli.py similarity index 100% rename from src/py/mat3ra/standata/cli.py rename to src/py/mat3ra/standata/data/cli.py diff --git a/src/py/mat3ra/standata/materials.py b/src/py/mat3ra/standata/materials.py deleted file mode 100644 index 5729426..0000000 --- a/src/py/mat3ra/standata/materials.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -materials_data = json.loads(r'''{"standataConfig":{"categories":{"type":["semiconductor","solar energy material","storage medium","organic electronics","battery/energy storage","composite","polymer","metals & alloys","solvent","catalysis","consumer packaged goods","glass","ceramic"],"form_factor":["bulk","layer","interface"],"dimensionality":["0D","1D","2D","3D","4D"],"electrical_conductivity":["metal","semi-metal","semiconductor","insulator"],"magnetism":["ferromagnetic","anti-ferromagnetic","paramagnetic","diamagnetic","non-magnetic"],"superconductivity":["type I","type II"],"composition":["oxide","nitride","carbide"]},"entities":[{"filename":"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json","categories":["2D","layer","semi-metal","non-magnetic"]},{"filename":"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json","categories":["3D","bulk","semi-metal","non-magnetic","battery/energy storage"]},{"filename":"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json","categories":["2D","layer","insulator","non-magnetic"]},{"filename":"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json","categories":["3D","bulk","metal","ferromagnetic"]},{"filename":"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json","categories":["3D","bulk","semiconductor","non-magnetic","oxide"]},{"filename":"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json","categories":["3D","bulk","insulator","non-magnetic","oxide","glass"]},{"filename":"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json","categories":["3D","bulk","semiconductor","ferromagnetic","oxide"]},{"filename":"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json","categories":["3D","bulk","semiconductor","non-magnetic","nitride"]},{"filename":"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json","categories":["3D","bulk","insulator","non-magnetic","nitride","ceramic"]}]},"filesMapByName":{"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json":{"name":"C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993","lattice":{"type":"HEX","a":2.464955,"b":2.464956,"c":19.996729,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0.666667,0.333333,0.5]}]},"external":{"id":"2dm-3993","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3993","origin":true},"isNonPeriodic":false},"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json":{"name":"C, Graphite, HEX (P6_3/mmc) 3D (Bulk), mp-48","lattice":{"type":"HEX","a":2.467291,"b":2.467291,"c":7.803073,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"},{"id":2,"value":"C"},{"id":3,"value":"C"}],"coordinates":[{"id":0,"value":[0,0,0.25]},{"id":1,"value":[0,0,0.75]},{"id":2,"value":[0.3333333,0.6666667,0.25]},{"id":3,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-48","source":"Materials Project","doi":"10.17188/1208406","url":"https://next-gen.materialsproject.org/materials/mp-48","origin":true},"isNonPeriodic":false},"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json":{"name":"BN, Hexagonal Boron Nitride, HEX (P6/mmm) 2D (Monolayer), 2dm-4991","lattice":{"type":"HEX","a":2.508995,"b":2.508996,"c":20,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"N"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.5]}]},"external":{"id":"2dm-4991","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-4991","origin":true},"isNonPeriodic":false},"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json":{"name":"BN, Boron Nitride, HEX (P6_3/mmc) 3D (Bulk), mp-7991","lattice":{"type":"HEX","a":2.5116,"b":2.5116,"c":8.267796,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"B"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.25]},{"id":1,"value":[0.6666667,0.3333333,0.75]},{"id":2,"value":[0,0,0.25]},{"id":3,"value":[0,0,0.75]}]},"external":{"id":"mp-7991","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-7991","origin":true},"isNonPeriodic":false},"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json":{"name":"NaCl, Sodium Chloride, FCC (Fm-3m) 3D (Bulk), mp-22862","lattice":{"type":"FCC","a":4.024635,"b":4.024635,"c":4.024635,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Na"},{"id":1,"value":"Cl"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.5,0.5,0.5]}]},"external":{"id":"mp-22862","source":"Materials Project","doi":"10.17188/1199028","url":"https://next-gen.materialsproject.org/materials/mp-22862","origin":true},"isNonPeriodic":false},"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json":{"name":"Si, Silicon, FCC (Fd-3m) 3D (Bulk), mp-149","lattice":{"type":"FCC","a":3.866976,"b":3.866975,"c":3.866975,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.875,0.875,0.875]},{"id":1,"value":[0.125,0.125,0.125]}]},"external":{"id":"mp-149","source":"Materials Project","doi":"10.17188/1190959","url":"https://next-gen.materialsproject.org/materials/mp-149","origin":true},"isNonPeriodic":false},"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json":{"name":"Si, Silicene, HEX (P-3m1) 2D (Monolayer), 2dm-5934","lattice":{"type":"HEX","a":3.875909,"b":3.875457,"c":20.688228,"alpha":90,"beta":90,"gamma":120.0039,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.833322,0.666644,0.487728]},{"id":1,"value":[0.166679,0.333356,0.512272]}]},"external":{"id":"2dm-5934","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5934","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json":{"name":"WS2, Tungsten Disulfide, HEX (P6_3/mmc) 3D (Bulk), mp-224","lattice":{"type":"HEX","a":3.190731,"b":3.19073,"c":14.2024,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.6666667,0.6666667,0.75]},{"id":1,"value":[0.3333333,0.3333333,0.25]},{"id":2,"value":[0.6666667,0.6666667,0.139241]},{"id":3,"value":[0.3333333,0.3333333,0.639241]},{"id":4,"value":[0.6666667,0.6666667,0.360759]},{"id":5,"value":[0.3333333,0.3333333,0.860759]}]},"external":{"id":"mp-224","source":"Materials Project","doi":"10.17188/1197614","url":"https://next-gen.materialsproject.org/materials/mp-224","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json":{"name":"WS2, Tungsten Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3749","lattice":{"type":"HEX","a":3.193434,"b":3.193434,"c":23.131045,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.568029]},{"id":2,"value":[0.333333,0.666667,0.431971]}]},"external":{"id":"2dm-3749","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3749","origin":true},"isNonPeriodic":false},"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json":{"name":"Ni, Nickel, FCC (Fm-3m) 3D (Bulk), mp-23","lattice":{"type":"FCC","a":2.478974,"b":2.478974,"c":2.478974,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ni"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-23","source":"Materials Project","doi":"10.17188/1199153","url":"https://next-gen.materialsproject.org/materials/mp-23","origin":true},"isNonPeriodic":false},"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json":{"name":"Cu, Copper, FCC (Fm-3m) 3D (Bulk), mp-30","lattice":{"type":"FCC","a":2.560619,"b":2.56062,"c":2.560619,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Cu"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-30","source":"Materials Project","doi":"10.17188/1204433","url":"https://next-gen.materialsproject.org/materials/mp-30s","origin":true},"isNonPeriodic":false},"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json":{"name":"Au, Gold, FCC (Fm-3m) 3D (Bulk), mp-81","lattice":{"type":"FCC","a":2.949546,"b":2.949546,"c":2.949546,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Au"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-81","source":"Materials Project","doi":"10.17188/1307925","url":"https://next-gen.materialsproject.org/materials/mp-81","origin":true},"isNonPeriodic":false},"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json":{"name":"ZnO, Zinc Oxide, HEX (P6_3mc) 3D (Bulk), mp-2133","lattice":{"type":"HEX","a":3.289103,"b":3.289103,"c":5.306821,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zn"},{"id":1,"value":"Zn"},{"id":2,"value":"O"},{"id":3,"value":"O"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.500548]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.879762]},{"id":3,"value":[0.3333333,0.6666667,0.379762]}]},"external":{"id":"mp-2133","source":"Materials Project","doi":"10.17188/1196748","url":"https://next-gen.materialsproject.org/materials/mp-2133","origin":true},"isNonPeriodic":false},"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json":{"name":"Al2O3, Sapphire, RHL (R-3c) 3D (Bulk), mp-1143","lattice":{"type":"RHL","a":5.177955,"b":5.177954,"c":5.177956,"alpha":55.2896,"beta":55.2896,"gamma":55.2896,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"Al"},{"id":3,"value":"Al"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"}],"coordinates":[{"id":0,"value":[0.647904,0.647903,0.647903]},{"id":1,"value":[0.852097,0.852097,0.852097]},{"id":2,"value":[0.147904,0.147903,0.147903]},{"id":3,"value":[0.352097,0.352096,0.352096]},{"id":4,"value":[0.443855,0.056145,0.750001]},{"id":5,"value":[0.943855,0.250001,0.556145]},{"id":6,"value":[0.056144,0.75,0.443855]},{"id":7,"value":[0.750001,0.443856,0.056144]},{"id":8,"value":[0.25,0.556144,0.943855]},{"id":9,"value":[0.556144,0.943856,0.249999]}]},"external":{"id":"mp-1143","source":"Materials Project","doi":"10.17188/1187823","url":"https://next-gen.materialsproject.org/materials/mp-1143","origin":true},"isNonPeriodic":false},"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json":{"name":"SiO2, Quartz, HEX (P3_121) 3D (Bulk), mp-7000","lattice":{"type":"HEX","a":5.021502,"b":5.021502,"c":5.51057,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"},{"id":2,"value":"Si"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"}],"coordinates":[{"id":0,"value":[0.523695,0.523695,0]},{"id":1,"value":[0,0.476305,0.6666667]},{"id":2,"value":[0.476305,0,0.3333333]},{"id":3,"value":[0.256094,0.414854,0.794543]},{"id":4,"value":[0.585146,0.84124,0.127877]},{"id":5,"value":[0.15876,0.743906,0.46121]},{"id":6,"value":[0.414854,0.256094,0.205457]},{"id":7,"value":[0.743906,0.15876,0.53879]},{"id":8,"value":[0.84124,0.585146,0.872123]}]},"external":{"id":"mp-7000","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-7000","origin":true},"isNonPeriodic":false},"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json":{"name":"ZrO2, Zirconium Dioxide, MCL (P2_1/c) 3D (Bulk), mp-2858","lattice":{"type":"MCL","a":5.233649,"b":5.26846,"c":5.418476,"alpha":90,"beta":100.0548,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zr"},{"id":1,"value":"Zr"},{"id":2,"value":"Zr"},{"id":3,"value":"Zr"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.724019,0.95582,0.789744]},{"id":1,"value":[0.724019,0.54418,0.289744]},{"id":2,"value":[0.275981,0.45582,0.710256]},{"id":3,"value":[0.275981,0.04418,0.210256]},{"id":4,"value":[0.061015,0.180178,0.854613]},{"id":5,"value":[0.061015,0.319822,0.354613]},{"id":6,"value":[0.54701,0.255674,0.021936]},{"id":7,"value":[0.45299,0.755674,0.478064]},{"id":8,"value":[0.54701,0.244326,0.521936]},{"id":9,"value":[0.45299,0.744326,0.978064]},{"id":10,"value":[0.938985,0.680178,0.645387]},{"id":11,"value":[0.938985,0.819822,0.145387]}]},"external":{"id":"mp-2858","source":"Materials Project","doi":"10.17188/1202679","url":"https://next-gen.materialsproject.org/materials/mp-2858","origin":true},"isNonPeriodic":false},"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json":{"name":"HfO2, Hafnium IV Oxide, MCL (P2_1/c) 3D (Bulk), mp-352","lattice":{"type":"MCL","a":5.142319,"b":5.195148,"c":5.326038,"alpha":90,"beta":99.6745,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Hf"},{"id":1,"value":"Hf"},{"id":2,"value":"Hf"},{"id":3,"value":"Hf"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.275959,0.457319,0.707891]},{"id":1,"value":[0.724041,0.957319,0.792109]},{"id":2,"value":[0.724041,0.542681,0.292109]},{"id":3,"value":[0.275959,0.042681,0.207891]},{"id":4,"value":[0.448887,0.742603,0.977708]},{"id":5,"value":[0.551113,0.242603,0.522292]},{"id":6,"value":[0.551113,0.257397,0.022292]},{"id":7,"value":[0.448887,0.757397,0.477708]},{"id":8,"value":[0.067849,0.330122,0.347094]},{"id":9,"value":[0.932151,0.830122,0.152906]},{"id":10,"value":[0.932151,0.669878,0.652906]},{"id":11,"value":[0.067849,0.169878,0.847094]}]},"external":{"id":"mp-352","source":"Materials Project","doi":"10.17188/1206948","url":"https://next-gen.materialsproject.org/materials/mp-352","origin":true},"isNonPeriodic":false},"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json":{"name":"Y2O3, Yttrium III Oxide, MCLC (C2/m) 3D (Bulk), mp-558573","lattice":{"type":"MCLC","a":3.515998,"b":7.276947,"c":8.695337,"alpha":100.1007,"beta":90,"gamma":103.9801,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Y"},{"id":1,"value":"Y"},{"id":2,"value":"Y"},{"id":3,"value":"Y"},{"id":4,"value":"Y"},{"id":5,"value":"Y"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"},{"id":12,"value":"O"},{"id":13,"value":"O"},{"id":14,"value":"O"}],"coordinates":[{"id":0,"value":[0.635175,0.27035,0.488039]},{"id":1,"value":[0.364825,0.72965,0.511961]},{"id":2,"value":[0.032014,0.064029,0.814048]},{"id":3,"value":[0.691364,0.382729,0.137328]},{"id":4,"value":[0.308636,0.617271,0.862672]},{"id":5,"value":[0.967986,0.935971,0.185952]},{"id":6,"value":[0.127996,0.255992,0.281772]},{"id":7,"value":[0.825532,0.651064,0.030517]},{"id":8,"value":[0.793308,0.586615,0.37737]},{"id":9,"value":[0.470963,0.941926,0.342856]},{"id":10,"value":[0.529037,0.058074,0.657144]},{"id":11,"value":[0.5,0,0]},{"id":12,"value":[0.174468,0.348936,0.969483]},{"id":13,"value":[0.206692,0.413385,0.62263]},{"id":14,"value":[0.872004,0.744008,0.718228]}]},"external":{"id":"mp-558573","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-558573","origin":true},"isNonPeriodic":false},"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json":{"name":"VO2, Vanadium IV Oxide, TET (P4_2/mnm) 3D (Bulk), mp-19094","lattice":{"type":"TET","a":3.038141,"b":4.51531,"c":4.51531,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"V"},{"id":1,"value":"V"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.799236,0.200764]},{"id":3,"value":[0.5,0.200764,0.799236]},{"id":4,"value":[0,0.700764,0.700764]},{"id":5,"value":[0,0.299236,0.299236]}]},"external":{"id":"mp-19094","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-19094","origin":true},"isNonPeriodic":false},"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json":{"name":"TiO2, Titanium Oxide, TET (P4_2/mnm) 3D (Bulk), mp-2657","lattice":{"type":"TET","a":2.969203,"b":4.653272,"c":4.653272,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ti"},{"id":1,"value":"Ti"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.19542,0.80458]},{"id":3,"value":[0.5,0.80458,0.19542]},{"id":4,"value":[0,0.30458,0.30458]},{"id":5,"value":[0,0.69542,0.69542]}]},"external":{"id":"mp-2657","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-2657","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P_3/mmc) 3D (Bulk), mp-2815","lattice":{"type":"HEX","a":3.192238,"b":3.192238,"c":13.37829,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"Mo"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.3333333,0.3333333,0.75]},{"id":1,"value":[0.6666667,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.3333333,0.133082]},{"id":3,"value":[0.6666667,0.6666667,0.866914]},{"id":4,"value":[0.3333333,0.3333333,0.366918]},{"id":5,"value":[0.6666667,0.6666667,0.633086]}]},"external":{"id":"mp-2815","source":"Materials Project","doi":"10.17188/1202268","url":"https://next-gen.materialsproject.org/materials/mp-2815","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3150","lattice":{"type":"HEX","a":3.196223,"b":3.196223,"c":23.12983,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.5]},{"id":1,"value":[0.333333,0.666667,0.432137]},{"id":2,"value":[0.333333,0.666667,0.567863]}]},"external":{"id":"2dm-3150","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3150","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P6_3/mmc) 3D (Bulk), mp-602","lattice":{"type":"HEX","a":3.558711,"b":3.558711,"c":15.34665,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Te"},{"id":3,"value":"Te"},{"id":4,"value":"Mo"},{"id":5,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.63208]},{"id":1,"value":[0.6666667,0.3333333,0.13208]},{"id":2,"value":[0.6666667,0.3333333,0.36792]},{"id":3,"value":[0.3333333,0.6666667,0.86792]},{"id":4,"value":[0.3333333,0.6666667,0.25]},{"id":5,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-602","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-602","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P-6m2) 2D (Monolayer), 2dm-5370","lattice":{"type":"HEX","a":3.567851,"b":3.56785,"c":23.619353,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.576748]},{"id":1,"value":[0.666667,0.333333,0.423252]},{"id":2,"value":[0,0,0.5]}]},"external":{"id":"2dm-5370","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5370","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json":{"name":"WSe2, Tungsten Diselenide, HEX (P6_3/mmc) 3D (Bulk), mp-1821","lattice":{"type":"HEX","a":3.327069,"b":3.327069,"c":15.06895,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"Se"},{"id":3,"value":"Se"},{"id":4,"value":"Se"},{"id":5,"value":"Se"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.75]},{"id":1,"value":[0.3333333,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.6666667,0.861569]},{"id":3,"value":[0.6666667,0.3333333,0.361569]},{"id":4,"value":[0.3333333,0.6666667,0.638431]},{"id":5,"value":[0.6666667,0.3333333,0.138431]}]},"external":{"id":"mp-1821","source":"Materials Project","doi":"10.17188/1192989","url":"https://next-gen.materialsproject.org/materials/mp-1821","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json":{"name":"WSe2, Tungsten Diselenide, HEX (P-6m2) 2D (Monolayer), 2dm-3594","lattice":{"type":"HEX","a":3.330619,"b":3.330619,"c":23.362456,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"Se"},{"id":2,"value":"Se"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0,0,0.427982]},{"id":2,"value":[0,0,0.572018]}]},"external":{"id":"2dm-3594","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3594","origin":true},"isNonPeriodic":false},"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json":{"name":"GaN, Gallium Nitride, HEX (P6_3mc) 3D (Bulk), mp-804","lattice":{"type":"HEX","a":3.21629,"b":3.21629,"c":5.239962,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"Ga"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.49912]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.87588]},{"id":3,"value":[0.3333333,0.6666667,0.37588]}]},"external":{"id":"mp-804","source":"Materials Project","doi":"10.17188/1268467","url":"https://next-gen.materialsproject.org/materials/mp-804","origin":true},"isNonPeriodic":false},"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json":{"name":"GaAs, Gallium Arsenide, FCC (F-43m) 3D (Bulk), mp-2534","lattice":{"type":"FCC","a":4.065993,"b":4.065993,"c":4.065993,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"As"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.25,0.25,0.25]}]},"external":{"id":"mp-2534","source":"Materials Project","doi":"10.17188/1200591","url":"https://next-gen.materialsproject.org/materials/mp-2534","origin":true},"isNonPeriodic":false},"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json":{"name":"AlN, Aluminum Nitride, HEX (P6_3mc) 3D (Bulk), mp-661","lattice":{"type":"HEX","a":3.128588,"b":3.128588,"c":5.016955,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.499287]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.880713]},{"id":3,"value":[0.3333333,0.6666667,0.380713]}]},"external":{"id":"mp-661","source":"Materials Project","doi":"10.17188/1268470","url":"https://next-gen.materialsproject.org/materials/mp-661","origin":true},"isNonPeriodic":false}}}''') diff --git a/src/py/mat3ra/standata/properties.py b/src/py/mat3ra/standata/properties.py deleted file mode 100644 index f7bb537..0000000 --- a/src/py/mat3ra/standata/properties.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -properties_data = json.loads(r'''{"standataConfig":{"categories":{"type":["mechanical","electronic","magnetic","thermal","optical","dynamic","transport","radiological","acoustic","manufacturing","chemical","structural","surface"],"property_class":["meta-property","proto-property"],"value_type":["scalar","vector","matrix","tensor_rank3","tensor_rank4","non-scalar"],"measurement":["angle-resolved-photoemission-spectroscopy","atomic-force-microscopy","x-ray-diffraction","x-ray-fluorescence","transmission-electron-microscopy","scanning-electron-microscopy","thermogravimetric-analysis"],"application":["espresso","vasp","python","shell"]},"entities":[{"filename":"valence_band_offset.json","categories":["scalar","electronic","angle-resolved-photoemission-spectroscopy"]},{"filename":"band_structure.json","categories":["matrix","electronic"]}]},"filesMapByName":{"valence_band_offset.json":{"name":"valence_band_offset","units":"eV","value":0.28},"band_structure.json":{"name":"band_structure","spin":[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],"xAxis":{"label":"kpoints","units":"crystal"},"xDataArray":[[0,0,0],[0.28867514,0.20412412,-0.49999997],[0,-0.61237246,0],[0.28867514,-0.40824834,-0.49999997],[-0.57735028,0.20412421,0],[-0.57735028,-0.40824824,0]],"yAxis":{"label":"energy","units":"eV"},"yDataSeries":[[-5.5990059,-3.30219959,-3.30220019,-1.51073812,-3.30221054,-1.51074222],[6.26931638,-0.66503974,-0.6650363,-1.51072293,-0.66501391,-1.5107195],[6.26931998,5.06084876,5.06084821,3.41069883,5.06085301,3.41069761],[6.26934533,5.0608702,5.06086954,3.41070722,5.06085524,3.41071003],[8.71135349,7.69496909,7.69496137,6.91957625,7.69495606,6.91957636],[8.71135587,9.49274379,9.49273868,6.91958498,9.49273487,6.91958424],[8.71135838,9.49275618,9.49275401,16.14829919,9.49273798,16.14830113],[9.41550185,13.89571002,13.89571914,16.1483028,13.89571883,16.14830247]]}}}''') diff --git a/src/py/mat3ra/standata/workflows.py b/src/py/mat3ra/standata/workflows.py deleted file mode 100644 index 0510bcb..0000000 --- a/src/py/mat3ra/standata/workflows.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -workflows_data = json.loads(r'''{"standataConfig":{"categories":{"application":["espresso","exabyteml","jupyterLab","nwchem","python","shell","vasp"],"property":["band_gap","band_gap_dos","band_structure","phonon_dispersions","reaction_energy_profile","total_energy"],"material_count":["single-material","multi-material"]},"entities":[{"filename":"total_energy.json","categories":["espresso","single-material","total_energy"]},{"filename":"band_gap.json","categories":["espresso","vasp","band_gap"]}]},"filesMapByName":{"total_energy.json":{"_id":"000000000000000000000000","name":"Total Energy","subworkflows":[{"_id":"000000000000000000000000","name":"Total Energy","application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9c216f92-2917-47e5-8f09-8513ada8330a","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"},"flavor":{"isDefault":true,"input":[{"name":"pw_scf.in"}],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"monitors":["standard_output","convergence_electronic"],"applicationName":"espresso","executableName":"pw.x","name":"pw_scf","executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"}},"status":"idle","statusTrack":[],"input":[{"content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"pw_scf.in","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"applicationName":"espresso","executableName":"pw.x","updatedAt":"2023-08-17T23:02:17.337Z","updatedBy":"0","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 "}]}],"compute":null,"isDraft":false}],"units":[{"name":"Total Energy","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"e9109d498900aad592ba68b5","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"isDefault":true,"hash":"b5ed1cf151e828dfec234c5bf1be5b02","isOutdated":false,"createdAt":"2017-11-04T06:32:04.926Z","updatedAt":"2023-08-17T23:05:45.202Z","workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"exadmin","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isEntitySet":false},"band_gap.json":{"_id":"00000000000000000","name":"Band Gap","subworkflows":[{"_id":"000000000000000000000000","name":"Band Gap","application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"0d35c419-ba29-44e7-94f0-690ff1f7976b","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"isDefault":true,"input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.614Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}],"next":"061929a3-368a-4c42-95fd-4144d31b6692"},{"type":"execution","name":"vasp_nscf","head":false,"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"061929a3-368a-4c42-95fd-4144d31b6692","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"results":["band_gaps","fermi_energy"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp_nscf","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.622Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}]}],"compute":null,"isDraft":false}],"units":[{"name":"Band Gap","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"509bb16a21dfb6806cbf4022","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"hash":"9a0499d15894c106d6115c132f67b47c","isOutdated":false,"workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"user-000000","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isDefault":false,"isEntitySet":false,"createdAt":"2023-08-23T02:56:18.620Z","createdBy":"00000000000000000","updatedAt":"2023-08-23T02:56:18.894Z","updatedBy":"00000000000000000"}}}''') From 0ee5bd2e044d969871b81eb5bea3e8c714444998 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 24 Oct 2024 18:14:30 -0700 Subject: [PATCH 03/25] update: restructure standata --- src/py/mat3ra/standata/__init__.py | 16 +- src/py/mat3ra/standata/applications.py | 3 + src/py/mat3ra/standata/builder.py | 159 -------------------- src/py/mat3ra/standata/data/__init__.py | 27 ---- src/py/mat3ra/standata/data/applications.py | 3 + src/py/mat3ra/standata/data/cli.py | 37 ----- src/py/mat3ra/standata/data/materials.py | 3 + src/py/mat3ra/standata/data/properties.py | 3 + src/py/mat3ra/standata/data/workflows.py | 3 + src/py/mat3ra/standata/materials.py | 3 + src/py/mat3ra/standata/properties.py | 3 + src/py/mat3ra/standata/workflows.py | 3 + 12 files changed, 32 insertions(+), 231 deletions(-) create mode 100644 src/py/mat3ra/standata/applications.py delete mode 100644 src/py/mat3ra/standata/builder.py create mode 100644 src/py/mat3ra/standata/data/applications.py delete mode 100644 src/py/mat3ra/standata/data/cli.py create mode 100644 src/py/mat3ra/standata/data/materials.py create mode 100644 src/py/mat3ra/standata/data/properties.py create mode 100644 src/py/mat3ra/standata/data/workflows.py create mode 100644 src/py/mat3ra/standata/materials.py create mode 100644 src/py/mat3ra/standata/properties.py create mode 100644 src/py/mat3ra/standata/workflows.py diff --git a/src/py/mat3ra/standata/__init__.py b/src/py/mat3ra/standata/__init__.py index 54e8606..7b1b0ef 100644 --- a/src/py/mat3ra/standata/__init__.py +++ b/src/py/mat3ra/standata/__init__.py @@ -1,19 +1,19 @@ import re -from typing import List - -from .base import Standata -from .materials import materials_data +from typing import Dict, List class Standata: # Override in children - data = {"filesMapByName": []} - files_map_by_name = data["filesMapByName"] + data: dict = {"filesMapByName": []} + + @classmethod + def files_map_by_name(cls) -> Dict[str, dict]: + return cls.data["filesMapByName"] @classmethod def get_as_list(cls): - return cls.files_map_by_name + return list(cls.files_map_by_name().values()) @classmethod def get_by_name(cls, name: str) -> List[dict]: @@ -23,7 +23,7 @@ def get_by_name(cls, name: str) -> List[dict]: name: Name of the entity. """ matching_entities = [] - for key, entity in cls.files_map_by_name.items(): + for key, entity in cls.files_map_by_name().items(): regex = re.compile(name, re.IGNORECASE) if re.match(regex, key): matching_entities.append(entity) diff --git a/src/py/mat3ra/standata/applications.py b/src/py/mat3ra/standata/applications.py new file mode 100644 index 0000000..f82dc2a --- /dev/null +++ b/src/py/mat3ra/standata/applications.py @@ -0,0 +1,3 @@ +import json + +applications_data = json.loads(r'''{"standataConfig":{"categories":{"model":["atomistic","macroscopic","mesoscopic","quantum-mechanical","statistical"],"language_type":["scripting","compiled"],"purpose":["command_line_interface","interactive_computing_environment","programming_language"]},"entities":[{"filename":"espresso_gnu_540.json","categories":["quantum-mechanical"]},{"filename":"python_386.json","categories":["scripting","programming_language"]}]},"filesMapByName":{"espresso_gnu_540.json":{"name":"espresso","shortName":"qe","summary":"Quantum Espresso","version":"5.4.0","build":"GNU","hasAdvancedComputeOptions":true,"isLicensed":false},"python_386.json":{"name":"python","shortName":"py","summary":"Python Script","version":"3.8.6","build":"Default","hasAdvancedComputeOptions":false,"isLicensed":false}}}''') diff --git a/src/py/mat3ra/standata/builder.py b/src/py/mat3ra/standata/builder.py deleted file mode 100644 index 8364157..0000000 --- a/src/py/mat3ra/standata/builder.py +++ /dev/null @@ -1,159 +0,0 @@ -import json -from pathlib import Path -from typing import Dict, List, Optional, TypedDict, Union - -import pandas as pd -import yaml - -EntityItem = TypedDict("EntityItem", {"filename": str, "categories": List[str]}) - -EntityConfig = TypedDict("EntityConfig", {"categories": Dict[str, List[str]], "entities": List[EntityItem]}) - - -class Standata: - """The Standata class associates the entity data files with categories and allows for tag-based queries. - - Attributes: - entity_dir: Path to the folder containing entity data files. - entities: List of entity items specifying filename and categories. - category_map: Dictionary mapping category types to category tags. - categories: List of unique categories from flattening the category_map dictionary. - lookup_table: Category-filename lookup table. - """ - - def __init__(self, entity_config: EntityConfig, entity_dir: Union[str, Path]): - """Initializes categories and the entity list. - - Args: - entity_config: The contents of the entity config file (`categories.yml`). - entity_dir: The path to the directory containing all entities. - """ - self.entity_dir: Path = Path(entity_dir).resolve() - self.category_map: Dict[str, List[str]] = entity_config["categories"] - self.entities: List[EntityItem] = entity_config["entities"] - - self.categories: List[str] = Standata.flatten_categories(entity_config["categories"]) - self.lookup_table: pd.DataFrame = self.__create_table() - - @classmethod - def from_file(cls, entity_config_path: Union[Path, str]) -> "Standata": - """Creates Standata class instance from entity config file (categories.yml). - - Args: - entity_config_path: The path to the entity config file `categories.yml`. - - Note: - Here, we assume that the entity config file is located in the same directory as all entity files. - """ - filepath = Path(entity_config_path) - cfg: EntityConfig = Standata.load_config(filepath) - instance = cls(entity_config=cfg, entity_dir=filepath.parent) - return instance - - @staticmethod - def load_config(entity_config_path: Path) -> EntityConfig: - """Loads entity config from file (Yaml). - - Args: - entity_config_path: The path to the entity config file `categories.yml`. - """ - entity_config: EntityConfig = {"categories": {}, "entities": []} - try: - with open(entity_config_path.resolve(), "r") as stream: - entity_config = yaml.safe_load(stream) - except yaml.YAMLError as e: - print(e) - return entity_config - - @staticmethod - def flatten_categories(category_map: Dict[str, List[str]], separator: str = "/") -> List[str]: - """Flattens categories dictionary to list of categories. - - Args: - category_map: Dictionary mapping category types to category tags. - separator: Separation character used to join category type and tag. - - Example:: - - Standata.flatten_categories({"size": ["S", "M", "L"]}) - # returns ["size/S", "size/M", "size/L"] - """ - category_groups = [list(map(lambda x: f"{key}{separator}{x}", val)) for key, val in category_map.items()] - return [item for sublist in category_groups for item in sublist] - - def convert_tag_to_category(self, *tags: str): - """Converts simple tags to '/' format. - - Args: - *tags: Category tags for the entity. - - Note: - Some tags belong to several categories simultaneously, for instance 'semiconductor' is associated with - 'electrical_conductivity' and 'type'. This function returns all occurrences of a tag as - '/'. - """ - return [cf for cf in self.categories if any([cf.split("/")[1] == t for t in tags])] - - def __create_table(self) -> pd.DataFrame: - """Creates lookup table for filenames and associated categories. - - For the lookup table category tags are first converted to the / format, which represent the - columns of the lookup table. The filenames represent the rows of the lookup table (DataFrame.index). The values - in the table are either 0 or 1 depending on whether a filename is associated with a certain category (1) or - not (0). - """ - df = pd.DataFrame(0, columns=self.categories, index=[entity["filename"] for entity in self.entities]) - for entity in self.entities: - filename = entity["filename"] - categories = self.convert_tag_to_category(*entity["categories"]) - for category in categories: - df.loc[filename, category] = 1 - return df - - def __get_filenames(self, *categories: str) -> List[Path]: - """Returns filepaths to entities that match all given categories. - - Args: - *categories: Categories for the entity query. Note, that `categories` should be in the same format as the - column names in the lookup table. - """ - if len(categories) == 0: - return [] - mask = pd.Series([True] * len(self.lookup_table), index=self.lookup_table.index) - for category in categories: - mask = mask & (self.lookup_table[category] == 1) - print(category, mask) - return [self.entity_dir / f for f in self.lookup_table[mask].index.tolist()] - - @staticmethod - def load_entity(filepath: Path) -> Optional[dict]: - """Loads entity config from file (JSON). - - Args: - filepath: Path to entity data file (JSON). - """ - entity = None - if not filepath.resolve().exists(): - print(f"Could not find entity file: {filepath.resolve()}") - return entity - try: - with open(filepath.resolve(), "r") as f: - entity = json.load(f) - except json.JSONDecodeError as e: - print(e) - return entity - - def find_entities(self, *tags: str) -> List[dict]: - """Finds entities that match all specified category tags. - - Args: - *tags: Category tags for the entity query. - """ - categories = self.convert_tag_to_category(*tags) - filenames = list(map(Path, self.__get_filenames(*categories))) - entities = [] - for filepath in filenames: - entity = Standata.load_entity(filepath) - if entity: - entities.append(entity) - return entities diff --git a/src/py/mat3ra/standata/data/__init__.py b/src/py/mat3ra/standata/data/__init__.py index 1a220ee..e69de29 100644 --- a/src/py/mat3ra/standata/data/__init__.py +++ b/src/py/mat3ra/standata/data/__init__.py @@ -1,27 +0,0 @@ -import re -from typing import List - -from .base import Standata -from .materials import materials_data - - -class StandataMaterials: - - def __init__(self): - self.entities = materials_data - - def get_json(self): - return self.entities["filesMapByName"] - - def get_by_name(self, name: str) -> List[dict]: - """Returns entity by name. - - Args: - name: Name of the entity. - """ - matching_entities = [] - for key, entity in self.entities["filesMapByName"].items(): - regex = re.compile(name, re.IGNORECASE) - if re.match(regex, key): - matching_entities.append(entity) - return matching_entities diff --git a/src/py/mat3ra/standata/data/applications.py b/src/py/mat3ra/standata/data/applications.py new file mode 100644 index 0000000..f82dc2a --- /dev/null +++ b/src/py/mat3ra/standata/data/applications.py @@ -0,0 +1,3 @@ +import json + +applications_data = json.loads(r'''{"standataConfig":{"categories":{"model":["atomistic","macroscopic","mesoscopic","quantum-mechanical","statistical"],"language_type":["scripting","compiled"],"purpose":["command_line_interface","interactive_computing_environment","programming_language"]},"entities":[{"filename":"espresso_gnu_540.json","categories":["quantum-mechanical"]},{"filename":"python_386.json","categories":["scripting","programming_language"]}]},"filesMapByName":{"espresso_gnu_540.json":{"name":"espresso","shortName":"qe","summary":"Quantum Espresso","version":"5.4.0","build":"GNU","hasAdvancedComputeOptions":true,"isLicensed":false},"python_386.json":{"name":"python","shortName":"py","summary":"Python Script","version":"3.8.6","build":"Default","hasAdvancedComputeOptions":false,"isLicensed":false}}}''') diff --git a/src/py/mat3ra/standata/data/cli.py b/src/py/mat3ra/standata/data/cli.py deleted file mode 100644 index ff404bc..0000000 --- a/src/py/mat3ra/standata/data/cli.py +++ /dev/null @@ -1,37 +0,0 @@ -from pathlib import Path -from typing import Optional - -import typer -from mat3ra.standata import Standata - - -def main( - entity_config: str = typer.Argument(..., help="Location of entity config file."), - destination: Optional[str] = typer.Option("--destination", "-d", help="Where to place symlink directory."), -): - cfg_path = Path(entity_config) - std = Standata.from_file(cfg_path) - - save_dir = cfg_path.parent - if destination and Path(destination).resolve().exists(): - save_dir = Path(destination) - categories_root = save_dir / "by_category" - - for entity in std.entities: - categories = std.convert_tag_to_category(*entity["categories"]) - entity_path = std.entity_dir / entity["filename"] - - for category in categories: - category_dir = categories_root / category - category_dir.mkdir(parents=True, exist_ok=True) - linked_entity = category_dir / entity["filename"] - if not linked_entity.exists(): - linked_entity.symlink_to(entity_path) - - -def typer_app(): - typer.run(main) - - -if __name__ == "__main__": - typer_app() diff --git a/src/py/mat3ra/standata/data/materials.py b/src/py/mat3ra/standata/data/materials.py new file mode 100644 index 0000000..5729426 --- /dev/null +++ b/src/py/mat3ra/standata/data/materials.py @@ -0,0 +1,3 @@ +import json + +materials_data = json.loads(r'''{"standataConfig":{"categories":{"type":["semiconductor","solar energy material","storage medium","organic electronics","battery/energy storage","composite","polymer","metals & alloys","solvent","catalysis","consumer packaged goods","glass","ceramic"],"form_factor":["bulk","layer","interface"],"dimensionality":["0D","1D","2D","3D","4D"],"electrical_conductivity":["metal","semi-metal","semiconductor","insulator"],"magnetism":["ferromagnetic","anti-ferromagnetic","paramagnetic","diamagnetic","non-magnetic"],"superconductivity":["type I","type II"],"composition":["oxide","nitride","carbide"]},"entities":[{"filename":"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json","categories":["2D","layer","semi-metal","non-magnetic"]},{"filename":"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json","categories":["3D","bulk","semi-metal","non-magnetic","battery/energy storage"]},{"filename":"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json","categories":["2D","layer","insulator","non-magnetic"]},{"filename":"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json","categories":["3D","bulk","metal","ferromagnetic"]},{"filename":"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json","categories":["3D","bulk","semiconductor","non-magnetic","oxide"]},{"filename":"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json","categories":["3D","bulk","insulator","non-magnetic","oxide","glass"]},{"filename":"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json","categories":["3D","bulk","semiconductor","ferromagnetic","oxide"]},{"filename":"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json","categories":["3D","bulk","semiconductor","non-magnetic","nitride"]},{"filename":"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json","categories":["3D","bulk","insulator","non-magnetic","nitride","ceramic"]}]},"filesMapByName":{"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json":{"name":"C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993","lattice":{"type":"HEX","a":2.464955,"b":2.464956,"c":19.996729,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0.666667,0.333333,0.5]}]},"external":{"id":"2dm-3993","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3993","origin":true},"isNonPeriodic":false},"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json":{"name":"C, Graphite, HEX (P6_3/mmc) 3D (Bulk), mp-48","lattice":{"type":"HEX","a":2.467291,"b":2.467291,"c":7.803073,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"},{"id":2,"value":"C"},{"id":3,"value":"C"}],"coordinates":[{"id":0,"value":[0,0,0.25]},{"id":1,"value":[0,0,0.75]},{"id":2,"value":[0.3333333,0.6666667,0.25]},{"id":3,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-48","source":"Materials Project","doi":"10.17188/1208406","url":"https://next-gen.materialsproject.org/materials/mp-48","origin":true},"isNonPeriodic":false},"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json":{"name":"BN, Hexagonal Boron Nitride, HEX (P6/mmm) 2D (Monolayer), 2dm-4991","lattice":{"type":"HEX","a":2.508995,"b":2.508996,"c":20,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"N"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.5]}]},"external":{"id":"2dm-4991","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-4991","origin":true},"isNonPeriodic":false},"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json":{"name":"BN, Boron Nitride, HEX (P6_3/mmc) 3D (Bulk), mp-7991","lattice":{"type":"HEX","a":2.5116,"b":2.5116,"c":8.267796,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"B"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.25]},{"id":1,"value":[0.6666667,0.3333333,0.75]},{"id":2,"value":[0,0,0.25]},{"id":3,"value":[0,0,0.75]}]},"external":{"id":"mp-7991","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-7991","origin":true},"isNonPeriodic":false},"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json":{"name":"NaCl, Sodium Chloride, FCC (Fm-3m) 3D (Bulk), mp-22862","lattice":{"type":"FCC","a":4.024635,"b":4.024635,"c":4.024635,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Na"},{"id":1,"value":"Cl"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.5,0.5,0.5]}]},"external":{"id":"mp-22862","source":"Materials Project","doi":"10.17188/1199028","url":"https://next-gen.materialsproject.org/materials/mp-22862","origin":true},"isNonPeriodic":false},"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json":{"name":"Si, Silicon, FCC (Fd-3m) 3D (Bulk), mp-149","lattice":{"type":"FCC","a":3.866976,"b":3.866975,"c":3.866975,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.875,0.875,0.875]},{"id":1,"value":[0.125,0.125,0.125]}]},"external":{"id":"mp-149","source":"Materials Project","doi":"10.17188/1190959","url":"https://next-gen.materialsproject.org/materials/mp-149","origin":true},"isNonPeriodic":false},"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json":{"name":"Si, Silicene, HEX (P-3m1) 2D (Monolayer), 2dm-5934","lattice":{"type":"HEX","a":3.875909,"b":3.875457,"c":20.688228,"alpha":90,"beta":90,"gamma":120.0039,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.833322,0.666644,0.487728]},{"id":1,"value":[0.166679,0.333356,0.512272]}]},"external":{"id":"2dm-5934","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5934","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json":{"name":"WS2, Tungsten Disulfide, HEX (P6_3/mmc) 3D (Bulk), mp-224","lattice":{"type":"HEX","a":3.190731,"b":3.19073,"c":14.2024,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.6666667,0.6666667,0.75]},{"id":1,"value":[0.3333333,0.3333333,0.25]},{"id":2,"value":[0.6666667,0.6666667,0.139241]},{"id":3,"value":[0.3333333,0.3333333,0.639241]},{"id":4,"value":[0.6666667,0.6666667,0.360759]},{"id":5,"value":[0.3333333,0.3333333,0.860759]}]},"external":{"id":"mp-224","source":"Materials Project","doi":"10.17188/1197614","url":"https://next-gen.materialsproject.org/materials/mp-224","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json":{"name":"WS2, Tungsten Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3749","lattice":{"type":"HEX","a":3.193434,"b":3.193434,"c":23.131045,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.568029]},{"id":2,"value":[0.333333,0.666667,0.431971]}]},"external":{"id":"2dm-3749","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3749","origin":true},"isNonPeriodic":false},"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json":{"name":"Ni, Nickel, FCC (Fm-3m) 3D (Bulk), mp-23","lattice":{"type":"FCC","a":2.478974,"b":2.478974,"c":2.478974,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ni"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-23","source":"Materials Project","doi":"10.17188/1199153","url":"https://next-gen.materialsproject.org/materials/mp-23","origin":true},"isNonPeriodic":false},"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json":{"name":"Cu, Copper, FCC (Fm-3m) 3D (Bulk), mp-30","lattice":{"type":"FCC","a":2.560619,"b":2.56062,"c":2.560619,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Cu"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-30","source":"Materials Project","doi":"10.17188/1204433","url":"https://next-gen.materialsproject.org/materials/mp-30s","origin":true},"isNonPeriodic":false},"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json":{"name":"Au, Gold, FCC (Fm-3m) 3D (Bulk), mp-81","lattice":{"type":"FCC","a":2.949546,"b":2.949546,"c":2.949546,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Au"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-81","source":"Materials Project","doi":"10.17188/1307925","url":"https://next-gen.materialsproject.org/materials/mp-81","origin":true},"isNonPeriodic":false},"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json":{"name":"ZnO, Zinc Oxide, HEX (P6_3mc) 3D (Bulk), mp-2133","lattice":{"type":"HEX","a":3.289103,"b":3.289103,"c":5.306821,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zn"},{"id":1,"value":"Zn"},{"id":2,"value":"O"},{"id":3,"value":"O"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.500548]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.879762]},{"id":3,"value":[0.3333333,0.6666667,0.379762]}]},"external":{"id":"mp-2133","source":"Materials Project","doi":"10.17188/1196748","url":"https://next-gen.materialsproject.org/materials/mp-2133","origin":true},"isNonPeriodic":false},"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json":{"name":"Al2O3, Sapphire, RHL (R-3c) 3D (Bulk), mp-1143","lattice":{"type":"RHL","a":5.177955,"b":5.177954,"c":5.177956,"alpha":55.2896,"beta":55.2896,"gamma":55.2896,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"Al"},{"id":3,"value":"Al"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"}],"coordinates":[{"id":0,"value":[0.647904,0.647903,0.647903]},{"id":1,"value":[0.852097,0.852097,0.852097]},{"id":2,"value":[0.147904,0.147903,0.147903]},{"id":3,"value":[0.352097,0.352096,0.352096]},{"id":4,"value":[0.443855,0.056145,0.750001]},{"id":5,"value":[0.943855,0.250001,0.556145]},{"id":6,"value":[0.056144,0.75,0.443855]},{"id":7,"value":[0.750001,0.443856,0.056144]},{"id":8,"value":[0.25,0.556144,0.943855]},{"id":9,"value":[0.556144,0.943856,0.249999]}]},"external":{"id":"mp-1143","source":"Materials Project","doi":"10.17188/1187823","url":"https://next-gen.materialsproject.org/materials/mp-1143","origin":true},"isNonPeriodic":false},"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json":{"name":"SiO2, Quartz, HEX (P3_121) 3D (Bulk), mp-7000","lattice":{"type":"HEX","a":5.021502,"b":5.021502,"c":5.51057,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"},{"id":2,"value":"Si"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"}],"coordinates":[{"id":0,"value":[0.523695,0.523695,0]},{"id":1,"value":[0,0.476305,0.6666667]},{"id":2,"value":[0.476305,0,0.3333333]},{"id":3,"value":[0.256094,0.414854,0.794543]},{"id":4,"value":[0.585146,0.84124,0.127877]},{"id":5,"value":[0.15876,0.743906,0.46121]},{"id":6,"value":[0.414854,0.256094,0.205457]},{"id":7,"value":[0.743906,0.15876,0.53879]},{"id":8,"value":[0.84124,0.585146,0.872123]}]},"external":{"id":"mp-7000","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-7000","origin":true},"isNonPeriodic":false},"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json":{"name":"ZrO2, Zirconium Dioxide, MCL (P2_1/c) 3D (Bulk), mp-2858","lattice":{"type":"MCL","a":5.233649,"b":5.26846,"c":5.418476,"alpha":90,"beta":100.0548,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zr"},{"id":1,"value":"Zr"},{"id":2,"value":"Zr"},{"id":3,"value":"Zr"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.724019,0.95582,0.789744]},{"id":1,"value":[0.724019,0.54418,0.289744]},{"id":2,"value":[0.275981,0.45582,0.710256]},{"id":3,"value":[0.275981,0.04418,0.210256]},{"id":4,"value":[0.061015,0.180178,0.854613]},{"id":5,"value":[0.061015,0.319822,0.354613]},{"id":6,"value":[0.54701,0.255674,0.021936]},{"id":7,"value":[0.45299,0.755674,0.478064]},{"id":8,"value":[0.54701,0.244326,0.521936]},{"id":9,"value":[0.45299,0.744326,0.978064]},{"id":10,"value":[0.938985,0.680178,0.645387]},{"id":11,"value":[0.938985,0.819822,0.145387]}]},"external":{"id":"mp-2858","source":"Materials Project","doi":"10.17188/1202679","url":"https://next-gen.materialsproject.org/materials/mp-2858","origin":true},"isNonPeriodic":false},"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json":{"name":"HfO2, Hafnium IV Oxide, MCL (P2_1/c) 3D (Bulk), mp-352","lattice":{"type":"MCL","a":5.142319,"b":5.195148,"c":5.326038,"alpha":90,"beta":99.6745,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Hf"},{"id":1,"value":"Hf"},{"id":2,"value":"Hf"},{"id":3,"value":"Hf"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.275959,0.457319,0.707891]},{"id":1,"value":[0.724041,0.957319,0.792109]},{"id":2,"value":[0.724041,0.542681,0.292109]},{"id":3,"value":[0.275959,0.042681,0.207891]},{"id":4,"value":[0.448887,0.742603,0.977708]},{"id":5,"value":[0.551113,0.242603,0.522292]},{"id":6,"value":[0.551113,0.257397,0.022292]},{"id":7,"value":[0.448887,0.757397,0.477708]},{"id":8,"value":[0.067849,0.330122,0.347094]},{"id":9,"value":[0.932151,0.830122,0.152906]},{"id":10,"value":[0.932151,0.669878,0.652906]},{"id":11,"value":[0.067849,0.169878,0.847094]}]},"external":{"id":"mp-352","source":"Materials Project","doi":"10.17188/1206948","url":"https://next-gen.materialsproject.org/materials/mp-352","origin":true},"isNonPeriodic":false},"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json":{"name":"Y2O3, Yttrium III Oxide, MCLC (C2/m) 3D (Bulk), mp-558573","lattice":{"type":"MCLC","a":3.515998,"b":7.276947,"c":8.695337,"alpha":100.1007,"beta":90,"gamma":103.9801,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Y"},{"id":1,"value":"Y"},{"id":2,"value":"Y"},{"id":3,"value":"Y"},{"id":4,"value":"Y"},{"id":5,"value":"Y"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"},{"id":12,"value":"O"},{"id":13,"value":"O"},{"id":14,"value":"O"}],"coordinates":[{"id":0,"value":[0.635175,0.27035,0.488039]},{"id":1,"value":[0.364825,0.72965,0.511961]},{"id":2,"value":[0.032014,0.064029,0.814048]},{"id":3,"value":[0.691364,0.382729,0.137328]},{"id":4,"value":[0.308636,0.617271,0.862672]},{"id":5,"value":[0.967986,0.935971,0.185952]},{"id":6,"value":[0.127996,0.255992,0.281772]},{"id":7,"value":[0.825532,0.651064,0.030517]},{"id":8,"value":[0.793308,0.586615,0.37737]},{"id":9,"value":[0.470963,0.941926,0.342856]},{"id":10,"value":[0.529037,0.058074,0.657144]},{"id":11,"value":[0.5,0,0]},{"id":12,"value":[0.174468,0.348936,0.969483]},{"id":13,"value":[0.206692,0.413385,0.62263]},{"id":14,"value":[0.872004,0.744008,0.718228]}]},"external":{"id":"mp-558573","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-558573","origin":true},"isNonPeriodic":false},"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json":{"name":"VO2, Vanadium IV Oxide, TET (P4_2/mnm) 3D (Bulk), mp-19094","lattice":{"type":"TET","a":3.038141,"b":4.51531,"c":4.51531,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"V"},{"id":1,"value":"V"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.799236,0.200764]},{"id":3,"value":[0.5,0.200764,0.799236]},{"id":4,"value":[0,0.700764,0.700764]},{"id":5,"value":[0,0.299236,0.299236]}]},"external":{"id":"mp-19094","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-19094","origin":true},"isNonPeriodic":false},"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json":{"name":"TiO2, Titanium Oxide, TET (P4_2/mnm) 3D (Bulk), mp-2657","lattice":{"type":"TET","a":2.969203,"b":4.653272,"c":4.653272,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ti"},{"id":1,"value":"Ti"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.19542,0.80458]},{"id":3,"value":[0.5,0.80458,0.19542]},{"id":4,"value":[0,0.30458,0.30458]},{"id":5,"value":[0,0.69542,0.69542]}]},"external":{"id":"mp-2657","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-2657","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P_3/mmc) 3D (Bulk), mp-2815","lattice":{"type":"HEX","a":3.192238,"b":3.192238,"c":13.37829,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"Mo"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.3333333,0.3333333,0.75]},{"id":1,"value":[0.6666667,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.3333333,0.133082]},{"id":3,"value":[0.6666667,0.6666667,0.866914]},{"id":4,"value":[0.3333333,0.3333333,0.366918]},{"id":5,"value":[0.6666667,0.6666667,0.633086]}]},"external":{"id":"mp-2815","source":"Materials Project","doi":"10.17188/1202268","url":"https://next-gen.materialsproject.org/materials/mp-2815","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3150","lattice":{"type":"HEX","a":3.196223,"b":3.196223,"c":23.12983,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.5]},{"id":1,"value":[0.333333,0.666667,0.432137]},{"id":2,"value":[0.333333,0.666667,0.567863]}]},"external":{"id":"2dm-3150","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3150","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P6_3/mmc) 3D (Bulk), mp-602","lattice":{"type":"HEX","a":3.558711,"b":3.558711,"c":15.34665,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Te"},{"id":3,"value":"Te"},{"id":4,"value":"Mo"},{"id":5,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.63208]},{"id":1,"value":[0.6666667,0.3333333,0.13208]},{"id":2,"value":[0.6666667,0.3333333,0.36792]},{"id":3,"value":[0.3333333,0.6666667,0.86792]},{"id":4,"value":[0.3333333,0.6666667,0.25]},{"id":5,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-602","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-602","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P-6m2) 2D (Monolayer), 2dm-5370","lattice":{"type":"HEX","a":3.567851,"b":3.56785,"c":23.619353,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.576748]},{"id":1,"value":[0.666667,0.333333,0.423252]},{"id":2,"value":[0,0,0.5]}]},"external":{"id":"2dm-5370","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5370","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json":{"name":"WSe2, Tungsten Diselenide, HEX (P6_3/mmc) 3D (Bulk), mp-1821","lattice":{"type":"HEX","a":3.327069,"b":3.327069,"c":15.06895,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"Se"},{"id":3,"value":"Se"},{"id":4,"value":"Se"},{"id":5,"value":"Se"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.75]},{"id":1,"value":[0.3333333,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.6666667,0.861569]},{"id":3,"value":[0.6666667,0.3333333,0.361569]},{"id":4,"value":[0.3333333,0.6666667,0.638431]},{"id":5,"value":[0.6666667,0.3333333,0.138431]}]},"external":{"id":"mp-1821","source":"Materials Project","doi":"10.17188/1192989","url":"https://next-gen.materialsproject.org/materials/mp-1821","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json":{"name":"WSe2, Tungsten Diselenide, HEX (P-6m2) 2D (Monolayer), 2dm-3594","lattice":{"type":"HEX","a":3.330619,"b":3.330619,"c":23.362456,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"Se"},{"id":2,"value":"Se"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0,0,0.427982]},{"id":2,"value":[0,0,0.572018]}]},"external":{"id":"2dm-3594","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3594","origin":true},"isNonPeriodic":false},"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json":{"name":"GaN, Gallium Nitride, HEX (P6_3mc) 3D (Bulk), mp-804","lattice":{"type":"HEX","a":3.21629,"b":3.21629,"c":5.239962,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"Ga"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.49912]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.87588]},{"id":3,"value":[0.3333333,0.6666667,0.37588]}]},"external":{"id":"mp-804","source":"Materials Project","doi":"10.17188/1268467","url":"https://next-gen.materialsproject.org/materials/mp-804","origin":true},"isNonPeriodic":false},"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json":{"name":"GaAs, Gallium Arsenide, FCC (F-43m) 3D (Bulk), mp-2534","lattice":{"type":"FCC","a":4.065993,"b":4.065993,"c":4.065993,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"As"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.25,0.25,0.25]}]},"external":{"id":"mp-2534","source":"Materials Project","doi":"10.17188/1200591","url":"https://next-gen.materialsproject.org/materials/mp-2534","origin":true},"isNonPeriodic":false},"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json":{"name":"AlN, Aluminum Nitride, HEX (P6_3mc) 3D (Bulk), mp-661","lattice":{"type":"HEX","a":3.128588,"b":3.128588,"c":5.016955,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.499287]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.880713]},{"id":3,"value":[0.3333333,0.6666667,0.380713]}]},"external":{"id":"mp-661","source":"Materials Project","doi":"10.17188/1268470","url":"https://next-gen.materialsproject.org/materials/mp-661","origin":true},"isNonPeriodic":false}}}''') diff --git a/src/py/mat3ra/standata/data/properties.py b/src/py/mat3ra/standata/data/properties.py new file mode 100644 index 0000000..f7bb537 --- /dev/null +++ b/src/py/mat3ra/standata/data/properties.py @@ -0,0 +1,3 @@ +import json + +properties_data = json.loads(r'''{"standataConfig":{"categories":{"type":["mechanical","electronic","magnetic","thermal","optical","dynamic","transport","radiological","acoustic","manufacturing","chemical","structural","surface"],"property_class":["meta-property","proto-property"],"value_type":["scalar","vector","matrix","tensor_rank3","tensor_rank4","non-scalar"],"measurement":["angle-resolved-photoemission-spectroscopy","atomic-force-microscopy","x-ray-diffraction","x-ray-fluorescence","transmission-electron-microscopy","scanning-electron-microscopy","thermogravimetric-analysis"],"application":["espresso","vasp","python","shell"]},"entities":[{"filename":"valence_band_offset.json","categories":["scalar","electronic","angle-resolved-photoemission-spectroscopy"]},{"filename":"band_structure.json","categories":["matrix","electronic"]}]},"filesMapByName":{"valence_band_offset.json":{"name":"valence_band_offset","units":"eV","value":0.28},"band_structure.json":{"name":"band_structure","spin":[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],"xAxis":{"label":"kpoints","units":"crystal"},"xDataArray":[[0,0,0],[0.28867514,0.20412412,-0.49999997],[0,-0.61237246,0],[0.28867514,-0.40824834,-0.49999997],[-0.57735028,0.20412421,0],[-0.57735028,-0.40824824,0]],"yAxis":{"label":"energy","units":"eV"},"yDataSeries":[[-5.5990059,-3.30219959,-3.30220019,-1.51073812,-3.30221054,-1.51074222],[6.26931638,-0.66503974,-0.6650363,-1.51072293,-0.66501391,-1.5107195],[6.26931998,5.06084876,5.06084821,3.41069883,5.06085301,3.41069761],[6.26934533,5.0608702,5.06086954,3.41070722,5.06085524,3.41071003],[8.71135349,7.69496909,7.69496137,6.91957625,7.69495606,6.91957636],[8.71135587,9.49274379,9.49273868,6.91958498,9.49273487,6.91958424],[8.71135838,9.49275618,9.49275401,16.14829919,9.49273798,16.14830113],[9.41550185,13.89571002,13.89571914,16.1483028,13.89571883,16.14830247]]}}}''') diff --git a/src/py/mat3ra/standata/data/workflows.py b/src/py/mat3ra/standata/data/workflows.py new file mode 100644 index 0000000..0510bcb --- /dev/null +++ b/src/py/mat3ra/standata/data/workflows.py @@ -0,0 +1,3 @@ +import json + +workflows_data = json.loads(r'''{"standataConfig":{"categories":{"application":["espresso","exabyteml","jupyterLab","nwchem","python","shell","vasp"],"property":["band_gap","band_gap_dos","band_structure","phonon_dispersions","reaction_energy_profile","total_energy"],"material_count":["single-material","multi-material"]},"entities":[{"filename":"total_energy.json","categories":["espresso","single-material","total_energy"]},{"filename":"band_gap.json","categories":["espresso","vasp","band_gap"]}]},"filesMapByName":{"total_energy.json":{"_id":"000000000000000000000000","name":"Total Energy","subworkflows":[{"_id":"000000000000000000000000","name":"Total Energy","application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9c216f92-2917-47e5-8f09-8513ada8330a","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"},"flavor":{"isDefault":true,"input":[{"name":"pw_scf.in"}],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"monitors":["standard_output","convergence_electronic"],"applicationName":"espresso","executableName":"pw.x","name":"pw_scf","executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"}},"status":"idle","statusTrack":[],"input":[{"content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"pw_scf.in","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"applicationName":"espresso","executableName":"pw.x","updatedAt":"2023-08-17T23:02:17.337Z","updatedBy":"0","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 "}]}],"compute":null,"isDraft":false}],"units":[{"name":"Total Energy","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"e9109d498900aad592ba68b5","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"isDefault":true,"hash":"b5ed1cf151e828dfec234c5bf1be5b02","isOutdated":false,"createdAt":"2017-11-04T06:32:04.926Z","updatedAt":"2023-08-17T23:05:45.202Z","workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"exadmin","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isEntitySet":false},"band_gap.json":{"_id":"00000000000000000","name":"Band Gap","subworkflows":[{"_id":"000000000000000000000000","name":"Band Gap","application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"0d35c419-ba29-44e7-94f0-690ff1f7976b","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"isDefault":true,"input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.614Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}],"next":"061929a3-368a-4c42-95fd-4144d31b6692"},{"type":"execution","name":"vasp_nscf","head":false,"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"061929a3-368a-4c42-95fd-4144d31b6692","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"results":["band_gaps","fermi_energy"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp_nscf","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.622Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}]}],"compute":null,"isDraft":false}],"units":[{"name":"Band Gap","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"509bb16a21dfb6806cbf4022","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"hash":"9a0499d15894c106d6115c132f67b47c","isOutdated":false,"workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"user-000000","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isDefault":false,"isEntitySet":false,"createdAt":"2023-08-23T02:56:18.620Z","createdBy":"00000000000000000","updatedAt":"2023-08-23T02:56:18.894Z","updatedBy":"00000000000000000"}}}''') diff --git a/src/py/mat3ra/standata/materials.py b/src/py/mat3ra/standata/materials.py new file mode 100644 index 0000000..5729426 --- /dev/null +++ b/src/py/mat3ra/standata/materials.py @@ -0,0 +1,3 @@ +import json + +materials_data = json.loads(r'''{"standataConfig":{"categories":{"type":["semiconductor","solar energy material","storage medium","organic electronics","battery/energy storage","composite","polymer","metals & alloys","solvent","catalysis","consumer packaged goods","glass","ceramic"],"form_factor":["bulk","layer","interface"],"dimensionality":["0D","1D","2D","3D","4D"],"electrical_conductivity":["metal","semi-metal","semiconductor","insulator"],"magnetism":["ferromagnetic","anti-ferromagnetic","paramagnetic","diamagnetic","non-magnetic"],"superconductivity":["type I","type II"],"composition":["oxide","nitride","carbide"]},"entities":[{"filename":"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json","categories":["2D","layer","semi-metal","non-magnetic"]},{"filename":"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json","categories":["3D","bulk","semi-metal","non-magnetic","battery/energy storage"]},{"filename":"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json","categories":["2D","layer","insulator","non-magnetic"]},{"filename":"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json","categories":["3D","bulk","metal","ferromagnetic"]},{"filename":"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json","categories":["3D","bulk","semiconductor","non-magnetic","oxide"]},{"filename":"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json","categories":["3D","bulk","insulator","non-magnetic","oxide","glass"]},{"filename":"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json","categories":["3D","bulk","semiconductor","ferromagnetic","oxide"]},{"filename":"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json","categories":["3D","bulk","semiconductor","non-magnetic","nitride"]},{"filename":"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json","categories":["3D","bulk","insulator","non-magnetic","nitride","ceramic"]}]},"filesMapByName":{"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json":{"name":"C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993","lattice":{"type":"HEX","a":2.464955,"b":2.464956,"c":19.996729,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0.666667,0.333333,0.5]}]},"external":{"id":"2dm-3993","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3993","origin":true},"isNonPeriodic":false},"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json":{"name":"C, Graphite, HEX (P6_3/mmc) 3D (Bulk), mp-48","lattice":{"type":"HEX","a":2.467291,"b":2.467291,"c":7.803073,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"},{"id":2,"value":"C"},{"id":3,"value":"C"}],"coordinates":[{"id":0,"value":[0,0,0.25]},{"id":1,"value":[0,0,0.75]},{"id":2,"value":[0.3333333,0.6666667,0.25]},{"id":3,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-48","source":"Materials Project","doi":"10.17188/1208406","url":"https://next-gen.materialsproject.org/materials/mp-48","origin":true},"isNonPeriodic":false},"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json":{"name":"BN, Hexagonal Boron Nitride, HEX (P6/mmm) 2D (Monolayer), 2dm-4991","lattice":{"type":"HEX","a":2.508995,"b":2.508996,"c":20,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"N"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.5]}]},"external":{"id":"2dm-4991","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-4991","origin":true},"isNonPeriodic":false},"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json":{"name":"BN, Boron Nitride, HEX (P6_3/mmc) 3D (Bulk), mp-7991","lattice":{"type":"HEX","a":2.5116,"b":2.5116,"c":8.267796,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"B"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.25]},{"id":1,"value":[0.6666667,0.3333333,0.75]},{"id":2,"value":[0,0,0.25]},{"id":3,"value":[0,0,0.75]}]},"external":{"id":"mp-7991","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-7991","origin":true},"isNonPeriodic":false},"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json":{"name":"NaCl, Sodium Chloride, FCC (Fm-3m) 3D (Bulk), mp-22862","lattice":{"type":"FCC","a":4.024635,"b":4.024635,"c":4.024635,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Na"},{"id":1,"value":"Cl"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.5,0.5,0.5]}]},"external":{"id":"mp-22862","source":"Materials Project","doi":"10.17188/1199028","url":"https://next-gen.materialsproject.org/materials/mp-22862","origin":true},"isNonPeriodic":false},"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json":{"name":"Si, Silicon, FCC (Fd-3m) 3D (Bulk), mp-149","lattice":{"type":"FCC","a":3.866976,"b":3.866975,"c":3.866975,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.875,0.875,0.875]},{"id":1,"value":[0.125,0.125,0.125]}]},"external":{"id":"mp-149","source":"Materials Project","doi":"10.17188/1190959","url":"https://next-gen.materialsproject.org/materials/mp-149","origin":true},"isNonPeriodic":false},"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json":{"name":"Si, Silicene, HEX (P-3m1) 2D (Monolayer), 2dm-5934","lattice":{"type":"HEX","a":3.875909,"b":3.875457,"c":20.688228,"alpha":90,"beta":90,"gamma":120.0039,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.833322,0.666644,0.487728]},{"id":1,"value":[0.166679,0.333356,0.512272]}]},"external":{"id":"2dm-5934","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5934","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json":{"name":"WS2, Tungsten Disulfide, HEX (P6_3/mmc) 3D (Bulk), mp-224","lattice":{"type":"HEX","a":3.190731,"b":3.19073,"c":14.2024,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.6666667,0.6666667,0.75]},{"id":1,"value":[0.3333333,0.3333333,0.25]},{"id":2,"value":[0.6666667,0.6666667,0.139241]},{"id":3,"value":[0.3333333,0.3333333,0.639241]},{"id":4,"value":[0.6666667,0.6666667,0.360759]},{"id":5,"value":[0.3333333,0.3333333,0.860759]}]},"external":{"id":"mp-224","source":"Materials Project","doi":"10.17188/1197614","url":"https://next-gen.materialsproject.org/materials/mp-224","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json":{"name":"WS2, Tungsten Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3749","lattice":{"type":"HEX","a":3.193434,"b":3.193434,"c":23.131045,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.568029]},{"id":2,"value":[0.333333,0.666667,0.431971]}]},"external":{"id":"2dm-3749","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3749","origin":true},"isNonPeriodic":false},"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json":{"name":"Ni, Nickel, FCC (Fm-3m) 3D (Bulk), mp-23","lattice":{"type":"FCC","a":2.478974,"b":2.478974,"c":2.478974,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ni"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-23","source":"Materials Project","doi":"10.17188/1199153","url":"https://next-gen.materialsproject.org/materials/mp-23","origin":true},"isNonPeriodic":false},"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json":{"name":"Cu, Copper, FCC (Fm-3m) 3D (Bulk), mp-30","lattice":{"type":"FCC","a":2.560619,"b":2.56062,"c":2.560619,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Cu"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-30","source":"Materials Project","doi":"10.17188/1204433","url":"https://next-gen.materialsproject.org/materials/mp-30s","origin":true},"isNonPeriodic":false},"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json":{"name":"Au, Gold, FCC (Fm-3m) 3D (Bulk), mp-81","lattice":{"type":"FCC","a":2.949546,"b":2.949546,"c":2.949546,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Au"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-81","source":"Materials Project","doi":"10.17188/1307925","url":"https://next-gen.materialsproject.org/materials/mp-81","origin":true},"isNonPeriodic":false},"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json":{"name":"ZnO, Zinc Oxide, HEX (P6_3mc) 3D (Bulk), mp-2133","lattice":{"type":"HEX","a":3.289103,"b":3.289103,"c":5.306821,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zn"},{"id":1,"value":"Zn"},{"id":2,"value":"O"},{"id":3,"value":"O"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.500548]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.879762]},{"id":3,"value":[0.3333333,0.6666667,0.379762]}]},"external":{"id":"mp-2133","source":"Materials Project","doi":"10.17188/1196748","url":"https://next-gen.materialsproject.org/materials/mp-2133","origin":true},"isNonPeriodic":false},"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json":{"name":"Al2O3, Sapphire, RHL (R-3c) 3D (Bulk), mp-1143","lattice":{"type":"RHL","a":5.177955,"b":5.177954,"c":5.177956,"alpha":55.2896,"beta":55.2896,"gamma":55.2896,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"Al"},{"id":3,"value":"Al"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"}],"coordinates":[{"id":0,"value":[0.647904,0.647903,0.647903]},{"id":1,"value":[0.852097,0.852097,0.852097]},{"id":2,"value":[0.147904,0.147903,0.147903]},{"id":3,"value":[0.352097,0.352096,0.352096]},{"id":4,"value":[0.443855,0.056145,0.750001]},{"id":5,"value":[0.943855,0.250001,0.556145]},{"id":6,"value":[0.056144,0.75,0.443855]},{"id":7,"value":[0.750001,0.443856,0.056144]},{"id":8,"value":[0.25,0.556144,0.943855]},{"id":9,"value":[0.556144,0.943856,0.249999]}]},"external":{"id":"mp-1143","source":"Materials Project","doi":"10.17188/1187823","url":"https://next-gen.materialsproject.org/materials/mp-1143","origin":true},"isNonPeriodic":false},"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json":{"name":"SiO2, Quartz, HEX (P3_121) 3D (Bulk), mp-7000","lattice":{"type":"HEX","a":5.021502,"b":5.021502,"c":5.51057,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"},{"id":2,"value":"Si"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"}],"coordinates":[{"id":0,"value":[0.523695,0.523695,0]},{"id":1,"value":[0,0.476305,0.6666667]},{"id":2,"value":[0.476305,0,0.3333333]},{"id":3,"value":[0.256094,0.414854,0.794543]},{"id":4,"value":[0.585146,0.84124,0.127877]},{"id":5,"value":[0.15876,0.743906,0.46121]},{"id":6,"value":[0.414854,0.256094,0.205457]},{"id":7,"value":[0.743906,0.15876,0.53879]},{"id":8,"value":[0.84124,0.585146,0.872123]}]},"external":{"id":"mp-7000","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-7000","origin":true},"isNonPeriodic":false},"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json":{"name":"ZrO2, Zirconium Dioxide, MCL (P2_1/c) 3D (Bulk), mp-2858","lattice":{"type":"MCL","a":5.233649,"b":5.26846,"c":5.418476,"alpha":90,"beta":100.0548,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zr"},{"id":1,"value":"Zr"},{"id":2,"value":"Zr"},{"id":3,"value":"Zr"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.724019,0.95582,0.789744]},{"id":1,"value":[0.724019,0.54418,0.289744]},{"id":2,"value":[0.275981,0.45582,0.710256]},{"id":3,"value":[0.275981,0.04418,0.210256]},{"id":4,"value":[0.061015,0.180178,0.854613]},{"id":5,"value":[0.061015,0.319822,0.354613]},{"id":6,"value":[0.54701,0.255674,0.021936]},{"id":7,"value":[0.45299,0.755674,0.478064]},{"id":8,"value":[0.54701,0.244326,0.521936]},{"id":9,"value":[0.45299,0.744326,0.978064]},{"id":10,"value":[0.938985,0.680178,0.645387]},{"id":11,"value":[0.938985,0.819822,0.145387]}]},"external":{"id":"mp-2858","source":"Materials Project","doi":"10.17188/1202679","url":"https://next-gen.materialsproject.org/materials/mp-2858","origin":true},"isNonPeriodic":false},"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json":{"name":"HfO2, Hafnium IV Oxide, MCL (P2_1/c) 3D (Bulk), mp-352","lattice":{"type":"MCL","a":5.142319,"b":5.195148,"c":5.326038,"alpha":90,"beta":99.6745,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Hf"},{"id":1,"value":"Hf"},{"id":2,"value":"Hf"},{"id":3,"value":"Hf"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.275959,0.457319,0.707891]},{"id":1,"value":[0.724041,0.957319,0.792109]},{"id":2,"value":[0.724041,0.542681,0.292109]},{"id":3,"value":[0.275959,0.042681,0.207891]},{"id":4,"value":[0.448887,0.742603,0.977708]},{"id":5,"value":[0.551113,0.242603,0.522292]},{"id":6,"value":[0.551113,0.257397,0.022292]},{"id":7,"value":[0.448887,0.757397,0.477708]},{"id":8,"value":[0.067849,0.330122,0.347094]},{"id":9,"value":[0.932151,0.830122,0.152906]},{"id":10,"value":[0.932151,0.669878,0.652906]},{"id":11,"value":[0.067849,0.169878,0.847094]}]},"external":{"id":"mp-352","source":"Materials Project","doi":"10.17188/1206948","url":"https://next-gen.materialsproject.org/materials/mp-352","origin":true},"isNonPeriodic":false},"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json":{"name":"Y2O3, Yttrium III Oxide, MCLC (C2/m) 3D (Bulk), mp-558573","lattice":{"type":"MCLC","a":3.515998,"b":7.276947,"c":8.695337,"alpha":100.1007,"beta":90,"gamma":103.9801,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Y"},{"id":1,"value":"Y"},{"id":2,"value":"Y"},{"id":3,"value":"Y"},{"id":4,"value":"Y"},{"id":5,"value":"Y"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"},{"id":12,"value":"O"},{"id":13,"value":"O"},{"id":14,"value":"O"}],"coordinates":[{"id":0,"value":[0.635175,0.27035,0.488039]},{"id":1,"value":[0.364825,0.72965,0.511961]},{"id":2,"value":[0.032014,0.064029,0.814048]},{"id":3,"value":[0.691364,0.382729,0.137328]},{"id":4,"value":[0.308636,0.617271,0.862672]},{"id":5,"value":[0.967986,0.935971,0.185952]},{"id":6,"value":[0.127996,0.255992,0.281772]},{"id":7,"value":[0.825532,0.651064,0.030517]},{"id":8,"value":[0.793308,0.586615,0.37737]},{"id":9,"value":[0.470963,0.941926,0.342856]},{"id":10,"value":[0.529037,0.058074,0.657144]},{"id":11,"value":[0.5,0,0]},{"id":12,"value":[0.174468,0.348936,0.969483]},{"id":13,"value":[0.206692,0.413385,0.62263]},{"id":14,"value":[0.872004,0.744008,0.718228]}]},"external":{"id":"mp-558573","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-558573","origin":true},"isNonPeriodic":false},"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json":{"name":"VO2, Vanadium IV Oxide, TET (P4_2/mnm) 3D (Bulk), mp-19094","lattice":{"type":"TET","a":3.038141,"b":4.51531,"c":4.51531,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"V"},{"id":1,"value":"V"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.799236,0.200764]},{"id":3,"value":[0.5,0.200764,0.799236]},{"id":4,"value":[0,0.700764,0.700764]},{"id":5,"value":[0,0.299236,0.299236]}]},"external":{"id":"mp-19094","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-19094","origin":true},"isNonPeriodic":false},"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json":{"name":"TiO2, Titanium Oxide, TET (P4_2/mnm) 3D (Bulk), mp-2657","lattice":{"type":"TET","a":2.969203,"b":4.653272,"c":4.653272,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ti"},{"id":1,"value":"Ti"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.19542,0.80458]},{"id":3,"value":[0.5,0.80458,0.19542]},{"id":4,"value":[0,0.30458,0.30458]},{"id":5,"value":[0,0.69542,0.69542]}]},"external":{"id":"mp-2657","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-2657","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P_3/mmc) 3D (Bulk), mp-2815","lattice":{"type":"HEX","a":3.192238,"b":3.192238,"c":13.37829,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"Mo"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.3333333,0.3333333,0.75]},{"id":1,"value":[0.6666667,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.3333333,0.133082]},{"id":3,"value":[0.6666667,0.6666667,0.866914]},{"id":4,"value":[0.3333333,0.3333333,0.366918]},{"id":5,"value":[0.6666667,0.6666667,0.633086]}]},"external":{"id":"mp-2815","source":"Materials Project","doi":"10.17188/1202268","url":"https://next-gen.materialsproject.org/materials/mp-2815","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3150","lattice":{"type":"HEX","a":3.196223,"b":3.196223,"c":23.12983,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.5]},{"id":1,"value":[0.333333,0.666667,0.432137]},{"id":2,"value":[0.333333,0.666667,0.567863]}]},"external":{"id":"2dm-3150","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3150","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P6_3/mmc) 3D (Bulk), mp-602","lattice":{"type":"HEX","a":3.558711,"b":3.558711,"c":15.34665,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Te"},{"id":3,"value":"Te"},{"id":4,"value":"Mo"},{"id":5,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.63208]},{"id":1,"value":[0.6666667,0.3333333,0.13208]},{"id":2,"value":[0.6666667,0.3333333,0.36792]},{"id":3,"value":[0.3333333,0.6666667,0.86792]},{"id":4,"value":[0.3333333,0.6666667,0.25]},{"id":5,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-602","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-602","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P-6m2) 2D (Monolayer), 2dm-5370","lattice":{"type":"HEX","a":3.567851,"b":3.56785,"c":23.619353,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.576748]},{"id":1,"value":[0.666667,0.333333,0.423252]},{"id":2,"value":[0,0,0.5]}]},"external":{"id":"2dm-5370","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5370","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json":{"name":"WSe2, Tungsten Diselenide, HEX (P6_3/mmc) 3D (Bulk), mp-1821","lattice":{"type":"HEX","a":3.327069,"b":3.327069,"c":15.06895,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"Se"},{"id":3,"value":"Se"},{"id":4,"value":"Se"},{"id":5,"value":"Se"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.75]},{"id":1,"value":[0.3333333,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.6666667,0.861569]},{"id":3,"value":[0.6666667,0.3333333,0.361569]},{"id":4,"value":[0.3333333,0.6666667,0.638431]},{"id":5,"value":[0.6666667,0.3333333,0.138431]}]},"external":{"id":"mp-1821","source":"Materials Project","doi":"10.17188/1192989","url":"https://next-gen.materialsproject.org/materials/mp-1821","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json":{"name":"WSe2, Tungsten Diselenide, HEX (P-6m2) 2D (Monolayer), 2dm-3594","lattice":{"type":"HEX","a":3.330619,"b":3.330619,"c":23.362456,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"Se"},{"id":2,"value":"Se"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0,0,0.427982]},{"id":2,"value":[0,0,0.572018]}]},"external":{"id":"2dm-3594","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3594","origin":true},"isNonPeriodic":false},"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json":{"name":"GaN, Gallium Nitride, HEX (P6_3mc) 3D (Bulk), mp-804","lattice":{"type":"HEX","a":3.21629,"b":3.21629,"c":5.239962,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"Ga"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.49912]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.87588]},{"id":3,"value":[0.3333333,0.6666667,0.37588]}]},"external":{"id":"mp-804","source":"Materials Project","doi":"10.17188/1268467","url":"https://next-gen.materialsproject.org/materials/mp-804","origin":true},"isNonPeriodic":false},"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json":{"name":"GaAs, Gallium Arsenide, FCC (F-43m) 3D (Bulk), mp-2534","lattice":{"type":"FCC","a":4.065993,"b":4.065993,"c":4.065993,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"As"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.25,0.25,0.25]}]},"external":{"id":"mp-2534","source":"Materials Project","doi":"10.17188/1200591","url":"https://next-gen.materialsproject.org/materials/mp-2534","origin":true},"isNonPeriodic":false},"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json":{"name":"AlN, Aluminum Nitride, HEX (P6_3mc) 3D (Bulk), mp-661","lattice":{"type":"HEX","a":3.128588,"b":3.128588,"c":5.016955,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.499287]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.880713]},{"id":3,"value":[0.3333333,0.6666667,0.380713]}]},"external":{"id":"mp-661","source":"Materials Project","doi":"10.17188/1268470","url":"https://next-gen.materialsproject.org/materials/mp-661","origin":true},"isNonPeriodic":false}}}''') diff --git a/src/py/mat3ra/standata/properties.py b/src/py/mat3ra/standata/properties.py new file mode 100644 index 0000000..f7bb537 --- /dev/null +++ b/src/py/mat3ra/standata/properties.py @@ -0,0 +1,3 @@ +import json + +properties_data = json.loads(r'''{"standataConfig":{"categories":{"type":["mechanical","electronic","magnetic","thermal","optical","dynamic","transport","radiological","acoustic","manufacturing","chemical","structural","surface"],"property_class":["meta-property","proto-property"],"value_type":["scalar","vector","matrix","tensor_rank3","tensor_rank4","non-scalar"],"measurement":["angle-resolved-photoemission-spectroscopy","atomic-force-microscopy","x-ray-diffraction","x-ray-fluorescence","transmission-electron-microscopy","scanning-electron-microscopy","thermogravimetric-analysis"],"application":["espresso","vasp","python","shell"]},"entities":[{"filename":"valence_band_offset.json","categories":["scalar","electronic","angle-resolved-photoemission-spectroscopy"]},{"filename":"band_structure.json","categories":["matrix","electronic"]}]},"filesMapByName":{"valence_band_offset.json":{"name":"valence_band_offset","units":"eV","value":0.28},"band_structure.json":{"name":"band_structure","spin":[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],"xAxis":{"label":"kpoints","units":"crystal"},"xDataArray":[[0,0,0],[0.28867514,0.20412412,-0.49999997],[0,-0.61237246,0],[0.28867514,-0.40824834,-0.49999997],[-0.57735028,0.20412421,0],[-0.57735028,-0.40824824,0]],"yAxis":{"label":"energy","units":"eV"},"yDataSeries":[[-5.5990059,-3.30219959,-3.30220019,-1.51073812,-3.30221054,-1.51074222],[6.26931638,-0.66503974,-0.6650363,-1.51072293,-0.66501391,-1.5107195],[6.26931998,5.06084876,5.06084821,3.41069883,5.06085301,3.41069761],[6.26934533,5.0608702,5.06086954,3.41070722,5.06085524,3.41071003],[8.71135349,7.69496909,7.69496137,6.91957625,7.69495606,6.91957636],[8.71135587,9.49274379,9.49273868,6.91958498,9.49273487,6.91958424],[8.71135838,9.49275618,9.49275401,16.14829919,9.49273798,16.14830113],[9.41550185,13.89571002,13.89571914,16.1483028,13.89571883,16.14830247]]}}}''') diff --git a/src/py/mat3ra/standata/workflows.py b/src/py/mat3ra/standata/workflows.py new file mode 100644 index 0000000..0510bcb --- /dev/null +++ b/src/py/mat3ra/standata/workflows.py @@ -0,0 +1,3 @@ +import json + +workflows_data = json.loads(r'''{"standataConfig":{"categories":{"application":["espresso","exabyteml","jupyterLab","nwchem","python","shell","vasp"],"property":["band_gap","band_gap_dos","band_structure","phonon_dispersions","reaction_energy_profile","total_energy"],"material_count":["single-material","multi-material"]},"entities":[{"filename":"total_energy.json","categories":["espresso","single-material","total_energy"]},{"filename":"band_gap.json","categories":["espresso","vasp","band_gap"]}]},"filesMapByName":{"total_energy.json":{"_id":"000000000000000000000000","name":"Total Energy","subworkflows":[{"_id":"000000000000000000000000","name":"Total Energy","application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9c216f92-2917-47e5-8f09-8513ada8330a","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"},"flavor":{"isDefault":true,"input":[{"name":"pw_scf.in"}],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"monitors":["standard_output","convergence_electronic"],"applicationName":"espresso","executableName":"pw.x","name":"pw_scf","executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"}},"status":"idle","statusTrack":[],"input":[{"content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"pw_scf.in","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"applicationName":"espresso","executableName":"pw.x","updatedAt":"2023-08-17T23:02:17.337Z","updatedBy":"0","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 "}]}],"compute":null,"isDraft":false}],"units":[{"name":"Total Energy","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"e9109d498900aad592ba68b5","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"isDefault":true,"hash":"b5ed1cf151e828dfec234c5bf1be5b02","isOutdated":false,"createdAt":"2017-11-04T06:32:04.926Z","updatedAt":"2023-08-17T23:05:45.202Z","workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"exadmin","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isEntitySet":false},"band_gap.json":{"_id":"00000000000000000","name":"Band Gap","subworkflows":[{"_id":"000000000000000000000000","name":"Band Gap","application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"0d35c419-ba29-44e7-94f0-690ff1f7976b","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"isDefault":true,"input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.614Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}],"next":"061929a3-368a-4c42-95fd-4144d31b6692"},{"type":"execution","name":"vasp_nscf","head":false,"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"061929a3-368a-4c42-95fd-4144d31b6692","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"results":["band_gaps","fermi_energy"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp_nscf","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.622Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}]}],"compute":null,"isDraft":false}],"units":[{"name":"Band Gap","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"509bb16a21dfb6806cbf4022","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"hash":"9a0499d15894c106d6115c132f67b47c","isOutdated":false,"workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"user-000000","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isDefault":false,"isEntitySet":false,"createdAt":"2023-08-23T02:56:18.620Z","createdBy":"00000000000000000","updatedAt":"2023-08-23T02:56:18.894Z","updatedBy":"00000000000000000"}}}''') From f81dbb40aba9959fe8a33e59f1286ea0477748f5 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 24 Oct 2024 18:14:50 -0700 Subject: [PATCH 04/25] update: fix tests --- tests/py/unit/conftest.py | 6 +++--- tests/py/unit/materials/test_init.py | 8 ++++---- tests/py/unit/materials/test_materials_data.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/py/unit/conftest.py b/tests/py/unit/conftest.py index 82e9b16..6d78dcf 100644 --- a/tests/py/unit/conftest.py +++ b/tests/py/unit/conftest.py @@ -1,7 +1,7 @@ from pathlib import Path import pytest -from mat3ra.standata import Standata +from mat3ra.standata.build.builder import StandataBuilder @pytest.fixture @@ -10,5 +10,5 @@ def materials_config_path() -> Path: @pytest.fixture(scope="module") -def materials_standata() -> Standata: - return Standata.from_file("materials/categories.yml") +def materials_standata() -> StandataBuilder: + return StandataBuilder.build_from_file("materials/categories.yml") diff --git a/tests/py/unit/materials/test_init.py b/tests/py/unit/materials/test_init.py index 3a2305d..fd36a8f 100644 --- a/tests/py/unit/materials/test_init.py +++ b/tests/py/unit/materials/test_init.py @@ -1,20 +1,20 @@ from pathlib import Path -from mat3ra.standata import Standata +from mat3ra.standata.build.builder import StandataBuilder def test_standata_init_path(materials_config_path: Path): """Constructor extracts categories and entities from config file.""" - std = Standata.from_file(materials_config_path) + std = StandataBuilder.build_from_file(materials_config_path) assert len(std.entities) >= 1 assert len(std.categories) >= 1 -def test_entities_data(materials_standata: Standata): +def test_entities_data(materials_standata: StandataBuilder): """Entities have properties 'filename' and 'categories'.""" assert all(["filename" in e and "categories" in e for e in materials_standata.entities]) -def test_categories_data(materials_standata: Standata): +def test_categories_data(materials_standata: StandataBuilder): """Category map has at least one group of tags.""" assert len(materials_standata.category_map.keys()) >= 1 diff --git a/tests/py/unit/materials/test_materials_data.py b/tests/py/unit/materials/test_materials_data.py index f0a2bba..bdce73a 100644 --- a/tests/py/unit/materials/test_materials_data.py +++ b/tests/py/unit/materials/test_materials_data.py @@ -1,4 +1,4 @@ -from mat3ra.standata.materials import materials_data +from mat3ra.standata.data.materials import materials_data def test_get_material_data(): From d935691b6e230b75bcfc755ff26e6a0b74d8a459 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 24 Oct 2024 18:15:09 -0700 Subject: [PATCH 05/25] chore: sync approach with the rest --- pyproject.toml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e86b43c..b527501 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,8 +22,26 @@ dependencies = [ ] [project.optional-dependencies] -dev = ["pre-commit", "black", "ruff", "isort", "mypy", "pip-tools", "express-py"] -tests = ["pytest", "pytest-cov", "pytest-mock"] +dev = [ + "pre-commit", + "black", + "ruff", + "isort", + "mypy", + "pip-tools", +] +tests = [ + "coverage[toml]>=5.3", + "pytest", + "pytest-cov", + # B/c of https://github.com/binary-husky/gpt_academic/issues/1237 + "gradio", + "pydantic", +] +all = [ + "mat3ra-standata[tests]", + "mat3ra-standata[dev]", +] # Entrypoint scripts can be defined here, see examples below. [project.scripts] From def3c9ffe5985023fc15ebb64f6c821e72ec38f7 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 24 Oct 2024 18:15:31 -0700 Subject: [PATCH 06/25] update: adjust build script --- build_runtime_data.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_runtime_data.js b/build_runtime_data.js index 725f4f5..9027b34 100644 --- a/build_runtime_data.js +++ b/build_runtime_data.js @@ -62,25 +62,25 @@ buildAsset({ buildAsset({ assetPath: "./materials/categories.yml", - targetPath: "./src/py/mat3ra/standata/materials.py", + targetPath: "./src/py/mat3ra/standata/data/materials.py", contentGenerator: (content) => `import json\n\nmaterials_data = json.loads(r'''${JSON.stringify(content)}''')\n`, }); buildAsset({ assetPath: "./properties/categories.yml", - targetPath: "./src/py/mat3ra/standata/properties.py", + targetPath: "./src/py/mat3ra/standata/data/properties.py", contentGenerator: (content) => `import json\n\nproperties_data = json.loads(r'''${JSON.stringify(content)}''')\n`, }); buildAsset({ assetPath: "./applications/categories.yml", - targetPath: "./src/py/mat3ra/standata/applications.py", + targetPath: "./src/py/mat3ra/standata/data/applications.py", contentGenerator: (content) => `import json\n\napplications_data = json.loads(r'''${JSON.stringify(content)}''')\n`, }); buildAsset({ assetPath: "./workflows/categories.yml", - targetPath: "./src/py/mat3ra/standata/workflows.py", + targetPath: "./src/py/mat3ra/standata/data/workflows.py", contentGenerator: (content) => `import json\n\nworkflows_data = json.loads(r'''${JSON.stringify(content)}''')\n`, }); From 7183e4cf57b0f9b8fb3a38bcb4f0168c79cdc925 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 24 Oct 2024 20:41:58 -0700 Subject: [PATCH 07/25] update: remove erroneous --- src/py/mat3ra/standata/applications.py | 3 --- src/py/mat3ra/standata/data/applications.py | 3 --- src/py/mat3ra/standata/data/materials.py | 3 --- src/py/mat3ra/standata/data/properties.py | 3 --- src/py/mat3ra/standata/data/workflows.py | 3 --- src/py/mat3ra/standata/materials.py | 3 --- src/py/mat3ra/standata/properties.py | 3 --- src/py/mat3ra/standata/workflows.py | 3 --- 8 files changed, 24 deletions(-) delete mode 100644 src/py/mat3ra/standata/applications.py delete mode 100644 src/py/mat3ra/standata/data/applications.py delete mode 100644 src/py/mat3ra/standata/data/materials.py delete mode 100644 src/py/mat3ra/standata/data/properties.py delete mode 100644 src/py/mat3ra/standata/data/workflows.py delete mode 100644 src/py/mat3ra/standata/properties.py delete mode 100644 src/py/mat3ra/standata/workflows.py diff --git a/src/py/mat3ra/standata/applications.py b/src/py/mat3ra/standata/applications.py deleted file mode 100644 index f82dc2a..0000000 --- a/src/py/mat3ra/standata/applications.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -applications_data = json.loads(r'''{"standataConfig":{"categories":{"model":["atomistic","macroscopic","mesoscopic","quantum-mechanical","statistical"],"language_type":["scripting","compiled"],"purpose":["command_line_interface","interactive_computing_environment","programming_language"]},"entities":[{"filename":"espresso_gnu_540.json","categories":["quantum-mechanical"]},{"filename":"python_386.json","categories":["scripting","programming_language"]}]},"filesMapByName":{"espresso_gnu_540.json":{"name":"espresso","shortName":"qe","summary":"Quantum Espresso","version":"5.4.0","build":"GNU","hasAdvancedComputeOptions":true,"isLicensed":false},"python_386.json":{"name":"python","shortName":"py","summary":"Python Script","version":"3.8.6","build":"Default","hasAdvancedComputeOptions":false,"isLicensed":false}}}''') diff --git a/src/py/mat3ra/standata/data/applications.py b/src/py/mat3ra/standata/data/applications.py deleted file mode 100644 index f82dc2a..0000000 --- a/src/py/mat3ra/standata/data/applications.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -applications_data = json.loads(r'''{"standataConfig":{"categories":{"model":["atomistic","macroscopic","mesoscopic","quantum-mechanical","statistical"],"language_type":["scripting","compiled"],"purpose":["command_line_interface","interactive_computing_environment","programming_language"]},"entities":[{"filename":"espresso_gnu_540.json","categories":["quantum-mechanical"]},{"filename":"python_386.json","categories":["scripting","programming_language"]}]},"filesMapByName":{"espresso_gnu_540.json":{"name":"espresso","shortName":"qe","summary":"Quantum Espresso","version":"5.4.0","build":"GNU","hasAdvancedComputeOptions":true,"isLicensed":false},"python_386.json":{"name":"python","shortName":"py","summary":"Python Script","version":"3.8.6","build":"Default","hasAdvancedComputeOptions":false,"isLicensed":false}}}''') diff --git a/src/py/mat3ra/standata/data/materials.py b/src/py/mat3ra/standata/data/materials.py deleted file mode 100644 index 5729426..0000000 --- a/src/py/mat3ra/standata/data/materials.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -materials_data = json.loads(r'''{"standataConfig":{"categories":{"type":["semiconductor","solar energy material","storage medium","organic electronics","battery/energy storage","composite","polymer","metals & alloys","solvent","catalysis","consumer packaged goods","glass","ceramic"],"form_factor":["bulk","layer","interface"],"dimensionality":["0D","1D","2D","3D","4D"],"electrical_conductivity":["metal","semi-metal","semiconductor","insulator"],"magnetism":["ferromagnetic","anti-ferromagnetic","paramagnetic","diamagnetic","non-magnetic"],"superconductivity":["type I","type II"],"composition":["oxide","nitride","carbide"]},"entities":[{"filename":"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json","categories":["2D","layer","semi-metal","non-magnetic"]},{"filename":"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json","categories":["3D","bulk","semi-metal","non-magnetic","battery/energy storage"]},{"filename":"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json","categories":["2D","layer","insulator","non-magnetic"]},{"filename":"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json","categories":["3D","bulk","metal","ferromagnetic"]},{"filename":"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json","categories":["3D","bulk","semiconductor","non-magnetic","oxide"]},{"filename":"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json","categories":["3D","bulk","insulator","non-magnetic","oxide","glass"]},{"filename":"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json","categories":["3D","bulk","semiconductor","ferromagnetic","oxide"]},{"filename":"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json","categories":["3D","bulk","semiconductor","non-magnetic","nitride"]},{"filename":"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json","categories":["3D","bulk","insulator","non-magnetic","nitride","ceramic"]}]},"filesMapByName":{"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json":{"name":"C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993","lattice":{"type":"HEX","a":2.464955,"b":2.464956,"c":19.996729,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0.666667,0.333333,0.5]}]},"external":{"id":"2dm-3993","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3993","origin":true},"isNonPeriodic":false},"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json":{"name":"C, Graphite, HEX (P6_3/mmc) 3D (Bulk), mp-48","lattice":{"type":"HEX","a":2.467291,"b":2.467291,"c":7.803073,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"},{"id":2,"value":"C"},{"id":3,"value":"C"}],"coordinates":[{"id":0,"value":[0,0,0.25]},{"id":1,"value":[0,0,0.75]},{"id":2,"value":[0.3333333,0.6666667,0.25]},{"id":3,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-48","source":"Materials Project","doi":"10.17188/1208406","url":"https://next-gen.materialsproject.org/materials/mp-48","origin":true},"isNonPeriodic":false},"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json":{"name":"BN, Hexagonal Boron Nitride, HEX (P6/mmm) 2D (Monolayer), 2dm-4991","lattice":{"type":"HEX","a":2.508995,"b":2.508996,"c":20,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"N"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.5]}]},"external":{"id":"2dm-4991","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-4991","origin":true},"isNonPeriodic":false},"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json":{"name":"BN, Boron Nitride, HEX (P6_3/mmc) 3D (Bulk), mp-7991","lattice":{"type":"HEX","a":2.5116,"b":2.5116,"c":8.267796,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"B"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.25]},{"id":1,"value":[0.6666667,0.3333333,0.75]},{"id":2,"value":[0,0,0.25]},{"id":3,"value":[0,0,0.75]}]},"external":{"id":"mp-7991","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-7991","origin":true},"isNonPeriodic":false},"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json":{"name":"NaCl, Sodium Chloride, FCC (Fm-3m) 3D (Bulk), mp-22862","lattice":{"type":"FCC","a":4.024635,"b":4.024635,"c":4.024635,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Na"},{"id":1,"value":"Cl"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.5,0.5,0.5]}]},"external":{"id":"mp-22862","source":"Materials Project","doi":"10.17188/1199028","url":"https://next-gen.materialsproject.org/materials/mp-22862","origin":true},"isNonPeriodic":false},"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json":{"name":"Si, Silicon, FCC (Fd-3m) 3D (Bulk), mp-149","lattice":{"type":"FCC","a":3.866976,"b":3.866975,"c":3.866975,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.875,0.875,0.875]},{"id":1,"value":[0.125,0.125,0.125]}]},"external":{"id":"mp-149","source":"Materials Project","doi":"10.17188/1190959","url":"https://next-gen.materialsproject.org/materials/mp-149","origin":true},"isNonPeriodic":false},"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json":{"name":"Si, Silicene, HEX (P-3m1) 2D (Monolayer), 2dm-5934","lattice":{"type":"HEX","a":3.875909,"b":3.875457,"c":20.688228,"alpha":90,"beta":90,"gamma":120.0039,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.833322,0.666644,0.487728]},{"id":1,"value":[0.166679,0.333356,0.512272]}]},"external":{"id":"2dm-5934","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5934","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json":{"name":"WS2, Tungsten Disulfide, HEX (P6_3/mmc) 3D (Bulk), mp-224","lattice":{"type":"HEX","a":3.190731,"b":3.19073,"c":14.2024,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.6666667,0.6666667,0.75]},{"id":1,"value":[0.3333333,0.3333333,0.25]},{"id":2,"value":[0.6666667,0.6666667,0.139241]},{"id":3,"value":[0.3333333,0.3333333,0.639241]},{"id":4,"value":[0.6666667,0.6666667,0.360759]},{"id":5,"value":[0.3333333,0.3333333,0.860759]}]},"external":{"id":"mp-224","source":"Materials Project","doi":"10.17188/1197614","url":"https://next-gen.materialsproject.org/materials/mp-224","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json":{"name":"WS2, Tungsten Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3749","lattice":{"type":"HEX","a":3.193434,"b":3.193434,"c":23.131045,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.568029]},{"id":2,"value":[0.333333,0.666667,0.431971]}]},"external":{"id":"2dm-3749","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3749","origin":true},"isNonPeriodic":false},"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json":{"name":"Ni, Nickel, FCC (Fm-3m) 3D (Bulk), mp-23","lattice":{"type":"FCC","a":2.478974,"b":2.478974,"c":2.478974,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ni"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-23","source":"Materials Project","doi":"10.17188/1199153","url":"https://next-gen.materialsproject.org/materials/mp-23","origin":true},"isNonPeriodic":false},"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json":{"name":"Cu, Copper, FCC (Fm-3m) 3D (Bulk), mp-30","lattice":{"type":"FCC","a":2.560619,"b":2.56062,"c":2.560619,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Cu"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-30","source":"Materials Project","doi":"10.17188/1204433","url":"https://next-gen.materialsproject.org/materials/mp-30s","origin":true},"isNonPeriodic":false},"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json":{"name":"Au, Gold, FCC (Fm-3m) 3D (Bulk), mp-81","lattice":{"type":"FCC","a":2.949546,"b":2.949546,"c":2.949546,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Au"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-81","source":"Materials Project","doi":"10.17188/1307925","url":"https://next-gen.materialsproject.org/materials/mp-81","origin":true},"isNonPeriodic":false},"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json":{"name":"ZnO, Zinc Oxide, HEX (P6_3mc) 3D (Bulk), mp-2133","lattice":{"type":"HEX","a":3.289103,"b":3.289103,"c":5.306821,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zn"},{"id":1,"value":"Zn"},{"id":2,"value":"O"},{"id":3,"value":"O"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.500548]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.879762]},{"id":3,"value":[0.3333333,0.6666667,0.379762]}]},"external":{"id":"mp-2133","source":"Materials Project","doi":"10.17188/1196748","url":"https://next-gen.materialsproject.org/materials/mp-2133","origin":true},"isNonPeriodic":false},"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json":{"name":"Al2O3, Sapphire, RHL (R-3c) 3D (Bulk), mp-1143","lattice":{"type":"RHL","a":5.177955,"b":5.177954,"c":5.177956,"alpha":55.2896,"beta":55.2896,"gamma":55.2896,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"Al"},{"id":3,"value":"Al"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"}],"coordinates":[{"id":0,"value":[0.647904,0.647903,0.647903]},{"id":1,"value":[0.852097,0.852097,0.852097]},{"id":2,"value":[0.147904,0.147903,0.147903]},{"id":3,"value":[0.352097,0.352096,0.352096]},{"id":4,"value":[0.443855,0.056145,0.750001]},{"id":5,"value":[0.943855,0.250001,0.556145]},{"id":6,"value":[0.056144,0.75,0.443855]},{"id":7,"value":[0.750001,0.443856,0.056144]},{"id":8,"value":[0.25,0.556144,0.943855]},{"id":9,"value":[0.556144,0.943856,0.249999]}]},"external":{"id":"mp-1143","source":"Materials Project","doi":"10.17188/1187823","url":"https://next-gen.materialsproject.org/materials/mp-1143","origin":true},"isNonPeriodic":false},"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json":{"name":"SiO2, Quartz, HEX (P3_121) 3D (Bulk), mp-7000","lattice":{"type":"HEX","a":5.021502,"b":5.021502,"c":5.51057,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"},{"id":2,"value":"Si"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"}],"coordinates":[{"id":0,"value":[0.523695,0.523695,0]},{"id":1,"value":[0,0.476305,0.6666667]},{"id":2,"value":[0.476305,0,0.3333333]},{"id":3,"value":[0.256094,0.414854,0.794543]},{"id":4,"value":[0.585146,0.84124,0.127877]},{"id":5,"value":[0.15876,0.743906,0.46121]},{"id":6,"value":[0.414854,0.256094,0.205457]},{"id":7,"value":[0.743906,0.15876,0.53879]},{"id":8,"value":[0.84124,0.585146,0.872123]}]},"external":{"id":"mp-7000","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-7000","origin":true},"isNonPeriodic":false},"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json":{"name":"ZrO2, Zirconium Dioxide, MCL (P2_1/c) 3D (Bulk), mp-2858","lattice":{"type":"MCL","a":5.233649,"b":5.26846,"c":5.418476,"alpha":90,"beta":100.0548,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zr"},{"id":1,"value":"Zr"},{"id":2,"value":"Zr"},{"id":3,"value":"Zr"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.724019,0.95582,0.789744]},{"id":1,"value":[0.724019,0.54418,0.289744]},{"id":2,"value":[0.275981,0.45582,0.710256]},{"id":3,"value":[0.275981,0.04418,0.210256]},{"id":4,"value":[0.061015,0.180178,0.854613]},{"id":5,"value":[0.061015,0.319822,0.354613]},{"id":6,"value":[0.54701,0.255674,0.021936]},{"id":7,"value":[0.45299,0.755674,0.478064]},{"id":8,"value":[0.54701,0.244326,0.521936]},{"id":9,"value":[0.45299,0.744326,0.978064]},{"id":10,"value":[0.938985,0.680178,0.645387]},{"id":11,"value":[0.938985,0.819822,0.145387]}]},"external":{"id":"mp-2858","source":"Materials Project","doi":"10.17188/1202679","url":"https://next-gen.materialsproject.org/materials/mp-2858","origin":true},"isNonPeriodic":false},"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json":{"name":"HfO2, Hafnium IV Oxide, MCL (P2_1/c) 3D (Bulk), mp-352","lattice":{"type":"MCL","a":5.142319,"b":5.195148,"c":5.326038,"alpha":90,"beta":99.6745,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Hf"},{"id":1,"value":"Hf"},{"id":2,"value":"Hf"},{"id":3,"value":"Hf"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.275959,0.457319,0.707891]},{"id":1,"value":[0.724041,0.957319,0.792109]},{"id":2,"value":[0.724041,0.542681,0.292109]},{"id":3,"value":[0.275959,0.042681,0.207891]},{"id":4,"value":[0.448887,0.742603,0.977708]},{"id":5,"value":[0.551113,0.242603,0.522292]},{"id":6,"value":[0.551113,0.257397,0.022292]},{"id":7,"value":[0.448887,0.757397,0.477708]},{"id":8,"value":[0.067849,0.330122,0.347094]},{"id":9,"value":[0.932151,0.830122,0.152906]},{"id":10,"value":[0.932151,0.669878,0.652906]},{"id":11,"value":[0.067849,0.169878,0.847094]}]},"external":{"id":"mp-352","source":"Materials Project","doi":"10.17188/1206948","url":"https://next-gen.materialsproject.org/materials/mp-352","origin":true},"isNonPeriodic":false},"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json":{"name":"Y2O3, Yttrium III Oxide, MCLC (C2/m) 3D (Bulk), mp-558573","lattice":{"type":"MCLC","a":3.515998,"b":7.276947,"c":8.695337,"alpha":100.1007,"beta":90,"gamma":103.9801,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Y"},{"id":1,"value":"Y"},{"id":2,"value":"Y"},{"id":3,"value":"Y"},{"id":4,"value":"Y"},{"id":5,"value":"Y"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"},{"id":12,"value":"O"},{"id":13,"value":"O"},{"id":14,"value":"O"}],"coordinates":[{"id":0,"value":[0.635175,0.27035,0.488039]},{"id":1,"value":[0.364825,0.72965,0.511961]},{"id":2,"value":[0.032014,0.064029,0.814048]},{"id":3,"value":[0.691364,0.382729,0.137328]},{"id":4,"value":[0.308636,0.617271,0.862672]},{"id":5,"value":[0.967986,0.935971,0.185952]},{"id":6,"value":[0.127996,0.255992,0.281772]},{"id":7,"value":[0.825532,0.651064,0.030517]},{"id":8,"value":[0.793308,0.586615,0.37737]},{"id":9,"value":[0.470963,0.941926,0.342856]},{"id":10,"value":[0.529037,0.058074,0.657144]},{"id":11,"value":[0.5,0,0]},{"id":12,"value":[0.174468,0.348936,0.969483]},{"id":13,"value":[0.206692,0.413385,0.62263]},{"id":14,"value":[0.872004,0.744008,0.718228]}]},"external":{"id":"mp-558573","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-558573","origin":true},"isNonPeriodic":false},"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json":{"name":"VO2, Vanadium IV Oxide, TET (P4_2/mnm) 3D (Bulk), mp-19094","lattice":{"type":"TET","a":3.038141,"b":4.51531,"c":4.51531,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"V"},{"id":1,"value":"V"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.799236,0.200764]},{"id":3,"value":[0.5,0.200764,0.799236]},{"id":4,"value":[0,0.700764,0.700764]},{"id":5,"value":[0,0.299236,0.299236]}]},"external":{"id":"mp-19094","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-19094","origin":true},"isNonPeriodic":false},"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json":{"name":"TiO2, Titanium Oxide, TET (P4_2/mnm) 3D (Bulk), mp-2657","lattice":{"type":"TET","a":2.969203,"b":4.653272,"c":4.653272,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ti"},{"id":1,"value":"Ti"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.19542,0.80458]},{"id":3,"value":[0.5,0.80458,0.19542]},{"id":4,"value":[0,0.30458,0.30458]},{"id":5,"value":[0,0.69542,0.69542]}]},"external":{"id":"mp-2657","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-2657","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P_3/mmc) 3D (Bulk), mp-2815","lattice":{"type":"HEX","a":3.192238,"b":3.192238,"c":13.37829,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"Mo"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.3333333,0.3333333,0.75]},{"id":1,"value":[0.6666667,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.3333333,0.133082]},{"id":3,"value":[0.6666667,0.6666667,0.866914]},{"id":4,"value":[0.3333333,0.3333333,0.366918]},{"id":5,"value":[0.6666667,0.6666667,0.633086]}]},"external":{"id":"mp-2815","source":"Materials Project","doi":"10.17188/1202268","url":"https://next-gen.materialsproject.org/materials/mp-2815","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3150","lattice":{"type":"HEX","a":3.196223,"b":3.196223,"c":23.12983,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.5]},{"id":1,"value":[0.333333,0.666667,0.432137]},{"id":2,"value":[0.333333,0.666667,0.567863]}]},"external":{"id":"2dm-3150","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3150","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P6_3/mmc) 3D (Bulk), mp-602","lattice":{"type":"HEX","a":3.558711,"b":3.558711,"c":15.34665,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Te"},{"id":3,"value":"Te"},{"id":4,"value":"Mo"},{"id":5,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.63208]},{"id":1,"value":[0.6666667,0.3333333,0.13208]},{"id":2,"value":[0.6666667,0.3333333,0.36792]},{"id":3,"value":[0.3333333,0.6666667,0.86792]},{"id":4,"value":[0.3333333,0.6666667,0.25]},{"id":5,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-602","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-602","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P-6m2) 2D (Monolayer), 2dm-5370","lattice":{"type":"HEX","a":3.567851,"b":3.56785,"c":23.619353,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.576748]},{"id":1,"value":[0.666667,0.333333,0.423252]},{"id":2,"value":[0,0,0.5]}]},"external":{"id":"2dm-5370","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5370","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json":{"name":"WSe2, Tungsten Diselenide, HEX (P6_3/mmc) 3D (Bulk), mp-1821","lattice":{"type":"HEX","a":3.327069,"b":3.327069,"c":15.06895,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"Se"},{"id":3,"value":"Se"},{"id":4,"value":"Se"},{"id":5,"value":"Se"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.75]},{"id":1,"value":[0.3333333,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.6666667,0.861569]},{"id":3,"value":[0.6666667,0.3333333,0.361569]},{"id":4,"value":[0.3333333,0.6666667,0.638431]},{"id":5,"value":[0.6666667,0.3333333,0.138431]}]},"external":{"id":"mp-1821","source":"Materials Project","doi":"10.17188/1192989","url":"https://next-gen.materialsproject.org/materials/mp-1821","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json":{"name":"WSe2, Tungsten Diselenide, HEX (P-6m2) 2D (Monolayer), 2dm-3594","lattice":{"type":"HEX","a":3.330619,"b":3.330619,"c":23.362456,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"Se"},{"id":2,"value":"Se"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0,0,0.427982]},{"id":2,"value":[0,0,0.572018]}]},"external":{"id":"2dm-3594","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3594","origin":true},"isNonPeriodic":false},"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json":{"name":"GaN, Gallium Nitride, HEX (P6_3mc) 3D (Bulk), mp-804","lattice":{"type":"HEX","a":3.21629,"b":3.21629,"c":5.239962,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"Ga"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.49912]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.87588]},{"id":3,"value":[0.3333333,0.6666667,0.37588]}]},"external":{"id":"mp-804","source":"Materials Project","doi":"10.17188/1268467","url":"https://next-gen.materialsproject.org/materials/mp-804","origin":true},"isNonPeriodic":false},"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json":{"name":"GaAs, Gallium Arsenide, FCC (F-43m) 3D (Bulk), mp-2534","lattice":{"type":"FCC","a":4.065993,"b":4.065993,"c":4.065993,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"As"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.25,0.25,0.25]}]},"external":{"id":"mp-2534","source":"Materials Project","doi":"10.17188/1200591","url":"https://next-gen.materialsproject.org/materials/mp-2534","origin":true},"isNonPeriodic":false},"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json":{"name":"AlN, Aluminum Nitride, HEX (P6_3mc) 3D (Bulk), mp-661","lattice":{"type":"HEX","a":3.128588,"b":3.128588,"c":5.016955,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.499287]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.880713]},{"id":3,"value":[0.3333333,0.6666667,0.380713]}]},"external":{"id":"mp-661","source":"Materials Project","doi":"10.17188/1268470","url":"https://next-gen.materialsproject.org/materials/mp-661","origin":true},"isNonPeriodic":false}}}''') diff --git a/src/py/mat3ra/standata/data/properties.py b/src/py/mat3ra/standata/data/properties.py deleted file mode 100644 index f7bb537..0000000 --- a/src/py/mat3ra/standata/data/properties.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -properties_data = json.loads(r'''{"standataConfig":{"categories":{"type":["mechanical","electronic","magnetic","thermal","optical","dynamic","transport","radiological","acoustic","manufacturing","chemical","structural","surface"],"property_class":["meta-property","proto-property"],"value_type":["scalar","vector","matrix","tensor_rank3","tensor_rank4","non-scalar"],"measurement":["angle-resolved-photoemission-spectroscopy","atomic-force-microscopy","x-ray-diffraction","x-ray-fluorescence","transmission-electron-microscopy","scanning-electron-microscopy","thermogravimetric-analysis"],"application":["espresso","vasp","python","shell"]},"entities":[{"filename":"valence_band_offset.json","categories":["scalar","electronic","angle-resolved-photoemission-spectroscopy"]},{"filename":"band_structure.json","categories":["matrix","electronic"]}]},"filesMapByName":{"valence_band_offset.json":{"name":"valence_band_offset","units":"eV","value":0.28},"band_structure.json":{"name":"band_structure","spin":[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],"xAxis":{"label":"kpoints","units":"crystal"},"xDataArray":[[0,0,0],[0.28867514,0.20412412,-0.49999997],[0,-0.61237246,0],[0.28867514,-0.40824834,-0.49999997],[-0.57735028,0.20412421,0],[-0.57735028,-0.40824824,0]],"yAxis":{"label":"energy","units":"eV"},"yDataSeries":[[-5.5990059,-3.30219959,-3.30220019,-1.51073812,-3.30221054,-1.51074222],[6.26931638,-0.66503974,-0.6650363,-1.51072293,-0.66501391,-1.5107195],[6.26931998,5.06084876,5.06084821,3.41069883,5.06085301,3.41069761],[6.26934533,5.0608702,5.06086954,3.41070722,5.06085524,3.41071003],[8.71135349,7.69496909,7.69496137,6.91957625,7.69495606,6.91957636],[8.71135587,9.49274379,9.49273868,6.91958498,9.49273487,6.91958424],[8.71135838,9.49275618,9.49275401,16.14829919,9.49273798,16.14830113],[9.41550185,13.89571002,13.89571914,16.1483028,13.89571883,16.14830247]]}}}''') diff --git a/src/py/mat3ra/standata/data/workflows.py b/src/py/mat3ra/standata/data/workflows.py deleted file mode 100644 index 0510bcb..0000000 --- a/src/py/mat3ra/standata/data/workflows.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -workflows_data = json.loads(r'''{"standataConfig":{"categories":{"application":["espresso","exabyteml","jupyterLab","nwchem","python","shell","vasp"],"property":["band_gap","band_gap_dos","band_structure","phonon_dispersions","reaction_energy_profile","total_energy"],"material_count":["single-material","multi-material"]},"entities":[{"filename":"total_energy.json","categories":["espresso","single-material","total_energy"]},{"filename":"band_gap.json","categories":["espresso","vasp","band_gap"]}]},"filesMapByName":{"total_energy.json":{"_id":"000000000000000000000000","name":"Total Energy","subworkflows":[{"_id":"000000000000000000000000","name":"Total Energy","application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9c216f92-2917-47e5-8f09-8513ada8330a","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"},"flavor":{"isDefault":true,"input":[{"name":"pw_scf.in"}],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"monitors":["standard_output","convergence_electronic"],"applicationName":"espresso","executableName":"pw.x","name":"pw_scf","executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"}},"status":"idle","statusTrack":[],"input":[{"content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"pw_scf.in","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"applicationName":"espresso","executableName":"pw.x","updatedAt":"2023-08-17T23:02:17.337Z","updatedBy":"0","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 "}]}],"compute":null,"isDraft":false}],"units":[{"name":"Total Energy","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"e9109d498900aad592ba68b5","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"isDefault":true,"hash":"b5ed1cf151e828dfec234c5bf1be5b02","isOutdated":false,"createdAt":"2017-11-04T06:32:04.926Z","updatedAt":"2023-08-17T23:05:45.202Z","workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"exadmin","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isEntitySet":false},"band_gap.json":{"_id":"00000000000000000","name":"Band Gap","subworkflows":[{"_id":"000000000000000000000000","name":"Band Gap","application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"0d35c419-ba29-44e7-94f0-690ff1f7976b","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"isDefault":true,"input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.614Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}],"next":"061929a3-368a-4c42-95fd-4144d31b6692"},{"type":"execution","name":"vasp_nscf","head":false,"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"061929a3-368a-4c42-95fd-4144d31b6692","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"results":["band_gaps","fermi_energy"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp_nscf","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.622Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}]}],"compute":null,"isDraft":false}],"units":[{"name":"Band Gap","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"509bb16a21dfb6806cbf4022","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"hash":"9a0499d15894c106d6115c132f67b47c","isOutdated":false,"workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"user-000000","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isDefault":false,"isEntitySet":false,"createdAt":"2023-08-23T02:56:18.620Z","createdBy":"00000000000000000","updatedAt":"2023-08-23T02:56:18.894Z","updatedBy":"00000000000000000"}}}''') diff --git a/src/py/mat3ra/standata/materials.py b/src/py/mat3ra/standata/materials.py index 5729426..e69de29 100644 --- a/src/py/mat3ra/standata/materials.py +++ b/src/py/mat3ra/standata/materials.py @@ -1,3 +0,0 @@ -import json - -materials_data = json.loads(r'''{"standataConfig":{"categories":{"type":["semiconductor","solar energy material","storage medium","organic electronics","battery/energy storage","composite","polymer","metals & alloys","solvent","catalysis","consumer packaged goods","glass","ceramic"],"form_factor":["bulk","layer","interface"],"dimensionality":["0D","1D","2D","3D","4D"],"electrical_conductivity":["metal","semi-metal","semiconductor","insulator"],"magnetism":["ferromagnetic","anti-ferromagnetic","paramagnetic","diamagnetic","non-magnetic"],"superconductivity":["type I","type II"],"composition":["oxide","nitride","carbide"]},"entities":[{"filename":"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json","categories":["2D","layer","semi-metal","non-magnetic"]},{"filename":"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json","categories":["3D","bulk","semi-metal","non-magnetic","battery/energy storage"]},{"filename":"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json","categories":["2D","layer","insulator","non-magnetic"]},{"filename":"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json","categories":["3D","bulk","metal","ferromagnetic"]},{"filename":"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json","categories":["3D","bulk","semiconductor","non-magnetic","oxide"]},{"filename":"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json","categories":["3D","bulk","insulator","non-magnetic","oxide","glass"]},{"filename":"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json","categories":["3D","bulk","semiconductor","ferromagnetic","oxide"]},{"filename":"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json","categories":["3D","bulk","semiconductor","non-magnetic","nitride"]},{"filename":"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json","categories":["3D","bulk","insulator","non-magnetic","nitride","ceramic"]}]},"filesMapByName":{"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json":{"name":"C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993","lattice":{"type":"HEX","a":2.464955,"b":2.464956,"c":19.996729,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0.666667,0.333333,0.5]}]},"external":{"id":"2dm-3993","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3993","origin":true},"isNonPeriodic":false},"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json":{"name":"C, Graphite, HEX (P6_3/mmc) 3D (Bulk), mp-48","lattice":{"type":"HEX","a":2.467291,"b":2.467291,"c":7.803073,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"},{"id":2,"value":"C"},{"id":3,"value":"C"}],"coordinates":[{"id":0,"value":[0,0,0.25]},{"id":1,"value":[0,0,0.75]},{"id":2,"value":[0.3333333,0.6666667,0.25]},{"id":3,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-48","source":"Materials Project","doi":"10.17188/1208406","url":"https://next-gen.materialsproject.org/materials/mp-48","origin":true},"isNonPeriodic":false},"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json":{"name":"BN, Hexagonal Boron Nitride, HEX (P6/mmm) 2D (Monolayer), 2dm-4991","lattice":{"type":"HEX","a":2.508995,"b":2.508996,"c":20,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"N"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.5]}]},"external":{"id":"2dm-4991","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-4991","origin":true},"isNonPeriodic":false},"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json":{"name":"BN, Boron Nitride, HEX (P6_3/mmc) 3D (Bulk), mp-7991","lattice":{"type":"HEX","a":2.5116,"b":2.5116,"c":8.267796,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"B"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.25]},{"id":1,"value":[0.6666667,0.3333333,0.75]},{"id":2,"value":[0,0,0.25]},{"id":3,"value":[0,0,0.75]}]},"external":{"id":"mp-7991","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-7991","origin":true},"isNonPeriodic":false},"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json":{"name":"NaCl, Sodium Chloride, FCC (Fm-3m) 3D (Bulk), mp-22862","lattice":{"type":"FCC","a":4.024635,"b":4.024635,"c":4.024635,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Na"},{"id":1,"value":"Cl"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.5,0.5,0.5]}]},"external":{"id":"mp-22862","source":"Materials Project","doi":"10.17188/1199028","url":"https://next-gen.materialsproject.org/materials/mp-22862","origin":true},"isNonPeriodic":false},"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json":{"name":"Si, Silicon, FCC (Fd-3m) 3D (Bulk), mp-149","lattice":{"type":"FCC","a":3.866976,"b":3.866975,"c":3.866975,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.875,0.875,0.875]},{"id":1,"value":[0.125,0.125,0.125]}]},"external":{"id":"mp-149","source":"Materials Project","doi":"10.17188/1190959","url":"https://next-gen.materialsproject.org/materials/mp-149","origin":true},"isNonPeriodic":false},"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json":{"name":"Si, Silicene, HEX (P-3m1) 2D (Monolayer), 2dm-5934","lattice":{"type":"HEX","a":3.875909,"b":3.875457,"c":20.688228,"alpha":90,"beta":90,"gamma":120.0039,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.833322,0.666644,0.487728]},{"id":1,"value":[0.166679,0.333356,0.512272]}]},"external":{"id":"2dm-5934","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5934","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json":{"name":"WS2, Tungsten Disulfide, HEX (P6_3/mmc) 3D (Bulk), mp-224","lattice":{"type":"HEX","a":3.190731,"b":3.19073,"c":14.2024,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.6666667,0.6666667,0.75]},{"id":1,"value":[0.3333333,0.3333333,0.25]},{"id":2,"value":[0.6666667,0.6666667,0.139241]},{"id":3,"value":[0.3333333,0.3333333,0.639241]},{"id":4,"value":[0.6666667,0.6666667,0.360759]},{"id":5,"value":[0.3333333,0.3333333,0.860759]}]},"external":{"id":"mp-224","source":"Materials Project","doi":"10.17188/1197614","url":"https://next-gen.materialsproject.org/materials/mp-224","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json":{"name":"WS2, Tungsten Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3749","lattice":{"type":"HEX","a":3.193434,"b":3.193434,"c":23.131045,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.568029]},{"id":2,"value":[0.333333,0.666667,0.431971]}]},"external":{"id":"2dm-3749","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3749","origin":true},"isNonPeriodic":false},"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json":{"name":"Ni, Nickel, FCC (Fm-3m) 3D (Bulk), mp-23","lattice":{"type":"FCC","a":2.478974,"b":2.478974,"c":2.478974,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ni"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-23","source":"Materials Project","doi":"10.17188/1199153","url":"https://next-gen.materialsproject.org/materials/mp-23","origin":true},"isNonPeriodic":false},"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json":{"name":"Cu, Copper, FCC (Fm-3m) 3D (Bulk), mp-30","lattice":{"type":"FCC","a":2.560619,"b":2.56062,"c":2.560619,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Cu"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-30","source":"Materials Project","doi":"10.17188/1204433","url":"https://next-gen.materialsproject.org/materials/mp-30s","origin":true},"isNonPeriodic":false},"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json":{"name":"Au, Gold, FCC (Fm-3m) 3D (Bulk), mp-81","lattice":{"type":"FCC","a":2.949546,"b":2.949546,"c":2.949546,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Au"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-81","source":"Materials Project","doi":"10.17188/1307925","url":"https://next-gen.materialsproject.org/materials/mp-81","origin":true},"isNonPeriodic":false},"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json":{"name":"ZnO, Zinc Oxide, HEX (P6_3mc) 3D (Bulk), mp-2133","lattice":{"type":"HEX","a":3.289103,"b":3.289103,"c":5.306821,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zn"},{"id":1,"value":"Zn"},{"id":2,"value":"O"},{"id":3,"value":"O"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.500548]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.879762]},{"id":3,"value":[0.3333333,0.6666667,0.379762]}]},"external":{"id":"mp-2133","source":"Materials Project","doi":"10.17188/1196748","url":"https://next-gen.materialsproject.org/materials/mp-2133","origin":true},"isNonPeriodic":false},"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json":{"name":"Al2O3, Sapphire, RHL (R-3c) 3D (Bulk), mp-1143","lattice":{"type":"RHL","a":5.177955,"b":5.177954,"c":5.177956,"alpha":55.2896,"beta":55.2896,"gamma":55.2896,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"Al"},{"id":3,"value":"Al"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"}],"coordinates":[{"id":0,"value":[0.647904,0.647903,0.647903]},{"id":1,"value":[0.852097,0.852097,0.852097]},{"id":2,"value":[0.147904,0.147903,0.147903]},{"id":3,"value":[0.352097,0.352096,0.352096]},{"id":4,"value":[0.443855,0.056145,0.750001]},{"id":5,"value":[0.943855,0.250001,0.556145]},{"id":6,"value":[0.056144,0.75,0.443855]},{"id":7,"value":[0.750001,0.443856,0.056144]},{"id":8,"value":[0.25,0.556144,0.943855]},{"id":9,"value":[0.556144,0.943856,0.249999]}]},"external":{"id":"mp-1143","source":"Materials Project","doi":"10.17188/1187823","url":"https://next-gen.materialsproject.org/materials/mp-1143","origin":true},"isNonPeriodic":false},"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json":{"name":"SiO2, Quartz, HEX (P3_121) 3D (Bulk), mp-7000","lattice":{"type":"HEX","a":5.021502,"b":5.021502,"c":5.51057,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"},{"id":2,"value":"Si"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"}],"coordinates":[{"id":0,"value":[0.523695,0.523695,0]},{"id":1,"value":[0,0.476305,0.6666667]},{"id":2,"value":[0.476305,0,0.3333333]},{"id":3,"value":[0.256094,0.414854,0.794543]},{"id":4,"value":[0.585146,0.84124,0.127877]},{"id":5,"value":[0.15876,0.743906,0.46121]},{"id":6,"value":[0.414854,0.256094,0.205457]},{"id":7,"value":[0.743906,0.15876,0.53879]},{"id":8,"value":[0.84124,0.585146,0.872123]}]},"external":{"id":"mp-7000","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-7000","origin":true},"isNonPeriodic":false},"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json":{"name":"ZrO2, Zirconium Dioxide, MCL (P2_1/c) 3D (Bulk), mp-2858","lattice":{"type":"MCL","a":5.233649,"b":5.26846,"c":5.418476,"alpha":90,"beta":100.0548,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zr"},{"id":1,"value":"Zr"},{"id":2,"value":"Zr"},{"id":3,"value":"Zr"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.724019,0.95582,0.789744]},{"id":1,"value":[0.724019,0.54418,0.289744]},{"id":2,"value":[0.275981,0.45582,0.710256]},{"id":3,"value":[0.275981,0.04418,0.210256]},{"id":4,"value":[0.061015,0.180178,0.854613]},{"id":5,"value":[0.061015,0.319822,0.354613]},{"id":6,"value":[0.54701,0.255674,0.021936]},{"id":7,"value":[0.45299,0.755674,0.478064]},{"id":8,"value":[0.54701,0.244326,0.521936]},{"id":9,"value":[0.45299,0.744326,0.978064]},{"id":10,"value":[0.938985,0.680178,0.645387]},{"id":11,"value":[0.938985,0.819822,0.145387]}]},"external":{"id":"mp-2858","source":"Materials Project","doi":"10.17188/1202679","url":"https://next-gen.materialsproject.org/materials/mp-2858","origin":true},"isNonPeriodic":false},"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json":{"name":"HfO2, Hafnium IV Oxide, MCL (P2_1/c) 3D (Bulk), mp-352","lattice":{"type":"MCL","a":5.142319,"b":5.195148,"c":5.326038,"alpha":90,"beta":99.6745,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Hf"},{"id":1,"value":"Hf"},{"id":2,"value":"Hf"},{"id":3,"value":"Hf"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.275959,0.457319,0.707891]},{"id":1,"value":[0.724041,0.957319,0.792109]},{"id":2,"value":[0.724041,0.542681,0.292109]},{"id":3,"value":[0.275959,0.042681,0.207891]},{"id":4,"value":[0.448887,0.742603,0.977708]},{"id":5,"value":[0.551113,0.242603,0.522292]},{"id":6,"value":[0.551113,0.257397,0.022292]},{"id":7,"value":[0.448887,0.757397,0.477708]},{"id":8,"value":[0.067849,0.330122,0.347094]},{"id":9,"value":[0.932151,0.830122,0.152906]},{"id":10,"value":[0.932151,0.669878,0.652906]},{"id":11,"value":[0.067849,0.169878,0.847094]}]},"external":{"id":"mp-352","source":"Materials Project","doi":"10.17188/1206948","url":"https://next-gen.materialsproject.org/materials/mp-352","origin":true},"isNonPeriodic":false},"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json":{"name":"Y2O3, Yttrium III Oxide, MCLC (C2/m) 3D (Bulk), mp-558573","lattice":{"type":"MCLC","a":3.515998,"b":7.276947,"c":8.695337,"alpha":100.1007,"beta":90,"gamma":103.9801,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Y"},{"id":1,"value":"Y"},{"id":2,"value":"Y"},{"id":3,"value":"Y"},{"id":4,"value":"Y"},{"id":5,"value":"Y"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"},{"id":12,"value":"O"},{"id":13,"value":"O"},{"id":14,"value":"O"}],"coordinates":[{"id":0,"value":[0.635175,0.27035,0.488039]},{"id":1,"value":[0.364825,0.72965,0.511961]},{"id":2,"value":[0.032014,0.064029,0.814048]},{"id":3,"value":[0.691364,0.382729,0.137328]},{"id":4,"value":[0.308636,0.617271,0.862672]},{"id":5,"value":[0.967986,0.935971,0.185952]},{"id":6,"value":[0.127996,0.255992,0.281772]},{"id":7,"value":[0.825532,0.651064,0.030517]},{"id":8,"value":[0.793308,0.586615,0.37737]},{"id":9,"value":[0.470963,0.941926,0.342856]},{"id":10,"value":[0.529037,0.058074,0.657144]},{"id":11,"value":[0.5,0,0]},{"id":12,"value":[0.174468,0.348936,0.969483]},{"id":13,"value":[0.206692,0.413385,0.62263]},{"id":14,"value":[0.872004,0.744008,0.718228]}]},"external":{"id":"mp-558573","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-558573","origin":true},"isNonPeriodic":false},"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json":{"name":"VO2, Vanadium IV Oxide, TET (P4_2/mnm) 3D (Bulk), mp-19094","lattice":{"type":"TET","a":3.038141,"b":4.51531,"c":4.51531,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"V"},{"id":1,"value":"V"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.799236,0.200764]},{"id":3,"value":[0.5,0.200764,0.799236]},{"id":4,"value":[0,0.700764,0.700764]},{"id":5,"value":[0,0.299236,0.299236]}]},"external":{"id":"mp-19094","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-19094","origin":true},"isNonPeriodic":false},"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json":{"name":"TiO2, Titanium Oxide, TET (P4_2/mnm) 3D (Bulk), mp-2657","lattice":{"type":"TET","a":2.969203,"b":4.653272,"c":4.653272,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ti"},{"id":1,"value":"Ti"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.19542,0.80458]},{"id":3,"value":[0.5,0.80458,0.19542]},{"id":4,"value":[0,0.30458,0.30458]},{"id":5,"value":[0,0.69542,0.69542]}]},"external":{"id":"mp-2657","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-2657","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P_3/mmc) 3D (Bulk), mp-2815","lattice":{"type":"HEX","a":3.192238,"b":3.192238,"c":13.37829,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"Mo"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.3333333,0.3333333,0.75]},{"id":1,"value":[0.6666667,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.3333333,0.133082]},{"id":3,"value":[0.6666667,0.6666667,0.866914]},{"id":4,"value":[0.3333333,0.3333333,0.366918]},{"id":5,"value":[0.6666667,0.6666667,0.633086]}]},"external":{"id":"mp-2815","source":"Materials Project","doi":"10.17188/1202268","url":"https://next-gen.materialsproject.org/materials/mp-2815","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3150","lattice":{"type":"HEX","a":3.196223,"b":3.196223,"c":23.12983,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.5]},{"id":1,"value":[0.333333,0.666667,0.432137]},{"id":2,"value":[0.333333,0.666667,0.567863]}]},"external":{"id":"2dm-3150","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3150","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P6_3/mmc) 3D (Bulk), mp-602","lattice":{"type":"HEX","a":3.558711,"b":3.558711,"c":15.34665,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Te"},{"id":3,"value":"Te"},{"id":4,"value":"Mo"},{"id":5,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.63208]},{"id":1,"value":[0.6666667,0.3333333,0.13208]},{"id":2,"value":[0.6666667,0.3333333,0.36792]},{"id":3,"value":[0.3333333,0.6666667,0.86792]},{"id":4,"value":[0.3333333,0.6666667,0.25]},{"id":5,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-602","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-602","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P-6m2) 2D (Monolayer), 2dm-5370","lattice":{"type":"HEX","a":3.567851,"b":3.56785,"c":23.619353,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.576748]},{"id":1,"value":[0.666667,0.333333,0.423252]},{"id":2,"value":[0,0,0.5]}]},"external":{"id":"2dm-5370","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5370","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json":{"name":"WSe2, Tungsten Diselenide, HEX (P6_3/mmc) 3D (Bulk), mp-1821","lattice":{"type":"HEX","a":3.327069,"b":3.327069,"c":15.06895,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"Se"},{"id":3,"value":"Se"},{"id":4,"value":"Se"},{"id":5,"value":"Se"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.75]},{"id":1,"value":[0.3333333,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.6666667,0.861569]},{"id":3,"value":[0.6666667,0.3333333,0.361569]},{"id":4,"value":[0.3333333,0.6666667,0.638431]},{"id":5,"value":[0.6666667,0.3333333,0.138431]}]},"external":{"id":"mp-1821","source":"Materials Project","doi":"10.17188/1192989","url":"https://next-gen.materialsproject.org/materials/mp-1821","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json":{"name":"WSe2, Tungsten Diselenide, HEX (P-6m2) 2D (Monolayer), 2dm-3594","lattice":{"type":"HEX","a":3.330619,"b":3.330619,"c":23.362456,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"Se"},{"id":2,"value":"Se"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0,0,0.427982]},{"id":2,"value":[0,0,0.572018]}]},"external":{"id":"2dm-3594","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3594","origin":true},"isNonPeriodic":false},"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json":{"name":"GaN, Gallium Nitride, HEX (P6_3mc) 3D (Bulk), mp-804","lattice":{"type":"HEX","a":3.21629,"b":3.21629,"c":5.239962,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"Ga"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.49912]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.87588]},{"id":3,"value":[0.3333333,0.6666667,0.37588]}]},"external":{"id":"mp-804","source":"Materials Project","doi":"10.17188/1268467","url":"https://next-gen.materialsproject.org/materials/mp-804","origin":true},"isNonPeriodic":false},"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json":{"name":"GaAs, Gallium Arsenide, FCC (F-43m) 3D (Bulk), mp-2534","lattice":{"type":"FCC","a":4.065993,"b":4.065993,"c":4.065993,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"As"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.25,0.25,0.25]}]},"external":{"id":"mp-2534","source":"Materials Project","doi":"10.17188/1200591","url":"https://next-gen.materialsproject.org/materials/mp-2534","origin":true},"isNonPeriodic":false},"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json":{"name":"AlN, Aluminum Nitride, HEX (P6_3mc) 3D (Bulk), mp-661","lattice":{"type":"HEX","a":3.128588,"b":3.128588,"c":5.016955,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.499287]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.880713]},{"id":3,"value":[0.3333333,0.6666667,0.380713]}]},"external":{"id":"mp-661","source":"Materials Project","doi":"10.17188/1268470","url":"https://next-gen.materialsproject.org/materials/mp-661","origin":true},"isNonPeriodic":false}}}''') diff --git a/src/py/mat3ra/standata/properties.py b/src/py/mat3ra/standata/properties.py deleted file mode 100644 index f7bb537..0000000 --- a/src/py/mat3ra/standata/properties.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -properties_data = json.loads(r'''{"standataConfig":{"categories":{"type":["mechanical","electronic","magnetic","thermal","optical","dynamic","transport","radiological","acoustic","manufacturing","chemical","structural","surface"],"property_class":["meta-property","proto-property"],"value_type":["scalar","vector","matrix","tensor_rank3","tensor_rank4","non-scalar"],"measurement":["angle-resolved-photoemission-spectroscopy","atomic-force-microscopy","x-ray-diffraction","x-ray-fluorescence","transmission-electron-microscopy","scanning-electron-microscopy","thermogravimetric-analysis"],"application":["espresso","vasp","python","shell"]},"entities":[{"filename":"valence_band_offset.json","categories":["scalar","electronic","angle-resolved-photoemission-spectroscopy"]},{"filename":"band_structure.json","categories":["matrix","electronic"]}]},"filesMapByName":{"valence_band_offset.json":{"name":"valence_band_offset","units":"eV","value":0.28},"band_structure.json":{"name":"band_structure","spin":[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],"xAxis":{"label":"kpoints","units":"crystal"},"xDataArray":[[0,0,0],[0.28867514,0.20412412,-0.49999997],[0,-0.61237246,0],[0.28867514,-0.40824834,-0.49999997],[-0.57735028,0.20412421,0],[-0.57735028,-0.40824824,0]],"yAxis":{"label":"energy","units":"eV"},"yDataSeries":[[-5.5990059,-3.30219959,-3.30220019,-1.51073812,-3.30221054,-1.51074222],[6.26931638,-0.66503974,-0.6650363,-1.51072293,-0.66501391,-1.5107195],[6.26931998,5.06084876,5.06084821,3.41069883,5.06085301,3.41069761],[6.26934533,5.0608702,5.06086954,3.41070722,5.06085524,3.41071003],[8.71135349,7.69496909,7.69496137,6.91957625,7.69495606,6.91957636],[8.71135587,9.49274379,9.49273868,6.91958498,9.49273487,6.91958424],[8.71135838,9.49275618,9.49275401,16.14829919,9.49273798,16.14830113],[9.41550185,13.89571002,13.89571914,16.1483028,13.89571883,16.14830247]]}}}''') diff --git a/src/py/mat3ra/standata/workflows.py b/src/py/mat3ra/standata/workflows.py deleted file mode 100644 index 0510bcb..0000000 --- a/src/py/mat3ra/standata/workflows.py +++ /dev/null @@ -1,3 +0,0 @@ -import json - -workflows_data = json.loads(r'''{"standataConfig":{"categories":{"application":["espresso","exabyteml","jupyterLab","nwchem","python","shell","vasp"],"property":["band_gap","band_gap_dos","band_structure","phonon_dispersions","reaction_energy_profile","total_energy"],"material_count":["single-material","multi-material"]},"entities":[{"filename":"total_energy.json","categories":["espresso","single-material","total_energy"]},{"filename":"band_gap.json","categories":["espresso","vasp","band_gap"]}]},"filesMapByName":{"total_energy.json":{"_id":"000000000000000000000000","name":"Total Energy","subworkflows":[{"_id":"000000000000000000000000","name":"Total Energy","application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9c216f92-2917-47e5-8f09-8513ada8330a","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"},"flavor":{"isDefault":true,"input":[{"name":"pw_scf.in"}],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"monitors":["standard_output","convergence_electronic"],"applicationName":"espresso","executableName":"pw.x","name":"pw_scf","executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"}},"status":"idle","statusTrack":[],"input":[{"content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"pw_scf.in","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"applicationName":"espresso","executableName":"pw.x","updatedAt":"2023-08-17T23:02:17.337Z","updatedBy":"0","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 "}]}],"compute":null,"isDraft":false}],"units":[{"name":"Total Energy","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"e9109d498900aad592ba68b5","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"isDefault":true,"hash":"b5ed1cf151e828dfec234c5bf1be5b02","isOutdated":false,"createdAt":"2017-11-04T06:32:04.926Z","updatedAt":"2023-08-17T23:05:45.202Z","workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"exadmin","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isEntitySet":false},"band_gap.json":{"_id":"00000000000000000","name":"Band Gap","subworkflows":[{"_id":"000000000000000000000000","name":"Band Gap","application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"0d35c419-ba29-44e7-94f0-690ff1f7976b","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"isDefault":true,"input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.614Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}],"next":"061929a3-368a-4c42-95fd-4144d31b6692"},{"type":"execution","name":"vasp_nscf","head":false,"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"061929a3-368a-4c42-95fd-4144d31b6692","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"results":["band_gaps","fermi_energy"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp_nscf","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.622Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}]}],"compute":null,"isDraft":false}],"units":[{"name":"Band Gap","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"509bb16a21dfb6806cbf4022","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"hash":"9a0499d15894c106d6115c132f67b47c","isOutdated":false,"workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"user-000000","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isDefault":false,"isEntitySet":false,"createdAt":"2023-08-23T02:56:18.620Z","createdBy":"00000000000000000","updatedAt":"2023-08-23T02:56:18.894Z","updatedBy":"00000000000000000"}}}''') From 864a7cc3fc59137306eaced6f646ee8d251a1855 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 24 Oct 2024 20:42:41 -0700 Subject: [PATCH 08/25] update: progress in rewriting --- src/py/mat3ra/standata/__init__.py | 30 ---- src/py/mat3ra/standata/base.py | 156 ++++++++++++++++++++ src/py/mat3ra/standata/build/__init__.py | 0 src/py/mat3ra/standata/build/builder.py | 75 ++++++++++ src/py/mat3ra/standata/build/cli.py | 39 +++++ src/py/mat3ra/standata/data/applications.py | 3 + src/py/mat3ra/standata/data/materials.py | 3 + src/py/mat3ra/standata/data/properties.py | 3 + src/py/mat3ra/standata/data/workflows.py | 3 + src/py/mat3ra/standata/materials.py | 6 + 10 files changed, 288 insertions(+), 30 deletions(-) create mode 100644 src/py/mat3ra/standata/base.py create mode 100644 src/py/mat3ra/standata/build/__init__.py create mode 100644 src/py/mat3ra/standata/build/builder.py create mode 100644 src/py/mat3ra/standata/build/cli.py create mode 100644 src/py/mat3ra/standata/data/applications.py create mode 100644 src/py/mat3ra/standata/data/materials.py create mode 100644 src/py/mat3ra/standata/data/properties.py create mode 100644 src/py/mat3ra/standata/data/workflows.py diff --git a/src/py/mat3ra/standata/__init__.py b/src/py/mat3ra/standata/__init__.py index 7b1b0ef..e69de29 100644 --- a/src/py/mat3ra/standata/__init__.py +++ b/src/py/mat3ra/standata/__init__.py @@ -1,30 +0,0 @@ -import re -from typing import Dict, List - - -class Standata: - - # Override in children - data: dict = {"filesMapByName": []} - - @classmethod - def files_map_by_name(cls) -> Dict[str, dict]: - return cls.data["filesMapByName"] - - @classmethod - def get_as_list(cls): - return list(cls.files_map_by_name().values()) - - @classmethod - def get_by_name(cls, name: str) -> List[dict]: - """Returns entity by name. - - Args: - name: Name of the entity. - """ - matching_entities = [] - for key, entity in cls.files_map_by_name().items(): - regex = re.compile(name, re.IGNORECASE) - if re.match(regex, key): - matching_entities.append(entity) - return matching_entities diff --git a/src/py/mat3ra/standata/base.py b/src/py/mat3ra/standata/base.py new file mode 100644 index 0000000..d571608 --- /dev/null +++ b/src/py/mat3ra/standata/base.py @@ -0,0 +1,156 @@ +import re +from typing import Dict, List, Optional + +import pandas as pd +from pydantic import BaseModel + + +class StandataEntity(BaseModel): + filename: str + categories: List[str] + + +class StandataConfig(BaseModel): + categories: Dict[str, List[str]] = {} + entities: List[StandataEntity] = [] + + def get_categories_as_list(self, separator: str = "/") -> List[str]: + """ + Flattens categories dictionary to list of categories. + + Args: + category_map: Dictionary mapping category types to category tags. + separator: Separation character used to join category type and tag. + + Example:: + + Standata.flatten_categories({"size": ["S", "M", "L"]}) + # returns ["size/S", "size/M", "size/L"] + """ + category_groups = [list(map(lambda x: f"{key}{separator}{x}", val)) for key, val in self.categories.items()] + return [item for sublist in category_groups for item in sublist] + + def convert_tags_to_categories_list(self, *tags: str): + """ + Converts simple tags to '/' format. + + Args: + *tags: Category tags for the entity. + + Note: + Some tags belong to several categories simultaneously, for instance 'semiconductor' is associated with + 'electrical_conductivity' and 'type'. This function returns all occurrences of a tag as + '/'. + """ + return [cf for cf in self.categories if any([cf.split("/")[1] == t for t in tags])] + + def get_filenames_by_categories(self, *categories: str) -> List[str]: + """ + Returns filenames that match all given categories. + + Args: + *categories: Categories for the entity query. Note, that `categories` should be in the same format as the + column names in the lookup table. + """ + if len(categories) == 0: + return [] + filenames = [] + for entity in self.entities: + if any([category in entity.categories for category in categories]): + filenames.append(entity.filename) + return filenames + + def get_filenames_by_regex(self, regex: str) -> List[str]: + """ + Returns filenames that match the regular expression. + + Args: + regex: Regular expression for the entity query. + """ + filenames = [] + for entity in self.entities: + if re.match(regex, entity.filename): + filenames.append(entity.filename) + return filenames + + @property + def __lookup_table(self) -> pd.DataFrame: + """ + Creates lookup table for filenames and associated categories. + + For the lookup table category tags are first converted to the / format, which represent the + columns of the lookup table. The filenames represent the rows of the lookup table (DataFrame.index). The values + in the table are either 0 or 1 depending on whether a filename is associated with a certain category (1) or + not (0). + """ + df = pd.DataFrame( + 0, + columns=self.get_categories_as_list(), + index=[entity.filename for entity in self.entities], + ) + for entity in self.entities: + filename = entity.filename + categories = self.convert_tags_to_categories_list(*entity.categories) + for category in categories: + df.loc[filename, category] = 1 + return df + + +class StandataFilesMapByName(Dict[str, dict]): + + def get_objects_by_filenames(self, filenames: List[str]) -> List[dict]: + """ + Returns entities by filenames. + + Args: + filenames: Filenames of the entities. + """ + matching_objects = [] + for key, entity in self.items(): + if key in filenames: + matching_objects.append(entity) + return matching_objects + + +class StandataData(BaseModel): + class Config: + arbitrary_types_allowed = True + + filesMapByName: Optional[StandataFilesMapByName] = StandataFilesMapByName() + standataConfig: Optional[StandataConfig] = StandataConfig() + + def __init__(self, /, **kwargs): + super().__init__(**kwargs) + self.filesMapByName = StandataFilesMapByName(kwargs.get("filesMapByName", {})) + self.standataConfig = StandataConfig(**kwargs.get("standataConfig", {})) + + +class Standata(BaseModel): + # Override in children + data: StandataData = StandataData() + + @classmethod + def get_as_list(cls): + return list(cls.data.filesMapByName.values()) + + @classmethod + def get_by_name(cls, name: str) -> List[dict]: + """ + Returns entities by name regex. + + Args: + name: Name of the entity. + """ + matching_filenames = cls.data.standataConfig.get_filenames_by_regex(name) + return cls.data.filesMapByName.get_objects_by_filenames(matching_filenames) + + def get_by_categories(self, *tags: str) -> List[dict]: + """ + Finds entities that match all specified category tags. + + Args: + *tags: Category tags for the entity query. + """ + categories = self.data.standataConfig.convert_tags_to_categories_list(*tags) + matching_filenames = self.data.standataConfig.get_filenames_by_categories(*categories) + return self.data.filesMapByName.get_objects_by_filenames(matching_filenames) diff --git a/src/py/mat3ra/standata/build/__init__.py b/src/py/mat3ra/standata/build/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/py/mat3ra/standata/build/builder.py b/src/py/mat3ra/standata/build/builder.py new file mode 100644 index 0000000..d18704a --- /dev/null +++ b/src/py/mat3ra/standata/build/builder.py @@ -0,0 +1,75 @@ +import json +import yaml +from pathlib import Path +from typing import Dict, List, Optional, TypedDict, Union + + +from ..base import StandataConfig + +EntityItem = TypedDict("EntityItem", {"filename": str, "categories": List[str]}) + +EntityConfig = TypedDict("EntityConfig", {"categories": Dict[str, List[str]], "entities": List[EntityItem]}) + + +class StandataBuilder: + """The Standata class associates the entity data files with categories and allows for tag-based queries. + + Attributes: + entity_dir: Path to the folder containing entity data files. + """ + + def __init__(self, entity_config: EntityConfig, entity_dir: Union[str, Path]): + """Initializes categories and the entity list. + + Args: + entity_config: The contents of the entity config file (`categories.yml`). + entity_dir: The path to the directory containing all entities. + """ + self.entity_dir: Path = Path(entity_dir).resolve() + + @classmethod + def build_from_file(cls, entity_config_path: Union[Path, str]) -> "StandataConfig": + """Creates Standata class instance from entity config file (categories.yml). + + Args: + entity_config_path: The path to the entity config file `categories.yml`. + + Note: + Here, we assume that the entity config file is located in the same directory as all entity files. + """ + filepath = Path(entity_config_path) + config = StandataBuilder.load_config(filepath) + return StandataConfig(**config) + + @staticmethod + def load_config(entity_config_path: Path) -> EntityConfig: + """Loads entity config from file (Yaml). + + Args: + entity_config_path: The path to the entity config file `categories.yml`. + """ + entity_config: EntityConfig = {"categories": {}, "entities": []} + try: + with open(entity_config_path.resolve(), "r") as stream: + entity_config = yaml.safe_load(stream) + except yaml.YAMLError as e: + print(e) + return entity_config + + @staticmethod + def load_entity(filepath: Path) -> Optional[dict]: + """Loads entity config from file (JSON). + + Args: + filepath: Path to entity data file (JSON). + """ + entity = None + if not filepath.resolve().exists(): + print(f"Could not find entity file: {filepath.resolve()}") + return entity + try: + with open(filepath.resolve(), "r") as f: + entity = json.load(f) + except json.JSONDecodeError as e: + print(e) + return entity diff --git a/src/py/mat3ra/standata/build/cli.py b/src/py/mat3ra/standata/build/cli.py new file mode 100644 index 0000000..64072b9 --- /dev/null +++ b/src/py/mat3ra/standata/build/cli.py @@ -0,0 +1,39 @@ +from pathlib import Path +from typing import Optional + +import typer +from .builder import StandataBuilder + + +def main( + yaml_config: str = typer.Argument(..., help="Location of entity config file."), + destination: Optional[str] = typer.Option("--destination", "-d", help="Where to place symlink directory."), +): + config_path = Path(yaml_config) + entity_path_parent = config_path.parent + + standata_config = StandataBuilder.build_from_file(config_path) + + save_dir = config_path.parent + if destination and Path(destination).resolve().exists(): + save_dir = Path(destination) + categories_root = save_dir / "by_category" + + for entity in standata_config.entities: + categories = standata_config.convert_tags_to_categories_list(*entity.categories) + entity_path = entity_path_parent / entity.filename + + for category in categories: + category_dir = categories_root / category + category_dir.mkdir(parents=True, exist_ok=True) + linked_entity = category_dir / entity.filename + if not linked_entity.exists(): + linked_entity.symlink_to(entity_path) + + +def typer_app(): + typer.run(main) + + +if __name__ == "__main__": + typer_app() diff --git a/src/py/mat3ra/standata/data/applications.py b/src/py/mat3ra/standata/data/applications.py new file mode 100644 index 0000000..f82dc2a --- /dev/null +++ b/src/py/mat3ra/standata/data/applications.py @@ -0,0 +1,3 @@ +import json + +applications_data = json.loads(r'''{"standataConfig":{"categories":{"model":["atomistic","macroscopic","mesoscopic","quantum-mechanical","statistical"],"language_type":["scripting","compiled"],"purpose":["command_line_interface","interactive_computing_environment","programming_language"]},"entities":[{"filename":"espresso_gnu_540.json","categories":["quantum-mechanical"]},{"filename":"python_386.json","categories":["scripting","programming_language"]}]},"filesMapByName":{"espresso_gnu_540.json":{"name":"espresso","shortName":"qe","summary":"Quantum Espresso","version":"5.4.0","build":"GNU","hasAdvancedComputeOptions":true,"isLicensed":false},"python_386.json":{"name":"python","shortName":"py","summary":"Python Script","version":"3.8.6","build":"Default","hasAdvancedComputeOptions":false,"isLicensed":false}}}''') diff --git a/src/py/mat3ra/standata/data/materials.py b/src/py/mat3ra/standata/data/materials.py new file mode 100644 index 0000000..5729426 --- /dev/null +++ b/src/py/mat3ra/standata/data/materials.py @@ -0,0 +1,3 @@ +import json + +materials_data = json.loads(r'''{"standataConfig":{"categories":{"type":["semiconductor","solar energy material","storage medium","organic electronics","battery/energy storage","composite","polymer","metals & alloys","solvent","catalysis","consumer packaged goods","glass","ceramic"],"form_factor":["bulk","layer","interface"],"dimensionality":["0D","1D","2D","3D","4D"],"electrical_conductivity":["metal","semi-metal","semiconductor","insulator"],"magnetism":["ferromagnetic","anti-ferromagnetic","paramagnetic","diamagnetic","non-magnetic"],"superconductivity":["type I","type II"],"composition":["oxide","nitride","carbide"]},"entities":[{"filename":"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json","categories":["2D","layer","semi-metal","non-magnetic"]},{"filename":"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json","categories":["3D","bulk","semi-metal","non-magnetic","battery/energy storage"]},{"filename":"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json","categories":["2D","layer","insulator","non-magnetic"]},{"filename":"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json","categories":["3D","bulk","insulator","non-magnetic"]},{"filename":"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json","categories":["3D","bulk","metal","ferromagnetic"]},{"filename":"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json","categories":["3D","bulk","metal","non-magnetic","metals & alloys"]},{"filename":"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json","categories":["3D","bulk","semiconductor","non-magnetic","oxide"]},{"filename":"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json","categories":["3D","bulk","insulator","non-magnetic","oxide","glass"]},{"filename":"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json","categories":["3D","bulk","semiconductor","ferromagnetic","oxide"]},{"filename":"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json","categories":["3D","bulk","insulator","non-magnetic","oxide"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json","categories":["2D","layer","semiconductor","non-magnetic"]},{"filename":"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json","categories":["3D","bulk","semiconductor","non-magnetic","nitride"]},{"filename":"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json","categories":["3D","bulk","semiconductor","non-magnetic"]},{"filename":"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json","categories":["3D","bulk","insulator","non-magnetic","nitride","ceramic"]}]},"filesMapByName":{"C-[Graphene]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-3993].json":{"name":"C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993","lattice":{"type":"HEX","a":2.464955,"b":2.464956,"c":19.996729,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0.666667,0.333333,0.5]}]},"external":{"id":"2dm-3993","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3993","origin":true},"isNonPeriodic":false},"C-[Graphite]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-48].json":{"name":"C, Graphite, HEX (P6_3/mmc) 3D (Bulk), mp-48","lattice":{"type":"HEX","a":2.467291,"b":2.467291,"c":7.803073,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"C"},{"id":1,"value":"C"},{"id":2,"value":"C"},{"id":3,"value":"C"}],"coordinates":[{"id":0,"value":[0,0,0.25]},{"id":1,"value":[0,0,0.75]},{"id":2,"value":[0.3333333,0.6666667,0.25]},{"id":3,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-48","source":"Materials Project","doi":"10.17188/1208406","url":"https://next-gen.materialsproject.org/materials/mp-48","origin":true},"isNonPeriodic":false},"BN-[Hexagonal_Boron_Nitride]-HEX_[P6%2Fmmm]_2D_[Monolayer]-[2dm-4991].json":{"name":"BN, Hexagonal Boron Nitride, HEX (P6/mmm) 2D (Monolayer), 2dm-4991","lattice":{"type":"HEX","a":2.508995,"b":2.508996,"c":20,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"N"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.5]}]},"external":{"id":"2dm-4991","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-4991","origin":true},"isNonPeriodic":false},"BN-[Boron_Nitride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-7991].json":{"name":"BN, Boron Nitride, HEX (P6_3/mmc) 3D (Bulk), mp-7991","lattice":{"type":"HEX","a":2.5116,"b":2.5116,"c":8.267796,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"B"},{"id":1,"value":"B"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.25]},{"id":1,"value":[0.6666667,0.3333333,0.75]},{"id":2,"value":[0,0,0.25]},{"id":3,"value":[0,0,0.75]}]},"external":{"id":"mp-7991","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-7991","origin":true},"isNonPeriodic":false},"NaCl-[Sodium_Chloride]-FCC_[Fm-3m]_3D_[Bulk]-[mp-22862].json":{"name":"NaCl, Sodium Chloride, FCC (Fm-3m) 3D (Bulk), mp-22862","lattice":{"type":"FCC","a":4.024635,"b":4.024635,"c":4.024635,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Na"},{"id":1,"value":"Cl"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.5,0.5,0.5]}]},"external":{"id":"mp-22862","source":"Materials Project","doi":"10.17188/1199028","url":"https://next-gen.materialsproject.org/materials/mp-22862","origin":true},"isNonPeriodic":false},"Si-[Silicon]-FCC_[Fd-3m]_3D_[Bulk]-[mp-149].json":{"name":"Si, Silicon, FCC (Fd-3m) 3D (Bulk), mp-149","lattice":{"type":"FCC","a":3.866976,"b":3.866975,"c":3.866975,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.875,0.875,0.875]},{"id":1,"value":[0.125,0.125,0.125]}]},"external":{"id":"mp-149","source":"Materials Project","doi":"10.17188/1190959","url":"https://next-gen.materialsproject.org/materials/mp-149","origin":true},"isNonPeriodic":false},"Si-[Silicene]-HEX_[P-3m1]_2D_[Monolayer]-[2dm-5934].json":{"name":"Si, Silicene, HEX (P-3m1) 2D (Monolayer), 2dm-5934","lattice":{"type":"HEX","a":3.875909,"b":3.875457,"c":20.688228,"alpha":90,"beta":90,"gamma":120.0039,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"}],"coordinates":[{"id":0,"value":[0.833322,0.666644,0.487728]},{"id":1,"value":[0.166679,0.333356,0.512272]}]},"external":{"id":"2dm-5934","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5934","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-224].json":{"name":"WS2, Tungsten Disulfide, HEX (P6_3/mmc) 3D (Bulk), mp-224","lattice":{"type":"HEX","a":3.190731,"b":3.19073,"c":14.2024,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.6666667,0.6666667,0.75]},{"id":1,"value":[0.3333333,0.3333333,0.25]},{"id":2,"value":[0.6666667,0.6666667,0.139241]},{"id":3,"value":[0.3333333,0.3333333,0.639241]},{"id":4,"value":[0.6666667,0.6666667,0.360759]},{"id":5,"value":[0.3333333,0.3333333,0.860759]}]},"external":{"id":"mp-224","source":"Materials Project","doi":"10.17188/1197614","url":"https://next-gen.materialsproject.org/materials/mp-224","origin":true},"isNonPeriodic":false},"WS2-[Tungsten_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3749].json":{"name":"WS2, Tungsten Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3749","lattice":{"type":"HEX","a":3.193434,"b":3.193434,"c":23.131045,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0,0,0.5]},{"id":1,"value":[0.333333,0.666667,0.568029]},{"id":2,"value":[0.333333,0.666667,0.431971]}]},"external":{"id":"2dm-3749","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3749","origin":true},"isNonPeriodic":false},"Ni-[Nickel]-FCC_[Fm-3m]_3D_[Bulk]-[mp-23].json":{"name":"Ni, Nickel, FCC (Fm-3m) 3D (Bulk), mp-23","lattice":{"type":"FCC","a":2.478974,"b":2.478974,"c":2.478974,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ni"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-23","source":"Materials Project","doi":"10.17188/1199153","url":"https://next-gen.materialsproject.org/materials/mp-23","origin":true},"isNonPeriodic":false},"Cu-[Copper]-FCC_[Fm-3m]_3D_[Bulk]-[mp-30].json":{"name":"Cu, Copper, FCC (Fm-3m) 3D (Bulk), mp-30","lattice":{"type":"FCC","a":2.560619,"b":2.56062,"c":2.560619,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Cu"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-30","source":"Materials Project","doi":"10.17188/1204433","url":"https://next-gen.materialsproject.org/materials/mp-30s","origin":true},"isNonPeriodic":false},"Au-[Gold]-FCC_[Fm-3m]_3D_[Bulk]-[mp-81].json":{"name":"Au, Gold, FCC (Fm-3m) 3D (Bulk), mp-81","lattice":{"type":"FCC","a":2.949546,"b":2.949546,"c":2.949546,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Au"}],"coordinates":[{"id":0,"value":[0,0,0]}]},"external":{"id":"mp-81","source":"Materials Project","doi":"10.17188/1307925","url":"https://next-gen.materialsproject.org/materials/mp-81","origin":true},"isNonPeriodic":false},"ZnO-[Zinc_Oxide]-HEX_[P6_3mc]_3D_[Bulk]-[mp-2133].json":{"name":"ZnO, Zinc Oxide, HEX (P6_3mc) 3D (Bulk), mp-2133","lattice":{"type":"HEX","a":3.289103,"b":3.289103,"c":5.306821,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zn"},{"id":1,"value":"Zn"},{"id":2,"value":"O"},{"id":3,"value":"O"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.500548]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.879762]},{"id":3,"value":[0.3333333,0.6666667,0.379762]}]},"external":{"id":"mp-2133","source":"Materials Project","doi":"10.17188/1196748","url":"https://next-gen.materialsproject.org/materials/mp-2133","origin":true},"isNonPeriodic":false},"Al2O3-[Sapphire]-RHL_[R-3c]_3D_[Bulk]-[mp-1143].json":{"name":"Al2O3, Sapphire, RHL (R-3c) 3D (Bulk), mp-1143","lattice":{"type":"RHL","a":5.177955,"b":5.177954,"c":5.177956,"alpha":55.2896,"beta":55.2896,"gamma":55.2896,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"Al"},{"id":3,"value":"Al"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"}],"coordinates":[{"id":0,"value":[0.647904,0.647903,0.647903]},{"id":1,"value":[0.852097,0.852097,0.852097]},{"id":2,"value":[0.147904,0.147903,0.147903]},{"id":3,"value":[0.352097,0.352096,0.352096]},{"id":4,"value":[0.443855,0.056145,0.750001]},{"id":5,"value":[0.943855,0.250001,0.556145]},{"id":6,"value":[0.056144,0.75,0.443855]},{"id":7,"value":[0.750001,0.443856,0.056144]},{"id":8,"value":[0.25,0.556144,0.943855]},{"id":9,"value":[0.556144,0.943856,0.249999]}]},"external":{"id":"mp-1143","source":"Materials Project","doi":"10.17188/1187823","url":"https://next-gen.materialsproject.org/materials/mp-1143","origin":true},"isNonPeriodic":false},"SiO2-[Quartz]-HEX_[P3_121]_3D_[Bulk]-[mp-7000].json":{"name":"SiO2, Quartz, HEX (P3_121) 3D (Bulk), mp-7000","lattice":{"type":"HEX","a":5.021502,"b":5.021502,"c":5.51057,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Si"},{"id":1,"value":"Si"},{"id":2,"value":"Si"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"}],"coordinates":[{"id":0,"value":[0.523695,0.523695,0]},{"id":1,"value":[0,0.476305,0.6666667]},{"id":2,"value":[0.476305,0,0.3333333]},{"id":3,"value":[0.256094,0.414854,0.794543]},{"id":4,"value":[0.585146,0.84124,0.127877]},{"id":5,"value":[0.15876,0.743906,0.46121]},{"id":6,"value":[0.414854,0.256094,0.205457]},{"id":7,"value":[0.743906,0.15876,0.53879]},{"id":8,"value":[0.84124,0.585146,0.872123]}]},"external":{"id":"mp-7000","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-7000","origin":true},"isNonPeriodic":false},"ZrO2-[Zirconium_Dioxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-2858].json":{"name":"ZrO2, Zirconium Dioxide, MCL (P2_1/c) 3D (Bulk), mp-2858","lattice":{"type":"MCL","a":5.233649,"b":5.26846,"c":5.418476,"alpha":90,"beta":100.0548,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Zr"},{"id":1,"value":"Zr"},{"id":2,"value":"Zr"},{"id":3,"value":"Zr"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.724019,0.95582,0.789744]},{"id":1,"value":[0.724019,0.54418,0.289744]},{"id":2,"value":[0.275981,0.45582,0.710256]},{"id":3,"value":[0.275981,0.04418,0.210256]},{"id":4,"value":[0.061015,0.180178,0.854613]},{"id":5,"value":[0.061015,0.319822,0.354613]},{"id":6,"value":[0.54701,0.255674,0.021936]},{"id":7,"value":[0.45299,0.755674,0.478064]},{"id":8,"value":[0.54701,0.244326,0.521936]},{"id":9,"value":[0.45299,0.744326,0.978064]},{"id":10,"value":[0.938985,0.680178,0.645387]},{"id":11,"value":[0.938985,0.819822,0.145387]}]},"external":{"id":"mp-2858","source":"Materials Project","doi":"10.17188/1202679","url":"https://next-gen.materialsproject.org/materials/mp-2858","origin":true},"isNonPeriodic":false},"HfO2-[Hafnium_IV_Oxide]-MCL_[P2_1%2Fc]_3D_[Bulk]-[mp-352].json":{"name":"HfO2, Hafnium IV Oxide, MCL (P2_1/c) 3D (Bulk), mp-352","lattice":{"type":"MCL","a":5.142319,"b":5.195148,"c":5.326038,"alpha":90,"beta":99.6745,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Hf"},{"id":1,"value":"Hf"},{"id":2,"value":"Hf"},{"id":3,"value":"Hf"},{"id":4,"value":"O"},{"id":5,"value":"O"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"}],"coordinates":[{"id":0,"value":[0.275959,0.457319,0.707891]},{"id":1,"value":[0.724041,0.957319,0.792109]},{"id":2,"value":[0.724041,0.542681,0.292109]},{"id":3,"value":[0.275959,0.042681,0.207891]},{"id":4,"value":[0.448887,0.742603,0.977708]},{"id":5,"value":[0.551113,0.242603,0.522292]},{"id":6,"value":[0.551113,0.257397,0.022292]},{"id":7,"value":[0.448887,0.757397,0.477708]},{"id":8,"value":[0.067849,0.330122,0.347094]},{"id":9,"value":[0.932151,0.830122,0.152906]},{"id":10,"value":[0.932151,0.669878,0.652906]},{"id":11,"value":[0.067849,0.169878,0.847094]}]},"external":{"id":"mp-352","source":"Materials Project","doi":"10.17188/1206948","url":"https://next-gen.materialsproject.org/materials/mp-352","origin":true},"isNonPeriodic":false},"Y2O3-[Yttrium_III_Oxide]-MCLC_[C2%2Fm]_3D_[Bulk]-[mp-558573].json":{"name":"Y2O3, Yttrium III Oxide, MCLC (C2/m) 3D (Bulk), mp-558573","lattice":{"type":"MCLC","a":3.515998,"b":7.276947,"c":8.695337,"alpha":100.1007,"beta":90,"gamma":103.9801,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Y"},{"id":1,"value":"Y"},{"id":2,"value":"Y"},{"id":3,"value":"Y"},{"id":4,"value":"Y"},{"id":5,"value":"Y"},{"id":6,"value":"O"},{"id":7,"value":"O"},{"id":8,"value":"O"},{"id":9,"value":"O"},{"id":10,"value":"O"},{"id":11,"value":"O"},{"id":12,"value":"O"},{"id":13,"value":"O"},{"id":14,"value":"O"}],"coordinates":[{"id":0,"value":[0.635175,0.27035,0.488039]},{"id":1,"value":[0.364825,0.72965,0.511961]},{"id":2,"value":[0.032014,0.064029,0.814048]},{"id":3,"value":[0.691364,0.382729,0.137328]},{"id":4,"value":[0.308636,0.617271,0.862672]},{"id":5,"value":[0.967986,0.935971,0.185952]},{"id":6,"value":[0.127996,0.255992,0.281772]},{"id":7,"value":[0.825532,0.651064,0.030517]},{"id":8,"value":[0.793308,0.586615,0.37737]},{"id":9,"value":[0.470963,0.941926,0.342856]},{"id":10,"value":[0.529037,0.058074,0.657144]},{"id":11,"value":[0.5,0,0]},{"id":12,"value":[0.174468,0.348936,0.969483]},{"id":13,"value":[0.206692,0.413385,0.62263]},{"id":14,"value":[0.872004,0.744008,0.718228]}]},"external":{"id":"mp-558573","source":"Materials Project","doi":"10.17188/1272685","url":"https://next-gen.materialsproject.org/materials/mp-558573","origin":true},"isNonPeriodic":false},"VO2-[Vanadium_IV_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-19094].json":{"name":"VO2, Vanadium IV Oxide, TET (P4_2/mnm) 3D (Bulk), mp-19094","lattice":{"type":"TET","a":3.038141,"b":4.51531,"c":4.51531,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"V"},{"id":1,"value":"V"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.799236,0.200764]},{"id":3,"value":[0.5,0.200764,0.799236]},{"id":4,"value":[0,0.700764,0.700764]},{"id":5,"value":[0,0.299236,0.299236]}]},"external":{"id":"mp-19094","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-19094","origin":true},"isNonPeriodic":false},"TiO2-[Titanium_Oxide]-TET_[P4_2%2Fmnm]_3D_[Bulk]-[mp-2657].json":{"name":"TiO2, Titanium Oxide, TET (P4_2/mnm) 3D (Bulk), mp-2657","lattice":{"type":"TET","a":2.969203,"b":4.653272,"c":4.653272,"alpha":90,"beta":90,"gamma":90,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ti"},{"id":1,"value":"Ti"},{"id":2,"value":"O"},{"id":3,"value":"O"},{"id":4,"value":"O"},{"id":5,"value":"O"}],"coordinates":[{"id":0,"value":[0.5,0.5,0.5]},{"id":1,"value":[0,0,0]},{"id":2,"value":[0.5,0.19542,0.80458]},{"id":3,"value":[0.5,0.80458,0.19542]},{"id":4,"value":[0,0.30458,0.30458]},{"id":5,"value":[0,0.69542,0.69542]}]},"external":{"id":"mp-2657","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-2657","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P_3%2Fmmc]_3D_[Bulk]-[mp-2815].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P_3/mmc) 3D (Bulk), mp-2815","lattice":{"type":"HEX","a":3.192238,"b":3.192238,"c":13.37829,"alpha":90,"beta":90,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"Mo"},{"id":2,"value":"S"},{"id":3,"value":"S"},{"id":4,"value":"S"},{"id":5,"value":"S"}],"coordinates":[{"id":0,"value":[0.3333333,0.3333333,0.75]},{"id":1,"value":[0.6666667,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.3333333,0.133082]},{"id":3,"value":[0.6666667,0.6666667,0.866914]},{"id":4,"value":[0.3333333,0.3333333,0.366918]},{"id":5,"value":[0.6666667,0.6666667,0.633086]}]},"external":{"id":"mp-2815","source":"Materials Project","doi":"10.17188/1202268","url":"https://next-gen.materialsproject.org/materials/mp-2815","origin":true},"isNonPeriodic":false},"MoS2-[Molybdenum_Disulfide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3150].json":{"name":"MoS2, Molybdenum Disulfide, HEX (P-6m2) 2D (Monolayer), 2dm-3150","lattice":{"type":"HEX","a":3.196223,"b":3.196223,"c":23.12983,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Mo"},{"id":1,"value":"S"},{"id":2,"value":"S"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.5]},{"id":1,"value":[0.333333,0.666667,0.432137]},{"id":2,"value":[0.333333,0.666667,0.567863]}]},"external":{"id":"2dm-3150","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3150","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-602].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P6_3/mmc) 3D (Bulk), mp-602","lattice":{"type":"HEX","a":3.558711,"b":3.558711,"c":15.34665,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Te"},{"id":3,"value":"Te"},{"id":4,"value":"Mo"},{"id":5,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.3333333,0.6666667,0.63208]},{"id":1,"value":[0.6666667,0.3333333,0.13208]},{"id":2,"value":[0.6666667,0.3333333,0.36792]},{"id":3,"value":[0.3333333,0.6666667,0.86792]},{"id":4,"value":[0.3333333,0.6666667,0.25]},{"id":5,"value":[0.6666667,0.3333333,0.75]}]},"external":{"id":"mp-602","source":"Materials Project","doi":null,"url":"https://next-gen.materialsproject.org/materials/mp-602","origin":true},"isNonPeriodic":false},"Te2Mo-[Molybdenum_Telluride]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-5370].json":{"name":"Te2Mo, Molybdenum Telluride, HEX (P-6m2) 2D (Monolayer), 2dm-5370","lattice":{"type":"HEX","a":3.567851,"b":3.56785,"c":23.619353,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Te"},{"id":1,"value":"Te"},{"id":2,"value":"Mo"}],"coordinates":[{"id":0,"value":[0.666667,0.333333,0.576748]},{"id":1,"value":[0.666667,0.333333,0.423252]},{"id":2,"value":[0,0,0.5]}]},"external":{"id":"2dm-5370","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-5370","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P6_3%2Fmmc]_3D_[Bulk]-[mp-1821].json":{"name":"WSe2, Tungsten Diselenide, HEX (P6_3/mmc) 3D (Bulk), mp-1821","lattice":{"type":"HEX","a":3.327069,"b":3.327069,"c":15.06895,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"W"},{"id":2,"value":"Se"},{"id":3,"value":"Se"},{"id":4,"value":"Se"},{"id":5,"value":"Se"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.75]},{"id":1,"value":[0.3333333,0.6666667,0.25]},{"id":2,"value":[0.3333333,0.6666667,0.861569]},{"id":3,"value":[0.6666667,0.3333333,0.361569]},{"id":4,"value":[0.3333333,0.6666667,0.638431]},{"id":5,"value":[0.6666667,0.3333333,0.138431]}]},"external":{"id":"mp-1821","source":"Materials Project","doi":"10.17188/1192989","url":"https://next-gen.materialsproject.org/materials/mp-1821","origin":true},"isNonPeriodic":false},"WSe2-[Tungsten_Diselenide]-HEX_[P-6m2]_2D_[Monolayer]-[2dm-3594].json":{"name":"WSe2, Tungsten Diselenide, HEX (P-6m2) 2D (Monolayer), 2dm-3594","lattice":{"type":"HEX","a":3.330619,"b":3.330619,"c":23.362456,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"W"},{"id":1,"value":"Se"},{"id":2,"value":"Se"}],"coordinates":[{"id":0,"value":[0.333333,0.666667,0.5]},{"id":1,"value":[0,0,0.427982]},{"id":2,"value":[0,0,0.572018]}]},"external":{"id":"2dm-3594","source":"2dmatpedia","doi":"10.1038/s41597-019-0097-3","url":"http://www.2dmatpedia.org/2dmaterials/doc/2dm-3594","origin":true},"isNonPeriodic":false},"GaN-[Gallium_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-804].json":{"name":"GaN, Gallium Nitride, HEX (P6_3mc) 3D (Bulk), mp-804","lattice":{"type":"HEX","a":3.21629,"b":3.21629,"c":5.239962,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"Ga"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.49912]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.87588]},{"id":3,"value":[0.3333333,0.6666667,0.37588]}]},"external":{"id":"mp-804","source":"Materials Project","doi":"10.17188/1268467","url":"https://next-gen.materialsproject.org/materials/mp-804","origin":true},"isNonPeriodic":false},"GaAs-[Gallium_Arsenide]-FCC_[F-43m]_3D_[Bulk]-[mp-2534].json":{"name":"GaAs, Gallium Arsenide, FCC (F-43m) 3D (Bulk), mp-2534","lattice":{"type":"FCC","a":4.065993,"b":4.065993,"c":4.065993,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Ga"},{"id":1,"value":"As"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.25,0.25,0.25]}]},"external":{"id":"mp-2534","source":"Materials Project","doi":"10.17188/1200591","url":"https://next-gen.materialsproject.org/materials/mp-2534","origin":true},"isNonPeriodic":false},"AlN-[Aluminum_Nitride]-HEX_[P6_3mc]_3D_[Bulk]-[mp-661].json":{"name":"AlN, Aluminum Nitride, HEX (P6_3mc) 3D (Bulk), mp-661","lattice":{"type":"HEX","a":3.128588,"b":3.128588,"c":5.016955,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"}},"basis":{"units":"crystal","elements":[{"id":0,"value":"Al"},{"id":1,"value":"Al"},{"id":2,"value":"N"},{"id":3,"value":"N"}],"coordinates":[{"id":0,"value":[0.6666667,0.3333333,0.499287]},{"id":1,"value":[0.3333333,0.6666667,0]},{"id":2,"value":[0.6666667,0.3333333,0.880713]},{"id":3,"value":[0.3333333,0.6666667,0.380713]}]},"external":{"id":"mp-661","source":"Materials Project","doi":"10.17188/1268470","url":"https://next-gen.materialsproject.org/materials/mp-661","origin":true},"isNonPeriodic":false}}}''') diff --git a/src/py/mat3ra/standata/data/properties.py b/src/py/mat3ra/standata/data/properties.py new file mode 100644 index 0000000..f7bb537 --- /dev/null +++ b/src/py/mat3ra/standata/data/properties.py @@ -0,0 +1,3 @@ +import json + +properties_data = json.loads(r'''{"standataConfig":{"categories":{"type":["mechanical","electronic","magnetic","thermal","optical","dynamic","transport","radiological","acoustic","manufacturing","chemical","structural","surface"],"property_class":["meta-property","proto-property"],"value_type":["scalar","vector","matrix","tensor_rank3","tensor_rank4","non-scalar"],"measurement":["angle-resolved-photoemission-spectroscopy","atomic-force-microscopy","x-ray-diffraction","x-ray-fluorescence","transmission-electron-microscopy","scanning-electron-microscopy","thermogravimetric-analysis"],"application":["espresso","vasp","python","shell"]},"entities":[{"filename":"valence_band_offset.json","categories":["scalar","electronic","angle-resolved-photoemission-spectroscopy"]},{"filename":"band_structure.json","categories":["matrix","electronic"]}]},"filesMapByName":{"valence_band_offset.json":{"name":"valence_band_offset","units":"eV","value":0.28},"band_structure.json":{"name":"band_structure","spin":[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],"xAxis":{"label":"kpoints","units":"crystal"},"xDataArray":[[0,0,0],[0.28867514,0.20412412,-0.49999997],[0,-0.61237246,0],[0.28867514,-0.40824834,-0.49999997],[-0.57735028,0.20412421,0],[-0.57735028,-0.40824824,0]],"yAxis":{"label":"energy","units":"eV"},"yDataSeries":[[-5.5990059,-3.30219959,-3.30220019,-1.51073812,-3.30221054,-1.51074222],[6.26931638,-0.66503974,-0.6650363,-1.51072293,-0.66501391,-1.5107195],[6.26931998,5.06084876,5.06084821,3.41069883,5.06085301,3.41069761],[6.26934533,5.0608702,5.06086954,3.41070722,5.06085524,3.41071003],[8.71135349,7.69496909,7.69496137,6.91957625,7.69495606,6.91957636],[8.71135587,9.49274379,9.49273868,6.91958498,9.49273487,6.91958424],[8.71135838,9.49275618,9.49275401,16.14829919,9.49273798,16.14830113],[9.41550185,13.89571002,13.89571914,16.1483028,13.89571883,16.14830247]]}}}''') diff --git a/src/py/mat3ra/standata/data/workflows.py b/src/py/mat3ra/standata/data/workflows.py new file mode 100644 index 0000000..0510bcb --- /dev/null +++ b/src/py/mat3ra/standata/data/workflows.py @@ -0,0 +1,3 @@ +import json + +workflows_data = json.loads(r'''{"standataConfig":{"categories":{"application":["espresso","exabyteml","jupyterLab","nwchem","python","shell","vasp"],"property":["band_gap","band_gap_dos","band_structure","phonon_dispersions","reaction_energy_profile","total_energy"],"material_count":["single-material","multi-material"]},"entities":[{"filename":"total_energy.json","categories":["espresso","single-material","total_energy"]},{"filename":"band_gap.json","categories":["espresso","vasp","band_gap"]}]},"filesMapByName":{"total_energy.json":{"_id":"000000000000000000000000","name":"Total Energy","subworkflows":[{"_id":"000000000000000000000000","name":"Total Energy","application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"pw_scf","head":true,"results":[{"name":"atomic_forces"},{"name":"fermi_energy"},{"name":"pressure"},{"name":"stress_tensor"},{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"total_force"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"9c216f92-2917-47e5-8f09-8513ada8330a","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"espresso","version":"5.4.0","build":"Default","isDefault":true,"summary":"Quantum Espresso","updatedAt":"2023-08-17T23:02:20.494Z","shortName":"qe","hasAdvancedComputeOptions":true,"updatedBy":"0"},"executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"},"flavor":{"isDefault":true,"input":[{"name":"pw_scf.in"}],"results":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"monitors":["standard_output","convergence_electronic"],"applicationName":"espresso","executableName":"pw.x","name":"pw_scf","executable":{"isDefault":true,"hasAdvancedComputeOptions":true,"postProcessors":["remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","charge_density_profile","density_of_states","fermi_energy","final_structure","magnetic_moments","potential_profile","pressure","reaction_energy_barrier","reaction_energy_profile","stress_tensor","total_energy","total_energy_contributions","total_force"],"name":"pw.x"}},"status":"idle","statusTrack":[],"input":[{"content":"{% if subworkflowContext.MATERIAL_INDEX %}\n{%- set input = input.perMaterial[subworkflowContext.MATERIAL_INDEX] -%}\n{% endif -%}\n&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = '{{ input.RESTART_MODE }}'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n wfcdir = {% raw %}'{{ JOB_WORK_DIR }}/outdir'{% endraw %}\n prefix = '__prefix__'\n pseudo_dir = {% raw %}'{{ JOB_WORK_DIR }}/pseudo'{% endraw %}\n/\n&SYSTEM\n ibrav = {{ input.IBRAV }}\n nat = {{ input.NAT }}\n ntyp = {{ input.NTYP }}\n ecutwfc = {{ cutoffs.wavefunction }}\n ecutrho = {{ cutoffs.density }}\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\n{{ input.ATOMIC_SPECIES }}\nATOMIC_POSITIONS crystal\n{{ input.ATOMIC_POSITIONS }}\nCELL_PARAMETERS angstrom\n{{ input.CELL_PARAMETERS }}\nK_POINTS automatic\n{% for d in kgrid.dimensions %}{{d}} {% endfor %}{% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"pw_scf.in","contextProviders":[{"name":"KGridFormDataManager"},{"name":"QEPWXInputDataManager"},{"name":"PlanewaveCutoffDataManager"}],"applicationName":"espresso","executableName":"pw.x","updatedAt":"2023-08-17T23:02:17.337Z","updatedBy":"0","rendered":"&CONTROL\n calculation = 'scf'\n title = ''\n verbosity = 'low'\n restart_mode = 'from_scratch'\n wf_collect = .true.\n tstress = .true.\n tprnfor = .true.\n outdir = '{{ JOB_WORK_DIR }}/outdir'\n wfcdir = '{{ JOB_WORK_DIR }}/outdir'\n prefix = '__prefix__'\n pseudo_dir = '{{ JOB_WORK_DIR }}/pseudo'\n/\n&SYSTEM\n ibrav = 0\n nat = 2\n ntyp = 1\n ecutwfc = 40\n ecutrho = 200\n occupations = 'smearing'\n degauss = 0.005\n/\n&ELECTRONS\n diagonalization = 'david'\n diago_david_ndim = 4\n diago_full_acc = .true.\n mixing_beta = 0.3\n startingwfc = 'atomic+random'\n/\n&IONS\n/\n&CELL\n/\nATOMIC_SPECIES\nSi 28.0855 \nATOMIC_POSITIONS crystal\nSi 0.000000000 0.000000000 0.000000000 \nSi 0.250000000 0.250000000 0.250000000 \nCELL_PARAMETERS angstrom\n3.348920236 0.000000000 1.933500000\n1.116306745 3.157392278 1.933500000\n0.000000000 0.000000000 3.867000000\nK_POINTS automatic\n2 2 2 0 0 0 "}]}],"compute":null,"isDraft":false}],"units":[{"name":"Total Energy","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"e9109d498900aad592ba68b5","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["atomic_forces","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force"],"isDefault":true,"hash":"b5ed1cf151e828dfec234c5bf1be5b02","isOutdated":false,"createdAt":"2017-11-04T06:32:04.926Z","updatedAt":"2023-08-17T23:05:45.202Z","workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"exadmin","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isEntitySet":false},"band_gap.json":{"_id":"00000000000000000","name":"Band Gap","subworkflows":[{"_id":"000000000000000000000000","name":"Band Gap","application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"model":{"type":"dft","subtype":"gga","method":{"type":"pseudopotential","subtype":"us","data":{}},"functional":{"slug":"pbe"}},"units":[{"type":"execution","name":"vasp","head":true,"results":[{"name":"total_energy"},{"name":"total_energy_contributions"},{"name":"pressure"},{"name":"fermi_energy"},{"name":"atomic_forces"},{"name":"total_force"},{"name":"stress_tensor"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"0d35c419-ba29-44e7-94f0-690ff1f7976b","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"isDefault":true,"input":[{"name":"INCAR"},{"name":"KPOINTS"},{"name":"POSCAR"}],"results":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.614Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nLORBIT = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}],"next":"061929a3-368a-4c42-95fd-4144d31b6692"},{"type":"execution","name":"vasp_nscf","head":false,"results":[{"name":"band_gaps"},{"name":"fermi_energy"}],"monitors":[{"name":"standard_output"},{"name":"convergence_electronic"}],"flowchartId":"061929a3-368a-4c42-95fd-4144d31b6692","preProcessors":[],"postProcessors":[],"application":{"_id":"00000000000000000","name":"vasp","version":"5.3.5","build":"Default","isDefault":true,"summary":"Vienna Ab-initio Simulation Package","updatedAt":"2023-08-17T23:02:32.576Z","shortName":"vasp","isLicensed":true,"updatedBy":"0"},"executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"},"flavor":{"input":[{"name":"INCAR","templateName":"INCAR_BANDS"},{"name":"KPOINTS","templateName":"KPOINTS"},{"name":"POSCAR","templateName":"POSCAR"}],"results":["band_gaps","fermi_energy"],"monitors":["standard_output","convergence_electronic"],"applicationName":"vasp","executableName":"vasp","name":"vasp_nscf","executable":{"isDefault":true,"postProcessors":["error_handler","prepare_restart","remove_non_zero_weight_kpoints"],"monitors":["standard_output","convergence_ionic","convergence_electronic"],"results":["atomic_forces","band_gaps","band_structure","density_of_states","fermi_energy","pressure","stress_tensor","total_energy","total_energy_contributions","total_force","zero_point_energy","final_structure","magnetic_moments","reaction_energy_barrier","reaction_energy_profile","potential_profile","charge_density_profile"],"name":"vasp"}},"status":"idle","statusTrack":[],"input":[{"content":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11","name":"INCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.622Z","updatedBy":"0","rendered":"ISMEAR = 0\nSIGMA = 0.05\nISTART = 1\nICHARG = 11"},{"content":"Automatic mesh\n0\nGamma\n {% for d in kgrid.dimensions %}{{d}} {% endfor %}\n {% for s in kgrid.shifts %}{{s}} {% endfor %}","name":"KPOINTS","contextProviders":[{"name":"KGridFormDataManager"},{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.670Z","updatedBy":"0","rendered":"Automatic mesh\n0\nGamma\n 2 2 2 \n 0 0 0 "},{"content":"{{ input.POSCAR }}","name":"POSCAR","contextProviders":[{"name":"VASPInputDataManager"}],"applicationName":"vasp","executableName":"vasp","updatedAt":"2023-08-17T23:02:18.693Z","updatedBy":"0","rendered":"Silicon FCC\n1.0\n 3.348920000\t 0.000000000\t 1.933500000\n 1.116307000\t 3.157392000\t 1.933500000\n 0.000000000\t 0.000000000\t 3.867000000\nSi\n2\ndirect\n 0.000000000 0.000000000 0.000000000 Si\n 0.250000000 0.250000000 0.250000000 Si"}]}],"compute":null,"isDraft":false}],"units":[{"name":"Band Gap","type":"subworkflow","_id":"000000000000000000000000","flowchartId":"509bb16a21dfb6806cbf4022","status":"idle","statusTrack":[],"results":[],"monitors":[],"preProcessors":[],"postProcessors":[],"head":true,"schemaVersion":"2022.8.16","isDefault":false}],"properties":["total_energy","total_energy_contributions","pressure","fermi_energy","atomic_forces","total_force","stress_tensor","band_gaps","fermi_energy"],"hash":"9a0499d15894c106d6115c132f67b47c","isOutdated":false,"workflows":[],"schemaVersion":"2022.8.16","tags":[],"owner":{"_id":"00000000000000000","slug":"user-000000","cls":"Account"},"creator":{"_id":"00000000000000000","slug":"user-000000","cls":"User"},"compute":null,"exabyteId":"00000000000000000","isDefault":false,"isEntitySet":false,"createdAt":"2023-08-23T02:56:18.620Z","createdBy":"00000000000000000","updatedAt":"2023-08-23T02:56:18.894Z","updatedBy":"00000000000000000"}}}''') diff --git a/src/py/mat3ra/standata/materials.py b/src/py/mat3ra/standata/materials.py index e69de29..7fb6f9e 100644 --- a/src/py/mat3ra/standata/materials.py +++ b/src/py/mat3ra/standata/materials.py @@ -0,0 +1,6 @@ +from .base import Standata, StandataData +from .data.materials import materials_data + + +class Materials(Standata): + data = StandataData(**materials_data) From 784ba8c85bccb8673e1c2b888445ddca0dba0e20 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 24 Oct 2024 20:44:31 -0700 Subject: [PATCH 09/25] update: fix 1 test --- src/py/mat3ra/standata/materials.py | 7 +++++-- tests/py/unit/conftest.py | 9 +++++---- tests/py/unit/materials/test_find_entity.py | 8 ++++---- tests/py/unit/materials/test_init.py | 6 ++++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/py/mat3ra/standata/materials.py b/src/py/mat3ra/standata/materials.py index 7fb6f9e..646289e 100644 --- a/src/py/mat3ra/standata/materials.py +++ b/src/py/mat3ra/standata/materials.py @@ -1,6 +1,9 @@ -from .base import Standata, StandataData +from .base import Standata, StandataData, StandataFilesMapByName from .data.materials import materials_data class Materials(Standata): - data = StandataData(**materials_data) + data: StandataData = StandataData( + filesMapByName=StandataFilesMapByName(materials_data["filesMapByName"]), + standataConfig=materials_data.get("standataConfig", {}), + ) diff --git a/tests/py/unit/conftest.py b/tests/py/unit/conftest.py index 6d78dcf..8973dbb 100644 --- a/tests/py/unit/conftest.py +++ b/tests/py/unit/conftest.py @@ -1,7 +1,8 @@ from pathlib import Path import pytest -from mat3ra.standata.build.builder import StandataBuilder + +# from mat3ra.standata.build.builder import StandataBuilder @pytest.fixture @@ -9,6 +10,6 @@ def materials_config_path() -> Path: return Path("materials/categories.yml") -@pytest.fixture(scope="module") -def materials_standata() -> StandataBuilder: - return StandataBuilder.build_from_file("materials/categories.yml") +# @pytest.fixture(scope="module") +# def materials_standata() -> StandataBuilder: +# return StandataBuilder.build_from_file("materials/categories.yml") diff --git a/tests/py/unit/materials/test_find_entity.py b/tests/py/unit/materials/test_find_entity.py index 8e4301b..69325e5 100644 --- a/tests/py/unit/materials/test_find_entity.py +++ b/tests/py/unit/materials/test_find_entity.py @@ -1,21 +1,21 @@ -from mat3ra.standata import Standata +from mat3ra.standata.build.builder import StandataBuilder -def test_find_entity_tag(materials_standata: Standata): +def test_find_entity_tag(materials_standata: StandataBuilder): """Find at least one material using correct tags.""" materials = materials_standata.find_entities("insulator", "3D") assert len(materials) >= 1 assert type(materials[0]) == dict -def test_find_entity_no_matching_tags(materials_standata: Standata): +def test_find_entity_no_matching_tags(materials_standata: StandataBuilder): """Return empty list if tags are not matching.""" materials = materials_standata.find_entities("nonexistent_1", "nonexistent_2") assert type(materials) == list assert len(materials) == 0 -def test_find_entity_no_tags(materials_standata: Standata): +def test_find_entity_no_tags(materials_standata: StandataBuilder): """Return empty list if no tags are provided.""" materials = materials_standata.find_entities() assert type(materials) == list diff --git a/tests/py/unit/materials/test_init.py b/tests/py/unit/materials/test_init.py index fd36a8f..7fe4d03 100644 --- a/tests/py/unit/materials/test_init.py +++ b/tests/py/unit/materials/test_init.py @@ -2,10 +2,12 @@ from mat3ra.standata.build.builder import StandataBuilder +from mat3ra.standata.materials import Materials -def test_standata_init_path(materials_config_path: Path): + +def test_standata_init_path(): """Constructor extracts categories and entities from config file.""" - std = StandataBuilder.build_from_file(materials_config_path) + std = Materials().data assert len(std.entities) >= 1 assert len(std.categories) >= 1 From abfdb205f3b059e6141fa13063b7ece28728c4b8 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:21:22 -0700 Subject: [PATCH 10/25] update: fix inits --- src/py/mat3ra/standata/base.py | 45 +++++++++++++++++++---------- src/py/mat3ra/standata/materials.py | 20 +++++++++---- 2 files changed, 45 insertions(+), 20 deletions(-) diff --git a/src/py/mat3ra/standata/base.py b/src/py/mat3ra/standata/base.py index d571608..e1ead10 100644 --- a/src/py/mat3ra/standata/base.py +++ b/src/py/mat3ra/standata/base.py @@ -2,7 +2,7 @@ from typing import Dict, List, Optional import pandas as pd -from pydantic import BaseModel +from pydantic import BaseModel, Field class StandataEntity(BaseModel): @@ -30,6 +30,16 @@ def get_categories_as_list(self, separator: str = "/") -> List[str]: category_groups = [list(map(lambda x: f"{key}{separator}{x}", val)) for key, val in self.categories.items()] return [item for sublist in category_groups for item in sublist] + def get(self, key: str, default=None): + """ + Returns the value for the specified key if key is in the dictionary, else default. + + Args: + key: The key to look for in the categories dictionary. + default: The value to return if the key is not found. + """ + return self.categories.get(key, default) + def convert_tags_to_categories_list(self, *tags: str): """ Converts simple tags to '/' format. @@ -96,7 +106,8 @@ def __lookup_table(self) -> pd.DataFrame: return df -class StandataFilesMapByName(Dict[str, dict]): +class StandataFilesMapByName(BaseModel): + dictionary: Dict[str, dict] = Field(default_factory=dict) def get_objects_by_filenames(self, filenames: List[str]) -> List[dict]: """ @@ -106,7 +117,7 @@ def get_objects_by_filenames(self, filenames: List[str]) -> List[dict]: filenames: Filenames of the entities. """ matching_objects = [] - for key, entity in self.items(): + for key, entity in self.dictionary.items(): if key in filenames: matching_objects.append(entity) return matching_objects @@ -116,33 +127,37 @@ class StandataData(BaseModel): class Config: arbitrary_types_allowed = True - filesMapByName: Optional[StandataFilesMapByName] = StandataFilesMapByName() - standataConfig: Optional[StandataConfig] = StandataConfig() + filesMapByName: StandataFilesMapByName = StandataFilesMapByName() + standataConfig: StandataConfig = StandataConfig() - def __init__(self, /, **kwargs): + def __init__(self, **kwargs): super().__init__(**kwargs) - self.filesMapByName = StandataFilesMapByName(kwargs.get("filesMapByName", {})) - self.standataConfig = StandataConfig(**kwargs.get("standataConfig", {})) + self.filesMapByName = StandataFilesMapByName(dictionary=kwargs.get("filesMapByName", {})) + self.standataConfig = StandataConfig( + categories=kwargs.get("standataConfig", {}).get("categories", {}), + entities=[ + StandataEntity(filename=entity["filename"], categories=entity["categories"]) + for entity in kwargs.get("standataConfig", {}).get("entities", []) + ], + ) class Standata(BaseModel): # Override in children data: StandataData = StandataData() - @classmethod - def get_as_list(cls): - return list(cls.data.filesMapByName.values()) + def get_as_list(self) -> List[dict]: + return list(self.data.filesMapByName.dictionary.values()) - @classmethod - def get_by_name(cls, name: str) -> List[dict]: + def get_by_name(self, name: str) -> List[dict]: """ Returns entities by name regex. Args: name: Name of the entity. """ - matching_filenames = cls.data.standataConfig.get_filenames_by_regex(name) - return cls.data.filesMapByName.get_objects_by_filenames(matching_filenames) + matching_filenames = self.data.standataConfig.get_filenames_by_regex(name) + return self.data.filesMapByName.get_objects_by_filenames(matching_filenames) def get_by_categories(self, *tags: str) -> List[dict]: """ diff --git a/src/py/mat3ra/standata/materials.py b/src/py/mat3ra/standata/materials.py index 646289e..aca3338 100644 --- a/src/py/mat3ra/standata/materials.py +++ b/src/py/mat3ra/standata/materials.py @@ -1,9 +1,19 @@ -from .base import Standata, StandataData, StandataFilesMapByName +from typing import Dict + +from .base import Standata, StandataConfig, StandataData, StandataEntity, StandataFilesMapByName from .data.materials import materials_data class Materials(Standata): - data: StandataData = StandataData( - filesMapByName=StandataFilesMapByName(materials_data["filesMapByName"]), - standataConfig=materials_data.get("standataConfig", {}), - ) + def __init__(self, data: Dict = materials_data): + standata_data = StandataData( + filesMapByName=StandataFilesMapByName(dictionary=data.get("filesMapByName", {})), + standataConfig=StandataConfig( + categories=data.get("standataConfig", {}).get("categories", {}), + entities=[ + StandataEntity(filename=entity["filename"], categories=entity["categories"]) + for entity in data.get("standataConfig", {}).get("entities", []) + ], + ), + ) + super().__init__(data=standata_data) From e7913bcf9784fa06156eeb699706135108681f2d Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 25 Oct 2024 15:32:03 -0700 Subject: [PATCH 11/25] update: make work --- src/py/mat3ra/standata/base.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/py/mat3ra/standata/base.py b/src/py/mat3ra/standata/base.py index e1ead10..9adbe20 100644 --- a/src/py/mat3ra/standata/base.py +++ b/src/py/mat3ra/standata/base.py @@ -79,7 +79,7 @@ def get_filenames_by_regex(self, regex: str) -> List[str]: """ filenames = [] for entity in self.entities: - if re.match(regex, entity.filename): + if re.search(regex, entity.filename): filenames.append(entity.filename) return filenames @@ -130,16 +130,16 @@ class Config: filesMapByName: StandataFilesMapByName = StandataFilesMapByName() standataConfig: StandataConfig = StandataConfig() - def __init__(self, **kwargs): - super().__init__(**kwargs) - self.filesMapByName = StandataFilesMapByName(dictionary=kwargs.get("filesMapByName", {})) - self.standataConfig = StandataConfig( - categories=kwargs.get("standataConfig", {}).get("categories", {}), - entities=[ - StandataEntity(filename=entity["filename"], categories=entity["categories"]) - for entity in kwargs.get("standataConfig", {}).get("entities", []) - ], - ) + # def __init__(self, **kwargs): + # super().__init__(**kwargs) + # self.filesMapByName = StandataFilesMapByName(dictionary=kwargs.get("filesMapByName", {})) + # self.standataConfig = StandataConfig( + # categories=kwargs.get("standataConfig", {}).get("categories", {}), + # entities=[ + # StandataEntity(filename=entity["filename"], categories=entity["categories"]) + # for entity in kwargs.get("standataConfig", {}).get("entities", []) + # ], + # ) class Standata(BaseModel): From 15c8523aa590179362446047294c110e9bf5f4de Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 25 Oct 2024 15:41:38 -0700 Subject: [PATCH 12/25] update: move init to base --- src/py/mat3ra/standata/base.py | 30 +++++++++++++++++++++++++++-- src/py/mat3ra/standata/materials.py | 15 ++++----------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/py/mat3ra/standata/base.py b/src/py/mat3ra/standata/base.py index 9adbe20..4ab5db3 100644 --- a/src/py/mat3ra/standata/base.py +++ b/src/py/mat3ra/standata/base.py @@ -143,8 +143,34 @@ class Config: class Standata(BaseModel): - # Override in children - data: StandataData = StandataData() + data: StandataData + + def __init__(self, data_dict: Dict, **kwargs): + """ + Initialize common data structures in a Standata class. + Args: + data: Dictionary with the data needed for initialization. + """ + + def _initialize_files_map(data_dict: Dict) -> StandataFilesMapByName: + return StandataFilesMapByName(dictionary=data_dict.get("filesMapByName", {})) + + def _initialize_config(data_dict: Dict) -> StandataConfig: + config_data = data_dict.get("standataConfig", {}) + return StandataConfig( + categories=config_data.get("categories", {}), + entities=[ + StandataEntity(filename=entity["filename"], categories=entity["categories"]) + for entity in config_data.get("entities", []) + ], + ) + + def _initialize_data(data_dict: Dict) -> StandataData: + return StandataData( + filesMapByName=_initialize_files_map(data_dict), standataConfig=_initialize_config(data_dict) + ) + + super().__init__(data=_initialize_data(data_dict), **kwargs) def get_as_list(self) -> List[dict]: return list(self.data.filesMapByName.dictionary.values()) diff --git a/src/py/mat3ra/standata/materials.py b/src/py/mat3ra/standata/materials.py index aca3338..da4c043 100644 --- a/src/py/mat3ra/standata/materials.py +++ b/src/py/mat3ra/standata/materials.py @@ -6,14 +6,7 @@ class Materials(Standata): def __init__(self, data: Dict = materials_data): - standata_data = StandataData( - filesMapByName=StandataFilesMapByName(dictionary=data.get("filesMapByName", {})), - standataConfig=StandataConfig( - categories=data.get("standataConfig", {}).get("categories", {}), - entities=[ - StandataEntity(filename=entity["filename"], categories=entity["categories"]) - for entity in data.get("standataConfig", {}).get("entities", []) - ], - ), - ) - super().__init__(data=standata_data) + """ + Initialize the Materials class with specific materials data. + """ + super().__init__(data_dict=data) From 6b14e1587d75f90f58cd62e9f5023a7e4e54e560 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:20:06 -0700 Subject: [PATCH 13/25] update: make tests pass --- src/py/mat3ra/standata/base.py | 67 ++++++++++++++-------------- src/py/mat3ra/standata/materials.py | 2 +- tests/py/unit/materials/test_init.py | 23 +++++----- 3 files changed, 45 insertions(+), 47 deletions(-) diff --git a/src/py/mat3ra/standata/base.py b/src/py/mat3ra/standata/base.py index 4ab5db3..b89a57b 100644 --- a/src/py/mat3ra/standata/base.py +++ b/src/py/mat3ra/standata/base.py @@ -1,5 +1,5 @@ import re -from typing import Dict, List, Optional +from typing import Dict, List import pandas as pd from pydantic import BaseModel, Field @@ -130,16 +130,36 @@ class Config: filesMapByName: StandataFilesMapByName = StandataFilesMapByName() standataConfig: StandataConfig = StandataConfig() - # def __init__(self, **kwargs): - # super().__init__(**kwargs) - # self.filesMapByName = StandataFilesMapByName(dictionary=kwargs.get("filesMapByName", {})) - # self.standataConfig = StandataConfig( - # categories=kwargs.get("standataConfig", {}).get("categories", {}), - # entities=[ - # StandataEntity(filename=entity["filename"], categories=entity["categories"]) - # for entity in kwargs.get("standataConfig", {}).get("entities", []) - # ], - # ) + def __init__(self, data: Dict, **kwargs): + """ + Initializes StandataData from raw data. + Args: + data: Dictionary with keys for filesMapByName and standataConfig. + """ + super().__init__( + filesMapByName=self._initialize_files_map(data), standataConfig=self._initialize_config(data), **kwargs + ) + + @staticmethod + def _initialize_files_map(data: Dict) -> StandataFilesMapByName: + """ + Initialize the StandataFilesMapByName from the input data. + """ + return StandataFilesMapByName(dictionary=data.get("filesMapByName", {})) + + @staticmethod + def _initialize_config(data: Dict) -> StandataConfig: + """ + Initialize StandataConfig from the input data. + """ + config_data = data.get("standataConfig", {}) + return StandataConfig( + categories=config_data.get("categories", {}), + entities=[ + StandataEntity(filename=entity["filename"], categories=entity["categories"]) + for entity in config_data.get("entities", []) + ], + ) class Standata(BaseModel): @@ -147,30 +167,11 @@ class Standata(BaseModel): def __init__(self, data_dict: Dict, **kwargs): """ - Initialize common data structures in a Standata class. + Initialize the Standata class with StandataData. Args: - data: Dictionary with the data needed for initialization. + data: Dictionary containing the data to initialize StandataData. """ - - def _initialize_files_map(data_dict: Dict) -> StandataFilesMapByName: - return StandataFilesMapByName(dictionary=data_dict.get("filesMapByName", {})) - - def _initialize_config(data_dict: Dict) -> StandataConfig: - config_data = data_dict.get("standataConfig", {}) - return StandataConfig( - categories=config_data.get("categories", {}), - entities=[ - StandataEntity(filename=entity["filename"], categories=entity["categories"]) - for entity in config_data.get("entities", []) - ], - ) - - def _initialize_data(data_dict: Dict) -> StandataData: - return StandataData( - filesMapByName=_initialize_files_map(data_dict), standataConfig=_initialize_config(data_dict) - ) - - super().__init__(data=_initialize_data(data_dict), **kwargs) + super().__init__(data=StandataData(data_dict), **kwargs) def get_as_list(self) -> List[dict]: return list(self.data.filesMapByName.dictionary.values()) diff --git a/src/py/mat3ra/standata/materials.py b/src/py/mat3ra/standata/materials.py index da4c043..d3c642c 100644 --- a/src/py/mat3ra/standata/materials.py +++ b/src/py/mat3ra/standata/materials.py @@ -1,6 +1,6 @@ from typing import Dict -from .base import Standata, StandataConfig, StandataData, StandataEntity, StandataFilesMapByName +from .base import Standata from .data.materials import materials_data diff --git a/tests/py/unit/materials/test_init.py b/tests/py/unit/materials/test_init.py index 7fe4d03..06c9bb8 100644 --- a/tests/py/unit/materials/test_init.py +++ b/tests/py/unit/materials/test_init.py @@ -1,22 +1,19 @@ from pathlib import Path from mat3ra.standata.build.builder import StandataBuilder - from mat3ra.standata.materials import Materials -def test_standata_init_path(): - """Constructor extracts categories and entities from config file.""" - std = Materials().data - assert len(std.entities) >= 1 - assert len(std.categories) >= 1 - - -def test_entities_data(materials_standata: StandataBuilder): - """Entities have properties 'filename' and 'categories'.""" - assert all(["filename" in e and "categories" in e for e in materials_standata.entities]) +def test_standata_materials_init(): + std_materials = Materials() + assert std_materials.data.standataConfig.entities is not None + assert len(std_materials.data.standataConfig.entities) >= 1 + assert isinstance(std_materials.data.filesMapByName.dictionary, dict) + assert len(std_materials.data.filesMapByName.dictionary) >= 1 -def test_categories_data(materials_standata: StandataBuilder): +def test_categories_data(): """Category map has at least one group of tags.""" - assert len(materials_standata.category_map.keys()) >= 1 + std_materials = Materials() + assert std_materials.data.standataConfig.categories is not None + assert len(std_materials.data.standataConfig.categories) >= 1 From 81a8bef8c4eede4d4063f329224408955898611c Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:33:12 -0700 Subject: [PATCH 14/25] chore: cleanup --- tests/py/unit/conftest.py | 15 ------------- tests/py/unit/materials/test_find_entity.py | 22 ------------------- .../{test_init.py => test_standata_init.py} | 4 +--- 3 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 tests/py/unit/conftest.py delete mode 100644 tests/py/unit/materials/test_find_entity.py rename tests/py/unit/materials/{test_init.py => test_standata_init.py} (88%) diff --git a/tests/py/unit/conftest.py b/tests/py/unit/conftest.py deleted file mode 100644 index 8973dbb..0000000 --- a/tests/py/unit/conftest.py +++ /dev/null @@ -1,15 +0,0 @@ -from pathlib import Path - -import pytest - -# from mat3ra.standata.build.builder import StandataBuilder - - -@pytest.fixture -def materials_config_path() -> Path: - return Path("materials/categories.yml") - - -# @pytest.fixture(scope="module") -# def materials_standata() -> StandataBuilder: -# return StandataBuilder.build_from_file("materials/categories.yml") diff --git a/tests/py/unit/materials/test_find_entity.py b/tests/py/unit/materials/test_find_entity.py deleted file mode 100644 index 69325e5..0000000 --- a/tests/py/unit/materials/test_find_entity.py +++ /dev/null @@ -1,22 +0,0 @@ -from mat3ra.standata.build.builder import StandataBuilder - - -def test_find_entity_tag(materials_standata: StandataBuilder): - """Find at least one material using correct tags.""" - materials = materials_standata.find_entities("insulator", "3D") - assert len(materials) >= 1 - assert type(materials[0]) == dict - - -def test_find_entity_no_matching_tags(materials_standata: StandataBuilder): - """Return empty list if tags are not matching.""" - materials = materials_standata.find_entities("nonexistent_1", "nonexistent_2") - assert type(materials) == list - assert len(materials) == 0 - - -def test_find_entity_no_tags(materials_standata: StandataBuilder): - """Return empty list if no tags are provided.""" - materials = materials_standata.find_entities() - assert type(materials) == list - assert len(materials) == 0 diff --git a/tests/py/unit/materials/test_init.py b/tests/py/unit/materials/test_standata_init.py similarity index 88% rename from tests/py/unit/materials/test_init.py rename to tests/py/unit/materials/test_standata_init.py index 06c9bb8..ee0f8c8 100644 --- a/tests/py/unit/materials/test_init.py +++ b/tests/py/unit/materials/test_standata_init.py @@ -1,10 +1,8 @@ -from pathlib import Path - -from mat3ra.standata.build.builder import StandataBuilder from mat3ra.standata.materials import Materials def test_standata_materials_init(): + """Materials class is initialized with data based on materials_data""" std_materials = Materials() assert std_materials.data.standataConfig.entities is not None assert len(std_materials.data.standataConfig.entities) >= 1 From f1d7123380f45ca38094ef64a2a8f93b9bf8cf1f Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 25 Oct 2024 17:58:38 -0700 Subject: [PATCH 15/25] update: fix get be categories one shot claude --- src/py/mat3ra/standata/base.py | 58 ++++++++++++++----- tests/py/unit/materials/test_standata_init.py | 17 ++++++ 2 files changed, 59 insertions(+), 16 deletions(-) diff --git a/src/py/mat3ra/standata/base.py b/src/py/mat3ra/standata/base.py index b89a57b..a66a989 100644 --- a/src/py/mat3ra/standata/base.py +++ b/src/py/mat3ra/standata/base.py @@ -10,16 +10,18 @@ class StandataEntity(BaseModel): categories: List[str] +CATEGORY_SEPARATOR = "/" + + class StandataConfig(BaseModel): categories: Dict[str, List[str]] = {} entities: List[StandataEntity] = [] - def get_categories_as_list(self, separator: str = "/") -> List[str]: + def get_categories_as_list(self, separator: str = CATEGORY_SEPARATOR) -> List[str]: """ Flattens categories dictionary to list of categories. Args: - category_map: Dictionary mapping category types to category tags. separator: Separation character used to join category type and tag. Example:: @@ -30,16 +32,6 @@ def get_categories_as_list(self, separator: str = "/") -> List[str]: category_groups = [list(map(lambda x: f"{key}{separator}{x}", val)) for key, val in self.categories.items()] return [item for sublist in category_groups for item in sublist] - def get(self, key: str, default=None): - """ - Returns the value for the specified key if key is in the dictionary, else default. - - Args: - key: The key to look for in the categories dictionary. - default: The value to return if the key is not found. - """ - return self.categories.get(key, default) - def convert_tags_to_categories_list(self, *tags: str): """ Converts simple tags to '/' format. @@ -52,22 +44,56 @@ def convert_tags_to_categories_list(self, *tags: str): 'electrical_conductivity' and 'type'. This function returns all occurrences of a tag as '/'. """ - return [cf for cf in self.categories if any([cf.split("/")[1] == t for t in tags])] + return [ + cf for cf in self.get_categories_as_list() if any((cf.split(CATEGORY_SEPARATOR)[-1] == t) for t in tags) + ] + + def get(self, key: str, default=None): + """ + Returns the value for the specified key if key is in the dictionary, else default. + + Args: + key: The key to look for in the categories dictionary. + default: The value to return if the key is not found. + """ + return self.categories.get(key, default) def get_filenames_by_categories(self, *categories: str) -> List[str]: """ Returns filenames that match all given categories. Args: - *categories: Categories for the entity query. Note, that `categories` should be in the same format as the - column names in the lookup table. + *categories: Categories for the entity query. Categories can be either in + 'category/tag' format or just 'tag' format. + + Returns: + List of filenames that match ALL given categories. """ if len(categories) == 0: return [] + + # Convert simple tags to full category format if needed + full_categories = [] + for category in categories: + if CATEGORY_SEPARATOR in category: + full_categories.append(category) + else: + # Convert tag to full category format + converted = self.convert_tags_to_categories_list(category) + full_categories.extend(converted) + + if not full_categories: # If no valid categories found + return [] + filenames = [] for entity in self.entities: - if any([category in entity.categories for category in categories]): + # Convert entity categories to full format + entity_categories = self.convert_tags_to_categories_list(*entity.categories) + + # Check if ALL required categories are present + if all(category in entity_categories for category in full_categories): filenames.append(entity.filename) + return filenames def get_filenames_by_regex(self, regex: str) -> List[str]: diff --git a/tests/py/unit/materials/test_standata_init.py b/tests/py/unit/materials/test_standata_init.py index ee0f8c8..a1c60b4 100644 --- a/tests/py/unit/materials/test_standata_init.py +++ b/tests/py/unit/materials/test_standata_init.py @@ -15,3 +15,20 @@ def test_categories_data(): std_materials = Materials() assert std_materials.data.standataConfig.categories is not None assert len(std_materials.data.standataConfig.categories) >= 1 + + +def test_get_by_name(): + """Assert correct information if found about a material.""" + std_materials = Materials() + material = std_materials.get_by_name("Graphene")[0] + assert type(material) == dict + assert material["name"] == "C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993" + assert material["isNonPeriodic"] is False + + +def test_get_by_categories(): + """Assert correct information if found about a material.""" + std_materials = Materials() + material = std_materials.get_by_categories("2D") + assert isinstance(material, list) + assert material[0]["name"] == "C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993" From b9be5fd0e6f48c03aa1b26e6a30509f6dc641c55 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 25 Oct 2024 18:29:57 -0700 Subject: [PATCH 16/25] update: do not lint data --- pyproject.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b527501..b111427 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ dependencies = [ "pyyaml", "pandas", "typer", + "pydantic", ] [project.optional-dependencies] @@ -78,10 +79,10 @@ extend-exclude = ''' # Exclude a variety of commonly ignored directories. extend-exclude = [ "src/js", - "src/py/mat3ra/standata/materials.py", - "src/py/mat3ra/standata/workflows.py", - "src/py/mat3ra/standata/applications.py", - "src/py/mat3ra/standata/properties.py", + "src/py/mat3ra/standata/data/materials.py", + "src/py/mat3ra/standata/data/workflows.py", + "src/py/mat3ra/standata/data/applications.py", + "src/py/mat3ra/standata/data/properties.py", "tests/js", ] line-length = 120 From cd739a0c71ccc74c225c0c96ab0ca88d7d3fe414 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 25 Oct 2024 18:36:16 -0700 Subject: [PATCH 17/25] chore: updates for local dev --- .gitignore | 1 + pyproject.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b73f57c..40f53c0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ __pycache__/ # Distribution / packaging .Python build/ +!src/py/mat3ra/standata/build develop-eggs/ dist/ downloads/ diff --git a/pyproject.toml b/pyproject.toml index b111427..2f0bd12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,7 @@ dev = [ "isort", "mypy", "pip-tools", + "express-py" ] tests = [ "coverage[toml]>=5.3", From 2126a55638a256203e6c82359bb6f074a08bc395 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 25 Oct 2024 20:47:15 -0700 Subject: [PATCH 18/25] update: remove need for initialization --- src/py/mat3ra/standata/base.py | 47 ++++++++++++++++------------- src/py/mat3ra/standata/materials.py | 9 ++---- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/py/mat3ra/standata/base.py b/src/py/mat3ra/standata/base.py index a66a989..c0d86b1 100644 --- a/src/py/mat3ra/standata/base.py +++ b/src/py/mat3ra/standata/base.py @@ -156,15 +156,13 @@ class Config: filesMapByName: StandataFilesMapByName = StandataFilesMapByName() standataConfig: StandataConfig = StandataConfig() - def __init__(self, data: Dict, **kwargs): + def __init__(self, data: Dict): """ Initializes StandataData from raw data. Args: data: Dictionary with keys for filesMapByName and standataConfig. """ - super().__init__( - filesMapByName=self._initialize_files_map(data), standataConfig=self._initialize_config(data), **kwargs - ) + super().__init__(filesMapByName=self._initialize_files_map(data), standataConfig=self._initialize_config(data)) @staticmethod def _initialize_files_map(data: Dict) -> StandataFilesMapByName: @@ -188,37 +186,44 @@ def _initialize_config(data: Dict) -> StandataConfig: ) -class Standata(BaseModel): - data: StandataData +class Standata: + data_dict: Dict = {} + data: StandataData = StandataData(data_dict) + + @classmethod + def get_as_list(cls) -> List[dict]: + return list(cls.data.filesMapByName.dictionary.values()) - def __init__(self, data_dict: Dict, **kwargs): + @classmethod + def get_by_name(cls, name: str) -> List[dict]: """ - Initialize the Standata class with StandataData. + Returns entities by name regex. + Args: - data: Dictionary containing the data to initialize StandataData. + name: Name of the entity. """ - super().__init__(data=StandataData(data_dict), **kwargs) - - def get_as_list(self) -> List[dict]: - return list(self.data.filesMapByName.dictionary.values()) + matching_filenames = cls.data.standataConfig.get_filenames_by_regex(name) + return cls.data.filesMapByName.get_objects_by_filenames(matching_filenames) - def get_by_name(self, name: str) -> List[dict]: + @classmethod + def get_by_name_first_match(cls, name: str) -> dict: """ - Returns entities by name regex. + Returns the first entity that matches the name regex. Args: name: Name of the entity. """ - matching_filenames = self.data.standataConfig.get_filenames_by_regex(name) - return self.data.filesMapByName.get_objects_by_filenames(matching_filenames) + matching_filenames = cls.data.standataConfig.get_filenames_by_regex(name) + return cls.data.filesMapByName.get_objects_by_filenames(matching_filenames)[0] - def get_by_categories(self, *tags: str) -> List[dict]: + @classmethod + def get_by_categories(cls, *tags: str) -> List[dict]: """ Finds entities that match all specified category tags. Args: *tags: Category tags for the entity query. """ - categories = self.data.standataConfig.convert_tags_to_categories_list(*tags) - matching_filenames = self.data.standataConfig.get_filenames_by_categories(*categories) - return self.data.filesMapByName.get_objects_by_filenames(matching_filenames) + categories = cls.data.standataConfig.convert_tags_to_categories_list(*tags) + matching_filenames = cls.data.standataConfig.get_filenames_by_categories(*categories) + return cls.data.filesMapByName.get_objects_by_filenames(matching_filenames) diff --git a/src/py/mat3ra/standata/materials.py b/src/py/mat3ra/standata/materials.py index d3c642c..8331fff 100644 --- a/src/py/mat3ra/standata/materials.py +++ b/src/py/mat3ra/standata/materials.py @@ -1,12 +1,9 @@ from typing import Dict -from .base import Standata +from .base import Standata, StandataData from .data.materials import materials_data class Materials(Standata): - def __init__(self, data: Dict = materials_data): - """ - Initialize the Materials class with specific materials data. - """ - super().__init__(data_dict=data) + data_dict: Dict = materials_data + data: StandataData = StandataData(data_dict) From 7ae619a75c32363076cf3c2059ec717fea2dc3db Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 25 Oct 2024 20:47:31 -0700 Subject: [PATCH 19/25] chore: adjust tsts --- tests/py/unit/materials/test_standata_init.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/py/unit/materials/test_standata_init.py b/tests/py/unit/materials/test_standata_init.py index a1c60b4..d426e54 100644 --- a/tests/py/unit/materials/test_standata_init.py +++ b/tests/py/unit/materials/test_standata_init.py @@ -3,24 +3,22 @@ def test_standata_materials_init(): """Materials class is initialized with data based on materials_data""" - std_materials = Materials() - assert std_materials.data.standataConfig.entities is not None - assert len(std_materials.data.standataConfig.entities) >= 1 - assert isinstance(std_materials.data.filesMapByName.dictionary, dict) - assert len(std_materials.data.filesMapByName.dictionary) >= 1 + assert Materials.data.standataConfig.entities is not None + assert len(Materials.data.standataConfig.entities) >= 1 + assert isinstance(Materials.data.filesMapByName.dictionary, dict) + assert len(Materials.data.filesMapByName.dictionary) >= 1 def test_categories_data(): """Category map has at least one group of tags.""" - std_materials = Materials() - assert std_materials.data.standataConfig.categories is not None + std_materials = Materials + assert Materials.data.standataConfig.categories is not None assert len(std_materials.data.standataConfig.categories) >= 1 def test_get_by_name(): """Assert correct information if found about a material.""" - std_materials = Materials() - material = std_materials.get_by_name("Graphene")[0] + material = Materials.get_by_name_first_match("Graphene") assert type(material) == dict assert material["name"] == "C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993" assert material["isNonPeriodic"] is False @@ -28,7 +26,6 @@ def test_get_by_name(): def test_get_by_categories(): """Assert correct information if found about a material.""" - std_materials = Materials() - material = std_materials.get_by_categories("2D") + material = Materials.get_by_categories("2D") assert isinstance(material, list) assert material[0]["name"] == "C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993" From 09ccdf98ea1269a6528d79a16c527ace37c41a84 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:40:30 -0700 Subject: [PATCH 20/25] chore: address PR comments --- src/py/mat3ra/standata/base.py | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/src/py/mat3ra/standata/base.py b/src/py/mat3ra/standata/base.py index c0d86b1..6402b8e 100644 --- a/src/py/mat3ra/standata/base.py +++ b/src/py/mat3ra/standata/base.py @@ -4,15 +4,14 @@ import pandas as pd from pydantic import BaseModel, Field +CATEGORY_SEPARATOR = "/" + class StandataEntity(BaseModel): filename: str categories: List[str] -CATEGORY_SEPARATOR = "/" - - class StandataConfig(BaseModel): categories: Dict[str, List[str]] = {} entities: List[StandataEntity] = [] @@ -48,16 +47,6 @@ def convert_tags_to_categories_list(self, *tags: str): cf for cf in self.get_categories_as_list() if any((cf.split(CATEGORY_SEPARATOR)[-1] == t) for t in tags) ] - def get(self, key: str, default=None): - """ - Returns the value for the specified key if key is in the dictionary, else default. - - Args: - key: The key to look for in the categories dictionary. - default: The value to return if the key is not found. - """ - return self.categories.get(key, default) - def get_filenames_by_categories(self, *categories: str) -> List[str]: """ Returns filenames that match all given categories. @@ -109,6 +98,7 @@ def get_filenames_by_regex(self, regex: str) -> List[str]: filenames.append(entity.filename) return filenames + # TODO: This is not used, but left in preparation for the future when the number of entities is large @property def __lookup_table(self) -> pd.DataFrame: """ @@ -169,20 +159,23 @@ def _initialize_files_map(data: Dict) -> StandataFilesMapByName: """ Initialize the StandataFilesMapByName from the input data. """ - return StandataFilesMapByName(dictionary=data.get("filesMapByName", {})) + files_map_dictionary = data.get("filesMapByName", {}) + return StandataFilesMapByName(dictionary=files_map_dictionary) @staticmethod def _initialize_config(data: Dict) -> StandataConfig: """ Initialize StandataConfig from the input data. """ - config_data = data.get("standataConfig", {}) + config_data_dict = data.get("standataConfig", {}) + categories_dict = config_data_dict.get("categories", {}) + entites_dict = config_data_dict.get("entities", []) + entites = [ + StandataEntity(filename=entity["filename"], categories=entity["categories"]) for entity in entites_dict + ] return StandataConfig( - categories=config_data.get("categories", {}), - entities=[ - StandataEntity(filename=entity["filename"], categories=entity["categories"]) - for entity in config_data.get("entities", []) - ], + categories=categories_dict, + entities=entites, ) From 582e9df03e1aa51830767a97fef35fbef6cdb82e Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:52:59 -0700 Subject: [PATCH 21/25] update: adjust types in standata builder + docstrings --- src/py/mat3ra/standata/build/builder.py | 65 +++++++++++++++---------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/src/py/mat3ra/standata/build/builder.py b/src/py/mat3ra/standata/build/builder.py index d18704a..6fd8f82 100644 --- a/src/py/mat3ra/standata/build/builder.py +++ b/src/py/mat3ra/standata/build/builder.py @@ -1,35 +1,32 @@ +from pathlib import Path +from typing import Optional, Union import json import yaml -from pathlib import Path -from typing import Dict, List, Optional, TypedDict, Union - - -from ..base import StandataConfig -EntityItem = TypedDict("EntityItem", {"filename": str, "categories": List[str]}) - -EntityConfig = TypedDict("EntityConfig", {"categories": Dict[str, List[str]], "entities": List[EntityItem]}) +from ..base import StandataConfig, StandataEntity class StandataBuilder: - """The Standata class associates the entity data files with categories and allows for tag-based queries. + """ + The StandataBuilder class is responsible for building the StandataConfig object. Attributes: entity_dir: Path to the folder containing entity data files. """ - def __init__(self, entity_config: EntityConfig, entity_dir: Union[str, Path]): - """Initializes categories and the entity list. + def __init__(self, entity_dir: Union[str, Path]): + """ + Initializes categories and the entity list. Args: - entity_config: The contents of the entity config file (`categories.yml`). entity_dir: The path to the directory containing all entities. """ self.entity_dir: Path = Path(entity_dir).resolve() @classmethod - def build_from_file(cls, entity_config_path: Union[Path, str]) -> "StandataConfig": - """Creates Standata class instance from entity config file (categories.yml). + def build_from_file(cls, entity_config_path: Union[Path, str]) -> StandataConfig: + """ + Creates StandataConfig instance from entity config file (categories.yml). Args: entity_config_path: The path to the entity config file `categories.yml`. @@ -38,38 +35,52 @@ def build_from_file(cls, entity_config_path: Union[Path, str]) -> "StandataConfi Here, we assume that the entity config file is located in the same directory as all entity files. """ filepath = Path(entity_config_path) - config = StandataBuilder.load_config(filepath) - return StandataConfig(**config) + return cls.load_config(filepath) @staticmethod - def load_config(entity_config_path: Path) -> EntityConfig: - """Loads entity config from file (Yaml). + def load_config(entity_config_path: Path) -> StandataConfig: + """ + Loads entity config from file (Yaml). Args: entity_config_path: The path to the entity config file `categories.yml`. + + Returns: + StandataConfig containing categories and entities configuration. """ - entity_config: EntityConfig = {"categories": {}, "entities": []} try: with open(entity_config_path.resolve(), "r") as stream: - entity_config = yaml.safe_load(stream) + raw_config = yaml.safe_load(stream) + return StandataConfig( + categories=raw_config.get("categories", {}), + entities=[ + StandataEntity(filename=e["filename"], categories=e["categories"]) + for e in raw_config.get("entities", []) + ], + ) except yaml.YAMLError as e: - print(e) - return entity_config + print(f"Error loading YAML config: {e}") + return StandataConfig() @staticmethod def load_entity(filepath: Path) -> Optional[dict]: - """Loads entity config from file (JSON). + """ + Loads entity config from file (JSON). Args: filepath: Path to entity data file (JSON). + + Returns: + Optional[dict]: The loaded entity data or None if loading fails. """ - entity = None if not filepath.resolve().exists(): print(f"Could not find entity file: {filepath.resolve()}") - return entity + return None + try: with open(filepath.resolve(), "r") as f: entity = json.load(f) + return entity except json.JSONDecodeError as e: - print(e) - return entity + print(f"Error loading JSON entity: {e}") + return None From 14c6f27c2516ed9df5d0e626203d5404c2d4204d Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:15:58 -0700 Subject: [PATCH 22/25] chore: place tests from materials standata in one file --- .../py/unit/materials/test_materials_data.py | 31 +++++++++++++++++++ tests/py/unit/materials/test_standata_init.py | 31 ------------------- 2 files changed, 31 insertions(+), 31 deletions(-) delete mode 100644 tests/py/unit/materials/test_standata_init.py diff --git a/tests/py/unit/materials/test_materials_data.py b/tests/py/unit/materials/test_materials_data.py index bdce73a..351ebd3 100644 --- a/tests/py/unit/materials/test_materials_data.py +++ b/tests/py/unit/materials/test_materials_data.py @@ -1,4 +1,35 @@ from mat3ra.standata.data.materials import materials_data +from mat3ra.standata.materials import Materials + + +def test_standata_materials_init(): + """Materials class is initialized with data based on materials_data""" + assert Materials.data.standataConfig.entities is not None + assert len(Materials.data.standataConfig.entities) >= 1 + assert isinstance(Materials.data.filesMapByName.dictionary, dict) + assert len(Materials.data.filesMapByName.dictionary) >= 1 + + +def test_categories_data(): + """Category map has at least one group of tags.""" + std_materials = Materials + assert Materials.data.standataConfig.categories is not None + assert len(std_materials.data.standataConfig.categories) >= 1 + + +def test_get_by_name(): + """Assert correct information if found about a material.""" + material = Materials.get_by_name_first_match("Graphene") + assert type(material) == dict + assert material["name"] == "C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993" + assert material["isNonPeriodic"] is False + + +def test_get_by_categories(): + """Assert correct information if found about a material.""" + material = Materials.get_by_categories("2D") + assert isinstance(material, list) + assert material[0]["name"] == "C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993" def test_get_material_data(): diff --git a/tests/py/unit/materials/test_standata_init.py b/tests/py/unit/materials/test_standata_init.py deleted file mode 100644 index d426e54..0000000 --- a/tests/py/unit/materials/test_standata_init.py +++ /dev/null @@ -1,31 +0,0 @@ -from mat3ra.standata.materials import Materials - - -def test_standata_materials_init(): - """Materials class is initialized with data based on materials_data""" - assert Materials.data.standataConfig.entities is not None - assert len(Materials.data.standataConfig.entities) >= 1 - assert isinstance(Materials.data.filesMapByName.dictionary, dict) - assert len(Materials.data.filesMapByName.dictionary) >= 1 - - -def test_categories_data(): - """Category map has at least one group of tags.""" - std_materials = Materials - assert Materials.data.standataConfig.categories is not None - assert len(std_materials.data.standataConfig.categories) >= 1 - - -def test_get_by_name(): - """Assert correct information if found about a material.""" - material = Materials.get_by_name_first_match("Graphene") - assert type(material) == dict - assert material["name"] == "C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993" - assert material["isNonPeriodic"] is False - - -def test_get_by_categories(): - """Assert correct information if found about a material.""" - material = Materials.get_by_categories("2D") - assert isinstance(material, list) - assert material[0]["name"] == "C, Graphene, HEX (P6/mmm) 2D (Monolayer), 2dm-3993" From 7e39ebcc7903622a71670cca76ed6da394660814 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:16:22 -0700 Subject: [PATCH 23/25] update: generate tests for standata builder and cli with claude --- .../py/unit/materials/test_standata_build.py | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 tests/py/unit/materials/test_standata_build.py diff --git a/tests/py/unit/materials/test_standata_build.py b/tests/py/unit/materials/test_standata_build.py new file mode 100644 index 0000000..303f15e --- /dev/null +++ b/tests/py/unit/materials/test_standata_build.py @@ -0,0 +1,155 @@ +import json +from pathlib import Path + +import pytest +import yaml +from mat3ra.standata.base import StandataConfig, StandataEntity +from mat3ra.standata.build.builder import StandataBuilder + +# Test data +SAMPLE_CONFIG = { + "categories": {"dimensionality": ["2D", "3D"], "type": ["metal", "semiconductor"]}, + "entities": [ + {"filename": "material1.json", "categories": ["2D", "metal"]}, + {"filename": "material2.json", "categories": ["3D", "semiconductor"]}, + ], +} + +SAMPLE_ENTITY = {"name": "Test Material", "isNonPeriodic": False, "lattice": {"a": 1.0, "b": 1.0, "c": 1.0}} + + +@pytest.fixture +def temp_dir(tmp_path): + """Create a temporary directory with test files.""" + # Create config file + config_path = tmp_path / "categories.yml" + with open(config_path, "w") as f: + yaml.dump(SAMPLE_CONFIG, f) + + # Create entity files + for entity in SAMPLE_CONFIG["entities"]: + entity_path = tmp_path / entity["filename"] + with open(entity_path, "w") as f: + json.dump(SAMPLE_ENTITY, f) + + return tmp_path + + +@pytest.fixture +def builder(temp_dir): + """Create a StandataBuilder instance.""" + return StandataBuilder(temp_dir) + + +# StandataBuilder Tests +def test_builder_initialization(builder): + """Test StandataBuilder initialization.""" + assert isinstance(builder, StandataBuilder) + assert isinstance(builder.entity_dir, Path) + assert builder.entity_dir.exists() + + +def test_load_config(temp_dir): + """Test loading configuration from YAML file.""" + config = StandataBuilder.load_config(temp_dir / "categories.yml") + assert isinstance(config, StandataConfig) + assert len(config.categories) == 2 + assert len(config.entities) == 2 + assert isinstance(config.entities[0], StandataEntity) + assert "dimensionality" in config.categories + assert "type" in config.categories + + +def test_load_entity(temp_dir): + """Test loading entity from JSON file.""" + entity_data = StandataBuilder.load_entity(temp_dir / "material1.json") + assert isinstance(entity_data, dict) + assert entity_data["name"] == "Test Material" + assert entity_data["isNonPeriodic"] is False + + +def test_load_nonexistent_entity(temp_dir): + """Test loading non-existent entity file.""" + entity_data = StandataBuilder.load_entity(temp_dir / "nonexistent.json") + assert entity_data is None + + +def test_build_from_file(temp_dir): + """Test building StandataConfig from config file.""" + config = StandataBuilder.build_from_file(temp_dir / "categories.yml") + assert isinstance(config, StandataConfig) + assert len(config.categories) == 2 + assert len(config.entities) == 2 + + +def test_load_invalid_yaml(temp_dir): + """Test loading invalid YAML file.""" + invalid_yaml_path = temp_dir / "invalid.yml" + with open(invalid_yaml_path, "w") as f: + f.write("invalid: yaml: content: {[}") + + config = StandataBuilder.load_config(invalid_yaml_path) + assert isinstance(config, StandataConfig) + assert len(config.categories) == 0 + assert len(config.entities) == 0 + + +# CLI Integration Tests +@pytest.mark.integration +def test_create_category_structure(temp_dir): + """Test creation of category structure.""" + config = StandataBuilder.build_from_file(temp_dir / "categories.yml") + + # Set up the category directory + categories_root = temp_dir / "by_category" + categories_root.mkdir(exist_ok=True) + + # Create category directories and symlinks + for entity in config.entities: + categories = config.convert_tags_to_categories_list(*entity.categories) + entity_path = temp_dir / entity.filename + + for category in categories: + category_dir = categories_root / category + category_dir.mkdir(parents=True, exist_ok=True) + linked_entity = category_dir / entity.filename + if not linked_entity.exists(): + try: + linked_entity.symlink_to(entity_path) + except PermissionError: + pytest.skip("No permission to create symlinks") + + # Verify the structure + assert (categories_root / "dimensionality/2D").exists() + assert (categories_root / "dimensionality/3D").exists() + assert (categories_root / "type/metal").exists() + assert (categories_root / "type/semiconductor").exists() + + +@pytest.mark.integration +def test_symlink_creation(temp_dir): + """Test symlink creation for materials.""" + config = StandataBuilder.build_from_file(temp_dir / "categories.yml") + categories_root = temp_dir / "by_category" + categories_root.mkdir(exist_ok=True) + + # Create symlinks for one material + entity = config.entities[0] # First material + categories = config.convert_tags_to_categories_list(*entity.categories) + entity_path = temp_dir / entity.filename + + for category in categories: + category_dir = categories_root / category + category_dir.mkdir(parents=True, exist_ok=True) + linked_entity = category_dir / entity.filename + if not linked_entity.exists(): + try: + linked_entity.symlink_to(entity_path) + except PermissionError: + pytest.skip("No permission to create symlinks") + + # Verify symlinks + metal_link = categories_root / "type/metal/material1.json" + if metal_link.exists(): + assert metal_link.is_symlink() + assert metal_link.resolve() == (temp_dir / "material1.json").resolve() From 7c196bd4eb2a85df4171179bb091c6ce2ecc0ff2 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:05:29 -0700 Subject: [PATCH 24/25] update: restructure standata tests --- tests/py/unit/test_cli.py | 101 ++++++++++++++++++ .../{materials => }/test_materials_data.py | 0 .../{materials => }/test_standata_build.py | 61 ----------- 3 files changed, 101 insertions(+), 61 deletions(-) create mode 100644 tests/py/unit/test_cli.py rename tests/py/unit/{materials => }/test_materials_data.py (100%) rename tests/py/unit/{materials => }/test_standata_build.py (56%) diff --git a/tests/py/unit/test_cli.py b/tests/py/unit/test_cli.py new file mode 100644 index 0000000..4d56032 --- /dev/null +++ b/tests/py/unit/test_cli.py @@ -0,0 +1,101 @@ +import json +import os +from pathlib import Path +from unittest.mock import patch + +import pytest +import yaml +from mat3ra.standata.build.cli import main + +# Test data +SAMPLE_CONFIG = { + "categories": {"dimensionality": ["2D", "3D"], "type": ["metal", "semiconductor"]}, + "entities": [ + {"filename": "material1.json", "categories": ["2D", "metal"]}, + {"filename": "material2.json", "categories": ["3D", "semiconductor"]}, + ], +} + +SAMPLE_ENTITY = {"name": "Test Material", "isNonPeriodic": False, "lattice": {"a": 1.0, "b": 1.0, "c": 1.0}} + + +@pytest.fixture +def temp_dir(tmp_path): + """Create a temporary directory with test files.""" + # Create config file + config_path = tmp_path / "categories.yml" + with open(config_path, "w") as f: + yaml.dump(SAMPLE_CONFIG, f) + + # Create entity files + for entity in SAMPLE_CONFIG["entities"]: + entity_path = tmp_path / entity["filename"] + with open(entity_path, "w") as f: + json.dump(SAMPLE_ENTITY, f) + + return tmp_path + + +def test_create_category_structure(temp_dir): + """Test creation of category structure.""" + # Pass None as destination to avoid typer.Option issue + main(yaml_config=str(temp_dir / "categories.yml"), destination=None) + + # Verify the structure was created correctly + categories_root = temp_dir / "by_category" + assert (categories_root / "dimensionality/2D").exists() + assert (categories_root / "dimensionality/3D").exists() + assert (categories_root / "type/metal").exists() + assert (categories_root / "type/semiconductor").exists() + + +def test_custom_destination(temp_dir): + """Test creating category structure in custom destination.""" + custom_dest = temp_dir / "custom_dest" + custom_dest.mkdir() + + # Use explicit keyword arguments + main(yaml_config=str(temp_dir / "categories.yml"), destination=str(custom_dest)) + + # Verify the structure was created in custom destination + categories_root = custom_dest / "by_category" + assert (categories_root / "dimensionality/2D").exists() + assert (categories_root / "type/metal").exists() + + +def test_symlink_creation(temp_dir): + """Test if symlinks are created correctly.""" + main(yaml_config=str(temp_dir / "categories.yml"), destination=None) + + # Verify symlinks + metal_link = temp_dir / "by_category/type/metal/material1.json" + assert metal_link.exists() + assert metal_link.is_symlink() + assert metal_link.resolve() == (temp_dir / "material1.json").resolve() + + +@pytest.mark.skipif(os.name == "nt", reason="Symlinks might not work on Windows without admin privileges") +def test_permission_error(temp_dir): + """Test handling of permission errors during symlink creation.""" + with patch("pathlib.Path.symlink_to", side_effect=PermissionError): + with pytest.raises(PermissionError): + main(yaml_config=str(temp_dir / "categories.yml"), destination=None) + + +def test_nonexistent_config(temp_dir): + """Test handling of non-existent config file.""" + with pytest.raises(FileNotFoundError): + main(yaml_config=str(temp_dir / "nonexistent.yml"), destination=None) + + +def test_duplicate_run(temp_dir): + """Test running the command twice (should handle existing symlinks).""" + # Run twice with explicit keyword arguments + main(yaml_config=str(temp_dir / "categories.yml"), destination=None) + main(yaml_config=str(temp_dir / "categories.yml"), destination=None) + + # Verify structure is still correct + categories_root = temp_dir / "by_category" + assert (categories_root / "dimensionality/2D").exists() + metal_link = categories_root / "type/metal/material1.json" + assert metal_link.is_symlink() diff --git a/tests/py/unit/materials/test_materials_data.py b/tests/py/unit/test_materials_data.py similarity index 100% rename from tests/py/unit/materials/test_materials_data.py rename to tests/py/unit/test_materials_data.py diff --git a/tests/py/unit/materials/test_standata_build.py b/tests/py/unit/test_standata_build.py similarity index 56% rename from tests/py/unit/materials/test_standata_build.py rename to tests/py/unit/test_standata_build.py index 303f15e..8ab65fd 100644 --- a/tests/py/unit/materials/test_standata_build.py +++ b/tests/py/unit/test_standata_build.py @@ -92,64 +92,3 @@ def test_load_invalid_yaml(temp_dir): assert isinstance(config, StandataConfig) assert len(config.categories) == 0 assert len(config.entities) == 0 - - -# CLI Integration Tests -@pytest.mark.integration -def test_create_category_structure(temp_dir): - """Test creation of category structure.""" - config = StandataBuilder.build_from_file(temp_dir / "categories.yml") - - # Set up the category directory - categories_root = temp_dir / "by_category" - categories_root.mkdir(exist_ok=True) - - # Create category directories and symlinks - for entity in config.entities: - categories = config.convert_tags_to_categories_list(*entity.categories) - entity_path = temp_dir / entity.filename - - for category in categories: - category_dir = categories_root / category - category_dir.mkdir(parents=True, exist_ok=True) - linked_entity = category_dir / entity.filename - if not linked_entity.exists(): - try: - linked_entity.symlink_to(entity_path) - except PermissionError: - pytest.skip("No permission to create symlinks") - - # Verify the structure - assert (categories_root / "dimensionality/2D").exists() - assert (categories_root / "dimensionality/3D").exists() - assert (categories_root / "type/metal").exists() - assert (categories_root / "type/semiconductor").exists() - - -@pytest.mark.integration -def test_symlink_creation(temp_dir): - """Test symlink creation for materials.""" - config = StandataBuilder.build_from_file(temp_dir / "categories.yml") - categories_root = temp_dir / "by_category" - categories_root.mkdir(exist_ok=True) - - # Create symlinks for one material - entity = config.entities[0] # First material - categories = config.convert_tags_to_categories_list(*entity.categories) - entity_path = temp_dir / entity.filename - - for category in categories: - category_dir = categories_root / category - category_dir.mkdir(parents=True, exist_ok=True) - linked_entity = category_dir / entity.filename - if not linked_entity.exists(): - try: - linked_entity.symlink_to(entity_path) - except PermissionError: - pytest.skip("No permission to create symlinks") - - # Verify symlinks - metal_link = categories_root / "type/metal/material1.json" - if metal_link.exists(): - assert metal_link.is_symlink() - assert metal_link.resolve() == (temp_dir / "material1.json").resolve() From da74d729d92e2bf7fb7695837db61b675490b3e2 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:10:11 -0700 Subject: [PATCH 25/25] update: remove duplication using conftest --- tests/py/unit/conftest.py | 40 ++++++++++++++++++++++++++++ tests/py/unit/test_cli.py | 36 ------------------------- tests/py/unit/test_standata_build.py | 38 -------------------------- 3 files changed, 40 insertions(+), 74 deletions(-) create mode 100644 tests/py/unit/conftest.py diff --git a/tests/py/unit/conftest.py b/tests/py/unit/conftest.py new file mode 100644 index 0000000..7f14023 --- /dev/null +++ b/tests/py/unit/conftest.py @@ -0,0 +1,40 @@ +import json + +import pytest +import yaml + +# Shared test data +SAMPLE_CONFIG = { + "categories": {"dimensionality": ["2D", "3D"], "type": ["metal", "semiconductor"]}, + "entities": [ + {"filename": "material1.json", "categories": ["2D", "metal"]}, + {"filename": "material2.json", "categories": ["3D", "semiconductor"]}, + ], +} + +SAMPLE_ENTITY = {"name": "Test Material", "isNonPeriodic": False, "lattice": {"a": 1.0, "b": 1.0, "c": 1.0}} + + +@pytest.fixture +def temp_dir(tmp_path): + """Create a temporary directory with test files.""" + # Create config file + config_path = tmp_path / "categories.yml" + with open(config_path, "w") as f: + yaml.dump(SAMPLE_CONFIG, f) + + # Create entity files + for entity in SAMPLE_CONFIG["entities"]: + entity_path = tmp_path / entity["filename"] + with open(entity_path, "w") as f: + json.dump(SAMPLE_ENTITY, f) + + return tmp_path + + +@pytest.fixture +def builder(temp_dir): + """Create a StandataBuilder instance.""" + from mat3ra.standata.build.builder import StandataBuilder + + return StandataBuilder(temp_dir) diff --git a/tests/py/unit/test_cli.py b/tests/py/unit/test_cli.py index 4d56032..25b0b25 100644 --- a/tests/py/unit/test_cli.py +++ b/tests/py/unit/test_cli.py @@ -1,44 +1,12 @@ -import json import os -from pathlib import Path from unittest.mock import patch import pytest -import yaml from mat3ra.standata.build.cli import main -# Test data -SAMPLE_CONFIG = { - "categories": {"dimensionality": ["2D", "3D"], "type": ["metal", "semiconductor"]}, - "entities": [ - {"filename": "material1.json", "categories": ["2D", "metal"]}, - {"filename": "material2.json", "categories": ["3D", "semiconductor"]}, - ], -} - -SAMPLE_ENTITY = {"name": "Test Material", "isNonPeriodic": False, "lattice": {"a": 1.0, "b": 1.0, "c": 1.0}} - - -@pytest.fixture -def temp_dir(tmp_path): - """Create a temporary directory with test files.""" - # Create config file - config_path = tmp_path / "categories.yml" - with open(config_path, "w") as f: - yaml.dump(SAMPLE_CONFIG, f) - - # Create entity files - for entity in SAMPLE_CONFIG["entities"]: - entity_path = tmp_path / entity["filename"] - with open(entity_path, "w") as f: - json.dump(SAMPLE_ENTITY, f) - - return tmp_path - def test_create_category_structure(temp_dir): """Test creation of category structure.""" - # Pass None as destination to avoid typer.Option issue main(yaml_config=str(temp_dir / "categories.yml"), destination=None) # Verify the structure was created correctly @@ -54,7 +22,6 @@ def test_custom_destination(temp_dir): custom_dest = temp_dir / "custom_dest" custom_dest.mkdir() - # Use explicit keyword arguments main(yaml_config=str(temp_dir / "categories.yml"), destination=str(custom_dest)) # Verify the structure was created in custom destination @@ -67,7 +34,6 @@ def test_symlink_creation(temp_dir): """Test if symlinks are created correctly.""" main(yaml_config=str(temp_dir / "categories.yml"), destination=None) - # Verify symlinks metal_link = temp_dir / "by_category/type/metal/material1.json" assert metal_link.exists() assert metal_link.is_symlink() @@ -90,11 +56,9 @@ def test_nonexistent_config(temp_dir): def test_duplicate_run(temp_dir): """Test running the command twice (should handle existing symlinks).""" - # Run twice with explicit keyword arguments main(yaml_config=str(temp_dir / "categories.yml"), destination=None) main(yaml_config=str(temp_dir / "categories.yml"), destination=None) - # Verify structure is still correct categories_root = temp_dir / "by_category" assert (categories_root / "dimensionality/2D").exists() metal_link = categories_root / "type/metal/material1.json" diff --git a/tests/py/unit/test_standata_build.py b/tests/py/unit/test_standata_build.py index 8ab65fd..dc621f3 100644 --- a/tests/py/unit/test_standata_build.py +++ b/tests/py/unit/test_standata_build.py @@ -1,47 +1,9 @@ -import json from pathlib import Path -import pytest -import yaml from mat3ra.standata.base import StandataConfig, StandataEntity from mat3ra.standata.build.builder import StandataBuilder -# Test data -SAMPLE_CONFIG = { - "categories": {"dimensionality": ["2D", "3D"], "type": ["metal", "semiconductor"]}, - "entities": [ - {"filename": "material1.json", "categories": ["2D", "metal"]}, - {"filename": "material2.json", "categories": ["3D", "semiconductor"]}, - ], -} -SAMPLE_ENTITY = {"name": "Test Material", "isNonPeriodic": False, "lattice": {"a": 1.0, "b": 1.0, "c": 1.0}} - - -@pytest.fixture -def temp_dir(tmp_path): - """Create a temporary directory with test files.""" - # Create config file - config_path = tmp_path / "categories.yml" - with open(config_path, "w") as f: - yaml.dump(SAMPLE_CONFIG, f) - - # Create entity files - for entity in SAMPLE_CONFIG["entities"]: - entity_path = tmp_path / entity["filename"] - with open(entity_path, "w") as f: - json.dump(SAMPLE_ENTITY, f) - - return tmp_path - - -@pytest.fixture -def builder(temp_dir): - """Create a StandataBuilder instance.""" - return StandataBuilder(temp_dir) - - -# StandataBuilder Tests def test_builder_initialization(builder): """Test StandataBuilder initialization.""" assert isinstance(builder, StandataBuilder)