Skip to main content

Morrigan

License Docs codecov Unit Tests Integration Tests

Morrigan is the protoplanet accretion module of the PROTEUS coupled atmosphere-interior evolution framework. It follows a system of protoplanets, the planetary embryos of the post-disk stage, through the giant impacts and gravitational scattering by which they accrete, tracking how each collision changes the masses and orbits of the bodies that survive. It implements the semi-analytical Monte Carlo model of Kimura et al. (2025).

Named after Morrigan, a shapeshifting figure from Irish mythology thought to represent the dynamical nature of existence.

Installation

git clone git@github.com:FormingWorlds/Morrigan.git
cd Morrigan
pip install -e .

Running a model

Settings live in a .toml file; initialise.toml in the repository root is a worked example covering the number of systems, the embryo masses, the stellar mass, and how long to evolve for.

morrigan -c initialise.toml

Keeping several settings files side by side and pointing at whichever you want is the reason for the -c flag. The repository ignores *.toml apart from initialise.toml, so a settings file you want to keep alongside the results it produced has to be added to git explicitly.

Results are written under the save_directory named in the settings file. A relative save_directory is taken from the directory you run the command in, not from wherever the settings file happens to live, so the run prints the full path it is writing to:

Path Contents
data/full_systems/ State of every planet through time
data/mergers/ One row per collision: the bodies involved and the collision velocity
data/survivors/ Final mass, orbit, and eccentricity of each surviving planet
batch_summary.csv Runtime and surviving-planet count for each system

To plot the results of a run, point the plotting script at the same settings file:

pip install -e ".[plot]"
python plot.py -c initialise.toml

plot.py is a script kept in the repository rather than part of the installed package, so it is run from a checkout. Its plotting dependencies (matplotlib, scipy) are in the plot extra, which keeps them out of the way of anything that only wants to import the model.

Documentation

The full documentation, including the model physics, the PROTEUS coupling contract, and the per-source validation anchors, lives at proteus-framework.org/Morrigan. Build it locally with pip install -e ".[docs]" and zensical serve.

Testing

pip install -e ".[develop]"
pytest -m "(unit or smoke) and not skip"

The suite is tiered (unit and smoke on every pull request, seed-ensemble statistics nightly) and every physics routine is pinned against a published value, an analytical limit, or a cross-implementation check; see the documentation's testing guide for the full contract.

Reproducibility

Each system's seed is mixed from random_seed in the settings file and the system's own index, so a given settings file reproduces the same systems exactly and two ensembles with neighbouring seeds are independent of each other.

Metadata

Release files for fwl-morrigan 26.10.23

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

Source distribution (sdist)

Source distribution for fwl-morrigan 26.10.23
File Size Uploaded Provenance
fwl_morrigan-26.10.23.tar.gz 854.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fwl-morrigan 26.10.23
File Interpreter ABI Platform
fwl_morrigan-26.10.23-py3-none-any.whl Python 3 none any Details

Total release size: 893.5 kB

Release files / fwl_morrigan-26.10.23.tar.gz

Download URL fwl_morrigan-26.10.23.tar.gz
Size 854.3 kB
Tags Source
SHA-256 checksum
How to use checksums
94319ee4ff4edccc7c63ea6b24ae0218f2cfe7ca3dfa984cf8761762b5f5ae4c
BLAKE2b-256 checksum
How to use checksums
bbdbb8d65d0d322bbae0525f3da3fc13614e9008bbb0065392ab978457a613bb
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 Oct 23, 2026.

Transparency log

Release files / fwl_morrigan-26.10.23-py3-none-any.whl

Download URL fwl_morrigan-26.10.23-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13f6fcf09afc380ae1b9d8093f21149c1f296eeb34bc2756ca36e089fad25899
BLAKE2b-256 checksum
How to use checksums
8fe31de46d0333d8146bd793d7cc9c41c93729361915b68f589c4e5a00fa169c
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 Oct 23, 2026.

Transparency log

Security for fwl-morrigan 26.10.23

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fwl_morrigan-26.10.23.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 Oct 23, 2026.

Transparency log

A 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.

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