Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions docs/source/03_api/core/edge_generators.rst
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
Edge Generators
========================

- :func:`element_element_neighborsByGroupPeriod <matgraphdb.core.edges.element_element_neighborsByGroupPeriod>` - A function that generates the neighbors of an element by group and period.
- :func:`element_element_neighborsByGroupPeriod <matgraphdb.generators.edges.element_element_neighborsByGroupPeriod>` - A function that generates the neighbors of an element by group and period.

- :func:`element_element_bonds <matgraphdb.core.edges.element_element_bonds>` - A function that generates the bonds of an element.
- :func:`element_element_bonds <matgraphdb.generators.edges.element_element_bonds>` - A function that generates the bonds of an element.

- :func:`element_oxiState_canOccur <matgraphdb.core.edges.element_oxiState_canOccur>` - A function that generates the possible oxidation states of an element.
- :func:`element_oxiState_canOccur <matgraphdb.generators.edges.element_oxiState_canOccur>` - A function that generates the possible oxidation states of an element.

- :func:`material_chemenv_containsSite <matgraphdb.core.edges.material_chemenv_containsSite>` - A function that generates the sites of a material.
- :func:`material_chemenv_containsSite <matgraphdb.generators.edges.material_chemenv_containsSite>` - A function that generates the sites of a material.

- :func:`material_crystalSystem_has <matgraphdb.core.edges.material_crystalSystem_has>` - A function that generates the crystal system of a material.
- :func:`material_crystalSystem_has <matgraphdb.generators.edges.material_crystalSystem_has>` - A function that generates the crystal system of a material.

- :func:`material_element_has <matgraphdb.core.edges.material_element_has>` - A function that generates the elements of a material.
- :func:`material_element_has <matgraphdb.generators.edges.material_element_has>` - A function that generates the elements of a material.

- :func:`material_lattice_has <matgraphdb.core.edges.material_lattice_has>` - A function that generates the lattice of a material.
- :func:`material_lattice_has <matgraphdb.generators.edges.material_lattice_has>` - A function that generates the lattice of a material.

- :func:`material_spg_has <matgraphdb.core.edges.material_spg_has>` - A function that generates the space group of a material.
- :func:`material_spg_has <matgraphdb.generators.edges.material_spg_has>` - A function that generates the space group of a material.

- :func:`element_chemenv_canOccur <matgraphdb.core.edges.element_chemenv_canOccur>` - A function that generates the possible oxidation states of an element.
- :func:`element_chemenv_canOccur <matgraphdb.generators.edges.element_chemenv_canOccur>` - A function that generates the possible oxidation states of an element.

- :func:`spg_crystalSystem_isApart <matgraphdb.core.edges.spg_crystalSystem_isApart>` - A function that generates the crystal system of a material.
- :func:`spg_crystalSystem_isApart <matgraphdb.generators.edges.spg_crystalSystem_isApart>` - A function that generates the crystal system of a material.



.. autosummary::
:toctree: _autosummary

matgraphdb.core.edges.element_element_neighborsByGroupPeriod
matgraphdb.core.edges.element_element_bonds
matgraphdb.core.edges.element_oxiState_canOccur
matgraphdb.core.edges.material_chemenv_containsSite
matgraphdb.core.edges.material_crystalSystem_has
matgraphdb.core.edges.material_element_has
matgraphdb.core.edges.material_lattice_has
matgraphdb.core.edges.material_spg_has
matgraphdb.core.edges.element_chemenv_canOccur
matgraphdb.core.edges.spg_crystalSystem_isApart
matgraphdb.generators.edges.element_element_neighborsByGroupPeriod
matgraphdb.generators.edges.element_element_bonds
matgraphdb.generators.edges.element_oxiState_canOccur
matgraphdb.generators.edges.material_chemenv_containsSite
matgraphdb.generators.edges.material_crystalSystem_has
matgraphdb.generators.edges.material_element_has
matgraphdb.generators.edges.material_lattice_has
matgraphdb.generators.edges.material_spg_has
matgraphdb.generators.edges.element_chemenv_canOccur
matgraphdb.generators.edges.spg_crystalSystem_isApart
4 changes: 2 additions & 2 deletions docs/source/03_api/core/material_store.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
MaterialStore
========================

- :class:`MaterialStore <matgraphdb.core.nodes.materials.MaterialStore>` - A store for managing materials in a graph database.
- :class:`MaterialStore <matgraphdb.core.material_store.MaterialStore>` - A store for managing materials in a graph database.

.. autosummary::
:toctree: _autosummary

matgraphdb.core.nodes.materials.MaterialStore
matgraphdb.core.material_store.MaterialStore
39 changes: 25 additions & 14 deletions docs/source/03_api/core/node_generators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,39 @@ Node Generators
========================


