Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI complains about bridges #195

Open
kjappelbaum opened this issue Jul 1, 2022 · 2 comments
Open

CLI complains about bridges #195

kjappelbaum opened this issue Jul 1, 2022 · 2 comments

Comments

@kjappelbaum
Copy link
Owner

... not being implemented for multigraph

[
Traceback (most recent call last):
  File "/Users/kevinmaikjablonka/miniconda3/envs/mofdscribe/bin/mofchecker", line 33, in <module>
    sys.exit(load_entry_point('mofchecker', 'console_scripts', 'mofchecker')())
  File "/Users/kevinmaikjablonka/miniconda3/envs/mofdscribe/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/kevinmaikjablonka/miniconda3/envs/mofdscribe/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/kevinmaikjablonka/miniconda3/envs/mofdscribe/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/kevinmaikjablonka/miniconda3/envs/mofdscribe/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/kevinmaikjablonka/git/kjappelbaum/mofchecker/src/mofchecker/cli.py", line 37, in run
    descriptors = mofchecker.get_mof_descriptors(descriptors=descriptors)
  File "/Users/kevinmaikjablonka/git/kjappelbaum/mofchecker/src/mofchecker/__init__.py", line 530, in get_mof_descriptors
    result_dict = OrderedDict(
  File "/Users/kevinmaikjablonka/git/kjappelbaum/mofchecker/src/mofchecker/__init__.py", line 531, in <genexpr>
    ((descriptor, getattr(self, descriptor)) for descriptor in descriptors)
  File "/Users/kevinmaikjablonka/git/kjappelbaum/mofchecker/src/mofchecker/__init__.py", line 212, in decorated_scaffold_hash
    _, g = self._scaffold_graphs()
  File "/Users/kevinmaikjablonka/git/kjappelbaum/mofchecker/src/mofchecker/__init__.py", line 395, in _scaffold_graphs
    sg, g = get_structure_graph_with_broken_bridges(self._graph)
  File "/Users/kevinmaikjablonka/git/kjappelbaum/mofchecker/src/mofchecker/graph/__init__.py", line 81, in get_structure_graph_with_broken_bridges
    bridges = _generate_bridges(g)
  File "/Users/kevinmaikjablonka/git/kjappelbaum/mofchecker/src/mofchecker/graph/__init__.py", line 117, in _generate_bridges
    bridges = list(nx.bridges(nx_graph))
  File "/Users/kevinmaikjablonka/miniconda3/envs/mofdscribe/lib/python3.8/site-packages/networkx/utils/decorators.py", line 811, in func
    yield from argmap._lazy_compile(__wrapper)(*args, **kwargs)
  File "<class 'networkx.utils.decorators.argmap'> compilation 5", line 4, in argmap_bridges_1
  File "/Users/kevinmaikjablonka/miniconda3/envs/mofdscribe/lib/python3.8/site-packages/networkx/utils/decorators.py", line 86, in _not_implemented_for
    raise nx.NetworkXNotImplemented(errmsg)
networkx.exception.NetworkXNotImplemented: not implemented for multigraph type
@kjappelbaum
Copy link
Owner Author

apparently it should have been

def get_structure_graph_with_broken_bridges(
    structure_graph: StructureGraph,
) -> Tuple[StructureGraph, nx.Graph]:
    """
    Returns a StructureGraph without the small subgraphs one obtains after breaking edges.
    """
    g = nx.DiGraph(deepcopy(structure_graph.graph)).to_undirected()

need to empirically check how much of a deal this is

@kjappelbaum
Copy link
Owner Author

I'm not sure how much this is an issue anymore ... if it does not appear on another larger-scale screening, then let's ignore this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant