{"id":14958356,"url":"https://github.com/janjoswig/commonnnclustering","last_synced_at":"2025-10-24T14:32:13.276Z","repository":{"id":50923349,"uuid":"157742111","full_name":"janjoswig/CommonNNClustering","owner":"janjoswig","description":"A Python package for common-nearest-neighbours clustering","archived":false,"fork":false,"pushed_at":"2022-11-24T16:17:37.000Z","size":214238,"stargazers_count":9,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T23:33:39.261Z","etag":null,"topics":["clustering","common-nearest-neighbours","density-based-clustering","markov-model","molecular-dynamics","scikit-learn"],"latest_commit_sha":null,"homepage":"","language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janjoswig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-15T16:38:46.000Z","updated_at":"2023-01-10T15:20:27.000Z","dependencies_parsed_at":"2023-01-23T09:31:16.890Z","dependency_job_id":null,"html_url":"https://github.com/janjoswig/CommonNNClustering","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjoswig%2FCommonNNClustering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjoswig%2FCommonNNClustering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjoswig%2FCommonNNClustering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjoswig%2FCommonNNClustering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janjoswig","download_url":"https://codeload.github.com/janjoswig/CommonNNClustering/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237990606,"owners_count":19398460,"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":["clustering","common-nearest-neighbours","density-based-clustering","markov-model","molecular-dynamics","scikit-learn"],"created_at":"2024-09-24T13:16:49.833Z","updated_at":"2025-10-24T14:32:08.225Z","avatar_url":"https://github.com/janjoswig.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![image](https://img.shields.io/pypi/v/cnnclustering.svg)](https://pypi.org/project/cnnclustering/)\n[![image](https://img.shields.io/pypi/l/cnnclustering.svg)](https://pypi.org/project/cnnclustering/)\n[![image](https://img.shields.io/pypi/pyversions/cnnclustering.svg)](https://pypi.org/project/cnnclustering/)\n[![Build Status](https://app.travis-ci.com/janjoswig/CommonNNClustering.svg?branch=master)](https://app.travis-ci.com/janjoswig/CommonNNClustering)\n[![Coverage Status](https://coveralls.io/repos/github/janjoswig/CommonNNClustering/badge.svg)](https://coveralls.io/github/janjoswig/CommonNNClustering)\n\nCommon-nearest-neighbour clustering\n===================================\n\n***\n**NOTE**\n\n*This project is now under further development at [https://github.com/bkellerlab/CommonNNClustering](https://github.com/bkellerlab/CommonNNClustering).*\n*Please refer to this new version for updates.*\n***\n\ncnnclustering\n-------------\n\n\nThe `cnnclustering` Python package provides a flexible interface to use the \u003cb\u003ec\u003c/b\u003eommon-\u003cb\u003en\u003c/b\u003eearest-\u003cb\u003en\u003c/b\u003eeighbours cluster algorithm. While the method can be applied to arbitrary data, this implementation was made before the background of processing trajectories from Molecular Dynamics simulations. In this context the cluster result can serve as a suitable basis for the construction of a core-set Markov-state (cs-MSM) model to capture the essential dynamics of the underlying molecular processes. For a tool for cs-MSM estimation, refer to this separate [project](https://github.com/janjoswig/cs-MSM).\n\nThe package provides a main module:\n\n  - `cluster`: User interface to (hierarchical) common-nearest-neighbour clustering\n\nFurther, it contains the modules:\n\n  - `plot`: Convenience functions to evaluate cluster results\n  - `_types`: Direct access to generic types representing needed cluster components\n  - `_fit`: Direct access to generic clustering procedures\n\nFeatures:\n\n  - Flexible: Clustering can be done for data sets in different input formats. Easy interfacing with external methods.\n  - Convenient: Integration of functionality, handy in the context of Molecular Dynamics.\n  - Fast: Core functionalities implemented in Cython.\n\nPlease refer to the following papers for the scientific background (and consider citing if you find the method useful):\n\n  - B. Keller, X. Daura, W. F. van Gunsteren *J. Chem. Phys.*, __2010__, *132*, 074110.\n  - O. Lemke, B.G. Keller *J. Chem. Phys.*, __2016__, *145*, 164104.\n  - O. Lemke, B.G. Keller *Algorithms*, __2018__, *11*, 19.\n\nDocumentation\n-------------\n\nThe package documentation (under developement) is available [here](https://janjoswig.github.io/CommonNNClustering/) online or under `docs/index.html`.\nThe sources for the documentation can be found under `docsrc/`.\n\nInstall\n-------\n\nRefer to the [documentation](https://janjoswig.github.io/CommonNNClustering/_source/install.html) for more details. Install from PyPi\n\n```bash\n$ pip install cnnclustering\n```\n\nor clone the development version and install from a local branch\n\n```bash\n$ git clone https://github.com/janjoswig/CommonNNClustering.git\n$ cd CommonNNClustering\n$ pip install .\n```\n\nQuickstart\n----------\n\n```python\n\u003e\u003e\u003e from cnnclustering import cluster\n\n\u003e\u003e\u003e # 2D data points (list of lists, 12 points in 2 dimensions)\n\u003e\u003e\u003e data_points = [   # point index\n...     [0, 0],       # 0\n...     [1, 1],       # 1\n...     [1, 0],       # 2\n...     [0, -1],      # 3\n...     [0.5, -0.5],  # 4\n...     [2,  1.5],    # 5\n...     [2.5, -0.5],  # 6\n...     [4, 2],       # 7\n...     [4.5, 2.5],   # 8\n...     [5, -1],      # 9\n...     [5.5, -0.5],  # 10\n...     [5.5, -1.5],  # 11\n...     ]\n\n\u003e\u003e\u003e clustering = cluster.Clustering(data_points)\n\u003e\u003e\u003e clustering.fit(radius_cutoff=1.5, cnn_cutoff=1, v=False)\n\u003e\u003e\u003e clustering.labels\narray([1, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2])\n\n```\n\n![quickstart](https://github.com/janjoswig/CommonNNClustering/raw/master/docs/_images/tutorial_basic_usage_30_0.png)\n\nAlternative scikit-learn implementation\n---------------------------------------\n\nWe provide an alternative approach to common-nearest-neighbours clustering in the spirit of the scikit-learn project within [scikit-learn-extra](https://github.com/scikit-learn-contrib/scikit-learn-extra).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanjoswig%2Fcommonnnclustering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanjoswig%2Fcommonnnclustering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanjoswig%2Fcommonnnclustering/lists"}