matgraphdb.core.matgraphdb.MatGraphDB¶
- class MatGraphDB(storage_path: str, materials_store: MaterialStore | None = None, load_custom_stores: bool = True, **kwargs)¶
The main entry point for advanced material analysis and graph storage.
- It uses:
GraphStore for general node/edge operations.
MaterialStore for specialized ‘material’ node data.
- __init__(storage_path: str, materials_store: MaterialStore | None = None, load_custom_stores: bool = True, **kwargs)¶
- Parameters:
storage_path (str) – The root directory for the entire MatGraphDB (nodes, edges, materials, etc.).
materials_store (MaterialsStore) – The materials store to use. If None, a new materials store will be created in the storage_path.
load_custom_stores (bool) – Whether to load custom stores.
Methods
__init__(storage_path[, materials_store, ...])add_edge_generator(generator_func[, ...])Register a user-defined callable that can read from node stores, and then create or update edges as it sees fit.
add_edge_store(edge_store)add_edge_type(edge_type)Create (or load) an EdgeStore for the specified edge_type.
add_edges(edge_type, data, **kwargs)add_generator_dependency(generator_name[, ...])Add dependencies for a generator.
add_node_generator(generator_func[, ...])add_node_store(node_store[, overwrite, ...])add_node_type(node_type)Create (or load) a NodeStore for the specified node_type.
add_nodes(node_type, data, **kwargs)construct_table(data[, schema, metadata, ...])create_material(**kwargs)create_materials(data, **kwargs)delete_edges(edge_type[, ids, columns])delete_materials([ids, columns])delete_nodes(node_type[, ids, columns])edge_exists(edge_type)edge_is_empty(edge_type)generator_consistency_check()get_edge_store(edge_type)get_generator_dependency_graph(generator_name)get_generator_type(generator_name)get_node_store(node_type)get_nodes(node_type[, ids, columns])list_edge_types()list_node_types()node_exists(node_type)node_is_empty(node_type)normalize_all_edges(normalize_kwargs)normalize_all_nodes(normalize_kwargs)normalize_edges(edge_type)normalize_nodes(node_type[, normalize_kwargs])read_edges(edge_type[, ids, columns])read_materials([ids, columns])read_nodes(node_type[, ids, columns])remove_edge_store(edge_type)remove_edge_type(edge_type)remove_node_store(node_type)remove_node_type(node_type)run_edge_generator(generator_name[, ...])run_node_generator(generator_name[, ...])Execute a previously registered custom node-generation function by name. :Parameters: * generator_name (str) -- The unique name used when registering the function. * generator_args (Dict) -- Additional arguments passed to the generator function. * generator_kwargs (Dict) -- Additional keyword arguments passed to the generator function.
summary([show_column_names])update_edges(edge_type, data, **kwargs)update_materials(data, **kwargs)update_nodes(node_type, data, **kwargs)Attributes
n_edge_typesn_edges_per_typen_node_typesn_nodes_per_type