Releases: mctools/ncrystal
Release list
NCrystal release 4.4.4
Small maintenance release which ensures consistent output across python versions of of cmdline script errors in case of invalid choices. This removes spurious test failures with Python 3.14. Likewise, Python 3.14 is now exercised in more CI tests.
Oldest supported Python version is still 3.8, but this is likely to be incremented soon.
Full Changelog: v4.4.2...v4.4.4
NCrystal release 4.4.2
This small release adds a single new function to the NCrystal C API: ncrystal_samplescatter_rs. This function is functionally similar to the existing ncrystal_samplescatter, except that the caller must also pass in a random number stream via the arguments. This thus ignores any RNG stream otherwise associated with the scatter process. For full flexibility, and to avoid forcing the caller to rely on global variables in their C code, the RNG stream is passed via a function pointer as well as a void-pointer to the RNG state. This function is in particular intended to enable proper sampling in McStas where each particle carries along its own specific RNG state. This will address github issue #354, once the new interface is also used in the McStas components.
Full Changelog: v4.4.0...v4.4.2
NCrystal release 4.4.0
This release brings support of a new strain cfg-string parameter, which can be used to easily model isotropic strain with a uniform expansion or contraction of crystal lattice vectors. If nonzero, crystal unit cell dimensions will be scaled with a factor of (1+strain), while keeping angles and relative atomic positions fixed. So for instance, "stdlib::Be_sg194.ncmat;strain=0.01" will cause the values of all lattice parameters (a, b, and c) to be increased by 1%. This in turn means that d-spacings of crystal reflections will also increase by 1%, but also structure factors (F^2) will be affected - although in a less regular fashion.
In addition to the support for strain, the release also brings a few other fixes and improvements. Most notably, the internal caching related to inelastic physics processes was much improved, with potential significant savings on material initialisation time or memory usage. For all the details of the release, refer to the CHANGELOG or the full code diff.
NCrystal release 4.3.4
Minor release addressing a few testing issues.
Full Changelog: v4.3.2...v4.3.4
NCrystal release 4.3.2
Small maintenance release with a few technical fixes as well as a fix for
Full Changelog: v4.3.0...v4.3.2
NCrystal release 4.3.0
NCrystal 4.3.0 : The MiniMC utility grows up
The NCrystal developers are proud to present a release in which the built-in "MiniMC" framework, is finally growing up. This framework allows doing simple simulations in which neutrons are propagated through a single convex volume and recorded as they come out. Although a small "toy" preview of the MiniMC framework was available in NCrystal since release 3.9.0, it is now much more feature complete and (hopefully) useful for a much wider range of use-cases. The MiniMC is included with NCrystal itself, and is intended to be accessed from either Python or via the new command-line tool ncrystal_minimc. It is intended as a light-weight alternative to using NCrystal in fully-fledged applications like McStas/OpenMC/..., and can be used to investigate properties of neutrons scattered in a particular material, including the effects of geometry and multiple scattering.
Here is an example of how to use the MiniMC in a Jupyter notebook:
Some MiniMC highlights
- Shapes available: box, sphere, cylinder, infinite slab, infinite cylinder.
- Sources geometries available: pencil beam, circular beam, isotropic.
- Source energy distributions available (in ekin or wavelength): Fixed, log-normal, uniform range, thermal (Maxwell).
- Pre-defined tally histograms: energy, q, wavelength, scatter angle, energy loss, scattering order, ...
- Flexible tallying via user (Numpy) code supported.
- JSON persistification supported.
- Focus on speed, typically filling tally histograms at above >10MHz. Relies on highly vectorized code and multithreading.
For more information about the MiniMC, please refer to the documentation in the wiki.
Other things in the release
In addition to the MiniMC, the release contains a slew of other updates and features. A few of the more noteworthy are listed here:
- A general speed-up of NCrystal processes related to cross section calculation and sampling of final state.
- All obsolete functions in the C API now emits a warning message if called.
- Introduction of a new command-line tool named just
ncrystal, which can be used to access the full suite of command-line tools (i.e. runncrystal cif2ncmat <args>instead ofncrystal_cif2ncmat <args>. - NCrystal code will no longer build on 32bit systems.
- Under the hood we have added a new "JSON query" mechanism to NCrystal, which is intended to make it a lot easier for NCrystal developers to export data available in the C++ layer to the Python or command-line APIs. This does not bring any user-visible features at this moment.
For the full details of what was changed in the release, refer to the CHANGELOG file or the Full diff: v4.2.12...v4.3.0
NCrystal release 4.2.12
Maintenance update which primarily fixes NCrystal CIF reading capability to work with spglib 2.7.0 which was released last week with breaking changes (this fixes #320). For now, we still support older spglib releases (back to 2.1.0).
Full Changelog: v4.2.10...v4.2.12
NCrystal release 4.2.10
Small maintenance release with just a single new feature: doInfo, doScatter, and doAbsorption flags in the NCMATComposer.load method (cf. #280).
Full Changelog: v4.2.8...v4.2.10
NCrystal release 4.2.8
Another tiny maintenance release which fixes a spuriously failing unit test.
Full Changelog: v4.2.6...v4.2.8
NCrystal release 4.2.6
This truly small update updates the dependency on endf-parserpy to work with (and now require) version 0.14.3 or later.
Full Changelog: v4.2.4...v4.2.6