Removed scipy-weave dependency of find_optimal_supercell_shape
Motivation
The previous version of find_optimal_supercell_shape
relied on inline-C via scipy.weave for speed-up.
As scipy.weave is deprecated this dependency had to be removed.
Summary of changes
This MR includes
- removed
find_optimal_supercell_shape
function in ase/build/supercells.py - renamed
find_optimal_supercell_shape_pure_python
function tofind_optimal_supercell_shape
in ase/build/supercells.py - small bug fixes
Further comments
Speed
The pure Python implementation is not nearly as fast as the weave version but should be sufficient for most applications. If speed does become an issue one could maybe consider using Cython.
Behavior
The current version considers a transformation matrix of the cell metric from the left
h = P h_p,
where h
is the supercell metric, h_p
is the primitive cell metric, and P
is the transformation matrix.
It would be more sensible to transform from the right
h = h_p P
since :math:h_p
is composed of row vectors.
Honestly, I should have realized that form the start.
I can introduce this change now but it would break backward compatibility.