Nmrformd
NMRforMD is a python script for the calculation of NMR relaxation time T1 and T2 from molecular dynamics trajectory file.
Install / Use
/learn @simongravelle/NmrformdREADME
NMRforMD
<a href="webp"> <img src="docs/source/figures/logo/logo-b.png" align="right" width="30%"/> </a>Dipolar Nuclear Magnetic Resonance for Molecular Dynamics (NMRforMD) simulations is a Python toolkit designed for the computation of dipolar NMR relaxation times (the so called $T_1$ and $T_2$) from molecular dynamics simulations. Used in combination with MDAnalysis, NMRforMD allows for the analysis of trajectory files from any MDAnalysis-compatible simulation package, including LAMMPS and GROMACS.
Migration
This repository will progressively be migrated on here, and the most up-to-date page will be https://nmrdfrommd.github.io.
Documentation
Details about installation and use of NMRforMD are given in the documentation. The documentation also contains a description of the theory behind dipolar dipolar NMR calculations, as well as details on some common pitfalls of NMR calculations.
<p float="left"> <a href="https://nmrformd.readthedocs.io/en/latest/"> <img src="avatars/bulk-water.png" width="32%" /> </a> <a href="https://nmrformd.readthedocs.io/en/latest/"> <img src="avatars/lennard-jones-fluid.png" width="32%" /> </a> <a href="https://nmrformd.readthedocs.io/en/latest/"> <img src="avatars/lysozyme-in-water.png" width="32%" /> </a> </p>Figure: Examples of systems that can be analyzed using NMRforMD, from left to right: a bulk water system, a lennard-jones fluid, and a lysozyme in water.
Datasets
Two molecular dynamics datasets are available on Github. One is a polymer in water system generated using LAMMPS, the second is a water confined in silica generated using GROMACS. Both datasets are required to follow the tutorials provided in the documentation.
Warning
The code has mostly been tested in the case of 1H-NMR (i.e. spin 1/2). It is also important to keep in mind that NMRforMD only works for dipolar interaction, not quadrupolar interaction.
Known issues
For very large trajectory file, the code requires a lot of memory. The code is not adapted to triclinic box, convert your trajectory to orthorhombic prior to calculation. This code is still in development, please raise an issue here if you encounter another problem.
For developers
If you intend to make modification to the code, please raise an issue or send me an email first. Then, fork the repository, apply your changes, then make a pull request that will be reviewed.
Clone the repository with its submodules as follow:
git clone https://github.com/simongravelle/nmrformd.git --recurse-submodule
Find more instructions here.
Acknowledgments
This project has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 101065060.

Related Skills
claude-opus-4-5-migration
81.6kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
model-usage
331.7kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
TrendRadar
49.6k⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
mcp-for-beginners
15.6kThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
