-
Notifications
You must be signed in to change notification settings - Fork 18
Get NCrystal
There are various manners in which one might acquire NCrystal. We mention a few on this page. No matter how you get it, proceed to the After installation, you are ready to Using-NCrystal page afterwards.
NCrystal is available in the conda-forge channel, for instance via the command:
conda -c conda-forge ncrystal
This should give you a fully-functional NCrystal release.
NCrystal is also available on PyPI, so it can be installed via the command:
python3 -mpip install ncrystal
Again, this should give you a fully-functional NCrystal release. The one exception is that the NCrystal CMake files are not automatically found by downstream CMake-based projects. To make it work, one must add the path returned by the command ncrystal-config --show cmakedir
to the CMAKE_PREFIX_PATH
environment variable, or alternatively embed this logic inside the downstream CMake files. This can for instance, be done by replacing a simple find_package(NCrystal REQUIRED)
statement with the following slightly more elaborate code which cause CMake to query the ncrystal-config
command for the appropriate NCrystal_DIR
setting:
execute_process( COMMAND ncrystal-config --show cmakedir
OUTPUT_VARIABLE NCrystal_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE )
find_package(NCrystal REQUIRED)
First step in installing NCrystal is to download the source distribution. Most users should simply download the latest release from this page as a tar-ball or zip-file which must then be unpacked. It is of course also possible to simply clone the github repository. We are always very careful to ensure that the HEAD of the master branch is always containing the lastest recommended release.
Please refer to the instructions in the INSTALL file which comes with the source distribution. Note that most users will need CMake installed (v3.10 or later), a C/C++ compiler with C++11 support, and Python (v3.6+ or later) in order to proceed.
Some users will get NCrystal available along with their other software. Most notably, the McStas releases on non-Windows platform often include an NCrystal installation in the $MCSTAS
directory. To enable it, source the setup.sh
script found therein (note: it might be eventually by moved to a different folder or renamed to ncrystal-setup.sh or something similar). Once you have found it, sourced it by typing e.g. . $MCSTAS/share/NCrystal/setup.sh
in a terminal.
Home
Get NCrystal
Using NCrystal
Data library
Cfg string parameters
Included physics
NCMAT format
Plugins (how to use)
Plugins (how to develop)
Release 2.0.0 announcement
Release 2.1.0 announcement
Release 2.5.0 announcement
Release 2.7.0 announcement
Release 3.0.0 announcement
Release 3.1.0 announcement
Release 3.2.0 announcement
About
Contact