Skip to main content

SimPYson: A Pythonic Interface for SIMPSON

DOI Python - Version PyPI - Version

SimPYson is a Python package that makes it easier to work with SIMPSON, a code for simulating solid-state NMR experiments. It handles preparing input files from DFT calculations, running simulations, and reading results — all from Python.

Features

  • Run SIMPSON simulations from Python: Use simulate_spectrum() for smart defaults or SimpCalc for full control over spin systems, pulse sequences, and output.
  • Convert DFT data to SIMPSON input files: Prepare spin systems from CASTEP, Quantum Espresso, and VASP calculations via ASE and Soprano.
  • Read SIMPSON output files: Load .spe, .fid, .xreim, and .csdf files into a unified Simpy object with automatic FID↔spectrum conversion and ppm scaling.
  • Pulse sequence templates: Built-in templates for no-pulse, 90° pulse, and CPMAS experiments. Custom Tcl sequences are also supported.
  • Graphical User Interface: Launch with simpyson gui to inspect and process spectra without any coding.

Quick Start

Read a SIMPSON output file:

from simpyson import read_simp

data = read_simp("ethanol.spe", b0="400MHz", nucleus="1H")
print(data.ppm['ppm'])   # ppm axis, auto-calculated
print(data.spe['hz'])    # Hz axis

Accessing .fid on a spectrum file (or .spe on a FID) triggers automatic conversion via FFT — no manual processing needed.

Simulate a spectrum directly from Python:

from simpyson import simulate_spectrum

spinsys = """
channels 13C
nuclei 13C 13C
shift 1 10p 0 0 0 0 0
shift 2 50p 0 0 0 0 0
"""

result = simulate_spectrum(spinsys, proton_frequency=400e6, spin_rate=10000)
print(result.ppm['ppm'])

simulate_spectrum() automatically estimates the spectral width and carrier offset from the chemical shifts. For full control over all parameters, use SimpCalc directly — see the documentation.

Installation

pip install git+https://github.com/nuts-org/simpyson.git

Requires Python ≥ 3.10 and a working SIMPSON installation for running simulations.

Documentation

Full documentation and tutorials are available at nuts-org.github.io/simpyson.

Planned Features

  • Additional pulse sequence templates for more complex NMR experiments.
  • Broader support for DFT codes — suggestions welcome.

Metadata

Release files for simpyson 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simpyson 0.2.0
File Size Uploaded
simpyson-0.2.0.tar.gz 47.4 kB Details

Release files / simpyson-0.2.0.tar.gz

Download URL simpyson-0.2.0.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e3201bf269ae3373ae2cb9424baedd456de6ba949d9c03b025f5e756849005a9
BLAKE2b-256 checksum
How to use checksums
d2e5409d8adffabf8f29af3266016b084de83985428ef77e3af28afc4c29ec64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page