OrderN / CONQUEST-release

Full public release of large scale and linear scaling DFT code CONQUEST
http://www.order-n.org/
MIT License
94 stars 24 forks source link

Non-zero forces for perfect bulk with some k-point meshes #322

Closed davidbowler closed 2 months ago

davidbowler commented 2 months ago

For the attached set up (perfect bulk silicon, but not a cubic cell) certain k-point meshes result in non-zero forces on atoms (where from symmetry they must be zero). It seems to happen when the k-point spacing is not uniform (so for instance a 3x3x3 mesh gives zero forces but a 3x6x3 mesh gives non-zero forces along z). I am really confused by this: I checked that it's not an error in the k-point symmetry routine by specifying the k-points explicitly.

Likely obscure, but indicates some problem.

DiagError.zip

Updated input file: previous version did not produce error!

tsuyoshi38 commented 2 months ago

Please let me know which branch (& version) you used. With the version (develop , a little older version), the forces were zero even when using 3x6x3 k-points. I will check it tomorrow again.

davidbowler commented 2 months ago

This was with the latest version of develop (78325c9) and seems to give the error with GCC13/OpenMPI 4.1.6/macOS and Intel 2020_u4/OpenMPI 4.1.3/RHEL7. But the same problem appears with master v1.2 (6bf8f4a8) at least on my mac.

tsuyoshi38 commented 2 months ago

I am sorry that I have not noticed that your input was 1x1x1. Now, I have observed that the forces are nonzero by commenting out the line (Diag.MPMesh F). I have just checked the atomic coordinates of your input file. I am not completely sure, but it looks like the symmetry w.r.t. z and -z seems to be broken if you break the symmetry along x and y. Why did you take 3x6x3 k-points? Or do you mean 3x3x6 k-points? (but, with this k-point sampling, the forces are 0.)

davidbowler commented 2 months ago

Thank you for pointing out this issue. It seems that this is user error, rather than a bug in the code! We should probably add a note in the manual to say that we do not perform any symmetry checks, and possibly consider adding such checks in the future. I will mark this as closed.