DiffusionAnalyzer will fail if there is no framework ions (namely if all ions are mobile)
Basically if framework_indices is an empty list. The first dimension of framework_disp would be 0. Then driftwould be a matrix filled with NAN, which leads to failure in the downstream.
Can you put in a fix with a unittest and submit a PR? I think it is relatively simple to test if framework_indices: and then set the drift and displacement.
https://github.com/materialsvirtuallab/pymatgen-analysis-diffusion/blob/5923fb59ec47698462c8b6092339768a542738fd/pymatgen/analysis/diffusion/analyzer.py#L229-L243
DiffusionAnalyzer will fail if there is no framework ions (namely if all ions are mobile)
Basically if
framework_indices
is an empty list. The first dimension offramework_disp
would be 0. Thendrift
would be a matrix filled with NAN, which leads to failure in the downstream.This should a minor bug that is easy to fix.