otter-hed 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- otter_hed-0.2.1/CHANGELOG.md +65 -0
- otter_hed-0.2.1/CITATION.cff +33 -0
- otter_hed-0.2.1/CONTRIBUTING.md +58 -0
- otter_hed-0.2.1/LICENSE +28 -0
- otter_hed-0.2.1/MANIFEST.in +14 -0
- otter_hed-0.2.1/PKG-INFO +231 -0
- otter_hed-0.2.1/README.md +198 -0
- otter_hed-0.2.1/SECURITY.md +14 -0
- otter_hed-0.2.1/THIRD_PARTY_NOTICES.md +68 -0
- otter_hed-0.2.1/pyproject.toml +75 -0
- otter_hed-0.2.1/setup.cfg +4 -0
- otter_hed-0.2.1/src/otter/__init__.py +45 -0
- otter_hed-0.2.1/src/otter/_version.py +8 -0
- otter_hed-0.2.1/src/otter/data/__init__.py +13 -0
- otter_hed-0.2.1/src/otter/data/elements.py +233 -0
- otter_hed-0.2.1/src/otter/data/helpers.py +131 -0
- otter_hed-0.2.1/src/otter/electronic/__init__.py +31 -0
- otter_hed-0.2.1/src/otter/electronic/continuum/__init__.py +32 -0
- otter_hed-0.2.1/src/otter/electronic/continuum/hybrid.py +124 -0
- otter_hed-0.2.1/src/otter/electronic/continuum/ideal.py +125 -0
- otter_hed-0.2.1/src/otter/electronic/continuum/interface.py +59 -0
- otter_hed-0.2.1/src/otter/electronic/continuum/scattering.py +4743 -0
- otter_hed-0.2.1/src/otter/electronic/continuum/tail.py +1630 -0
- otter_hed-0.2.1/src/otter/electronic/densities.py +298 -0
- otter_hed-0.2.1/src/otter/electronic/full_external.py +4933 -0
- otter_hed-0.2.1/src/otter/electronic/ks_dft.py +6620 -0
- otter_hed-0.2.1/src/otter/electronic/mixture.py +3104 -0
- otter_hed-0.2.1/src/otter/electronic/potential.py +380 -0
- otter_hed-0.2.1/src/otter/electronic/solvers/__init__.py +10 -0
- otter_hed-0.2.1/src/otter/electronic/solvers/bound.py +1053 -0
- otter_hed-0.2.1/src/otter/electronic/solvers/free.py +272 -0
- otter_hed-0.2.1/src/otter/electronic/thomas_fermi.py +1344 -0
- otter_hed-0.2.1/src/otter/electronic/xc.py +712 -0
- otter_hed-0.2.1/src/otter/experimental/__init__.py +17 -0
- otter_hed-0.2.1/src/otter/experimental/sc_feedback.py +544 -0
- otter_hed-0.2.1/src/otter/io/__init__.py +24 -0
- otter_hed-0.2.1/src/otter/io/_npz.py +43 -0
- otter_hed-0.2.1/src/otter/io/results.py +366 -0
- otter_hed-0.2.1/src/otter/io/state.py +1111 -0
- otter_hed-0.2.1/src/otter/ionic/__init__.py +100 -0
- otter_hed-0.2.1/src/otter/ionic/correlation.py +93 -0
- otter_hed-0.2.1/src/otter/ionic/lfc.py +762 -0
- otter_hed-0.2.1/src/otter/ionic/qoz.py +2074 -0
- otter_hed-0.2.1/src/otter/ionic/response.py +49 -0
- otter_hed-0.2.1/src/otter/literature.bib +523 -0
- otter_hed-0.2.1/src/otter/literature.py +459 -0
- otter_hed-0.2.1/src/otter/numerics/__init__.py +37 -0
- otter_hed-0.2.1/src/otter/numerics/constants.py +22 -0
- otter_hed-0.2.1/src/otter/numerics/grids.py +204 -0
- otter_hed-0.2.1/src/otter/numerics/interpolation.py +81 -0
- otter_hed-0.2.1/src/otter/numerics/transforms.py +168 -0
- otter_hed-0.2.1/src/otter/plotting.py +481 -0
- otter_hed-0.2.1/src/otter/workflows.py +1716 -0
- otter_hed-0.2.1/src/otter_hed.egg-info/PKG-INFO +231 -0
- otter_hed-0.2.1/src/otter_hed.egg-info/SOURCES.txt +56 -0
- otter_hed-0.2.1/src/otter_hed.egg-info/dependency_links.txt +1 -0
- otter_hed-0.2.1/src/otter_hed.egg-info/requires.txt +7 -0
- otter_hed-0.2.1/src/otter_hed.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
This project follows [Semantic Versioning](https://semver.org/). Changes that
|
|
4
|
+
have not yet been released are collected under “Unreleased”.
|
|
5
|
+
|
|
6
|
+
## Unreleased
|
|
7
|
+
|
|
8
|
+
## 0.2.1 - 2026-08-14
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Expanded ``otter_state_v3`` archives with electronic profiles, orbital
|
|
13
|
+
densities, response functions, QOZ interaction channels, pair potentials,
|
|
14
|
+
structure factors, and calculation metadata.
|
|
15
|
+
- Added a Colab introduction and optional Libxc installation extra.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Added a Poetry lock file and one cross-platform `poetry install` path with
|
|
20
|
+
runtime, plotting, tests, documentation, and editable source installation.
|
|
21
|
+
- Added package-install smoke tests on all three operating systems and on
|
|
22
|
+
supported CPython release lines.
|
|
23
|
+
- Replaced the duplicated quick-start snippets with the canonical
|
|
24
|
+
``examples/single_species_workflow.py`` example, which now exercises the
|
|
25
|
+
production defaults directly.
|
|
26
|
+
- Kept the top-level examples focused on single-species and mixture workflows;
|
|
27
|
+
numerical diagnostics and model studies now live under ``tools``.
|
|
28
|
+
- Stabilized mixture roots near pressure ionization and preserved validated
|
|
29
|
+
external-density tails through the final electronic solve.
|
|
30
|
+
- Recomputed and promoted all accepted example and benchmark NPZ baselines
|
|
31
|
+
with field inventories and provenance metadata.
|
|
32
|
+
- Simplified the software citation and refreshed the example and benchmark
|
|
33
|
+
documentation.
|
|
34
|
+
|
|
35
|
+
## 0.2.0 - 2026-08-10
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- Unified single-species and mixture AA → pseudoatom → QOZ/HNC workflow.
|
|
40
|
+
- Orbital Kohn–Sham and finite-temperature Thomas–Fermi electronic backends.
|
|
41
|
+
- Finite-temperature Chabrier (1990) jellium local-field correction.
|
|
42
|
+
- Portable, pickle-free `q(k)`, `f(k)`, `g_ij(r)`, and `S_ij(k)` state files.
|
|
43
|
+
- Cached, provenance-checked Starrett et al. mixture benchmark.
|
|
44
|
+
- Experimental AA ↔ QOZ/HNC self-consistent feedback API.
|
|
45
|
+
- Configurable exchange-correlation models, including dependency-free Dirac
|
|
46
|
+
exchange and optional Libxc-backed LDA/PBE functionals with recorded
|
|
47
|
+
software and functional provenance.
|
|
48
|
+
- Self-contained capability and scientific-benchmark galleries with
|
|
49
|
+
results-first HTML pages and publication-ready PNG/PDF figures.
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
|
|
53
|
+
- Physical Fermi–Dirac bound occupation is the production default.
|
|
54
|
+
- Pseudoatom charge closure is enforced on the QOZ/DST lattice.
|
|
55
|
+
- HNC production paths reject unconverged or projected nonphysical roots.
|
|
56
|
+
- Experimental SC feedback and production state export now fail closed on
|
|
57
|
+
missing convergence status.
|
|
58
|
+
- Continuum threshold, phase-shift resonance, weak-bound-state, and B3/Friedel
|
|
59
|
+
tail diagnostics were strengthened.
|
|
60
|
+
- Scientific reference datasets now carry explicit source, checksum, rights,
|
|
61
|
+
and redistribution metadata separate from Otter's software license.
|
|
62
|
+
|
|
63
|
+
## 0.1.0
|
|
64
|
+
|
|
65
|
+
- Initial Otter project structure and documentation prototype.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: >-
|
|
3
|
+
If you use Otter in a scientific publication, please cite this software.
|
|
4
|
+
title: Otter
|
|
5
|
+
type: software
|
|
6
|
+
version: 0.2.1
|
|
7
|
+
date-released: 2026-08-14
|
|
8
|
+
authors:
|
|
9
|
+
- family-names: Qu
|
|
10
|
+
given-names: Chongbing
|
|
11
|
+
- family-names: Kraus
|
|
12
|
+
given-names: Dominik
|
|
13
|
+
repository-code: https://github.com/otter-hed/otter
|
|
14
|
+
license: BSD-3-Clause
|
|
15
|
+
keywords:
|
|
16
|
+
- average atom
|
|
17
|
+
- dense plasma
|
|
18
|
+
- ionic structure
|
|
19
|
+
- pseudoatom
|
|
20
|
+
- QOZ
|
|
21
|
+
- HNC
|
|
22
|
+
- warm dense matter
|
|
23
|
+
preferred-citation:
|
|
24
|
+
type: software
|
|
25
|
+
title: Otter
|
|
26
|
+
version: 0.2.1
|
|
27
|
+
date-released: 2026-08-14
|
|
28
|
+
authors:
|
|
29
|
+
- family-names: Qu
|
|
30
|
+
given-names: Chongbing
|
|
31
|
+
- family-names: Kraus
|
|
32
|
+
given-names: Dominik
|
|
33
|
+
repository-code: https://github.com/otter-hed/otter
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Contributing to Otter
|
|
2
|
+
|
|
3
|
+
Thank you for helping improve Otter. Numerical plasma models can produce
|
|
4
|
+
smooth-looking but incorrect curves, so every change should be reviewable at
|
|
5
|
+
three levels: implementation, numerical invariants, and physical validation.
|
|
6
|
+
|
|
7
|
+
## Development setup
|
|
8
|
+
|
|
9
|
+
Use Python 3.12 or newer and Poetry 2.1 or newer. Install the locked runtime,
|
|
10
|
+
tests, and documentation tools:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
poetry install
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Run the fast regression suite and strict documentation build:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
poetry run pytest -q
|
|
20
|
+
poetry run make -C docs strict
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
On Windows without `make`, use
|
|
24
|
+
`poetry run python -m sphinx -E -a -W --keep-going -b html docs/source docs/build/html`.
|
|
25
|
+
|
|
26
|
+
## Change requirements
|
|
27
|
+
|
|
28
|
+
- Keep model defaults conservative. Diagnostic approximations must be explicit
|
|
29
|
+
options and clearly labelled in result metadata.
|
|
30
|
+
- Add focused tests for each numerical invariant or failure mode.
|
|
31
|
+
- For physics changes, add or update a benchmark with a citable source,
|
|
32
|
+
immutable input data, units, provenance, and quantitative metrics.
|
|
33
|
+
- Do not regenerate expensive AA calculations in ordinary tests or docs.
|
|
34
|
+
Commit small, pickle-free reference arrays and validate their hashes instead.
|
|
35
|
+
- Do not hide failed common-chemical-potential, charge-closure, or HNC solves by
|
|
36
|
+
clipping or silently returning a best-effort result.
|
|
37
|
+
- Add the primary literature citation near the implementation and to
|
|
38
|
+
`src/otter/literature.bib`.
|
|
39
|
+
- Keep generated Sphinx pages, caches, plots, and local environments out of
|
|
40
|
+
version control.
|
|
41
|
+
|
|
42
|
+
The validation policy and architecture notes are in `docs/source/benchmarks`
|
|
43
|
+
and `docs/source/development`.
|
|
44
|
+
|
|
45
|
+
## Pull requests
|
|
46
|
+
|
|
47
|
+
Keep each pull request focused. In the description, state:
|
|
48
|
+
|
|
49
|
+
1. the physical or engineering problem;
|
|
50
|
+
2. the model equations or references affected;
|
|
51
|
+
3. tests and benchmark states run;
|
|
52
|
+
4. any changes to defaults, schemas, or numerical tolerances;
|
|
53
|
+
5. known validity limits.
|
|
54
|
+
|
|
55
|
+
Changes to public result schemas or model defaults require a changelog entry.
|
|
56
|
+
Before creating any public artifact, run
|
|
57
|
+
`python tools/check_public_release.py`; a nonzero result is a hard release
|
|
58
|
+
blocker, not an informational warning.
|
otter_hed-0.2.1/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Chongbing Qu
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include README.md
|
|
3
|
+
include CITATION.cff
|
|
4
|
+
include CHANGELOG.md
|
|
5
|
+
include CONTRIBUTING.md
|
|
6
|
+
include SECURITY.md
|
|
7
|
+
include THIRD_PARTY_NOTICES.md
|
|
8
|
+
|
|
9
|
+
prune tests
|
|
10
|
+
|
|
11
|
+
global-exclude __pycache__
|
|
12
|
+
global-exclude *.py[cod]
|
|
13
|
+
global-exclude *.so
|
|
14
|
+
global-exclude .DS_Store
|
otter_hed-0.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: otter-hed
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Average-atom, pseudoatom, and ionic-structure calculations for dense plasmas.
|
|
5
|
+
Author: Chongbing Qu, Dominik Kraus
|
|
6
|
+
License-Expression: BSD-3-Clause
|
|
7
|
+
Project-URL: Homepage, https://github.com/otter-hed/otter
|
|
8
|
+
Project-URL: Documentation, https://otter-hed.github.io/otter/
|
|
9
|
+
Project-URL: Repository, https://github.com/otter-hed/otter
|
|
10
|
+
Project-URL: Issues, https://github.com/otter-hed/otter/issues
|
|
11
|
+
Keywords: average atom,dense plasma,ionic structure,pseudoatom,warm dense matter
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
License-File: THIRD_PARTY_NOTICES.md
|
|
26
|
+
Requires-Dist: numpy<3,>=2.0
|
|
27
|
+
Requires-Dist: scipy<2,>=1.13
|
|
28
|
+
Requires-Dist: numba<1,>=0.60
|
|
29
|
+
Requires-Dist: matplotlib>=3.8
|
|
30
|
+
Provides-Extra: libxc
|
|
31
|
+
Requires-Dist: pylibxc7==7.0.0; extra == "libxc"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
# Otter
|
|
35
|
+
|
|
36
|
+
Otter calculates electronic and ionic structure in warm and hot dense matter.
|
|
37
|
+
From composition, mass density, and temperature it can solve a quantum
|
|
38
|
+
average-atom or Thomas–Fermi model, construct neutral
|
|
39
|
+
pseudoatoms, build effective ion–ion potentials, and solve one- or
|
|
40
|
+
multicomponent QOZ/HNC equations.
|
|
41
|
+
|
|
42
|
+
Otter is based primarily on the pseudoatom model of
|
|
43
|
+
[Starrett and Saumon (2014)](https://doi.org/10.1016/j.hedp.2013.12.001).
|
|
44
|
+
|
|
45
|
+
## Capabilities
|
|
46
|
+
|
|
47
|
+
- finite-temperature quantum(KS-DFT, QM) and Thomas–Fermi (TF) electronic structure; the
|
|
48
|
+
QM model provides orbital levels, occupations, and density components;
|
|
49
|
+
- pseudoatom densities `n_pa(r)` and screening densities `n_scr(r)`, with form factors
|
|
50
|
+
`f(k)=n_ion(k)` and `q(k)=n_scr(k)`;
|
|
51
|
+
- effective ion–ion potentials `V_ij(r)` and `V_ij(k)`;
|
|
52
|
+
- one- and multicomponent QOZ/HNC results `g_ij(r)` and `S_ij(k)`.
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
Install the released package from PyPI:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
python -m pip install otter-hed
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The distribution name is `otter-hed`; the Python package is imported as
|
|
63
|
+
`otter`.
|
|
64
|
+
|
|
65
|
+
For a reproducible editable installation from source, Otter requires CPython
|
|
66
|
+
3.12 or newer, Git, and Poetry 2.1.3.
|
|
67
|
+
|
|
68
|
+
macOS, Linux, or WSL:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
curl -sSL https://install.python-poetry.org | python3 - --version 2.1.3
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Windows PowerShell:
|
|
75
|
+
|
|
76
|
+
```powershell
|
|
77
|
+
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py - --version 2.1.3
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Verify the installation:
|
|
81
|
+
|
|
82
|
+
```console
|
|
83
|
+
poetry --version
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Clone and install:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
git clone https://github.com/otter-hed/otter.git
|
|
90
|
+
cd otter
|
|
91
|
+
poetry install
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Dependencies are locked by `poetry.lock`; Otter is installed in editable mode.
|
|
95
|
+
|
|
96
|
+
Otter's built-in local-density Dirac exchange is the dependency-free default
|
|
97
|
+
used by the validated warm- and hot-dense-matter workflows. Libxc is optional
|
|
98
|
+
and is needed only for additional LDA correlation or GGA functionals such as
|
|
99
|
+
`lda_pw`, `lda_pz`, `lda_vwn`, and `pbe`.
|
|
100
|
+
|
|
101
|
+
To enable these additional functionals:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
poetry install --extras libxc
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
PyPI distributes the Libxc Python bindings as source, so this optional step
|
|
108
|
+
requires CMake and a C compiler. See the
|
|
109
|
+
[XC installation guide](https://otter-hed.github.io/otter/user_guide/xc_functionals.html#installation).
|
|
110
|
+
|
|
111
|
+
```console
|
|
112
|
+
poetry run python -c "import otter; print(otter.__version__)"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
An unlocked fallback is `python -m pip install -e .`. See the
|
|
116
|
+
[installation guide](https://otter-hed.github.io/otter/installing.html).
|
|
117
|
+
|
|
118
|
+
## Quick start
|
|
119
|
+
|
|
120
|
+
Run an introductory calculation in Google Colab:
|
|
121
|
+
|
|
122
|
+
[](https://colab.research.google.com/github/otter-hed/otter/blob/main/notebooks/00-otter_intro.ipynb)
|
|
123
|
+
|
|
124
|
+
Run the complete [single-species workflow](examples/single_species_workflow.py)
|
|
125
|
+
from the repository root:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
poetry run python examples/single_species_workflow.py
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The default state is Al at `rho=8.1 g/cm^3` and `Te=Ti=15 eV`. Edit the input
|
|
132
|
+
block to change the state or output controls. The script plots the electronic
|
|
133
|
+
density, effective potential, `g_ii(r)`, and `S_ii(k)`, and saves PNG, PDF, and
|
|
134
|
+
NPZ files.
|
|
135
|
+
|
|
136
|
+
For mixtures, run [mixture_workflow.py](examples/mixture_workflow.py).
|
|
137
|
+
|
|
138
|
+
### Saved workflow state
|
|
139
|
+
|
|
140
|
+
The versioned NPZ schema stores the native electronic profiles and bound
|
|
141
|
+
levels, `q/f`, electron response and LFC, electron/ion interaction channels,
|
|
142
|
+
and `g_ij/S_ij`, together with units and convergence metadata. In particular:
|
|
143
|
+
|
|
144
|
+
- `q_k == n_scr_k` and `f_k == n_ion_k`;
|
|
145
|
+
- `g_ee_k`, `chi0_k`, `chi_ee_k`, `v_ie_k`, `c_ie_k`, `v_ee_k`, and `c_ee_k`;
|
|
146
|
+
- `gij_r`, `sij_k`, `vij_r`, and `vij_k`.
|
|
147
|
+
|
|
148
|
+
The default windows are `r < 20 Bohr` and `k < 20 Bohr^-1`. Archives load with
|
|
149
|
+
`allow_pickle=False` and are written atomically. See the
|
|
150
|
+
[state-export guide](docs/source/user_guide/state_exports.rst) for in-memory
|
|
151
|
+
and NPZ access.
|
|
152
|
+
|
|
153
|
+
Quantum continuum calculations can be slow near pressure ionization.
|
|
154
|
+
`continue_plasma_workflow_from_electronic_result` reuses a validated
|
|
155
|
+
electronic result for subsequent QOZ/HNC calculations.
|
|
156
|
+
|
|
157
|
+
## Validation and documentation
|
|
158
|
+
|
|
159
|
+
Build the documentation and cached benchmark gallery with:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
poetry install
|
|
163
|
+
poetry run make -C docs strict
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Open `docs/build/html/index.html` after the build. Start with:
|
|
167
|
+
|
|
168
|
+
- [documentation source](docs/source/index.rst);
|
|
169
|
+
- [capability example gallery](docs/examples/README.rst);
|
|
170
|
+
- [scientific benchmark gallery](docs/source/benchmarks/index.rst);
|
|
171
|
+
- [validation policy](docs/source/benchmarks/validation_policy.rst);
|
|
172
|
+
- [portable state schema](docs/source/user_guide/state_exports.rst);
|
|
173
|
+
- [development roadmap](docs/source/development/roadmap.rst).
|
|
174
|
+
|
|
175
|
+
Digitized publication curves and author-provided numerical data have separate
|
|
176
|
+
provenance and rights manifests; they are not covered by Otter's BSD software
|
|
177
|
+
license unless a dataset explicitly says otherwise. The current bundled
|
|
178
|
+
reference sets are published by maintainer decision with source attribution
|
|
179
|
+
and license status `NOASSERTION`. Read the
|
|
180
|
+
[reference-data notice](benchmarks/reference_data/README.md) before reuse.
|
|
181
|
+
The executable gate `python tools/check_public_release.py` rejects any future
|
|
182
|
+
manifest that reintroduces an unresolved public-release action.
|
|
183
|
+
|
|
184
|
+
## Development
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
poetry install
|
|
188
|
+
poetry run pytest -q
|
|
189
|
+
poetry run make -C docs strict
|
|
190
|
+
poetry run python -m build
|
|
191
|
+
poetry run python -m twine check dist/*
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Anyone interested in Otter is welcome to contribute. See
|
|
195
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) for numerical and benchmark review
|
|
196
|
+
requirements and [CHANGELOG.md](CHANGELOG.md) for user-visible changes.
|
|
197
|
+
|
|
198
|
+
## Citation
|
|
199
|
+
|
|
200
|
+
If you use Otter in a scientific publication, please cite:
|
|
201
|
+
|
|
202
|
+
> Chongbing Qu and Dominik Kraus, *Otter*, version 0.2.1, computer software (2026),
|
|
203
|
+
> [https://github.com/otter-hed/otter](https://github.com/otter-hed/otter).
|
|
204
|
+
|
|
205
|
+
```bibtex
|
|
206
|
+
@misc{QuKraus2026Otter,
|
|
207
|
+
author = {Qu, Chongbing and Kraus, Dominik},
|
|
208
|
+
title = {Otter},
|
|
209
|
+
year = {2026},
|
|
210
|
+
note = {Computer software, version 0.2.1},
|
|
211
|
+
url = {https://github.com/otter-hed/otter}
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The same metadata are available in [CITATION.cff](CITATION.cff). Otter is
|
|
216
|
+
also available through GitHub's **Cite this repository** menu. Runtime
|
|
217
|
+
configuration objects provide
|
|
218
|
+
`config.citation(style="plain"|"bibtex"|"cite")` and expose their canonical
|
|
219
|
+
`citation_keys` as scientific provenance for selected physical models; these
|
|
220
|
+
are not additional software-citation requirements. See
|
|
221
|
+
[`CITATIONS.md`](CITATIONS.md).
|
|
222
|
+
|
|
223
|
+
## Acknowledgements
|
|
224
|
+
|
|
225
|
+
The authors thank Zachary A. Johnson and C. E. Starrett for helpful
|
|
226
|
+
discussions.
|
|
227
|
+
|
|
228
|
+
Chongbing Qu gratefully acknowledges financial support from HEDI and the China
|
|
229
|
+
Scholarship Council (CSC).
|
|
230
|
+
|
|
231
|
+
Otter is distributed under the [BSD 3-Clause License](LICENSE).
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Otter
|
|
2
|
+
|
|
3
|
+
Otter calculates electronic and ionic structure in warm and hot dense matter.
|
|
4
|
+
From composition, mass density, and temperature it can solve a quantum
|
|
5
|
+
average-atom or Thomas–Fermi model, construct neutral
|
|
6
|
+
pseudoatoms, build effective ion–ion potentials, and solve one- or
|
|
7
|
+
multicomponent QOZ/HNC equations.
|
|
8
|
+
|
|
9
|
+
Otter is based primarily on the pseudoatom model of
|
|
10
|
+
[Starrett and Saumon (2014)](https://doi.org/10.1016/j.hedp.2013.12.001).
|
|
11
|
+
|
|
12
|
+
## Capabilities
|
|
13
|
+
|
|
14
|
+
- finite-temperature quantum(KS-DFT, QM) and Thomas–Fermi (TF) electronic structure; the
|
|
15
|
+
QM model provides orbital levels, occupations, and density components;
|
|
16
|
+
- pseudoatom densities `n_pa(r)` and screening densities `n_scr(r)`, with form factors
|
|
17
|
+
`f(k)=n_ion(k)` and `q(k)=n_scr(k)`;
|
|
18
|
+
- effective ion–ion potentials `V_ij(r)` and `V_ij(k)`;
|
|
19
|
+
- one- and multicomponent QOZ/HNC results `g_ij(r)` and `S_ij(k)`.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
Install the released package from PyPI:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
python -m pip install otter-hed
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The distribution name is `otter-hed`; the Python package is imported as
|
|
30
|
+
`otter`.
|
|
31
|
+
|
|
32
|
+
For a reproducible editable installation from source, Otter requires CPython
|
|
33
|
+
3.12 or newer, Git, and Poetry 2.1.3.
|
|
34
|
+
|
|
35
|
+
macOS, Linux, or WSL:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
curl -sSL https://install.python-poetry.org | python3 - --version 2.1.3
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Windows PowerShell:
|
|
42
|
+
|
|
43
|
+
```powershell
|
|
44
|
+
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py - --version 2.1.3
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Verify the installation:
|
|
48
|
+
|
|
49
|
+
```console
|
|
50
|
+
poetry --version
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Clone and install:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git clone https://github.com/otter-hed/otter.git
|
|
57
|
+
cd otter
|
|
58
|
+
poetry install
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Dependencies are locked by `poetry.lock`; Otter is installed in editable mode.
|
|
62
|
+
|
|
63
|
+
Otter's built-in local-density Dirac exchange is the dependency-free default
|
|
64
|
+
used by the validated warm- and hot-dense-matter workflows. Libxc is optional
|
|
65
|
+
and is needed only for additional LDA correlation or GGA functionals such as
|
|
66
|
+
`lda_pw`, `lda_pz`, `lda_vwn`, and `pbe`.
|
|
67
|
+
|
|
68
|
+
To enable these additional functionals:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
poetry install --extras libxc
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
PyPI distributes the Libxc Python bindings as source, so this optional step
|
|
75
|
+
requires CMake and a C compiler. See the
|
|
76
|
+
[XC installation guide](https://otter-hed.github.io/otter/user_guide/xc_functionals.html#installation).
|
|
77
|
+
|
|
78
|
+
```console
|
|
79
|
+
poetry run python -c "import otter; print(otter.__version__)"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
An unlocked fallback is `python -m pip install -e .`. See the
|
|
83
|
+
[installation guide](https://otter-hed.github.io/otter/installing.html).
|
|
84
|
+
|
|
85
|
+
## Quick start
|
|
86
|
+
|
|
87
|
+
Run an introductory calculation in Google Colab:
|
|
88
|
+
|
|
89
|
+
[](https://colab.research.google.com/github/otter-hed/otter/blob/main/notebooks/00-otter_intro.ipynb)
|
|
90
|
+
|
|
91
|
+
Run the complete [single-species workflow](examples/single_species_workflow.py)
|
|
92
|
+
from the repository root:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
poetry run python examples/single_species_workflow.py
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The default state is Al at `rho=8.1 g/cm^3` and `Te=Ti=15 eV`. Edit the input
|
|
99
|
+
block to change the state or output controls. The script plots the electronic
|
|
100
|
+
density, effective potential, `g_ii(r)`, and `S_ii(k)`, and saves PNG, PDF, and
|
|
101
|
+
NPZ files.
|
|
102
|
+
|
|
103
|
+
For mixtures, run [mixture_workflow.py](examples/mixture_workflow.py).
|
|
104
|
+
|
|
105
|
+
### Saved workflow state
|
|
106
|
+
|
|
107
|
+
The versioned NPZ schema stores the native electronic profiles and bound
|
|
108
|
+
levels, `q/f`, electron response and LFC, electron/ion interaction channels,
|
|
109
|
+
and `g_ij/S_ij`, together with units and convergence metadata. In particular:
|
|
110
|
+
|
|
111
|
+
- `q_k == n_scr_k` and `f_k == n_ion_k`;
|
|
112
|
+
- `g_ee_k`, `chi0_k`, `chi_ee_k`, `v_ie_k`, `c_ie_k`, `v_ee_k`, and `c_ee_k`;
|
|
113
|
+
- `gij_r`, `sij_k`, `vij_r`, and `vij_k`.
|
|
114
|
+
|
|
115
|
+
The default windows are `r < 20 Bohr` and `k < 20 Bohr^-1`. Archives load with
|
|
116
|
+
`allow_pickle=False` and are written atomically. See the
|
|
117
|
+
[state-export guide](docs/source/user_guide/state_exports.rst) for in-memory
|
|
118
|
+
and NPZ access.
|
|
119
|
+
|
|
120
|
+
Quantum continuum calculations can be slow near pressure ionization.
|
|
121
|
+
`continue_plasma_workflow_from_electronic_result` reuses a validated
|
|
122
|
+
electronic result for subsequent QOZ/HNC calculations.
|
|
123
|
+
|
|
124
|
+
## Validation and documentation
|
|
125
|
+
|
|
126
|
+
Build the documentation and cached benchmark gallery with:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
poetry install
|
|
130
|
+
poetry run make -C docs strict
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Open `docs/build/html/index.html` after the build. Start with:
|
|
134
|
+
|
|
135
|
+
- [documentation source](docs/source/index.rst);
|
|
136
|
+
- [capability example gallery](docs/examples/README.rst);
|
|
137
|
+
- [scientific benchmark gallery](docs/source/benchmarks/index.rst);
|
|
138
|
+
- [validation policy](docs/source/benchmarks/validation_policy.rst);
|
|
139
|
+
- [portable state schema](docs/source/user_guide/state_exports.rst);
|
|
140
|
+
- [development roadmap](docs/source/development/roadmap.rst).
|
|
141
|
+
|
|
142
|
+
Digitized publication curves and author-provided numerical data have separate
|
|
143
|
+
provenance and rights manifests; they are not covered by Otter's BSD software
|
|
144
|
+
license unless a dataset explicitly says otherwise. The current bundled
|
|
145
|
+
reference sets are published by maintainer decision with source attribution
|
|
146
|
+
and license status `NOASSERTION`. Read the
|
|
147
|
+
[reference-data notice](benchmarks/reference_data/README.md) before reuse.
|
|
148
|
+
The executable gate `python tools/check_public_release.py` rejects any future
|
|
149
|
+
manifest that reintroduces an unresolved public-release action.
|
|
150
|
+
|
|
151
|
+
## Development
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
poetry install
|
|
155
|
+
poetry run pytest -q
|
|
156
|
+
poetry run make -C docs strict
|
|
157
|
+
poetry run python -m build
|
|
158
|
+
poetry run python -m twine check dist/*
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Anyone interested in Otter is welcome to contribute. See
|
|
162
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) for numerical and benchmark review
|
|
163
|
+
requirements and [CHANGELOG.md](CHANGELOG.md) for user-visible changes.
|
|
164
|
+
|
|
165
|
+
## Citation
|
|
166
|
+
|
|
167
|
+
If you use Otter in a scientific publication, please cite:
|
|
168
|
+
|
|
169
|
+
> Chongbing Qu and Dominik Kraus, *Otter*, version 0.2.1, computer software (2026),
|
|
170
|
+
> [https://github.com/otter-hed/otter](https://github.com/otter-hed/otter).
|
|
171
|
+
|
|
172
|
+
```bibtex
|
|
173
|
+
@misc{QuKraus2026Otter,
|
|
174
|
+
author = {Qu, Chongbing and Kraus, Dominik},
|
|
175
|
+
title = {Otter},
|
|
176
|
+
year = {2026},
|
|
177
|
+
note = {Computer software, version 0.2.1},
|
|
178
|
+
url = {https://github.com/otter-hed/otter}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
The same metadata are available in [CITATION.cff](CITATION.cff). Otter is
|
|
183
|
+
also available through GitHub's **Cite this repository** menu. Runtime
|
|
184
|
+
configuration objects provide
|
|
185
|
+
`config.citation(style="plain"|"bibtex"|"cite")` and expose their canonical
|
|
186
|
+
`citation_keys` as scientific provenance for selected physical models; these
|
|
187
|
+
are not additional software-citation requirements. See
|
|
188
|
+
[`CITATIONS.md`](CITATIONS.md).
|
|
189
|
+
|
|
190
|
+
## Acknowledgements
|
|
191
|
+
|
|
192
|
+
The authors thank Zachary A. Johnson and C. E. Starrett for helpful
|
|
193
|
+
discussions.
|
|
194
|
+
|
|
195
|
+
Chongbing Qu gratefully acknowledges financial support from HEDI and the China
|
|
196
|
+
Scholarship Council (CSC).
|
|
197
|
+
|
|
198
|
+
Otter is distributed under the [BSD 3-Clause License](LICENSE).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
Otter is scientific software and is not intended to enforce a security
|
|
4
|
+
boundary. Nevertheless, dependency, archive-loading, code-execution, or data
|
|
5
|
+
integrity vulnerabilities should be reported privately through the repository
|
|
6
|
+
host’s security-advisory channel rather than through a public issue.
|
|
7
|
+
|
|
8
|
+
Only the latest development release is supported while the project is below
|
|
9
|
+
version 1.0. Please include a minimal reproducer, affected version or commit,
|
|
10
|
+
and an assessment of whether untrusted input is required.
|
|
11
|
+
|
|
12
|
+
Otter’s public NPZ state format is deliberately loadable with
|
|
13
|
+
`allow_pickle=False`. New interchange formats must preserve that property
|
|
14
|
+
unless a security review explicitly documents an alternative.
|