Releases: pace-neutrons/Euphonic
v1.4.2
v1.4.1
-
Bug fixes
-
CASTEP 25.1 allows Born effective charges to be calculated by
Berry Phase methods without a corresponding dielectric tensor. In
such cases, no long-range term can be subtracted from the Force
Constants (or reconstructed). Euphonic uses the presence of Born
effective charges to indicate such a subtraction; to prevent
ill-defined cases, ForceConstants now sets both Born charges and
dielectric tensor to None if only one was provided. -
An optional parameter is provided to change how bin edges are
obtained from bin centres: previously the bin edges were constrained
to the initial data range, but this can lead to incorrect scaling
when performing broadening. Variable-width broadening schemes are
now allowed to extrapolate the bin edges in order to get the correct
width scaling.Outside of broadening, the default behaviour is unchanged in order
to maintain backward compatibility. This is likely to be changed
in the next "major version" (i.e. API-breaking release) of
Euphonic.
-
-
Maintenance
-
The euphonic.spectra module has been broken up into a subpackage
with the single-spectrum classes defined in euphonic.spectra.base
and the collections in euphonic.spectra.collections. This is not a
breaking change: the public classes, functions and type annotations
remain importable from euphonic.spectra. -
CASTEP 25.1 includes an extra field in .castep_bin files,
indicating whether Born effective charges were read from an
external file. For clarity and safety, this field is now
explicitly read by the Euphonic .castep_bin parser, but remains unused. -
The release process has been reworked to reduce manual steps: a
top-level "release" action will now sequence most of the
steps. (Post-release testing is still separate.)
-
v1.4.1rc2
This pre-release was created to test changes to release workflow. See v1.4.1rc1 for summary of changes.
v1.4.1rc1
-
Bug fixes
-
CASTEP 25.1 allows Born effective charges to be calculated by
Berry Phase methods without a corresponding dielectric tensor. In
such cases, no long-range term can be subtracted from the Force
Constants (or reconstructed). Euphonic uses the presence of Born
effective charges to indicate such a subtraction; to prevent
ill-defined cases, ForceConstants now sets both Born charges and
dielectric tensor to None if only one was provided. -
An optional parameter is provided to change how bin edges are
obtained from bin centres: previously the bin edges were constrained
to the initial data range, but this can lead to incorrect scaling
when performing broadening. Variable-width broadening schemes are
now allowed to extrapolate the bin edges in order to get the correct
width scaling.Outside of broadening, the default behaviour is unchanged in order
to maintain backward compatibility. This is likely to be changed
in the next "major version" (i.e. API-breaking release) of
Euphonic.
-
-
Maintenance
-
The euphonic.spectra module has been broken up into a subpackage
with the single-spectrum classes defined in euphonic.spectra.base
and the collections in euphonic.spectra.collections. This is not a
breaking change: the public classes, functions and type annotations
remain importable from euphonic.spectra. -
CASTEP 25.1 includes an extra field in .castep_bin files,
indicating whether Born effective charges were read from an
external file. For clarity and safety, this field is now
explicitly read by the Euphonic .castep_bin parser, but remains unused. -
The release process has been reworked to reduce manual steps: a
top-level "release" action will now sequence most of the
steps. (Post-release testing is still separate.)
-
v1.4.0.post1
-
Bug fixes
-
Fixed a bug in the version numbering mechanism affecting builds from sdist
on Windows and environments where Git is unavailable -
Reduce size of sdist, removing docs and tests from
archive. (Restoring similar size to pre-v1.4.0 releases.)
-
-
Maintenance
- Source builds automatically tested on Windows as part of
build/deployment process
- Source builds automatically tested on Windows as part of
v1.4.0
This release includes some significant modernisation and maintenance,
as well as new features and performance enhancements.
-
Requirements
-
Python 3.8, 3.9 is no longer supported
-
Python 3.12 is supported
-
importlib_resources backport is no longer required
-
toolz <https://toolz.readthedocs.io/en/latest/index.html>
_ is
a new requirement -
Some other dependency requirements have been increased in order
to simplify maintenance and testing:-
Minimum version of numpy increased from 1.19.3 to 1.24.0
-
Minimum version of matplotlib increased from 3.2 to 3.8
-
Minimum version of Pint increased from 0.19 to 0.22
-
Minimum version of PyYAML increased from 3.13 to 6.0
-
Minimum version of h5py increaased from 2.10 to 3.6
-
Minimum version of threadpoolctl increased from 1.0 to 3.0.
-
-
-
Improvements
-
A "reciprocal_spectroscopy" Pint context is made available in the
unit registry for tricky conversions between reciprocal
frequency/energy units. It is not active by default but can be
enabled with e.g.(10 * ureg("1 / meV")).to("cm", "reciprocal_spectroscopy")
This can also help to avoid divide-by-zero issues when performing
energy <-> wavenumber conversions. -
A Spectrum2DCollection class has been added to euphonic.spectra,
which shares many features with Spectrum1DCollection- In particular, the
iter_metadata
method is recommended when
one needs to iterate over the collection metadata without
copying the spectral data to new objects.
- In particular, the
-
Both Spectrum1DCollection and Spectrum2DCollection have a
.from_spectra()
constructor with an "unsafe" option which
bypasses some consistency checks on the component data. This
should only be used when confident that these will be consistent,
such as when iterating over an existing collection. -
Performance optimisations have been made to the "item getter" for
Spectrum1DCollection (and Spectrum2DCollection); it should now be
significantly faster to access and iterate over the contained
spectra. -
A
euphonic.writers.phonon_website
module has been added with a
function to export QpointPhononModes to appropriate JSON for use
with the phonon visualisation website
http://henriquemiranda.github.io/phononwebsite/From the command-line, this can be accessed with a
--save-web-json
argument to theeuphonic-dispersion
tool.
-
-
Bug fixes
-
Metadata strings from Castep-imported PDOS data are now converted
from numpy strings to native Python strings. -
Spectra from CASTEP .phonon_dos files are now imported with units
of reciprocal energy (e.g. 1/meV)
-
-
Maintenance
-
Cleared up unit-conversion-related warnings, de-cluttering the
expected test suite output. -
The Spectrum1DCollection class was significantly refactored to
support addition of Spectrum2DCollection and improve
maintainability. -
Entire build system rework, migrating to
pyproject.toml
form
withmeson-python
,cibuildwheel
and removing
versioneer
to simplify future development and maintenance.
-
v1.3.2
WARNING: the PyPI wheels for this release are built against "old" Numpy and will not work with Numpy 2.0. Source builds against the new Numpy ABI are expected to work.
-
Requirements
packaging
library added to dependencies.
-
Bug fixes
- Fixed an error loading QpointPhononModes from JSON when there is a
single q-point in the data
- Fixed an error loading QpointPhononModes from JSON when there is a
-
Improvements
- When loading
.castep_bin
files, explicitly check the CASTEP
version number and give a useful error message if this is < 17.1.
(These files are missing information about the unit cell origins,
and would previously cause an error with an unhelpful message.)
- When loading
-
Maintenance
-
Compatibility fix for spglib 2.4 update: a new sanity-check in
spglib raises TypeError when using empty unit cell and this needs
handling when looking for high-symmetry labels -
Compatibility fix for Numpy 2.0 update: avoid some
broadcasting issues with array shape returned bynp.unique
-
Update reference to scipy.integrate.simpson (scipy.integrate.simps
is deprecated) -
Filter out spglib deprecation warnings caused by SeeK-path.
-
v1.3.1
v1.3.0
-
Requirements
-
Python 3.7 is no longer supported
-
Minimum version of scipy increased from 1.1 to 1.10
- This requires numpy >= 1.19.5
-
Minimum version of matplotlib increased from 2.2.2 to 3.2.0
-
Minimum version of pint increased from 0.10.1 to 0.19
-
Minimum version of h5py increaased form 2.8 to 2.10
-
-
Improvements
-
Added variable-width broadening for 1-D and 2-D spectra. An
arbitrary Callable can be provided relating the axis position to
Gaussian or Lorentzian width parameter.euphonic-dos
and
euphonic-powder-map
CLI tools accept polynomial coefficients
as input. The broadening is implemented with the fast approximate
interpolation method already available for adaptive broadening of
DOS. -
Added features to Spectrum classes
-
Added
copy()
methods returning an independent duplicate of data -
Added
__mul__
and__imul__
methods to Spectrum
classes. This allows results to be conveniently scaled with
infix notation*
or*=
-
-
Added
--scale
parameter toeuphonic-dos
,
euphonic-intensity-map
,euphonic-powder-map
to allow
arbitrary scaling of results from command-line. (e.g. for
comparison with experiment, or changing DOS normalisation from 1
to 3N.)
-
-
Bug Fixes:
- Changed the masking logic for kinematic constraints: instead of
requiring energy bin to entirely fall within accessible range at
Q-bin mid-point, unmask bins if any part of energy range is
accessible at this Q value. This gives much more intuitive
behaviour, especially for narrow angle ranges.
- Changed the masking logic for kinematic constraints: instead of
v1.2.1
-
Improvements
-
Added "prefer_non_loto" option to Castep .phonon file
importers. When this is enabled, a block of q-points are
encountered with splitting directions, and one q-point does not
have a splitting direction, the data at this "exact" q-point is
preferred and the other weights in the group are set to zero.This provides the intended behaviour of the Abins Castep parser
and should give a reasonable result for Gamma-point only Castep
calculations.The option is disabled by default, so existing scripts will not be
affected.
-
-
Bug Fixes:
- Allow
color
to be passed as an extra kwarg toplot_1d
and
plot_1d_to_axis
. Previously this caused aTypeError
. - Fix bug where
Py_None
was not incremented before returning from
calculate_phonons()
in the C-extension causing a deallocation crash - Support phonopy.yaml files from Phonopy versions >= 1.18, which
have moved the data relating to dipole-dipole
corrections. (i.e. Born effective charges, static dielectric
tensor and a related unit conversion factor.)
- Allow
-
Maintenance:
- A deprecation in Numpy 1.25, which indirectly caused a test failure, has been addressed.