Metadata-Version: 2.4
Name: DarkNewt
Version: 0.2.0
Summary: Tolman-Oppenheimer-Volkoff modelling of dark-matter admixed neutron stars
Author: Samanwaya Mukherjee
License: MIT License
        
        Copyright (c) 2026 Samanwaya Mukherjee
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://gitlab.com/samanwaya-mukherjee/darknewt
Project-URL: Repository, https://gitlab.com/samanwaya-mukherjee/darknewt
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: scipy>=1.9
Requires-Dist: tqdm>=4.60
Requires-Dist: matplotlib
Dynamic: license-file

# DarkNewt

<p align="center">
  <img src="assets/darknewt_logo.png" alt="darknewt logo" width="220">
</p>

<p align="center">
  <b>Tolman–Oppenheimer–Volkoff modelling of dark-matter admixed neutron stars</b>
</p>

<p align="center">
  <a href="https://pypi.org/project/darknewt/">
    <img src="https://img.shields.io/pypi/v/darknewt.svg" alt="PyPI version">
  </a>
  <a href="https://gitlab.com/samanwaya-mukherjee/darknewt">
    <img src="https://img.shields.io/badge/source-GitLab-black.svg" alt="GitLab">
  </a>
  <img src="https://img.shields.io/badge/python-%3E%3D3.10-blue.svg" alt="Python">
  <img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License">
</p>

---

## Overview

**DarkNewt** is a Python package for modelling compact stars containing nuclear matter and dark matter using the Tolman–Oppenheimer–Volkoff (TOV) equations.

The package can be used to calculate:

- Mass–radius relations of neutron stars
- Pure nuclear-matter neutron-star sequences
- Two-fluid nuclear-matter + dark-matter configurations
- Individual nuclear-matter and dark-matter masses
- Individual fluid radii
- Total stellar mass and radius
- Dimensionless tidal deformability
- Mass–tidal-deformability relations
- Configurations at fixed dark-matter mass fraction

The package is designed primarily for research and exploratory work in neutron-star and gravitational-wave physics.

---

## Installation

### From PyPI

```bash
pip install darknewt
```
### Install from source

Quickest way is this:

```bash
pip install git+https://gitlab.com/samanwaya-mukherjee/darknewt.git
```

## Features

### Equation of state

`darknewt` provides a common EOS interface supporting both tabulated and analytic equations of state.

Built-in nuclear-matter EOS tables include, among others:

- APR4
- AP1
- AP3
- MPA1
- MS1
- H1
- H4
- SLy

Several Bose–Einstein condensate (BEC) dark-matter EOS tables are also included.

User-supplied EOS tables can be loaded from a file containing:

```text
density [g/cm^3]    pressure [dyn/cm^2]
```
## Project structure
```
darknewt/
├── assets/
│   └── darknewt_logo.png
├── darknewt/
│   ├── __init__.py
│   ├── constants.py
│   ├── love.py
│   ├── solver.py
│   ├── tov.py
│   ├── utils.py
│   └── eos/
│       ├── __init__.py
│       ├── base.py
│       ├── models.py
│       └── eos_data/
│           ├── AP1.txt
│           ├── ...
├── examples/
│   └── test.py
├── README.md
├── LICENSE
└── pyproject.toml
```

