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.
- with
-
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.
- with
-
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.
- with
-
Percolation probability
$\Pi$ :
-
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_∞$ :
- 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.
To install nexus-cat as a package, you can use pip:
pip install nexus-catNote: the package does not auto upgrade itself, please run the following command to upgrade to the latest version:
pip install nexus-cat --upgradeIf 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.gitThen install the package in development mode:
cd nexus
pip install -e .As a first example you can follow the steps of the Getting started section of the documentation.
The documentation is available here
Contributions to Nexus-CAT are welcome! You can contribute by submitting bug reports, feature requests, new extension requests, or pull requests through GitHub.
This project is licensed under the MIT License.
