Ncrystal

Latest version: v4.1.2

Safety actively analyzes 710445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 13

2.7.3

* Add missing import statement in ncrystal_hfg2ncmat (github issue 71).
* C++ API gets ekin2ksq and ksq2ekin utility functions.
* Cleanup the PointwiseDist utility class and add new sampleBelow and
commulIntegral utility functions
* Add new internal IofQHelper utility class which can be used to
implement elastic physics described via an I(Q) curve
* Fix some obscure -Wshadow warnings on some rare platforms when some
local variable named s or m clashes with global variables of the same
name from Geant4.

2.7.2

* Various compilation fixes, affecting only users of Geant4-hooks with
the most recent Geant4 release (10.07.p02) or users with the rather
outdated gcc 4.8.5 (github issue 69).

2.7.1

* Fix single crystal alignment bug which was inadvertantly introduced
among the many technical changes in release v2.5.0, essentially
swapping the meaning of crys: and crys_hkl: in the parts of the cfg
strings defining the crystal orientation.

2.7.0

* Introduce NCMAT v5 which two updates for the format, both meant to
facilitate modelling of amorphous (i.e. non-crystalline) solids.
Firstly, Debye temperatures can now be specified directly in DYNINFO
sections of vdosdebye type, meaning that such sections can now also be
used in non-crystalline materials where DEBYETEMPERATURE sections are
disallowed. Secondly, a new optional STATEOFMATTER section can be used
to explicitly indicate the state of matter if needed. If STATEOFMATTER
is not specified, materials with crystal structure or vdos curves are
assumed to be solids, otherwise the state will be undefined. Amorphous
solids will currently get both inelastic and elastic physics determined
from the VDOS curves - with coherent components approximated via the
incoherent approximation.
* Improve HKL plane initialisation code to make it 200% faster (i.e. a
factor of 3 speedup)! This was mostly achieved by using our own custom
sin+cos implementations, which are much faster than the standard ones,
but with no impact on precision. As a result, the heuristics picking a
default dcutoff value were updated so that structures with more than 40
atoms per unit cell now defaults to dcutoff=0.2Aa, as opposed to
dcutoff=0.25Aa before (the default value for other materials remain
dcutoff=0.1Aa).
* Add ncrystal_hfg2ncmat script for convenient production of NCMAT files
for hydrogen rich amorphous materials, based on concept and data from
Romanelli et. al. (2021), https://dx.doi.org/10.1088/1361-648X/abfc13
* Add ncrystal_onlinedb2ncmat script for creating materials with crystal
structure taken from online databases (materialprojects.org or
Crystallography Open Database). The script also has options for copying
material dynamics from existing .ncmat files, and for verifying that
NCMAT files containing comments containing specific links to entries in
these databases, actually contain those structure (by overlaying Bragg
cross section curves). Internally the script uses the Python Materials
Genomics (pymatgen) Python module to access the online databases.
* Add ncrystal_verifyatompos script for verifying that the list of
ATOMPOSITIONS in an .ncmat file is consistent with the indicated
SPACEGROUP number. Internally the script uses the Atomic Simulation
Environment (ASE) Python module to handle the symmetries.
* Add 16 new amorphous materials. Most are created with the
ncrystal_hfg2ncmat script: Epoxy_Araldite506_C18H20O3 Kapton_C22H10N2O5
Nylon11_C11H21NO Nylon12_C12H23NO Nylon610_C16H30N2O2
Nylon66or6_C12H22N2O2 PEEK_C19H12O3 Polycarbonate_C16O3H14
Polyester_C10H8O4 Polylactide_C3H4O2 Polypropylene_C3H6 Polystyrene_C8H8
PVC_C2H3Cl Rubber_C5H8. The material Polyethylene_CH2.ncmat is not
created with the ncrystal_hfg2ncmat script (although it could have
been), but is instead based on phonon DOS curves provided by Kemal Ramic
from the ESS Spallation Physics group, (based on modelling with Phonopy,
VASP and OCLIMAX software). Finally, AcrylicGlass_C5O2H8.ncmat
(a.k.a. "Plexiglass" or "Lucite"), is based on a VDOS curve used in
ENDF/B-VIII.0 due to Petersen, et. al. (NCSU)., as it gave a slightly
better fit to experimental data.
* Add CaSiO3_sg2_Wollastonite.ncmat. The main motivation for adding this
is that our library should contain at least one triclinic material, to
make sure we exercise all code paths. For now, the material does not
have VDOS curves and the dynamics are described via the Debye model.
* Thanks to work by K. Ramic and J. I. Marquez Damian from the ESS
Spallation Physics group under the HighNESS EU project, a massive number
(64) of new crystalline materials are added to the data library, which
along with the 16 new amorphous materials brings the number of material
files shipped with NCrystal to a whooping total of 131! Additionally,
VDOS curves were added for 4 existing materials so that now only two
crystalline materials (gamma-calcium and wollastonite) in the entire
library have dynamics based purely on the less accurate Debye model. The
64 new crystalline materials are mostly polyatomic materials of interest
to the wider community of nuclear scientists, neutronics, and neutron
scattering instrumentation. All these materials come fully described
with both crystal structures and phonon VDOS curves, and have been
carefully validated. Crystal structures are mostly taken from the
Crystallography Open Database and the Materials Project, with most
structures verified by verification against multiple DB entries (using
the ncrystal_onlinedb2ncmat script). The VDOS curves are mostly based on
calculations with Phonopy and OCLIMAX software with input files from the
Phonon database at Kyoto university
(http://phonondb.mtl.kyoto-u.ac.jp/). VDOS curves for two materials,
magnesium hydride (MgH2) and magnesium deuteride (MgD2), were provided
by Davide Campi and Marco Bernasconi from University of Milano-Bicocca,
based on DFPT calculations with the Quantum-ESPRESSO package. All
materials were validated against total cross section curves where
available, VDOS curves were verified to be in agreement with
experimentally measured heat capacity curves, predicted material
densities were verified to be in accordance with known densities, and
crystal symmetries were verified with the ncrystal_verifyatompos script.
* Files for a few existing materials (SiLu2O5, UO2, SiO2) were renamed for
consistency, and Crystallography Open Database reference numbers were
added for all existing crystalline files.
* Fixed bug where some hkl planes slightly above the d-spacing cutoff were
left out of the final calculated list. Cubic, tetragonal, and
orthorombic space groups were not affected by this bug, and since our
default d-spacing cut off value is rather low, the effect was in any
case unlikely to have affected many users.
* Fixed bug where some hkl planes could very rarely be left out in
crystals containing elements with negative coherent scattering
lengths. It is not believed to be likely that this bug has affected any
users, but a few of the new materials would have been affected.
* Updated calcium scattering lengths due to improved measurements,
Palomino et al. (2019), DOI:10.1016/j.nima.2019.02.072. This was
implemented as a modification of b_coh for natural Ca and the dominant
isotope Ca40, increasing the values of both b_coh parameters by roughly
23%.
* NCrystal.directMultiCreate now works with NCrystal.TextData objects.
* Improve wrapping and indentation in code produced by the Python
formatVectorForNCMAT utility function.
* Add --stdout option to ncrystal_vdos2ncmat for easier usage in scripts.
* Small fix for NCMAT parser which previously allowed multiple entries in
DENSITY section.
* Add unofficial mechanism for removing certain contributions when
expanding a VDOS to a scattering kernel. This is primarily intended to
allow people working on plugins with detailed coherent physics to avoid
double-counting by making it possible to exclude components otherwise
created based on the incoherent approximation. The mechanism is
implemented via the CUSTOM_ support in NCMAT data, and it should be
understood that files with such sections are always considered "under
development", and unlikely to be suitable for general usage.
* Expose VDOS analysis utilities from NCVDOSEval.hh to Python and C
interfaces. In Python this is available both as a global analyseVDOS
function, and as a member function in DI_VDOS objects. Return value is a
dictionary with quantities derived from the VDOS curve: Debye
temperature, mean-squared-displacements, effective temperature, etc.
* Rename Python crossSectionNonOriented method to crossSectionIsotropic
for consistency, keeping crossSectionNonOriented as a backwards
compatible alias.
* Fix python NCrystal.atomDB method where some situations of querying for
unknown isotopes would always result in an exception even when called
with throwOnErrors=False (github issue 65).
* Type safe VDOSEval::elementMassAMU in C++.
* Conversion from shared_obj<T> to pointer T* in C++ is made explicit to
avoid footgun "const Info* info = NC::createInfo(..)". The footgun is
still available for references (const Info& info = ...), but that is a
necessary tradeoff since the implicit conversion to a reference is so
useful when passing shared objects to functions taking reference
parameters.

2.6.1

* Workaround for numerical artifacts in inelastic cross sections arising
from low-granularity beta-grids. In practice this affected materials
which either used hard-coded low-granularity scattering kernel, or those
with phonon VDOS curves that had large empty regions (often the case for
hydrogen VDOS curves in materials with C-H bounds). The workaround for
external low-granularity kernels consists of a simple "thickening" of
the beta-grid, while the workaround for VDOS-based kernels consists in
modifying the beta-grid generation code to ensure points are inserted
into any large gaps in the single-phonon region.

2.6.0

* Introduce NCMAT v4 which introduces a few new features, as described in
detail in the ncmat_doc.md file. The most important new feature relies
on the fact that it is possible to estimate atomic
mean-squared-displacements directly from a phonon density of state
distribution (VDOS), meaning that it is now allowed (and actually
recommended) to skip DEBYETEMPERATURE's for crystalline materials where
atoms have VDOS curves available). This is not only useful, but improves
low-temperature reliability of the Debye-Waller factors used in the
elastic scattering components. This development was helped by Kemal
Ramic and Jose Ignacio Marquez Damian from the ESS Spallation Physics
group, and more details are available in the ncrystal GitHub issue
58. The other new feature in NCMAT v4 is a new optional syntax for the
CELL section, which allows more compact specification for certain
crystal systems (in particular cubic systems).
* The vast majority of crystalline materials in the NCrystal data library
were updated to take advantage of the new features, and in addition the
number of VDOS curves was increased dramatically, meaning that the
dynamics in almost all crystalline materials are now described using
actual VDOS curves rather than just Debye temperatures.
* Missing VDOS curves for all elements in beryllium-fluoride (BeF2),
aragonite (CaCO3), cuprite (Cu2O), periclase (MgO), and quartz (SiO2)
were provided by Kemal Ramic from the ESS Spallation Physics group,
based on modelling with Phonopy, VASP and OCLIMAX software.
* Missing VDOS curves for 14 mono-atomic materials were added (fixing
github issue 39): Au, Ba, Cr, Mg, Mo, Na, Nb, Pd, Pt, Rb, Sc, Sn, Y,
and Zn. Refer to comments in the individual NCMAT files for references
concerning the origin of these curves.
* Missing VDOS curves were added to uranium oxide (UO2), taken from
DOI:10.1103/PhysRevB.102.134312. Note that UO2 NCMAT files with VDOS
tuned for specific temperatures are available (refer to comments in the
UO2 NCMAT file for details).
* All existing files with VDOS have been update to NCMAT v4, and had
DEBYETEMPERATURE sections removed in order to benefit from the better
performance of getting the atomic displacements from the VDOS.
* Added new material: gamma-Iron (Fe_sg225_Iron-gamma.ncmat) with VDOS
curve. At the same time, the not particularly useful beta-Iron file was
removed, so the NCrystal data library now contains both alpha- and
gamma-iron, both with VDOS curves.
* Expose debyeIsotropicMSD and debyeTempFromIsotropicMSD functions from
NCDebyeMSD.hh header to C and Python, allowing conversions between
atomic mean-squared-displacement and Debye temperature.
* Improve robustness of the function debyeTempFromIsotropicMSD. Previously
the internally deployed root-finding algorithm could fail under some
scenarios (e.g. non-ultra cold rubidium).
* Various improvements for ncrystal_vdos2ncmat.
* Compilation fix for pre-Catalina OSX where the aligned_alloc function is
apparently missing.
* Fix bug where early calls to removeAllDataSources could get reverted by
subsequent plugin loading.
* Before defining macros in public headers, check if present already and
if so undefine.

Page 7 of 13

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.