-
Notifications
You must be signed in to change notification settings - Fork 0
NCrystalInstall
Ants3 gives access to NCrystal library which enables simulations of thermal neutrons in crystals and other materials. The access is provided using the NCrystal-Geant4 interface.
NCrystal support in Ants3 is optional (not enabled by default). In order to enable it, the following steps have to be taken:
-
mkdir $HOME/NCrystal
-
cd $HOME/NCrystal
-
wget https://github.com/mctools/ncrystal/archive/refs/heads/main.tar.gz
-
tar xf main.tar.gz
-
rm -f main.tar.gz
-
optionally, to speed up compilation using more cores: export CMAKE_BUILD_PARALLEL_LEVEL=12
-
cd $HOME/NCrystal/ncrystal-main
-
cmake -S ./ncrystal_core -B ncrystal_build -DCMAKE_INSTALL_PREFIX=./ncrystal_install -DNCRYSTAL_ENABLE_DATA=EMBED
-
cmake --build ./ncrystal_build --target install --config Release
- add the following two lines:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/NCrystal/ncrystal-main/ncrystal_install/lib
export PATH=$PATH:$HOME/NCrystal/ncrystal-main/ncrystal_install/bin
- In g4ants3.pro and g4inspector.pro files, uncomment the following line by removing the starting '#' character:
CONFIG += ants3_NCrystal
- In QtCreator, using the "Build" menu, start "Run qmake" and then "Rebuild" for the g4ants3 and g4inspector sub-projects (if in doubts, recompile the entire project)
- Define at least one NCrystal material (Material window --> "Standard NCrystal material" composition option)
- Activate NCrystal physics (Particle simulation window --> Settings tab --> "Additional model for neutrons" box --> "NCrystal" option)