Introduction to Topological Data Analysis in Molecular Sciences
Some basic tutorials in using TDA in biomolecular data analysis and machine learning. The applications discussed are based on some of the early works by Asst. Prof. Xia Kelin and Prof. Guo-Wei Wei's group.
GeneralisedFormanRicci
Python package to compute Forman Persistent Ricci curvature of a point cloud data in a filtration process.
The implementation is based on the following combinatorial definition of Forman Ricci curvature of a simplex $\alpha$, defined by Robin Forman:
$$\begin{equation*}
\mathcal{F}^{\sharp}_p(\alpha) = \sharp\{\beta^{(p+1)} > \alpha\} + \sharp\{\gamma^{(p-1)} < \alpha\} - \sharp\{\text{parallel neighbours of }\alpha\},
\end{equation*}$$
where $\beta^{(p+1)} > \alpha$ denotes a $(p+1)$-simplex $\beta$ that has $\alpha$ as a face and $\gamma^{(p-1)} < \alpha$ denoting $(p-1)$-simplex $\gamma$ as a face of $\alpha$.
Code can be extended to Hodge and Bochner Laplacian computations via Bochner-Weitzenböck Decomposition:
$$\begin{equation*}
\mathbf{L}_p = \Delta_p + \text{Ricc}_p^{\mathcal{F}},
\end{equation*}$$
where $\mathbf{L}_p$ is the Hodge-Laplacian,
$$\begin{equation*}
\Delta_p (i,j) = \left\{ \begin{array}{ll}
\displaystyle \sum_{\substack{k\ne i}} |\mathbf{L}_p(i,k)|, & i=j. \\
\mathbf{L}_p(i,j), & i\ne j.
\end{array} \right.,
\end{equation*}$$
is the Bochner Laplacian and lastly,
$$\begin{equation*}
\text{Ricc}_p^{\mathcal{F}} (i,j) = \left\{ \begin{array}{ll}
\mathcal{F}_p^\sharp(\sigma_i^p), & i=j. \\
0, & i\ne j.
\end{array} \right.
\end{equation*}$$
is a matrix with Forman Ricci curvature as diagonals. This implementation generalises beyond the graph network version in GraphRicciCurvature.
Plotting Simplicial complexes in Plotly
Some python
code
to plot simplicial complexes based on coordinates of point cloud data, in particular, $\mathbb{R^3}$. Plotly also allows color coding of $0$, $1$ and $2$-dimensional simplices at various scales. The code demonstrates the simplicial complex plots by color coding according to the Forman Ricci curvature values.