{"id":21156319,"url":"https://github.com/vitroid/cycless","last_synced_at":"2025-07-09T12:32:20.994Z","repository":{"id":62566158,"uuid":"320728197","full_name":"vitroid/cycless","owner":"vitroid","description":"Algorithms for cycles in a graph","archived":false,"fork":false,"pushed_at":"2024-03-27T03:57:36.000Z","size":2775,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-10T02:28:56.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitroid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-12T02:09:18.000Z","updated_at":"2024-10-14T18:43:41.000Z","dependencies_parsed_at":"2023-12-10T04:22:21.725Z","dependency_job_id":"e88ab6f2-42d2-4b39-add7-d52ed35199f2","html_url":"https://github.com/vitroid/cycless","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"e1df37dfdf6f048da009260c575a289edeef44c8"},"previous_names":["vitroid/cycles"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitroid%2Fcycless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitroid%2Fcycless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitroid%2Fcycless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitroid%2Fcycless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitroid","download_url":"https://codeload.github.com/vitroid/cycless/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225542172,"owners_count":17485841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T11:42:37.280Z","updated_at":"2025-07-09T12:32:20.989Z","avatar_url":"https://github.com/vitroid.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cycless\n\nA collection of algorithms to analyze a graph as a set of cycles.\n\nSome codes come from [https://github.com/vitroid/Polyhed](vitroid/Polyhed) and [https://github.com/vitroid/countrings](vitroid/countrings) are integrated and improved.\n\nVersion 0.5\n\n## API\n\nAPI manual is [here](https://vitroid.github.io/cycless).\n\n## cycles.py\n\nA simple algorithm to enumerate all irreducible cycles of n-members and smaller in an undirected graph. [Matsumoto 2007]\n\n```python\nimport cycless.cycles as cy\nimport networkx as nx\n\ng = nx.cubical_graph()\n\nfor cycle in cy.cycles_iter(g, maxsize=6):\n    print(cycle)\n```\n\n## dicycles.py\n\nAn algorithm to enumerate the directed cycles of a size in a dircted graph. [Matsumoto 2021]\n\n```python\nfrom genice2.genice import GenIce\nfrom genice2.plugin import Lattice, Format, Molecule\nimport cycless.dicycles as dc\n\n# Generate an ice I structure as a directed graph\nlattice = Lattice(\"1h\")\nformatter = Format(\"raw\", stage=(3,))\nraw = GenIce(lattice, signature=\"ice 1h\", rep=[2, 2, 2]).generate_ice(formatter)\n\nfor cycle in dc.dicycles_iter(raw[\"digraph\"], size=6):\n    print(cycle)\n```\n\n## polyhed.py\n\nAn algorithm to enumerate the quasi-polyhedral hull made of cycles in an undirected graph. A quasi-polyhedral hull (vitrite) obeys the following conditions: [Matsumoto 2007]\n\n1. The surface of the hull is made of irreducible cycles.\n2. Two or three cycles shares a vertex of the hull.\n3. Two cycles shares an edge of the hull.\n4. Its Euler index (F-E+V) is two.\n\n```python\nimport cycless.cycles as cy\nimport cycless.polyhed as ph\nimport networkx as nx\n\ng = nx.dodecahedral_graph()\n\ncycles = [cycle for cycle in cy.cycles_iter(g, maxsize=6)]\nfor polyhed in ph.polyhedra_iter(cycles):\n    print(polyhed)\n```\n\n## simplex.py\n\nEnumerate triangle, tetrahedral, and octahedral subgraphs found in the given graph.\n\n## References\n\n1. M. Matsumoto, A. Baba, and I. Ohmine, Topological building blocks of hydrogen bond network in water, J. Chem. Phys. 127, 134504 (2007). http://doi.org/10.1063/1.2772627\n2. Matsumoto, M., Yagasaki, T. \u0026 Tanaka, H. On the anomalous homogeneity of hydrogen-disordered ice and its origin. J. Chem. Phys. 155, 164502 (2021). https://doi.org/10.1063/5.0065215\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitroid%2Fcycless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitroid%2Fcycless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitroid%2Fcycless/lists"}