Move all PW basis k-point data to new KpointSet struct #1021
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a minor refactoring of the
PlaneWaveBasis
struct. All fields related to K-points in the basis are moved to a newKpointSet
struct, in thekpoints.jl
file (renamed fromKpoint.jl
). As of now, this PR simply moves the K-point code previously located inPlaneWaveBasis.jl
tokpoints.jl
, with only minor modifications. This allows to:KpointSet
, aFFTGrid
, an array ofTerms
, and a handful of general fields (dvol
,architecture
, etc.).SiriusBasis
, which will share most of the same structure)This is currently a draft, as I would like to discuss the following first:
Throughout the code, there are lots of references to
basis.kpoints
,basis.kweights
, etc. This will not be compatible with the changes proposed here. One could either explicitly go through theKpointSet
(basis.kpoint_set.kpoints
), or define a functions such askpoints(basis)
orkweights(basis)
. I am personally for the latter option, as it is more robust in case of further modifications, and also more concise.