Skip to content
[Diff since v0.3.10](https://github.com/JuliaMolSim/DFTK.jl/compare/v0.3.10...v0.4.0)

Note that this release increases the minor version and
contains a number of breaking changes:

- The bandstructure plotting mechanism (`plot_bandstructure` and friends) now uses [`Brillouin.jl`](https://github.com/thchr/Brillouin.jl) to determine the kpath instead of the `pymatgen` python library. Since this effectively changes the determined kpath from the [Setyawan-Curtarolo](http://doi.org/10.1016/j.commatsci.2010.05.010) convention to the [Hinuma *et. al.*](http://doi.org/10.1016/j.commatsci.2016.10.015) convention the obtained bands will now differ in some cases. (#496)

- [LdosMixing](https://michael-herbst.com/publications/2020.09.03_ldos_preconditioning.pdf) is now the default mixing/preconditioning for self-consistent field iterations. Due to the auto-adapting nature of this approach we expect this to be a better default mixing choice, albeit it likely implies performance penalties for small systems. The old behaviour can be restored by passing `mixing=SimpleMixing()` to `self_consistent_field`. (#509)

- The deprecated `PlaneWaveBasis(model, Ecut; kgrid=...)` constructor has been removed in favour of `PlaneWaveBasis(model; Ecut, kgrid=...)` (i.e. `Ecut` is now a keyword argument). (#517)

- The function `kgrid_size_from_minimal_spacing` has been renamed to  `kgrid_from_minimal_spacing` and its default argument removed (#523)

- The function `compute_fft_size(lattice::AbstractMatrix, Ecut)` has been removed in   favour of `compute_fft_size(model::Model, Ecut)`, i.e. if you want to manually compute the FFT size with this function you must now pass a `Model` and not just the lattice vectors. (#524)

- The interface of the functions `compute_bands` and `plot_bandstructure` has been  made more in line with the rest of the code. Atomic units are now used for all   quantities on input and output. This means that bands are by default plotted  in Hartree (use `unit=u"eV"` to restore old behaviour of plotting in electron volts).  Similarly `kline_density` is no longer assumed to be in Ångström, but in Bohr.  The new interfaces of these functions is  `compute_bands(basis, kcoords; n_bands, ρ, kwargs...)` or  `plot_bandstructure(basis; ρ, n_bands, kwargs...)`, i.e. `n_bands` and `ρ`   have become non-mandatory keyword arguments.  The more high-level interface `plot_bandstructure(scfres; kwargs...)`  remains valid. (#536)

**Closed issues:**
- Forces and stresses (#47)
- homogenize kpoint spelling (#326)
- Debug incompatibility with JLD2 beyond 0.4.7 for MPI-parallel `save_scfres` (#444)
- Segfault in 1.7 (#480)
- Replace pymatgen by Brillouin.jl (#483)
- Stresses: API and symmetries (#484)
- Windows CI started failing (#501)
- stresses without unfold_bz (#506)
- Potential Issue with Stresses and Number of Bands (#512)
- Applicability of Stresses in Metalic Systems: Comparing Si to Fe (#527)

**Merged pull requests:**
- Try to lift JLD2 restrictions (#455) (@mfherbst)
- Replace pymatgen by Brillouin.jl #483 (#496) (@harrisonlabollita)
- Move from Gitter to the JuliaMolSim slack (#507) (@mfherbst)
- Make LDOS mixing the default (#509) (@mfherbst)
- Use more convenient MPI.Init from MPI 0.19 (#510) (@github-actions[bot])
- Implement stresses without unfold_bz (#511) (@jaemolihm)
- Fix stresses for very small occupations (#513) (@antoine-levitt)
- Fix and reword symmetries documentation section. (#516) (@mfherbst)
- Remove deprecated PlaneWaveBasis constructor (#517) (@mfherbst)
- [WIP] Forwarddiff dipole moment example (#520) (@niklasschmitz)
- Fix more edge cases when computing the number of occupied bands (#521) (@mfherbst)
- Improve basis mapping (#522) (@mfherbst)
- Implement kgrid_from_minimal_kpoints (#523) (@mfherbst)
- Improved printing with `Base.show` (#524) (@mfherbst)
- Some docs explaining periodic problems (#525) (@mfherbst)
- Add test for self-adjointness of solve_ΩplusK (#528) (@niklasschmitz)
- homogenize k-points in docs and comments (#531) (@thazhemadam)
- A collection of various small fixes (#532) (@mfherbst)
- Remove reference to pymatgen as dependency (#534) (@mfherbst)
- CompatHelper: bump compat for Spglib to 0.5, (keep existing compat) (#535) (@github-actions[bot])
- Refactor plot_bandstructure interface (#536) (@mfherbst)