Releases: pace-neutrons/Euphonic
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
.
v0.6.2
-
Improvements:
- Wheels are now provided with PyPI releases
- Type hinting is now handled more consistently across different Euphonic
classes and functions
-
Bug Fixes:
- Will no longer raise a KeyError reading from
phonopy.yaml
if
physical_unit
key is not present, instead will assume default units - Can now read Phonopy BORN files where the (optional) NAC conversion
factor is not present
- Will no longer raise a KeyError reading from
v0.6.1
-
Bug fixes:
- The scaling of S(Q,w) as produced by
StructureFactor.calculate_sqw_map
was incorrect, and did not correctly scale with energy bin size (given its
units are nowlength**2/energy
). This has been fixed, and S(Q,w) scale
has changed by a factor of (hartee to energy bin unit conversion)/(energy
bin width magnitude). e.g. if using an energy bin width of 0.1 meV, the new
S(Q,w) will be scaled by 2.72e4/0.1 = 2.72e5. The original structure factors
can now be correctly recovered by multiplying S(Q,w) by the energy bin width.
- The scaling of S(Q,w) as produced by
v0.6.0
-
Euphonic can now calculate neutron-weighted partial density of states, and
has newSpectra
features to handle PDOS data:- Added
QpointPhononModes.calculate_pdos
method - Added
QpointFrequencies.calculate_dos_map
method - New
Spectrum1D.__add__
method, which adds 2 spectra together - New
Spectrum1DCollection.__add__
method, which concatenates 2 collections - Enabled indexing of
Spectrum1DCollection
by a sequence - Added
Spectrum1DCollection.group_by
method, which allows grouping and
summing spectra by metadata keys e.g.group_by('species')
- Added
Spectrum1DCollection.select
method, which allows selection
of spectra by metadata keys e.g.select(species='Si')
- Added
Spectrum1DCollection.sum
method, which sums all spectra in a
collection - Added
-w={'coherent-dos','incoherent-dos','coherent-plus-incoherent-dos'}
neutron-weighted PDOS options toeuphonic-dos
andeuphonic-powder-map
- Added
--pdos
options for plotting specific species PDOS to
euphonic-dos
andeuphonic-powder-map
- Deprecated
--weights
command-line argument in favour of--weighting
for consistency withcalculate_pdos
- Added
-
Improvements:
- LICENSE and
CITATION.cff <https://citation-file-format.github.io/>
_
files are now included in Euphonic's installation - Add ability to interactively change the colormap intensity limits
ineuphonic-powder-map
euphonic-optimise-dipole-parameter
can now read from Phonopy sourceseuphonic-optimise-dipole-parameter
can now also be used for non-polar
materials to get general per-qpoint timings- Dimensioned Euphonic properties (e.g.
frequencies
,cell_vectors
)
now have setters so can be set, previously this would raise an
AttributeError
- LICENSE and
-
Changes:
- The units of density of states as produced by
calculate_dos
have
changed from dimensionless to1/energy
- The scaling of density of states has also changed. Previously the
integration would sum to 1 (if thex_data
were converted to Hartree
units), now the integration will sum to 3N in the same units asx_data
StructureFactor.structure_factors
have been changed to be in absolute
units per atom (rather than per unit cell) so will have changed by a
factor of1/2*n_atoms
, this formulation change has been reflected in the
calculate_structure_factor
docstring- The default unit of
StructureFactor.structure_factors
has been changed
fromangstrom**2
tomillibarn
- The unit of S(Q,w) as produced by
StructureFactor.calculate_sqw_map
has changed dimension fromlength**2
tolength**2/energy
. Also,
as its unit is derived from the inputStructureFactor
object, its
default units are nowmillibarn/meV
- The
eta_scale
argument incalculate_qpoint_phonon_modes
has been
deprecated,dipole_parameter
should be used instead. - This means the
euphonic-optimise-eta
script has been renamed to
euphonic-optimise-dipole-parameter
.
- The units of density of states as produced by
v0.5.2
-
Improvements:
- Added
broaden
method toSpectrum1DCollection
- Added
-
Changes:
- The
return_mode_widths
argument incalculate_qpoint_phonon_modes
has been deprecated in favour ofreturn_mode_gradients
. The mode
widths can still be obtained from the mode gradients with
util.mode_gradients_to_widths
- The
-
Bug fixes:
- Fixed memory leak when using the C extension and making multiple calls to
calculate_qpoint_phonon_modes/frequencies
- Fixed bug which resulted in incorrect energy bins being generated
ineuphonic-powder-map
if units other than meV are used and
--e-max
and--e-min
aren't specified - Use correct number of energy bins in
euphonic-intensity-map
,
euphonic-powder-map
andeuphonic-dos
. Previously only
ebins - 1
bins were generated
- Fixed memory leak when using the C extension and making multiple calls to
v0.3.3
-
Bug fixes:
- Fixed memory leak when using the C extension and making multiple calls to
calculate_qpoint_phonon_modes
- Fixed memory leak when using the C extension and making multiple calls to
v0.5.1
-
New Features:
- New
Crystal.get_symmetry_equivalent_atoms
method which uses spglib
to get the symmetry operations and equivalent atoms under each operation
- New
-
Improvements:
- Added
symmetrise
argument toQpointPhononModes.calculate_debye_waller
which will symmetrise it under the crystal symmetry operations. This
means that there will no longer be a discrepancy betweenDebyeWaller
calculated on a symmetry-reduced or full Monkhorst-Pack grid. By default,
symmetrise=True
- Added
frequencies_min
argument tocalculate_debye_waller
to
exclude very small frequencies. This will also exclude negative
frequencies. This improves on the previous behaviour which only excluded
gamma-point acoustic modes, so would miss small/negative frequencies
elsewhere - Loading the LAPACK libraries for the C extension now uses the
interface <https://docs.scipy.org/doc/scipy/reference/linalg.cython_lapack.html
_
provided byscipy
forcython
instead of loading directly from a DLL.
The new method means we don't have to guess the DLL filename anymore!
- Added
-
Changes:
- New dependency on
spglib>=1.9.4
- Fixed formula in
calculate_debye_waller
docstring to match actual
implementation: moved1/2
factor and added explicit q-point weights
- New dependency on
v0.5.0
-
New Features:
- New command-line tool
euphonic-powder-map
allows generation
and plotting of powder-averaged S(|q|,w) and DOS maps. - New
QpointFrequencies
object which allows storage of frequencies
without eigenvectors, meaning that memory usage can be reduced if
eigenvectors are not required. StructureFactor
now has aweights
attribute and can be used
to calculate DOS withcalculate_dos
and get dispersion with
get_dispersion
Spectrum1D
,Spectrum1DCollection
andSpectrum2D
objects
have a newmetadata
attribute, see their docstrings for details- Euphonic can now read DOS/PDOS from CASTEP .phonon_dos files with
Spectrum1D.from_castep_phonon_dos
and
Spectrum1DCollection.from_castep_phonon_dos
- Adaptive broadening is now available for DOS, which can obtain a
more representative DOS than standard fixed-width broadening. See
the docs <https://euphonic.readthedocs.io/en/latest/dos.html#adaptive-broadening>
_
for details - Adaptive broadening can be used in the
euphonic-dos
tool with the
--adaptive
argument
- New command-line tool
-
Improvements:
-
Improved default behaviour for C extension use and number of threads:
- By default the C extension will be used if it is installed
- By default the number of threads will be set by
multiprocessing.cpu_count()
- The environment variable
EUPHONIC_NUM_THREADS
can be used to set
a specific number of threads, which takes priority over
multiprocessing.cpu_count()
fall_back_on_python
argument has been removed and superseded by the
defaultuse_c=None
behaviourthreadpoolctl.threadpool_limits
is used to limit the number of threads
used by numerical libraries in Euphonic C function calls, resulting in
better overall performance
-
Command-line interfaces have been refactored, giving a more
uniform set of options and clearer sections of related arguments
on the interactive help pages.- It is now possible where appropriate to specify Monkhorst-Pack
sampling with a single-parameter--q-spacing
as an
alternative to setting Monkhorst-Pack divisions. This approach
will account for the size and shape of reciprocal-lattice cells.
- It is now possible where appropriate to specify Monkhorst-Pack
-
Build process tweaks
-
On Linux, the build process will now respect a user-defined
C-compiler variableCC
. -
On Mac OSX, the build process will now respect a user-defined
C-compiler variableCC
. Homebrew library paths will only be
set ifCC
is empty and thebrew
command is available.
These tweaks are intended to facilitate Conda packaging.
-
-
-
Breaking changes:
-
The
--q-distance
argument toeuphonic-intensity-map
has
been renamed to--q-spacing
for consistency with other tools. -
Debye-Waller calculation in
euphonic-intensity-map
is now
enabled by setting--temperature
, which no longer has a
default value. -
Default Monkhorst-Pack meshes (i.e. [6, 6, 6] in
euphonic-dos
and [20, 20, 20] insample_sphere_structure_factor()
) have
been replaced by default grid-spacing values. -
The scaling of density of states has changed, due to a change
in implementation
-
v0.4.0
-
There have been some major changes and improvements to spectra, plotting
and command line tools, including:- New command line tool
euphonic-intensity-map
for plotting weighted
2D Spectra e.g. Coherent neutron S(Q,w) - Existing command line tools
euphonic-dispersion
andeuphonic-dos
have been updated to also read force constants and Phonopy files.
Arguments are also more consistent across tools so some may have changed,
check the command line tool help for details. - New
Spectrum1DCollection
object for containing 1D spectra with a
shared x-axis (e.g. phonon dispersion modes) - New
plot_1d_to_axis
andplot_2d_to_axis
functions to allow
plotting on specific axes get_bin_centres
andget_bin_edges
utility functions on spectra- The
ratio
argument toplot_2d
has been removed, it should no longer
be required due to better management of relative axis sizes. - The
btol
argument toplot_1d
has been removed, it is recommended
to useSpectrum1D.split()
orSpectrum1DCollection.split()
instead. - The
plot_dispersion
function has been removed. It is now recommended
to plot dispersion usingplot_1d(QpointPhononModes.get_dispersion())
.
See docs for details.
- New command line tool
-
Other changes:
-
Some of Euphonic's dependency version requirements have been changed, but
can now be relied on with more certainty due to better CI testing. This
includes:- numpy requirement increased from
1.9.1
to1.12.1
- matplotlib requirement increased from
1.4.2
to2.0.0
- pint requirement decreased from
0.10.1
to0.9
- h5py requirement decreased from
2.9.0
to2.7.0
- pyyaml requirement decreased from
5.1.2
to3.13
- numpy requirement increased from
-
-
Improvements:
yaml.CSafeLoader
is now used instead ofyaml.SafeLoader
by
default, so Phonopy.yaml
files should load faster- Metadata
__euphonic_version__
and__euphonic_class__
have been
added to .json file output for better provenance
-
Bug fixes:
- Fix read of Phonopy 'full' force constants from phonopy.yaml and
FORCE_CONSTANTS files - Fix structure factor calculation at gamma points with splitting, see
#107 <https://github.com/pace-neutrons/Euphonic/issues/107>
_ - Change broadening implementation from
scipy.signal.fftconvolve
to usescipy.ndimage
functions for better handling of bright
Bragg peaks, see
#108 <https://github.com/pace-neutrons/Euphonic/issues/108>
_
- Fix read of Phonopy 'full' force constants from phonopy.yaml and