Skip to content

Releases: pace-neutrons/Euphonic

v0.3.3

02 Jun 08:47
Compare
Choose a tag to compare
v0.3.3 Pre-release
Pre-release
  • Bug fixes:

    • Fixed memory leak when using the C extension and making multiple calls to
      calculate_qpoint_phonon_modes

v0.5.1

17 May 10:30
Compare
Choose a tag to compare
v0.5.1 Pre-release
Pre-release
  • New Features:

    • New Crystal.get_symmetry_equivalent_atoms method which uses spglib
      to get the symmetry operations and equivalent atoms under each operation
  • Improvements:

    • Added symmetrise argument to QpointPhononModes.calculate_debye_waller
      which will symmetrise it under the crystal symmetry operations. This
      means that there will no longer be a discrepancy between DebyeWaller
      calculated on a symmetry-reduced or full Monkhorst-Pack grid. By default,
      symmetrise=True
    • Added frequencies_min argument to calculate_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 by scipy for cython instead of loading directly from a DLL.
      The new method means we don't have to guess the DLL filename anymore!
  • Changes:

    • New dependency on spglib>=1.9.4
    • Fixed formula in calculate_debye_waller docstring to match actual
      implementation: moved 1/2 factor and added explicit q-point weights

v0.5.0

15 Apr 15:04
e525bb7
Compare
Choose a tag to compare
v0.5.0 Pre-release
Pre-release
  • 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 a weights attribute and can be used
      to calculate DOS with calculate_dos and get dispersion with
      get_dispersion
    • Spectrum1D, Spectrum1DCollection and Spectrum2D objects
      have a new metadata 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
  • 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
        default use_c=None behaviour
      • threadpoolctl.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.
    • Build process tweaks

      • On Linux, the build process will now respect a user-defined
        C-compiler variable CC.

      • On Mac OSX, the build process will now respect a user-defined
        C-compiler variable CC. Homebrew library paths will only be
        set if CC is empty and the brew command is available.

      These tweaks are intended to facilitate Conda packaging.

  • Breaking changes:

    • The --q-distance argument to euphonic-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] in sample_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

09 Feb 10:41
Compare
Choose a tag to compare
v0.4.0 Pre-release
Pre-release
  • 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 and euphonic-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 and plot_2d_to_axis functions to allow
      plotting on specific axes
    • get_bin_centres and get_bin_edges utility functions on spectra
    • The ratio argument to plot_2d has been removed, it should no longer
      be required due to better management of relative axis sizes.
    • The btol argument to plot_1d has been removed, it is recommended
      to use Spectrum1D.split() or Spectrum1DCollection.split() instead.
    • The plot_dispersion function has been removed. It is now recommended
      to plot dispersion using plot_1d(QpointPhononModes.get_dispersion()).
      See docs for details.
  • 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 to 1.12.1
      • matplotlib requirement increased from 1.4.2 to 2.0.0
      • pint requirement decreased from 0.10.1 to 0.9
      • h5py requirement decreased from 2.9.0 to 2.7.0
      • pyyaml requirement decreased from 5.1.2 to 3.13
  • Improvements:

    • yaml.CSafeLoader is now used instead of yaml.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 use scipy.ndimage functions for better handling of bright
      Bragg peaks, see
      #108 <https://github.com/pace-neutrons/Euphonic/issues/108>_

v0.3.2