- :func:`element <matgraphdb.core.nodes.generators.element>` - A function that generates the elements of a material.
- :func:`element <matgraphdb.generators.nodes.element>` - A function that generates the elements of a material.

- :func:`chemenv <matgraphdb.core.nodes.generators.chemenv>` - A function that generates the chemical environments of a material.
- :func:`chemenv <matgraphdb.generators.nodes.chemenv>` - A function that generates the chemical environments of a material.

- :func:`crystal_system <matgraphdb.core.nodes.generators.crystal_system>` - A function that generates the crystal systems of a material.
- :func:`crystal_system <matgraphdb.generators.nodes.crystal_system>` - A function that generates the crystal systems of a material.

- :func:`magnetic_state <matgraphdb.generators.nodes.magnetic_state>` - A function that generates the magnetic states of a material.

- :func:`oxidation_state <matgraphdb.generators.nodes.oxidation_state>` - A function that generates the oxidation states of a material.

- :func:`space_group <matgraphdb.generators.nodes.space_group>` - A function that generates the space groups of a material.

- :func:`wyckoff <matgraphdb.generators.nodes.wyckoff>` - A function that generates the wyckoffs of a material.

- :func:`lattice <matgraphdb.generators.nodes.lattice>` - A function that generates the lattices of a material.

- :func:`material_site <matgraphdb.generators.nodes.material_site>` - A function that generates the sites of a material.

- :func:`magnetic_state <matgraphdb.core.nodes.generators.magnetic_state>` - A function that generates the magnetic states of a material.

- :func:`oxidation_state <matgraphdb.core.nodes.generators.oxidation_state>` - A function that generates the oxidation states of a material.

- :func:`space_group <matgraphdb.core.nodes.generators.space_group>` - A function that generates the space groups of a material.

- :func:`wyckoff <matgraphdb.core.nodes.generators.wyckoff>` - A function that generates the wyckoffs of a material.


.. autosummary::
:toctree: _autosummary

matgraphdb.core.nodes.generators.element
matgraphdb.core.nodes.generators.chemenv
matgraphdb.core.nodes.generators.crystal_system
matgraphdb.core.nodes.generators.magnetic_state
matgraphdb.core.nodes.generators.oxidation_state
matgraphdb.core.nodes.generators.space_group
matgraphdb.core.nodes.generators.wyckoff
matgraphdb.generators.nodes.element
matgraphdb.generators.nodes.chemenv
matgraphdb.generators.nodes.crystal_system
matgraphdb.generators.nodes.magnetic_state
matgraphdb.generators.nodes.oxidation_state
matgraphdb.generators.nodes.space_group
matgraphdb.generators.nodes.wyckoff
matgraphdb.generators.nodes.lattice
matgraphdb.generators.nodes.material_site

