smartsexplore.smarts.to_json module¶
Functions to retrieve JSON-renderable representations of graph data stored in the database.
-
smartsexplore.smarts.to_json.from_db(min_similarity: float, max_similarity: float) → dict¶ Generates a dict representation of all directed graph data stored in the database, consisting of all stored SMARTS nodes (key ‘nodes’) and those stored directed edges (key ‘edges’) whose spsim property fulfils (interval min_similarity <= spsim <= max_similarity).
- Parameters
min_similarity – The minimum similarity of the returned edges (inclusive).
max_similarity – The maximum similarity of the returned edges (exclusive).
- Returns
A dict of the available graph data as described.