Skip to content
Thomas Kittelmann edited this page Sep 20, 2021 · 35 revisions

NCrystal : a library for thermal neutron transport in crystals

NCrystal is a library and associated tools which enables calculations for Monte Carlo simulations of thermal neutrons in crystals and other materials, supporting a range of physics including both coherent, incoherent, elastic and inelastic scatterings in a wide range of materials, including powders, mosaic single crystals, layered single crystals and liquids.

Written in C++, interfaces and infrastructure facilitate integration into existing simulation frameworks such as Geant4 or McStas, as well as allowing direct usage from C++, C or Python code or via command-line tools. While the C++ library is designed with a high degree of flexibility in mind for developers, typical end-user configuration is deliberately kept simple and uniform across various applications and APIs. This allows tuning and validation of a particular crystal setup to be performed in one tool before it is then deployed in another, or it allows simulations in multiple frameworks to deploy the same materials.

NCrystal comes with a set of validated data files, including many materials important at neutron scattering facilities. For more information, visit the data library.

Supporting compilation with C++11 or later standards, the code has no third-party dependencies and is available under a highly liberal open source license (Apache 2.0).1 It was developed in close collaboration by Xiao Xiao Cai (formerly DTU and ESS, now CSNS) and Thomas Kittelmann (ESS) and was supported in part by the European Union’s Horizon 2020 research and innovation programme under grant agreement No 676548 (the BrightnESS project) and 951782 (the HighNESS project).

More details about the NCrystal library and framework can be found in the detailed Open Access publications (for citing details, see the About page):

Note that the first publication above concerns NCrystal v1.0.0. The NCrystal v2.0.0 release brought changes to inelastic physics and configuration strings, which are discussed on the Announcement-Release2.0.0 page. After that, NCrystal v2.1.0 brought additional features including flexible atomic definitions, discussed on the Announcement-Release2.1.0 page. Next, the most notable feature of the NCrystal v2.2.0 release, was the introduction of plugin support as discussed on the Plugins page. After that, the NCrystal v2.5.0 release brought a major technical upgrade concerning modern C++, multi-thread safety, and more as discussed on the Announcement-Release2.5.0 page. Then, NCrystal v2.6.0 essentially obsoleted usage of Debye temperatures for materials with phonon density curves, and also saw the addition of such curves to almost all crystalline materials in the standard data library. Most recently, the NCrystal v2.7.0 release introduced support for amorphous materials and greatly increased the size of the materials data library as discussed on the page.

[1]: For details refer to the files NOTICE and LICENSE.