Skip to content

TheDisorderedOrganization/nexus

Repository files navigation

NEXUS-CAT

Cluster Analysis Toolkit

License PyPI version Documentation Status

NEXUS-CAT

⇁ TOC

⇁ Description and features

nexus-cat is a package designed to find clusters of connected polyhedra in an atomistic simulation trajectory. It provides functionality to analyze cluster properties according to the percolation theory:

  • Note: Here the notion of size refers to the number of polyhedra in a cluster, not the physical size of the cluster, ie its radius nor its volume.
  • Average cluster size $\langle s \rangle$: $\langle s(p) \rangle = \sum_s \frac{s^2n_s(p)}{\sum_s s n_s(p)}$
    • with $n_s$ the number of clusters of size $s$ (ie number of polyhedra in the cluster).
    • 1 sized clusters and percolating clusters are not taken into account in the calculation.
  • Largest cluster size $s_{max}$: largest cluster size in the system no matter the percolation threshold.
  • Spanning cluster size $s_{\infty}$ : largest cluster size in the system excluding the percolating cluster.
  • Gyration radius $R_g$ : $R_s² = \frac{1}{2s^2}\sum_{i,j}|\overrightarrow{r_i}-\overrightarrow{r_j}|^2$
    • with $r_i$ the unwrapped coordinates of the atom $_i$ in the cluster of size $s$.
    • 1 sized clusters and percolating clusters are not taken into account in the calculation.
  • Correlation length $\xi$ : $\xi^2 = \frac{\sum_s 2R_s²s²n_s(p)}{\sum_ss²n_s(p)}$
    • with $n_s$ the number, $R_s$ the average gyration radius of clusters of size $s$ (ie number of polyhedra in the cluster).
    • 1 sized clusters and percolating clusters are not taken into account in the calculation.
  • Percolation probability $\Pi$ :
$$\Pi = \begin{cases} 0 & \text{if } R_g < L_{box} \\\ 1 & \text{if } R_g \geq L_{box} \end{cases}$$
  • with $L_{box}$ is the length of the simulation box.

  • Note: The percolation probability is calculated for each direction of the simulation box, a cluster can percolate in 1D, 2D or 3D.

  • Order parameter $P_∞$ :

$$P_∞ = \begin{cases}0 & \text{if } \Pi = 0 \\\frac{s_{max}}{N} & \text{if } \Pi = 1 \end{cases}$$
  • with $s_{max}$ the number of polyhedra in the biggest cluster, $N$ the total number of connected polyhedra in the system (1 sized clusters excluded).
  • Note : the order parameter is calculated with $\Pi$ in 1D.

⇁ Installation

Basic installation

To install nexus-cat as a package, you can use pip:

pip install nexus-cat

Note: the package does not auto upgrade itself, please run the following command to upgrade to the latest version:

pip install nexus-cat --upgrade

Installation from the source code

If you want to install the package from the source code to implement your extensions for example, you can clone the repository:

git clone git@github.com:TheDisorderedOrganization/nexus.git

Then install the package in development mode:

cd nexus
pip install -e .

⇁ Getting started

As a first example you can follow the steps of the Getting started section of the documentation.

⇁ Documentation

The documentation is available here

⇁ Contributing

Contributions to Nexus-CAT are welcome! You can contribute by submitting bug reports, feature requests, new extension requests, or pull requests through GitHub.

⇁ License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages