[Diff since v0.4.7](https://github.com/JuliaMolSim/DFTK.jl/compare/v0.4.7...v0.5.0) Note that this release increases the minor version and contains a number of breaking changes: - The `atoms` field in the `Model` data structure, which used to contain pairs mapping from an element to a list of associated positions, is now split up into a plain `atoms` vector (containing a flat and repeated list of all elements) and a `positions` vector (containing the list of respective positions). I.e. whereas before one would have, for example: ```julia Ga = ElementCoulomb(:Ga) As = ElementCoulomb(:As) atoms = [Ga => [[0.1, 0.2, 0.3], [0.4, 0.5, 0.6], ], As => [[0.7, 0.8, 0.9], ], ] ``` we now have ```julia Ga = ElementCoulomb(:Ga) As = ElementCoulomb(:As) atoms = [Ga, Ga, As] positions = [[0.1, 0.2, 0.3], [0.4, 0.5, 0.6], [0.7, 0.8, 0.9], ] ``` This change is carried forward to **all interfaces** of DFTK. This means that all `Model` constructors as well as the `model_atomic`, `model_DFT`, `model_LDA`, `model_PBE`, `model_SCAN` functions change interface. E.g. constructing an LDA model for this fictitious gallium arsenide system could now be done as such: ```julia Ga = ElementCoulomb(:Ga) As = ElementCoulomb(:As) atoms = [Ga, Ga, As] positions = [[0.1, 0.2, 0.3], [0.4, 0.5, 0.6], [0.7, 0.8, 0.9], ] lattice = 5.6 * I(3) model = model_LDA(lattice, atoms, positions) ``` All examples and tests have been updated and can be used to draw examples for the new interface. For convenience and to simplify amending downstream code the old `model_LDA` etc. function have not been completely removed for now, but only marked as deprecated. However, removal will occur at the next patch release. (#626) - The `compute_forces` and `compute_forces_cart` functions now also return arrays of `Vec3` (Static vector of 3 dimensions). These vectors are the forces on a particular atom in the same order as the `model.positions` and `model.atoms` arrays. (#626) - The `Model(lattice; atoms, positions, kwargs...)` constructor has been dropped in favour of `Model(lattice, atoms, positions; kwargs...)`, i.e. `atoms` and `positions` are now positional arguments. This was done to make the constructor resemble more the structure of the `model_LDA`, `model_PBE`, etc. functions. (#629). - The default LDA model constructed by `model_LDA` is now `[:lda_x, :lda_c_pw]` instead of `[:lda_xc_teter93]`. To return to the old behaviour replace `model_LDA(lattice, atoms, positions; kwargs...)` by `model_DFT(lattice, atoms, positions, :lda_xc_teter93; kwargs...)`. (#629) - The default `kshift` in the `PlaneWaveBasis` constructor is now always `(0, 0, 0)`. It used to be `1/2` in one direction in case the `kgrid` was even in this direction. Manually specifying the desired `kshift` returns the old behaviour. (#630) - The `load_psp(element; kwargs...)` function is discontinued and has been removed. Instead use a combination of `list_psp(element; kwargs...)` with `load_psp(identifier)` or the `attach_psp(system::AbstractSystem)` function. (#558) - The deprecated `compute_stresses(scfres)` function has now been removed in favour of `compute_stresses_cart(scfres)`. (#628) - The deprecated `PowerNonlinearity(C, α)` constructor has now been removed in favour of `LocalNonlinearity(ρ -> C * ρ^α)`. (#628) **Closed issues:** - Autodiff (#107) - Figure out notations for the symmetry operations (#266) - Possibility to "unfold" the k grid (#382) - Make another round of profiling (#425) - Improve density computation (#456) - Employing DFTK results for Machine-Learning (#595) - Refactor SymOp to be primarily (W,w) rather than (S,tau) (#618) - Remove ksymops (#621) **Merged pull requests:** - Integrate with AtomsBase (#558) (@mfherbst) - Adding framework for pairwise interactions (#602) (@epolack) - Random optimization (#610) (@antoine-levitt) - Fix performance issue in block array (#611) (@antoine-levitt) - Small cleanup in LOBPCG (#612) (@mfherbst) - Remove coordinate_cart field from Kpoint (#613) (@niklasschmitz) - Small optimizations (#615) (@antoine-levitt) - Refactoring diagonalize_all_kblocks (#617) (@antoine-levitt) - Symop refactoring (again!) (#619) (@antoine-levitt) - Fixes for julia 1.8 (#620) (@mfherbst) - Excise ksymops (#622) (@antoine-levitt) - Excise symops, part 2 (#624) (@antoine-levitt) - Refactor atoms field in Model (#626) (@mfherbst) - Remove deprecated features (#628) (@mfherbst) - Make atoms and positions positional arguments of the Model (#629) (@mfherbst) - Change default kshift to zero (#630) (@mfherbst) - Remove kpoint fallback (#631) (@mfherbst) - Remove final mention of ksymops (#632) (@mfherbst)