Releases: pace-neutrons/Euphonic
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.
v1.2.0
-
Improvements:
- Euphonic now tests on Python 3.11
- Euphonic now provides PyPI wheels for Python 3.11
-
New features:
- You can now perform linear interpolation of phonon frequencies and
eigenvectors with theBrille <https://brille.github.io/stable/index.html>
_
library using the new
euphonic.brille.BrilleInterpolator
object. This should provide
performance improvements for large unit cells which require the
dipole correction. - There is a new command-line tool
euphonic-brille-convergence
to
assist with choosing theBrilleInterpolator.from_force_constants
arguments to achieve the desired accuracy. - Brille interpolation can be accessed from the
euphonic-powder-map
tool
using the new--use-brille
,--brille-grid-type
,--brille-npts
and--brille-npts-density
arguments.
- You can now perform linear interpolation of phonon frequencies and
v1.1.0
-
New features:
- There is a new function
ForceConstants.from_total_fc_with_dipole
to allow
reading force constants from other programs which contain long-ranged
dipole-dipole interactions.
- There is a new function
-
Bug fixes:
- Avoid occasional segmentation faults when using OpenBLAS, workaround for
#191 <https://github.com/pace-neutrons/Euphonic/issues/191>
_ - Correctly read force constants from Phonopy with dipole-dipole
interactions, see#239 <https://github.com/pace-neutrons/Euphonic/issues/239>
_.
- Avoid occasional segmentation faults when using OpenBLAS, workaround for
v1.0.0
-
Changes:
-
Support for Python 3.6 has been dropped. This has also resulted in
changes to the following dependencies:- numpy requirement increased from
1.12.1
to1.14.5
- scipy requirement increased from
1.0.0
to1.1.0
- pint requirement increased from
0.9
to0.10.1
- matplotlib requirement increased from
2.0.0
to2.2.2
- h5py requirement increased from
2.7.0
to2.8.0
- numpy requirement increased from
-
The following deprecated features have been removed:
- The
return_mode_widths
argument inForceConstants.calculate_qpoint_phonon_modes
andForceConstants.calculate_qpoint_frequencies
has been removed - The
eta_scale
argument incalculate_qpoint_phonon_modes/frequencies
has been removed - The alias command-line tool argument
--weights
has been removed - The alias arguments
x_label
,y_label
,y_min
andy_max
to
plot_1d/2d
have been removed - The
modes_from_file
andforce_constants_from_file
functions from
euphonic.cli.utils
have been removed - Calling
broaden
on aSpectrum
with uneven bin widths without
specifying themethod='convolve'
argument will now raise aValueError
- The
-
DOS and PDOS calculated by the
calculate_dos
and
calculate_dos_map
methods ofQpointPhononModes
and
QpointFrequencies
, andQpointPhononModes.calculate_pdos
are
now calculated per atom rather than per unit cell (integrated area
is3
rather than3*N_atom
). This is to keep consistency with
the structure factors calculated by
QpointPhononModes.calculate_structure_factor
which are calculated
per atom. -
The option
average_repeat_points
when importing q-point modes or
frequencies from a CASTEP .phonon file with
QpointFrequencies/QpointPhononModes.from_castep
is nowTrue
by default. To recover previous behaviour set this toFalse
.
-
v0.6.5
-
New Features:
-
Kinematic constraints have been implemented for 2-D S(q,w)-like data.
- A function
euphonic.spectra.apply_kinematic_constraints(Spectrum2d, **kwargs) -> Spectrum2D
is implemented which masks out inaccessible data, replacing it with NaN. - Both direct-geometry and indirect-geometry are supported, by
using the appropriate argument to set incident or final neutron energy. - This function is exposed to the
euphonic-powder-map
tool, so these
plots can be produced directly from the CLI. - Some parameters from real-world instruments are collected in the
documentation for convenience.
- A function
-
There is a new function
euphonic.util.convert_fc_phases
, which converts
a force constants matrix which uses the atom coordinates in the phase
during interpolation (Phonopy-like), to one which uses the cell origin
coordinates (Euphonic, CASTEP-like). -
When importing q-point modes or frequencies from a CASTEP .phonon
file, a new option (average_repeat_points=True
) allows
repeated entries (with the same q-point index) to be identified
and their weights divided down by the number of entries. This
option should give better statistics for sampling meshes that
include the Gamma-point with LO-TO splitting.
-
-
Improvements:
-
Documentation on the shape and format of the force constants, and how to
read them from other programs has been improved. -
The
euphonic.util.get_qpoint_labels
function, which is called when
importing band-structure data to identify and label significant points,
primarily identifies these points by searching for turning-points
in the band path. The function will now also pick up any q-point
that appears twice in succession. This is a common convention in
band-structure calculations and helps with edge-cases such as when
the path passes through a high-symmetry point without changing
direction. This may pick up some previously-missing points in
band-structure plots generated witheuphonic-dispersion
and
euphonic-intensity-map
-
-
Bug fixes:
- Allow read of
phonopy.yaml
quantities in'au'
(bohr) units.
Previously this was interpreted as an astronomical unit by Pint.
- Allow read of
v0.6.4
-
Improvements:
-
The
euphonic-dos
,euphonic-dispersion
and
euphonic-intensity-map
command-line tools can now read
files that don't contain eigenvectors, if eigenvectors are
not required for the chosen options. -
A new
--save-json
option is available for command-line tools
which produce plots, this will output the produced spectrum to
a Euphonic .json file. -
There is now the option to use a fast, approximate variable-width broadening method when
adaptively broadening dos:- Added new
adaptive_method
andadaptive_error
arguments forcalculate_dos
which specify which adaptive broadening method to use (reference
orfast
) and an
acceptable error level when using thefast
method. - Fast adaptive broadening can be used in the
euphonic-dos
tool with the
--adaptive-method
and--adaptive-error
arguments.
- Added new
-
-
Changes:
euphonic.cli.force_constants_from_file
andmodes_from_file
have been deprecated in favour ofeuphonic.cli.load_data_from_file
.- Using
Spectrum1D/1DCollection/2D.broaden
on an axis with unequal
bin widths is now deprecated, as broadening is performed via convolution,
which is incorrect in this case. In the future, this will raise a
ValueError
. To broaden anyway,method='convolve'
can be supplied,
which will just emit a warning.
v0.6.3
-
New Features:
-
New
Spectrum1D.to_text_file
andSpectrum1DCollection.to_text_file
methods to write to column text files -
An expanded and consistent set of styling options is made
available for command-line tools that produce plots. -
Consistent styling and advanced changes can be made using
Matplotlib stylesheet files, either as a CLI argument or
usingmatplotlib.style.context()
in a Python script.
-
-
Improvements:
- Internally, plot theming has been adjusted to rely on Matplotlib
style contexts. This means user changes and style context are more
likely to be respected. - Additional aliases for plot arguments in the command-line tools have
been added, for example either--x-label
or--xlabel
can be used.
- Internally, plot theming has been adjusted to rely on Matplotlib
-
Changes:
x_label
,y_label
,y_min
andy_max
ineuphonic.plot
functions have been deprecated in favour ofxlabel
,ylabel
,
ymin
andymax
respectively, to match the Matplotlib arguments
they refer to, and to match other arguments likevmin
,vmax
.