08 Oct 14:00
Compare
Choose a tag to compare
v0.3.2 Pre-release
Pre-release
  • New Features:

    • Added weights as an argument to
      ForceConstants.calculate_qpoint_phonon_modes, this will allow easier
      use of symmetry reduction for calculating density of states, for example.

    • Modules have been added to support spherical averaging from 3D
      q-points to mod(q)

      • euphonic.sampling provides pure functions for the generation of
        points on (2D) unit square and (3D) unit sphere surfaces.
      • A script is provided for visualisation of the different schemes
        implemented in euphonic.sampling. This is primarily intended for
        education and debugging.
      • euphonic.powder provides functions which, given force constants
        data, can use these sampling methods to obtain
        spherically-averaged phonon DOS and coherent structure factor
        data as 1D spectrum objects. (It is anticipated that this module
        will grow to include schemes beyond this average over a single
        sphere.)
    • Added Crystal.to_spglib_cell convenience function

  • Changes:

    • The Scripts folder has been removed. Command-line tools are now
      located in the euphonic.cli module. The entry-points are managed
      in setup.py, and each tool has the prefix "euphonic-" to avoid
      namespace clashes with other tools on the user's
      computer. (e.g. euphonic-dos)
    • From an interactive shell with tab-completion, one can find all
      the euphonic tools by typing "euphonic-".
    • Changed arguments for util.get_qpoint_labels(Crystal, qpts)
      to util.get_qpoint_labels(qpts, cell=None) where
      cell = Crystal.to_spglib_cell()
  • Bug fixes:

    • Correctly convert from Phonopy's q-point weight convention to Euphonic's
      when reading from mesh.yaml (see
      7509043 <https://github.com/pace-neutrons/Euphonic/commit/7509043>_)
    • Avoid IndexError in ForceConstants.calculate_qpoint_phonon_modes when
      there is only one q-point (which is gamma) and splitting=True

v0.3.1

10 Aug 11:02
Compare
Choose a tag to compare
v0.3.1 Pre-release
Pre-release
  • New Features:

    • A system has been added for reference data in JSON files. These
      are accessed via euphonic.utils.get_reference_data and some
      data has been added for coherent scattering lengths and cross-sections.
      This system has been made available to the
      calculate_structure_factor() method; it is no longer necessary to
      craft a data dict every time a program uses this function.
  • Changes:

    • Fixed structure factor formula in docs (|F(Q, nu)| -> |F(Q, \\nu)|^2
      and e^(Q.r) -> e^(iQ.r))
  • Bug fixes:

    • Fix 'born':null in ForceConstants .json files when Born is not
      present in the calculation (see
      c20679c <https://github.com/pace-neutrons/Euphonic/commit/c20679c>_)
    • Fix incorrect calculation of LO-TO splitting when reduce_qpts=True,
      as the 'reduced' q rather than the actual q was used as the q-direction
      (see 3958072 <https://github.com/pace-neutrons/Euphonic/commit/3958072>_)
    • Fix interpolation for materials with non-symmetric supcercell matrices,
      see #81 <https://github.com/pace-neutrons/Euphonic/issues/81>_
    • Fix interpolation for force constants read from Phonopy for materials that
      have a primitive matrix and more than 1 species, see
      #77 <https://github.com/pace-neutrons/Euphonic/issues/77>_

v0.3.0

03 Jun 09:37
Compare
Choose a tag to compare
v0.3.0 Pre-release
Pre-release
  • Breaking Changes:

    • There has been a major refactor, for see the latest
      docs <https://euphonic.readthedocs.io/en/latest>_ for how to use, or
      here <https://euphonic.readthedocs.io/en/latest/refactor.html>_ for
      refactor details
    • Python 2 is no longer supported. Supported Python versions are 3.6,
      3.7 and 3.8
  • New Features:

    • Euphonic can now read Phonopy input! See
      the docs <https://euphonic.readthedocs.io/en/latest>_
      for details.
  • Improvements:

    • Added fall_back_on_python boolean keyword argument to
      ForceConstants.calculate_qpoint_phonon_modes to control
      whether the Python implementation is used as a fallback to the C
      extension or not, see
      #35 <https://github.com/pace-neutrons/Euphonic/issues/35>_
    • Added --python-only option to setup.py to enable install
      without the C extension
  • Bug fixes:

    • On reading CASTEP phonon file header information, switch from a fixed
      number of lines skipped to a search for a specific line, fixing issue
      #23 <https://github.com/pace-neutrons/Euphonic/issues/23>_
    • Fix NaN frequencies/eigenvectors for consecutive gamma points, see
      #25 <https://github.com/pace-neutrons/Euphonic/issues/25>_
    • Fix issue saving plots to file with dispersion.py, see
      #27 <https://github.com/pace-neutrons/Euphonic/issues/27>_
    • Fix incorrect frequencies at gamma point when using dipole correction
      in C, #45 <https://github.com/pace-neutrons/Euphonic/issues/45>_

v0.2.2

23 Jan 09:08
Compare
Choose a tag to compare
v0.2.2 Pre-release
Pre-release
  • Bug fixes:

    • Add MANIFEST.in for PyPI distribution

v0.2.1

23 Jan 08:17
Compare
Choose a tag to compare
v0.2.1 Pre-release
Pre-release
  • Bug fixes:

    • Cannot easily upload C header files to PyPI without an accompanying source
      file, so refactor C files to avoid this

v0.2.0

22 Jan 15:49
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release
  • There are several breaking changes:

    • Changes to the object instantiation API. The former interface
      InterpolationData(seedname) has been changed to
      ``InterpolationData.from_castep(seedname), in anticipation of more codes
      being added which require more varied arguments.
    • Changes to the Debye-Waller calculation API when calculating the structure
      factor. The previous dw_arg kwarg accepted either a seedname or length
      3 list describing a grid. The new kwarg is now dw_data and accepts a
      PhononData or InterpolationData object with the frequencies
      calculated on a grid. This is to make it clearer to the user exactly what
      arguments are being used when calculating phonons on the grid.
    • Changes to parallel functionality. The previous parallel implementation
      based on Python's multiprocessing has been removed and replaced by a
      C/OpenMP version. This has both better performance and is more robust. As
      a result the n_procs kwarg to calculate_fine_phonons has been
      replaced by use_c and n_threads kwargs.
  • Improvements:

    • The parallel implementation based on Python's multiprocessing has been
      removed and now uses C/OpenMP which both has better performance and is more
      robust
    • Documentation has been moved to readthedocs and is more detailed
    • Clearer interface for calculating the Debye-Waller factor
    • Better error handling (e.g. empty InterpolationData objects, Matplotlib
      is not installed...)
  • Bug fixes:

    • Fix gwidth for DOS not being converted to correct units
    • Fix qwidth for S(Q,w) broadening being incorrectly calculated