python | ||
src | ||
.gitignore | ||
build.sh | ||
CITATION.cff | ||
CMakeLists.txt | ||
config.txt | ||
LICENSE | ||
main.py | ||
README.md |
Download
- Clone repository with
git clone https://gitea.pkm.physik.tu-darmstadt.de/NMRRWSims/cpp.git
- After download, change permissions of build.sh in terminal with
chmod a+x build.sh
Build
Running
Command line
To run a random walk simulation Execute rwsim
in the command line with
./rwsim /path/to/config.txt MotionModel DistributionModel --ste --spectrum -ARG1 1 -ARG2 2
It needs three positional arguments: the path to your basic configuration file (see below) and the names of the motional model and of the distribution of correlation times.
Set the optional arguments --ste
and/or --spectrum
to create Stimulated Echos or normal echo spectra, respectively.
You can overwrite any parameter given in the configuration file by adding it as optional argument with a numerical value, e.g. -TAU 1e-3
for a correlation time of 1 ms.
Configuration file config.txt
Change the values of delta, eta, mixing times, echo times,... in this file. If a paramter is defined multiple times, only the last one is used.
General parameter
This list of general parameter are necessary for all simulations:
Parameter | Description |
---|---|
num_walker | Number of trajectories |
delta | Anisotropy parameter in Hz |
eta | Asymmetry parameter |
Distribution of correlation times
Two distributions are available: A delta distribution Delta
, i.e. the same correlation time for every walker, and a log-normal distribution LogNormal
.
-
Parameters for delta distribution
Delta
Parameter Description tau Jump time in s -
Parameters for log-normal distribution
LogNormal
Parameter Description tau Maximum jump time of the distribution in s sigma Standard deviation of the distribution
Motion models
Four different jump models are implemented: Isotropic random jump RandomJump
, isotropic jump with a certain angle, isotropic jump with a bimodal distribution of angles, and a tetrahedral jump TetrahedralJump
.
-
Isotropic random jump
RandomJump
does not have additional parameters. -
Tetrahedral jump
TetrahedralJump
does not have additional parameters. -
Parameters for isotropic jump by an angle
IsotropicAngle
Parameter Description angle Jump angle in degree -
Parameters for isotropic jump with bimodal angle distribution
BimodalAngle
Parameter Description angle1 First jump angle in degree angle2 Second jump angle in degree probability1 Probality that jump has angle1 (0-1)
Running
Because filenames are always the same, previous simulations and results are overwritten!
- Execute
build.sh
(in terminal with./build.sh
). It compiles the source code and executes test.py