Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
klausweinbauer committed Sep 5, 2024
1 parent 391db53 commit 0140b3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions fgutils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ def add_implicit_hydrogens(graph: nx.Graph) -> nx.Graph:


def split_its(graph: nx.Graph) -> tuple[nx.Graph, nx.Graph]:
"""Split an ITS graph into reactant graph G and product graph H.
"""Split an ITS graph into reactant graph G and product graph H.
:param graph: ITS graph to split up.
:returns: Tuple of two graphs (G, H).
"""

def _set_rc_edge(g, u, v, b):
if b == 0:
g.remove_edge(u, v)
Expand Down
3 changes: 2 additions & 1 deletion test/algorithm/test_subgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,11 @@ def test_map_with_its_with_wildcard():
m = map_subgraph(its, 1, p, mapper=default_mapper)
_assert_mapping(m, True, exp_mapping)


def test_doc_example_2():
# example for functional_groups.rst:Get changing groups in reaction
smiles = "[C:1][C:2](=[O:3])[O:4][C:5].[O:6]>>[C:1][C:2](=[O:3])[O:6].[O:4][C:5]"
pattern="C(=O)(<0,1>R)<1,0>R"
pattern = "C(=O)(<0,1>R)<1,0>R"
exp_mapping = [(2, 0), (3, 1), (4, 3), (6, 2)]
g, h = smiles_to_graph(smiles)
its = get_its(g, h)
Expand Down

0 comments on commit 0140b3e

Please sign in to comment.