from atomrdf import KnowledgeGraph
from atomrdf.datamodels.structure import AtomicScaleSample
import atomrdf.build as build
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 1
----> 1 from atomrdf import KnowledgeGraph
      2 from atomrdf.datamodels.structure import AtomicScaleSample
      3 import atomrdf.build as build

File ~/checkouts/readthedocs.org/user_builds/pyscal-rdf/conda/latest/lib/python3.11/site-packages/atomrdf/__init__.py:21
      1 """atomRDF — ontology-based knowledge graphs for atomistic simulation data.
      2 
      3 atomRDF combines `pyscal3 <https://github.com/pyscal/pyscal3>`_,
   (...)     17 documentation at https://atomrdf.pyscal.org.
     18 """
     20 from atomrdf._version import __version__
---> 21 from atomrdf.graph import KnowledgeGraph
     22 from atomrdf.io.workflow_parser import WorkflowParser
     24 __all__ = [
     25     "__version__",
     26     "KnowledgeGraph",
     27     "WorkflowParser",
     28 ]

File ~/checkouts/readthedocs.org/user_builds/pyscal-rdf/conda/latest/lib/python3.11/site-packages/atomrdf/graph.py:46
     44 from atomrdf.stores import create_store, purge
     45 import atomrdf.json_io as json_io
---> 46 import atomrdf.mp as amp
     49 from atomrdf.namespace import (
     50     CMSO,
     51     PLDO,
   (...)     56     Literal,
     57 )
     59 # read element data file

File ~/checkouts/readthedocs.org/user_builds/pyscal-rdf/conda/latest/lib/python3.11/site-packages/atomrdf/mp.py:5
      1 """
      2 Wrapper around Materials Project to query structures and get it as a KG
      3 """
----> 5 from mp_api.client import MPRester
      6 import numpy as np
      8 def query_mp(api_key, chemical_system=None, material_ids=None, is_stable=True):

ModuleNotFoundError: No module named 'mp_api'
kg = KnowledgeGraph()
structure = build.bulk('Fe', cubic=True, graph=kg)
structure.info
{'id': 'sample:1e1ba36f-6c64-4d78-a6bf-0e387db5c942',
 'graph': <atomrdf.graph.KnowledgeGraph at 0x327d2c750>}
sample = AtomicScaleSample.from_graph(kg, structure.info['id'])
sample
AtomicScaleSample(id='sample:1e1ba36f-6c64-4d78-a6bf-0e387db5c942', label=None, pid='http://purls.helmholtz-metadaten.de/cmso/AtomicScaleSample', material=Material(id=None, label=None, pid=None, element_ratio={'Fe': 1.0}, crystal_structure=CrystalStructure(id=None, label=None, pid=None, name=None, spacegroup_symbol='Im-3m', spacegroup_number=229, unit_cell=UnitCell(id=None, label=None, pid=None, bravais_lattice='https://www.wikidata.org/wiki/Q851536', lattice_parameter=[2.87, 2.87, 2.87], angle=[90.0, 90.0, 90.0]))), simulation_cell=SimulationCell(id=None, label=None, pid=None, volume=DataProperty[float](id=None, label=None, value=23.64, pid=None, unit=None, basename=None), number_of_atoms=2, length=[2.87, 2.87, 2.87], vector=[[2.87, 0.0, 0.0], [0.0, 2.87, 0.0], [0.0, 0.0, 2.87]], angle=[90.0, 90.0, 90.0], repetitions=[1, 1, 1], grain_size=None, number_of_grains=None), atom_attribute=AtomAttribute(id=None, label=None, pid='http://purls.helmholtz-metadaten.de/cmso/AtomAttribute', position=[[0.0, 0.0, 0.0], [1.435, 1.435, 1.435]], species=['Fe', 'Fe']), point_defect=None, vacancy=None, substitutional=None, interstitial=None, dislocation=None, edge_dislocation=None, screw_dislocation=None, mixed_dislocation=None, stacking_fault=None, grain_boundary=None, tilt_grain_boundary=None, twist_grain_boundary=None, symmetric_tilt_grain_boundary=None, mixed_grain_boundary=None, calculated_property=[<class 'atomrdf.datamodels.workflow.property.CalculatedProperty'>], defect_complex=None)