/dnpsoup

A numerical simulation software for dynamic nuclear polarization

Primary LanguageC++BSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

DNPSOUP

CircleCI

Dynamic Nuclear Polarization Simulation Optimized with a Unified Propagator

DNPSOUP let users simulate field profiles without preparing a single equation. It gives insights about polarization enhancement on nuclei(s) due to the presence of electron(s) and EM radiations, with or without Magic Angle Spinning (MAS).

DOI: 10.1016/j.jmr.2021.107107

please email yangcnju@gmail for questions or suggestions.

Graphical User Interface for Input Preparation

dnpsoup_gui is a graphical user interface that helps generating simulation inputs:

https://github.com/cyang019/dnpsoup_gui


Table of Contents


Background Knowledge

Nuclear Magnetic Resonance (NMR)

NMR is an analytical chemistry technique that utilizes a high field magnet to measure molecular or atomic structures.

Dynamic Nuclear Polarization (DNP)

DNP relies on the transfer of electron polarization (typically from an organic based exogenous radical) to neighboring nuclei offering significant gains in sensitivity.

Getting Started for Linux and MacOS

Download

git clone --recursive https://github.com/cyang019/dnpsoup.git

Prerequisites

  • c++ compiler that supports c++17 features
  • cmake version 3.14.7 and above

Install Dependencies

Ubuntu

sudo apt-get update
sudo apt-get install -y g++ git cmake ninja-build libopenblas-dev liblapacke-dev libpthread-stubs0-dev gfortran libatlas-base-dev

Manjaro Linux

sudo pacman -Syu clang cmake ninja git openblas lapacke

MacOS

Install xcode and homebrew

# homebrew
brew install cmake ninja git

Build

# can put this line in .bashrc
export OMP_NUM_THREADS=1

# in the root directory of dnpsoup
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release
ninja

# test if build was succesful
./tests/test_dnpsoup_core

Usage

To execute dnpsoup:

# in the root directory of dnpsoup
./build/dnpsoup_cli/dnpsoup_exec [input json file path] [output file path]

Getting Started for Windows

Prerequisites

Download and Compile

  1. Open Git Bash, browse to a desired folder,
git clone --recursive https://github.com/cyang019/dnpsoup.git
  1. Open Visual Studio, on the menu bar, File->Open->Folder... to open the dnpsoup folder. Within the Solution Explorer - Folder View, right click on the CMakeLists.txt in the root directory of the project to build.

  2. Open the Developer Command Prompt for VS <version number>, browse to <dnpsoup_folder>\out\build\x64-Release or x64-Debug\out, the executable dnpsoup_exec.exe should locate here.

Examples

Input JSON File Example

{
  "spinsys": {
    "euler": {
      "alpha": 0.0,
      "beta": 0.0,
      "gamma": 0.0
    },
    "interactions": [
      {
        "entries": {
        },
        "name": "csa/shielding/hyperfine/dipole/scalar"
      }
    ],
    "spins": {
      "spin-id": {
        "type": "e/H1/C13 etc",
        "x": 0.0,
        "y": 0.0,
        "z": 0.0,
        "t1": 1.0e-3,
        "t2": 1.0e-6
      }
    }
  },
  "pulseseq": {
    "name": "name of the pulse sequence",
    "components": {
      "emr-name": {
        "channel-name": {
          "frequency": 1.0e6,
          "offset": 0.0,
          "phase": 0.0
        }
      }
    },
    "increment": 1.0e-9,
    "sections": {
      "section-name": {
        "names-within-section": [
          "name1"          
        ],
        "params": {},
        "size": 100,
        "type": "section-type"
      }
    },
    "sequence": [
      "section1", "section2", "section3"
    ]
  },
  "settings": {
    "euler": {
      "alpha": 0.0,
      "beta": 0.0,
      "gamma": 0.0
    },
    "ncores": 1,
    "acq": "H1",
    "Magnet": {
      "b0": 9.4
    },
    "Gyroton": {
      "em_frequency": 263.0e9
    },
    "Probe": {
      "mas_frequency": 0.0,
      "temperature": 77.0,
      "mas_increment": 1e-5
    },
    "task": "FieldProfile",

    "other-task-related-entries"
  }
}

Authors

Chen Yang, Kong Ooi Tan, and Robert G. Griffin

Citing DNPSOUP

Yang, C., Tan, K. O., & Griffin, R. G. (2021). DNPSOUP: A simulation software package for dynamic nuclear polarization. Journal of Magnetic Resonance, 107107. DOI: 10.1016/j.jmr.2021.107107

Acknowledgements

  • The authors would like to thank Prof. Sheetal Kumar Jain for initial discussions and encouragement on creating a separate simulation package.
  • The authors would also like to thank Dr. Kan-Nian Hu for discussions on cross effect, and Dr. John Wright for computational resources of PSFC at MIT.
  • Chen Yang thanks Professor Leonard Mueller for introducing him to solid-state NMR and product operators.
  • Chen Yang also thanks his family for support, and Mr. Xiang Gao for his suggestions on debugging frontend javascript code.

Fundings

Links

License

BSD-3-Clause License