Skip to content

Instantly share code, notes, and snippets.

@yomichi
Last active March 26, 2024 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yomichi/db87e96b6b783243db570d3b70bc2357 to your computer and use it in GitHub Desktop.
Save yomichi/db87e96b6b783243db570d3b70bc2357 to your computer and use it in GitHub Desktop.
Install 2DMAT and solvers (sim-trhepd-rheed and sxrdcalc) in MALIVE! (Debian)
#!/bin/bash
# Install 2DMAT and solvers (sim-trhepd-rheed and sxrdcalc) in MALIVE! (Debian)
## Install py2dmat and dependences
sudo apt -y update
sudo apt -y install python3-tk libgsl-dev eog
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install py2dmat[all]
## Make working directory "2DMAT" under the home directory
## NOTE: OLD ~/2DMAT directory will be removed
cd
rm -rf 2DMAT
mkdir 2DMAT
cd 2DMAT
## Download 2DMAT repository including sample files
git clone https://github.com/issp-center-dev/2DMAT
## Install sim-trhepd-rheed
git clone http://github.com/sim-trhepd-rheed/sim-trhepd-rheed
cd sim-trhepd-rheed/src
make
## Install sxrdcalc
cd $HOME/2DMAT
git clone http://github.com/sxrdcalc/sxrdcalc
cd sxrdcalc/
make
## test for sim-trhepd-rheed + bayes
cd $HOME/2DMAT/2DMAT/sample/sim-trhepd-rheed/single_beam/bayes
cp $HOME/2DMAT/sim-trhepd-rheed/src/*.exe ./
sh do.sh
## test for sxrdcalc + minsearch
cd $HOME/2DMAT/2DMAT/sample/sxrd/minsearch
cp $HOME/2DMAT/sxrdcalc/sxrdcalc ./
python3 ../../../src/py2dmat_main.py input.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment