Go to file
2024-11-28 14:50:26 +01:00
python added flexibility 2024-11-28 14:50:26 +01:00
src added flexibility 2024-11-28 14:50:26 +01:00
.gitignore added flexibility 2024-11-28 14:50:26 +01:00
build.sh added flexibility 2024-11-28 14:50:26 +01:00
CITATION.cff set motion parameters together via map 2024-11-10 15:52:54 +01:00
CMakeLists.txt added flexibility 2024-11-28 11:07:44 +01:00
config.txt added flexibility 2024-11-28 14:50:26 +01:00
LICENSE add README.md 2024-11-04 19:39:53 +01:00
main.py added flexibility 2024-11-28 14:50:26 +01:00
README.md added flexibility 2024-11-28 14:50:26 +01:00

Download

  1. Clone repository with git clone https://gitea.pkm.physik.tu-darmstadt.de/NMRRWSims/cpp.git
  2. 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!

  1. Execute build.sh (in terminal with ./build.sh). It compiles the source code and executes test.py