Meanwhile, I found a very strange problem with the real space matrix images themselves.
As an example, a very simple system of a 1D H array, with 4 atoms in the unit cell (input file in attachment).
The coordinates are
&CELL
ABC 16.0 16.0 6.0
PERIODIC xyz
&END CELL
&COORD
H 0.00000000 0.00000000 0.00000000
H 0.00000000 0.00000000 1.50000000
H 0.00000000 0.00000000 3.00000000
H 0.00000000 0.00000000 4.50000000
&END COORD
The 5 RS image cells are
S CSR write| 5 periodic images
Number X Y Z
1 0 0 0
2 0 0 -1
3 0 0 1
4 0 0 -2
5 0 0 2
and the 0,0,0 image for S overlap is (all other in attachment)
1 1 0.10000000000000E+001
1 2 0.39126534955779E+000
1 3 0.39734112631705E-001
1 4 0.39126534955779E+000
2 1 0.39126534955779E+000
2 2 0.10000000000000E+001
2 3 0.39126534955779E+000
2 4 0.39734112631705E-001
3 1 0.39734112631705E-001
3 2 0.39126534955779E+000
3 3 0.10000000000000E+001
3 4 0.12433452435606E-002
4 1 0.39126534955779E+000
4 2 0.39734112631705E-001
4 3 0.12433452435606E-002
4 4 0.10000000000000E+001
As one can see, the values of S correspond to the atom positions in order
4 1 2 3
not
1 2 3 4
as I assume to be correct.
If one makes only one RS image, e.g., taking
ABC 16.0 16.0 16.0
in the input file, the file looks correct.
1 1 0.10000000000000E+001
1 2 0.39126534955779E+000
1 3 0.39734112631705E-001
1 4 0.12433452435606E-002
2 1 0.39126534955779E+000
2 2 0.10000000000000E+001
2 3 0.39126534955779E+000
2 4 0.39734112631705E-001
3 1 0.39734112631705E-001
3 2 0.39126534955779E+000
3 3 0.10000000000000E+001
3 4 0.39126534955779E+000
4 1 0.12433452435606E-002
4 2 0.39734112631705E-001
4 3 0.39126534955779E+000
4 4 0.10000000000000E+001
Here (1,4) and (4,1) matrix elements are the smallest.
Besides, this "cyclic shift" depends on k-points and the linear shift of atom coordinates.
Even if it does not change k-point calculations itself, it can be important in other problems.
Actually, I found this problem in "NEGF" transport systems, where it is important.
At the moment, I have not found the origin of this problem.