Dear Christian.
First of all thanks for your valuable contribution.
It has been annoying me for some time that the performance of the TransmissionSpectrum for bulk systems because for some systems is really fast, but others it is really really dead slow. If you care to read it, i will give a more detailed explanation of algorithm ATK currently use for the bulk Transmission spectrum compared to your approach.
- The structure is repeated to ensure that there is only coupling between neighbours cells
- A hopping matrix is calculated, and the number of propergating modes are calculated using the Krylov method.
- The number of modes is the multiplied with the k-point weight and added to total transmission spectrum
The approach you are doing is based on performing a diagonalization of a NxN matrix, which is order nz*N^3 operations (where N is the number of basis functions in the cell and nz is the number of k-points in z-axises). ATK's current approach sets up a (2xN*M)x(2xN*M), (where M is a the number of repetitions required to make cell only coupled to its nearest cell), and the principal we perform a inversion of the this matrix which then if implemented naively is a 8*M^3*N^3 operation.
But then it uses a iterative method such that the solution should only take a fraction of the time at not the full 8*M^3*N^3.
So despite the much larger problem in ATK, still on paper your approach should be slower, but the problem comes when the iterative methods fails, since it has to revert performing the full operation, making your routine faster depending on your choice of k-points in the z-axis. But potential the ATK verison could be very slow if the iterative method fails. However the ATK still has the strength that it has infinite number of k-points in the z-axis.
Having be boxing around with the bulk transmission quite a lot myself, I would really advocate that ATK should support both methods.