forked from highness-eu/TSL_School
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·93 lines (78 loc) · 2.47 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env bash
#
# Install NCrystal and OpenMC in a conda environment in Ubuntu/Mint/etc distros
#
# Install prerequisites
# sudo apt install -y git g++ cmake libhdf5-dev libpng-dev curl xcrysden
# sudo apt install -y --no-install-recommends libfftw3-dev quantum-espresso
# sudo apt install -y gfortran
# sudo apt install -y emacs-gtk mc nedit vim mousepad evince gnumeric
#
# curl --output anaconda.sh https://repo.anaconda.com/archive/Anaconda3-2023.03-Linux-x86_64.sh
# chmod +x anaconda.sh
# ./anaconda.sh
cd ~/
# Clone and write protect NCrystal notebooks repo
git clone https://github.com/mctools/ncrystal-notebooks.git
find ~/ncrystal-notebooks/ -type d -execdir chmod ugo-w {} \;
# Create installation directory
mkdir tsl_software
cd tsl_software
conda create -y --name tsl_env python=3.9
source ~/anaconda3/etc/profile.d/conda.sh
conda activate tsl_env
conda install -y pip jupyterlab
conda install -y -c conda-forge pyside2
# Install NCrystal
git clone https://github.com/mctools/ncrystal.git
cd ncrystal
git checkout develop
cd ..
mkdir build_ncrystal
cd build_ncrystal
cmake ../ncrystal -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DNCRYSTAL_BUILTIN_PLUGINS="XuShuqi7:MagScat::main;highness-eu:SANSND::main"
make -j 2
make install
source $CONDA_PREFIX/setup.sh
export LD_LIBRARY_PATH=
ncrystal_inspectfile --test
cd ../
# Install MCPL
git clone https://github.com/mctools/mcpl.git
mkdir build_mcpl
cd build_mcpl
cmake ../mcpl -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
make -j 2
make install
cd ../
# Install OpenMC
git clone --recurse-submodules https://github.com/openmc-dev/openmc.git
cd openmc
# git checkout develop
git checkout 6561838 # Do not update after May 15th.
cd ../
mkdir build_openmc
cd build_openmc
cmake ../openmc -DOPENMC_USE_NCRYSTAL=on -DOPENMC_USE_MCPL=on -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
make -j 2
make install
cd ../openmc
pip install .
python -c "import openmc; print(openmc.Material.from_ncrystal('Al_sg225.ncmat'))"
cd ../
pip install openmc-plotter
pip install ipympl matplotlib spglib gemmi ase pymatgen cif2cell
conda install -y -c conda-forge pyne
# Install NJOY
git clone https://github.com/highness-eu/NJOY2016.git
cd NJOY2016
git checkout 2016.61_njoyncrystal
cd ../
mkdir build_njoy
cd build_njoy
cmake ../NJOY2016/ -DNJOY_NCRYSTAL=True -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
make -j 2
make install
cd ..
# Install OpenMC data (ENDF/B-VIII.0 library)
wget -O endf8.xz https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz && tar -xJf endf8.xz