diff --git a/src/pymatgen/analysis/graphs.py b/src/pymatgen/analysis/graphs.py index 2f36b015ad7..998db8a72bf 100644 --- a/src/pymatgen/analysis/graphs.py +++ b/src/pymatgen/analysis/graphs.py @@ -2420,7 +2420,7 @@ def find_rings(self, including=None) -> list[list[tuple[int, int]]]: for cycle in cycles_nodes: edges = [] for idx, itm in enumerate(cycle): - edges.append((itm, cycle[idx - 1])) + edges.append((cycle[idx - 1], itm)) cycles_edges.append(edges) return cycles_edges