58 changes: 20 additions & 38 deletions examples/notebooks/01 - Getting Started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@
}
],
"source": [
"\n",
"from matgraphdb import MatGraphDB\n",
"\n",
"if not os.path.exists(MATGRAPHDB_PATH):\n",
Expand All @@ -284,27 +283,24 @@
"metadata": {},
"outputs": [],
"source": [
"from matgraphdb.core.nodes import (\n",
" element, chemenv, crystal_system, magnetic_state, \n",
" oxidation_state, space_group, wyckoff, material_site, material_lattice\n",
")\n",
"from matgraphdb import generators\n",
"\n",
"# Here we define the generator functions and arguments if they are needed. \n",
"# For instance, to get the materials sites and lattices, we need to pass the materials store to the generator function.\n",
"node_generators = [\n",
" {\"generator_func\": element},\n",
" {\"generator_func\": chemenv},\n",
" {\"generator_func\": crystal_system},\n",
" {\"generator_func\": magnetic_state},\n",
" {\"generator_func\": oxidation_state},\n",
" {\"generator_func\": space_group},\n",
" {\"generator_func\": wyckoff},\n",
" {\"generator_func\": generators.element},\n",
" {\"generator_func\": generators.chemenv},\n",
" {\"generator_func\": generators.crystal_system},\n",
" {\"generator_func\": generators.magnetic_state},\n",
" {\"generator_func\": generators.oxidation_state},\n",
" {\"generator_func\": generators.space_group},\n",
" {\"generator_func\": generators.wyckoff},\n",
" {\n",
" \"generator_func\": material_site,\n",
" \"generator_func\": generators.material_site,\n",
" \"generator_args\": {\"material_store\": mdb.node_stores[\"material\"]},\n",
" },\n",
" {\n",
" \"generator_func\": material_lattice,\n",
" \"generator_func\": generators.material_lattice,\n",
" \"generator_args\": {\"material_store\": mdb.node_stores[\"material\"]},\n",
" },\n",
"]\n"
Expand Down Expand Up @@ -805,86 +801,72 @@
}
],
"source": [
"from matgraphdb.core.edges import (\n",
" material_element_has,\n",
" material_lattice_has,\n",
" material_spg_has,\n",
" element_element_neighborsByGroupPeriod,\n",
" element_element_bonds,\n",
" element_oxiState_canOccur,\n",
" material_chemenv_containsSite,\n",
" material_crystalSystem_has,\n",
" element_chemenv_canOccur,\n",
" spg_crystalSystem_isApart,\n",
")\n",
"\n",
"\n",
"\n",
"# List of edge generator configurations.\n",
"edge_generators = [\n",
" {\n",
" \"generator_func\": element_element_neighborsByGroupPeriod,\n",
" \"generator_func\": generators.element_element_neighborsByGroupPeriod,\n",
" \"generator_args\": {\"element_store\": mdb.node_stores[\"element\"]},\n",
" },\n",
" {\n",
" \"generator_func\": element_oxiState_canOccur,\n",
" \"generator_func\": generators.element_oxiState_canOccur,\n",
" \"generator_args\": {\n",
" \"element_store\": mdb.node_stores[\"element\"],\n",
" \"oxiState_store\": mdb.node_stores[\"oxidation_state\"],\n",
" },\n",
" },\n",
" {\n",
" \"generator_func\": material_chemenv_containsSite,\n",
" \"generator_func\": generators.material_chemenv_containsSite,\n",
" \"generator_args\": {\n",
" \"material_store\": mdb.node_stores[\"material\"],\n",
" \"chemenv_store\": mdb.node_stores[\"chemenv\"],\n",
" },\n",
" },\n",
" {\n",
" \"generator_func\": material_crystalSystem_has,\n",
" \"generator_func\": generators.material_crystalSystem_has,\n",
" \"generator_args\": {\n",
" \"material_store\": mdb.node_stores[\"material\"],\n",
" \"crystal_system_store\": mdb.node_stores[\"crystal_system\"],\n",
" },\n",
" },\n",
" {\n",
" \"generator_func\": material_element_has,\n",
" \"generator_func\": generators.material_element_has,\n",
" \"generator_args\": {\n",
" \"material_store\": mdb.node_stores[\"material\"],\n",
" \"element_store\": mdb.node_stores[\"element\"],\n",
" },\n",
" },\n",
" {\n",
" \"generator_func\": material_lattice_has,\n",
" \"generator_func\": generators.material_lattice_has,\n",
" \"generator_args\": {\n",
" \"material_store\": mdb.node_stores[\"material\"],\n",
" \"lattice_store\": mdb.node_stores[\"material_lattice\"],\n",
" },\n",
" },\n",
" {\n",
" \"generator_func\": material_spg_has,\n",
" \"generator_func\": generators.material_spg_has,\n",
" \"generator_args\": {\n",
" \"material_store\": mdb.node_stores[\"material\"],\n",
" \"spg_store\": mdb.node_stores[\"space_group\"],\n",
" },\n",
" },\n",
" {\n",
" \"generator_func\": element_chemenv_canOccur,\n",
" \"generator_func\": generators.element_chemenv_canOccur,\n",
" \"generator_args\": {\n",
" \"element_store\": mdb.node_stores[\"element\"],\n",
" \"chemenv_store\": mdb.node_stores[\"chemenv\"],\n",
" \"material_store\": mdb.node_stores[\"material\"],\n",
" },\n",
" },\n",
" {\n",
" \"generator_func\": spg_crystalSystem_isApart,\n",
" \"generator_func\": generators.spg_crystalSystem_isApart,\n",
" \"generator_args\": {\n",
" \"spg_store\": mdb.node_stores[\"space_group\"],\n",
" \"crystal_system_store\": mdb.node_stores[\"crystal_system\"],\n",
" },\n",
" },\n",
" {\n",
" \"generator_func\": element_element_bonds,\n",
" \"generator_func\": generators.element_element_bonds,\n",
" \"generator_args\": {\n",
" \"element_store\": mdb.node_stores[\"element\"],\n",
" \"material_store\": mdb.node_stores[\"material\"],\n",
Expand Down
5 changes: 5 additions & 0 deletions matgraphdb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
from parquetdb.utils.log_utils import setup_logging

from matgraphdb._version import __version__

setup_logging()

from matgraphdb.core import MaterialStore, MatGraphDB
from matgraphdb.utils.config import PKG_DIR, config
33 changes: 0 additions & 33 deletions matgraphdb/calculations/README.md

This file was deleted.

Empty file.
Loading
Loading