NuclearMatter-Backend (nmbackend)
An open-source research toolkit for neutron-star equations of state (EOS),
stellar structure, tidal deformability, and EOS inference. The JAX core combines
nuclear models and imported tables with an adaptive TOV solver and selected
automatic-differentiation paths. It extends the preliminary EOS tooling in RIFT's
EOSManager.py and provides implemented RIFT adapters and sequence I/O.
Status: v0.4.0, research software. Capabilities have different validation and differentiation coverage; inclusion does not establish precision-inference readiness. Start with the documentation index, capability guide, and validation guide.
Capabilities
- EOS families: nuclear empirical-parameter metamodel with causal tail; nonlinear RMFT (GM1), density-dependent RMF (DD2/DDME2), standard/extended Skyrme (SLy4/BSkG3), polytropes, Maxwell hybrid transitions, CompOSE/simple tables and MUSES-CMF CSV readers, with crust and lepton/composition utilities.
- Structure and tides: adaptive diffrax TOV-in-enthalpy, Love numbers and M–R–Λ families; explicit hybrid tidal junctions and an independent radius-domain SciPy reference. Twin-star handling remains limited (see below).
- Priors and inference: constrained Brownian-bridge EOS draws, PCA sequence compression and Gaussian coefficient-prior tools; fixed-mass and maximum-mass sensitivities, Fisher forecasts, density-tagged laboratory likelihoods and published merger-ejecta fitting families with uncertainty estimates.
- RIFT workflows:
EOSConcreteNMB, native tabular and PCA sequences, and legacy Landry-format export. A recorded RIFT CIP smoke test establishes plumbing, not science-grade per-EOS evidence: its 12-EOS input was remapped against an interpolant indexed for 10,000 EOS. See RIFT integration. - Rotation and cooling interfaces: pinned external RNS equilibrium runner and tabulated-EOS adapter, external NSCool driver, and separate JAX thermal transport on frozen backgrounds. RNS/NSCool are not bundled; these paths do not establish a fully coupled rotating-star cooling model. See rotation and thermal limits.
Integration boundaries: gwkokab is a planned adapter, despite an optional package dependency. MUSES supplies out-of-band EOS tables/reference targets; it is not an integrated inference dependency.
Install and quickstart
Use a project-local environment (Python ≥3.9; core dependencies include NumPy, SciPy, JAX, diffrax and PyYAML):
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
python examples/quickstart.py
# Optional test dependencies and suite:
python -m pip install -e '.[test]'
python -m pytest
For the heavier validation environment and optional references, see installation and environment notes.
from nmbackend.eos import MetaModelEOS
from nmbackend.tov import build_family, m_max, radius_of_mass, lambda_of_mass
from nmbackend.adapters import EOSConcreteNMB
model = MetaModelEOS()
params = dict(K_sat=230., E_sym=32., L_sym=60., cs2_tail=0.4)
family = build_family(model.eos_table(params))
print(m_max(family), radius_of_mass(family, 1.4), lambda_of_mass(family, 1.4))
eos = EOSConcreteNMB(model, params) # RIFT-compatible single-EOS interface
Differentiation and branch limits
Use forward mode (jax.jacfwd, jax.jvp) for supported EOS/TOV sensitivities.
Reverse mode is supported for structure-only solves (tidal=False); reverse mode
through the tidal variable is not recommended. First derivatives in central
enthalpy are supported, but second derivatives in central enthalpy or EOS
parameters are not. Accuracy depends on tolerance, EOS representation and
transitions; the physics guide records the current node/jump
handling and derivative caveats. Fixed-mass sensitivities use the implicit-function
theorem rather than coarse family interpolation; see inference.
build_family/single-EOS adapters do not yet provide complete disconnected
(twin-star) branch handling. RIFT sequence scalar accessors and legacy export
retain the primary stable rising branch; sequence branch counts let callers detect
and reject or route multi-branch EOS. They do not marginalize over all branches.
Validation evidence and remaining work
The repository records internal comparisons against an independently implemented radius-domain SciPy solver, including <0.1% M/R/Λ agreement for the documented smooth/hybrid cases. Hybrid references sharing the same junction formula check integration consistency; the smeared-transition limit separately checks the sign. October 2026 interpolation/tidal fixes and their table-specific results are recorded in the physics guide.
The initial ~200 m RePrimAnd radius mismatch is historical: the later surface/interpolation report records ~3–10 m in R and <0.1% in Λ against RePrimAnd 1.7 for the compared cases. That dated result is separate from the internal SciPy comparison and is not a comprehensive accuracy certification of today's entire model/parameter space. External-reference coverage, convergence, crust systematics and disconnected branches remain work items. See the evidence and limits, validation plan, and roadmap.
Scientific credit and license
MIT-licensed, by R. O'Shaughnessy and the RIT CCRG nuclear-matter group. ATTRIBUTION.md distinguishes independently implemented methods, reused data and optional external software; external licenses remain separate. Data products we generate and archive (for example on Zenodo) are released under CC-BY-4.0. Third-party data shipped here keep their own licenses, listed in ATTRIBUTION.md. Foundations include Margueron, Hoffmann Casali & Gulminelli's metamodel (I, II), Hinderer's tidal calculation, Damour & Nagar, and laboratory constraints from Huth et al. and Tsang et al..
Metadata
Release files for nmbackend 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nmbackend-0.4.0.tar.gz | 291.1 kB | With provenance | Details for nmbackend-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nmbackend-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for nmbackend-0.4.0-py3-none-any.whl |
Total release size: 526.4 kB
Release files / nmbackend-0.4.0.tar.gz
| Download URL | nmbackend-0.4.0.tar.gz |
|---|---|
| Size | 291.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d20ee213495c33a9af9000d6b02928a5ba892f11029cdeb8681c930ae3d27ec4
|
|
BLAKE2b-256 checksum How to use checksums |
4c55199a2e819400e87ab9057e8e82bbb875725fa145487645b34112332e0a54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logRelease files / nmbackend-0.4.0-py3-none-any.whl
| Download URL | nmbackend-0.4.0-py3-none-any.whl |
|---|---|
| Size | 235.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f427eda57aa9da23633e857ff81f2ebe3fccc1ebcf2a20099ad3bd3a01cbbcda
|
|
BLAKE2b-256 checksum How to use checksums |
b7fcce90d4cba35e1d81098a20768363ef8894183d4d793110256df163d05c57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logSecurity for nmbackend 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for nmbackend-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.