Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relevant WK computation in others.f90 in Prof. Marc De Graef's EMsoft reads: DO J=1,4 FPHON = FPHON + A1(J)*A1(J)*(DEWA * RI1(B1(J),B1(J),G) - RI2(B1(J),B1(J),G,UL)) DO I=1,J-1 FPHON = FPHON + 2.*A1(J)*A1(I)*(DEWA * RI1(B1(I),B1(J),G)-RI2(B1(I),B1(J),G,UL)) When J=1: The inner loop condition is DO I=1,0 (since J-1 = 0) In Fortran, when the upper bound is less than the lower bound, the loop is not executed at all So for J=1, only the first FPHON calculation happens, the inner loop is skipped. In the current py4DSTEM code, the inner loop is executed for ii = jj = 0 making the diagonal be computed a second time with a factor of 2.0 and take an overall prefactor of 3.0 instead of 1.0. If I am missing something and this has been verified against others.f90, then completely ignore this.
- Loading branch information