A Python tool to compare protein structures using Gromov-Hausdorff ultrametrics. The implementation is adapted from the MATLAB code in https://arxiv.org/abs/1912.00564. Here, we apply pyGH to distinguish between different protein conformers and different types of organic-inorganic halide perovskites.
pip install pyGH
Upgrading via pip install --upgrade pyGH
from pyGH.GH import uGH, plot_uGH
ux = np.array([[ 0, 5.0225, 5.4539, 4.8977, 5.3575],
[5.0225, 0, 5.2971, 5.4132, 5.2084],
[5.4539, 5.2971, 0, 5.2856, 4.5969],
[4.8977, 5.4132, 5.2856, 0, 5.6365],
[5.3575, 5.2084, 4.5969, 5.6365, 0]])
uy = np.array([[0, 4.89878009143743, 4.73993109215105],
[4.89878009143743, 0, 5.0687],
[4.73993109215105, 5.0687, 0]])
plot_uGH(ux,uy)