https://github.com/janjoswig/commonnnclustering

A Python package for common-nearest-neighbours clustering

https://github.com/janjoswig/commonnnclustering

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 3 committers (66.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.5%) to scientific vocabulary

Keywords

clustering common-nearest-neighbours density-based-clustering markov-model molecular-dynamics scikit-learn
Last synced: 5 months ago · JSON representation

Repository

A Python package for common-nearest-neighbours clustering

Basic Info
  • Host: GitHub
  • Owner: janjoswig
  • License: mit
  • Language: Cython
  • Default Branch: master
  • Homepage:
  • Size: 204 MB
Statistics
  • Stars: 9
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
clustering common-nearest-neighbours density-based-clustering markov-model molecular-dynamics scikit-learn
Created over 7 years ago · Last pushed about 3 years ago
Metadata Files
Readme License

README.md

image image image Build Status Coverage Status

Common-nearest-neighbour clustering


NOTE

This project is now under further development at https://github.com/bkellerlab/CommonNNClustering. Please refer to this new version for updates.


cnnclustering

The cnnclustering Python package provides a flexible interface to use the common-nearest-neighbours 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.

The package provides a main module:

  • cluster: User interface to (hierarchical) common-nearest-neighbour clustering

Further, it contains the modules:

  • plot: Convenience functions to evaluate cluster results
  • _types: Direct access to generic types representing needed cluster components
  • _fit: Direct access to generic clustering procedures

Features:

  • Flexible: Clustering can be done for data sets in different input formats. Easy interfacing with external methods.
  • Convenient: Integration of functionality, handy in the context of Molecular Dynamics.
  • Fast: Core functionalities implemented in Cython.

Please refer to the following papers for the scientific background (and consider citing if you find the method useful):

  • B. Keller, X. Daura, W. F. van Gunsteren J. Chem. Phys., 2010, 132, 074110.
  • O. Lemke, B.G. Keller J. Chem. Phys., 2016, 145, 164104.
  • O. Lemke, B.G. Keller Algorithms, 2018, 11, 19.

Documentation

The package documentation (under developement) is available here online or under docs/index.html. The sources for the documentation can be found under docsrc/.

Install

Refer to the documentation for more details. Install from PyPi

bash $ pip install cnnclustering

or clone the development version and install from a local branch

bash $ git clone https://github.com/janjoswig/CommonNNClustering.git $ cd CommonNNClustering $ pip install .

Quickstart

```python

from cnnclustering import cluster

2D data points (list of lists, 12 points in 2 dimensions)

data_points = [ # point index ... [0, 0], # 0 ... [1, 1], # 1 ... [1, 0], # 2 ... [0, -1], # 3 ... [0.5, -0.5], # 4 ... [2, 1.5], # 5 ... [2.5, -0.5], # 6 ... [4, 2], # 7 ... [4.5, 2.5], # 8 ... [5, -1], # 9 ... [5.5, -0.5], # 10 ... [5.5, -1.5], # 11 ... ]

clustering = cluster.Clustering(datapoints) clustering.fit(radiuscutoff=1.5, cnn_cutoff=1, v=False) clustering.labels array([1, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2])

```

quickstart

Alternative scikit-learn implementation

We provide an alternative approach to common-nearest-neighbours clustering in the spirit of the scikit-learn project within scikit-learn-extra.

Owner

  • Name: Jan-Oliver Kapp-Joswig
  • Login: janjoswig
  • Kind: user
  • Location: Oxford, UK
  • Company: Exscientia AI

GitHub Events

Total
  • Issues event: 4
  • Issue comment event: 4
Last Year
  • Issues event: 4
  • Issue comment event: 4

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 355
  • Total Committers: 3
  • Avg Commits per committer: 118.333
  • Development Distribution Score (DDS): 0.056
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Jan-Oliver Joswig j****g@f****e 335
Jan-Oliver Joswig 3****g 19
Jan-Oliver Joswig j****Å@f****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 10
  • Total pull requests: 12
  • Average time to close issues: about 2 years
  • Average time to close pull requests: 11 days
  • Total issue authors: 3
  • Total pull request authors: 2
  • Average comments per issue: 1.9
  • Average comments per pull request: 0.25
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 3
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • janjoswig (8)
  • egy1st (1)
  • edikedik (1)
Pull Request Authors
  • janjoswig (9)
  • dependabot[bot] (3)
Top Labels
Issue Labels
enhancement (4) refactor (1) dependencies (1)
Pull Request Labels
dependencies (3)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 11 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 9
  • Total maintainers: 1
pypi.org: cnnclustering

A Python package for common-nearest-neighbours clustering

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 11 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 17.7%
Dependent repos count: 21.6%
Average: 23.1%
Forks count: 29.8%
Downloads: 36.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements-dev.txt pypi
  • cython >=0.29 development
requirements-docs.txt pypi
  • ipython *
  • nbsphinx *
  • rstcheck *
  • sphinx *
  • sphinxcontrib-napoleon *
requirements-optional.txt pypi
  • matplotlib *
  • networkx *
  • pandas *
  • scikit-learn *
  • scipy *
requirements-test.txt pypi
  • coverage ==4.5 test
  • coveralls * test
  • flake8 * test
  • pytest * test
  • pytest-mock * test
  • pytest-raises * test
  • pytest-regressions * test
requirements.txt pypi
  • PyYAML *
  • numpy *
  • tqdm *