peritheos 0.2.0__tar.gz → 0.4.0__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.
Files changed (74) hide show
  1. peritheos-0.4.0/CHANGELOG.md +108 -0
  2. peritheos-0.4.0/CITATION.cff +20 -0
  3. peritheos-0.4.0/CODE_OF_CONDUCT.md +19 -0
  4. peritheos-0.4.0/CONTRIBUTING.md +46 -0
  5. peritheos-0.4.0/MANIFEST.in +9 -0
  6. {peritheos-0.2.0 → peritheos-0.4.0}/PKG-INFO +55 -6
  7. {peritheos-0.2.0 → peritheos-0.4.0}/README.md +49 -3
  8. peritheos-0.4.0/SECURITY.md +25 -0
  9. peritheos-0.4.0/SUPPORT.md +14 -0
  10. peritheos-0.4.0/docs/api-stability.md +35 -0
  11. peritheos-0.4.0/docs/api.md +105 -0
  12. peritheos-0.4.0/docs/development.md +40 -0
  13. peritheos-0.4.0/docs/fitting.md +249 -0
  14. peritheos-0.4.0/docs/getting-started.md +68 -0
  15. peritheos-0.4.0/docs/index.md +47 -0
  16. peritheos-0.4.0/docs/models.md +82 -0
  17. peritheos-0.4.0/docs/project-policies.md +14 -0
  18. peritheos-0.4.0/docs/references.md +35 -0
  19. peritheos-0.4.0/docs/requirements.txt +1 -0
  20. peritheos-0.4.0/docs/thermoelastic-properties.md +76 -0
  21. peritheos-0.4.0/docs/uncertainty.md +239 -0
  22. peritheos-0.4.0/docs/units.md +45 -0
  23. peritheos-0.4.0/docs/validation.md +60 -0
  24. peritheos-0.4.0/mkdocs.yml +25 -0
  25. peritheos-0.4.0/peritheos/__init__.py +16 -0
  26. {peritheos-0.2.0 → peritheos-0.4.0}/peritheos/constants.py +1 -1
  27. {peritheos-0.2.0 → peritheos-0.4.0}/peritheos/eos/__init__.py +177 -1
  28. peritheos-0.4.0/peritheos/eos/rt/__init__.py +23 -0
  29. {peritheos-0.2.0 → peritheos-0.4.0}/peritheos/eos/rt/bm.py +28 -24
  30. {peritheos-0.2.0 → peritheos-0.4.0}/peritheos/eos/rt/holzapfel.py +1 -0
  31. peritheos-0.4.0/peritheos/eos/rt/murnaghan.py +60 -0
  32. peritheos-0.4.0/peritheos/eos/rt/natural_strain.py +87 -0
  33. peritheos-0.4.0/peritheos/eos/rt/tait.py +95 -0
  34. {peritheos-0.2.0 → peritheos-0.4.0}/peritheos/eos/rt/vinet.py +1 -0
  35. peritheos-0.4.0/peritheos/eos/thermal/__init__.py +15 -0
  36. peritheos-0.4.0/peritheos/eos/thermal/holland_powell.py +86 -0
  37. peritheos-0.4.0/peritheos/eos/thermal/mie_gruneisen.py +277 -0
  38. {peritheos-0.2.0 → peritheos-0.4.0}/peritheos/eos/thermal/sokolova2016.py +5 -14
  39. peritheos-0.4.0/peritheos/fitting.py +832 -0
  40. peritheos-0.4.0/peritheos/uncertainty.py +694 -0
  41. peritheos-0.4.0/peritheos/units.py +101 -0
  42. {peritheos-0.2.0 → peritheos-0.4.0}/peritheos/utils.py +29 -28
  43. {peritheos-0.2.0 → peritheos-0.4.0}/peritheos.egg-info/PKG-INFO +55 -6
  44. peritheos-0.4.0/peritheos.egg-info/SOURCES.txt +65 -0
  45. peritheos-0.4.0/peritheos.egg-info/requires.txt +2 -0
  46. {peritheos-0.2.0 → peritheos-0.4.0}/pyproject.toml +29 -2
  47. peritheos-0.4.0/tests/data/literature_reference_cases.json +130 -0
  48. {peritheos-0.2.0 → peritheos-0.4.0}/tests/test_bm.py +11 -2
  49. peritheos-0.4.0/tests/test_eos_api.py +102 -0
  50. peritheos-0.4.0/tests/test_fitting.py +479 -0
  51. {peritheos-0.2.0 → peritheos-0.4.0}/tests/test_holzapfel.py +1 -1
  52. peritheos-0.4.0/tests/test_literature_reference_cases.py +63 -0
  53. peritheos-0.4.0/tests/test_murnaghan.py +58 -0
  54. peritheos-0.4.0/tests/test_natural_strain.py +61 -0
  55. peritheos-0.4.0/tests/test_numerical_stress.py +98 -0
  56. peritheos-0.4.0/tests/test_package_metadata.py +17 -0
  57. peritheos-0.4.0/tests/test_tait.py +73 -0
  58. peritheos-0.4.0/tests/test_thermal_mie_gruneisen.py +145 -0
  59. {peritheos-0.2.0 → peritheos-0.4.0}/tests/test_thermal_sokolova.py +60 -53
  60. peritheos-0.4.0/tests/test_thermoelastic_api.py +134 -0
  61. peritheos-0.4.0/tests/test_uncertainty.py +546 -0
  62. peritheos-0.4.0/tests/test_units.py +43 -0
  63. {peritheos-0.2.0 → peritheos-0.4.0}/tests/test_vinet.py +1 -2
  64. peritheos-0.2.0/peritheos/__init__.py +0 -3
  65. peritheos-0.2.0/peritheos/eos/rt/__init__.py +0 -7
  66. peritheos-0.2.0/peritheos/eos/thermal/__init__.py +0 -5
  67. peritheos-0.2.0/peritheos.egg-info/SOURCES.txt +0 -24
  68. peritheos-0.2.0/peritheos.egg-info/requires.txt +0 -2
  69. peritheos-0.2.0/tests/test_eos_api.py +0 -51
  70. peritheos-0.2.0/tests/test_package_metadata.py +0 -7
  71. {peritheos-0.2.0 → peritheos-0.4.0}/LICENSE +0 -0
  72. {peritheos-0.2.0 → peritheos-0.4.0}/peritheos.egg-info/dependency_links.txt +0 -0
  73. {peritheos-0.2.0 → peritheos-0.4.0}/peritheos.egg-info/top_level.txt +0 -0
  74. {peritheos-0.2.0 → peritheos-0.4.0}/setup.cfg +0 -0
@@ -0,0 +1,108 @@
1
+ # Changelog
2
+
3
+ All notable changes to Peritheos are documented here. The project follows
4
+ [Semantic Versioning](https://semver.org/).
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [0.4.0] - 2026-08-09
9
+
10
+ ### Added
11
+
12
+ - Branch-aware coverage enforcement, Ruff lint and formatting gates, and a
13
+ minimum-supported-dependency CI job.
14
+ - Literature-tagged numerical cases for all public EOS families and an
15
+ independently solvable weighted least-squares fitting benchmark.
16
+ - Automatic GitHub Releases with source and wheel artifacts.
17
+ - Citation metadata, API stability, contribution, security, support, conduct,
18
+ issue, and pull-request policies.
19
+ - Versioned Read the Docs builds using the locked uv documentation environment.
20
+ - Joint reference-isotherm and thermal parameter fitting with complete
21
+ cross-covariance through `fit_joint_eos`.
22
+ - Per-observation correlated P-V and P-V-T covariance matrices and robust
23
+ least-squares losses for all fitting entry points.
24
+ - Human-readable fit summaries and versioned, JSON-safe result export including
25
+ model parameters, covariance, adjusted observations, diagnostics, and solver
26
+ metadata.
27
+
28
+ ### Changed
29
+
30
+ - Uncertainty propagation tests now cover Monte Carlo state sampling, invalid
31
+ covariance and option handling, one-sided numerical derivatives, wrapper
32
+ behavior, and failed sampling; branch-aware project coverage exceeds 90%.
33
+ - Corrected the fourth-order Birch-Murnaghan documentation to match its
34
+ implemented Eulerian-strain signs and exponents.
35
+ - Package maturity metadata now identifies the 0.4 development line as beta.
36
+ - The minimum supported NumPy version is now 1.21, matching the public typing
37
+ APIs used by Peritheos.
38
+ - Distribution package discovery is restricted to `peritheos`, preventing
39
+ generated documentation directories from entering or blocking builds.
40
+
41
+ ## [0.3.0] - 2026-08-08
42
+
43
+ ### Added
44
+
45
+ - Murnaghan, modified Tait, and second- through fourth-order natural-strain
46
+ room-temperature equations of state.
47
+ - Holland-Powell thermal modified Tait equation of state.
48
+ - Bounded P-V and P-V-T errors-in-variables fitting with independently optional
49
+ pressure, volume, and temperature standard errors.
50
+ - `FitResult` covariance, correlation, parameter-error, residual, chi-square,
51
+ information-criterion, and adjusted-state diagnostics.
52
+ - `EOSUncertainty` for propagating complete covariance matrices, parameter
53
+ errors with correlations, or partial independent parameter errors into EOS
54
+ calculations.
55
+ - Linear covariance propagation and reproducible Monte Carlo propagation for
56
+ pressure, volume, bulk modulus, and arbitrary public EOS quantities.
57
+ - Optional propagation of pressure, volume, and temperature errors in the
58
+ requested state.
59
+ - Explicit combination of separately quantified thermal and reference-EOS
60
+ uncertainty blocks.
61
+ - Isothermal compressibility, thermal expansivity, constant-volume and
62
+ constant-pressure heat capacities, thermodynamic Gruneisen parameter, and
63
+ adiabatic bulk modulus APIs.
64
+ - Vibrational entropy, internal energy, Helmholtz energy, enthalpy, and Gibbs
65
+ energy for the Mie-Gruneisen-Debye and Mie-Gruneisen-Einstein models.
66
+ - Molar-volume and density conversion helpers with explicit unit validation.
67
+ - Literature-tagged reference cases and expanded numerical regression tests.
68
+ - A multi-page MkDocs documentation site covering models, fitting,
69
+ uncertainty, properties, units, validation, references, and development.
70
+
71
+ ### Changed
72
+
73
+ - EOS models now expose reconstructable parameter values and safe parameter
74
+ replacement, including dotted reference-EOS parameters such as
75
+ `rt_eos.K0`.
76
+ - Thermal EOS calculations consistently document and enforce their molar
77
+ volume, pressure, and temperature units.
78
+ - CI now builds the documentation strictly, and source distributions include
79
+ documentation and literature-validation data.
80
+ - The legacy fitting argument `sigma` remains supported as an alias for
81
+ `pressure_sigma`.
82
+
83
+ ### Statistical assumptions
84
+
85
+ - Parameters omitted from an uncertainty specification are treated as exact.
86
+ - Individual parameter errors without a correlation matrix are treated as
87
+ mutually independent.
88
+ - Combining thermal and reference-EOS results from separate fits requires an
89
+ explicit block-independence assumption.
90
+
91
+ ## [0.2.0] - 2026-08-07
92
+
93
+ ### Added
94
+
95
+ - Fourth-order Birch-Murnaghan support.
96
+ - Complete Sokolova et al. (2016) pressure terms and parameters.
97
+ - Automated test and trusted PyPI publication workflows.
98
+
99
+ ### Changed
100
+
101
+ - EOS pressure and volume validation and inversion were hardened for invalid
102
+ and out-of-domain states.
103
+ - Project naming and release metadata were standardized.
104
+
105
+ [Unreleased]: https://github.com/CPrescher/peritheos/compare/v0.4.0...HEAD
106
+ [0.4.0]: https://github.com/CPrescher/peritheos/compare/v0.3.0...v0.4.0
107
+ [0.3.0]: https://github.com/CPrescher/peritheos/compare/v0.2.0...v0.3.0
108
+ [0.2.0]: https://github.com/CPrescher/peritheos/releases/tag/v0.2.0
@@ -0,0 +1,20 @@
1
+ cff-version: 1.2.0
2
+ message: >-
3
+ If you use Peritheos in published work, please cite the software and the
4
+ original references for the equation-of-state models you use.
5
+ title: Peritheos
6
+ type: software
7
+ version: 0.4.0
8
+ date-released: 2026-08-09
9
+ authors:
10
+ - family-names: Prescher
11
+ given-names: Clemens
12
+ email: clemens.prescher@gmail.com
13
+ repository-code: https://github.com/CPrescher/peritheos
14
+ url: https://peritheos.readthedocs.io/
15
+ license: MIT
16
+ keywords:
17
+ - equation of state
18
+ - high pressure
19
+ - thermodynamics
20
+ - solid materials
@@ -0,0 +1,19 @@
1
+ # Code of conduct
2
+
3
+ Peritheos is committed to a respectful, inclusive, and scientifically rigorous
4
+ community.
5
+
6
+ Participants are expected to communicate constructively, distinguish evidence
7
+ from opinion, acknowledge uncertainty, welcome correction, and respect differing
8
+ levels of experience. Harassment, personal attacks, discriminatory language,
9
+ deliberate misrepresentation, and disclosure of another person's private
10
+ information are unacceptable.
11
+
12
+ Project maintainers may edit or remove contributions that violate these
13
+ expectations and may temporarily or permanently restrict participation. Report
14
+ conduct concerns privately to `clemens.prescher@gmail.com`. Reports will be
15
+ handled as confidentially as practical, with attention to the safety of the
16
+ reporter and others affected.
17
+
18
+ This policy applies in project spaces and when someone publicly represents the
19
+ project.
@@ -0,0 +1,46 @@
1
+ # Contributing to Peritheos
2
+
3
+ Contributions are welcome, particularly independently reproducible validation
4
+ cases, numerical robustness improvements, and documentation clarifications.
5
+
6
+ ## Development setup
7
+
8
+ Install [uv](https://docs.astral.sh/uv/) and create the locked development
9
+ environment:
10
+
11
+ ```bash
12
+ uv sync --all-groups
13
+ ```
14
+
15
+ Run the same checks used by continuous integration:
16
+
17
+ ```bash
18
+ uv run ruff check .
19
+ uv run ruff format --check .
20
+ uv run pytest -q -W error --cov --cov-report=term-missing
21
+ uv run --group docs mkdocs build --strict
22
+ ```
23
+
24
+ ## Scientific changes
25
+
26
+ Changes to an equation, constant, unit convention, fitting statistic, or
27
+ uncertainty calculation should include:
28
+
29
+ - the primary literature reference and DOI where one exists;
30
+ - an independently calculated numerical case, not only a value generated by
31
+ the implementation under test;
32
+ - reference-state, derivative, array, invalid-domain, and inversion tests when
33
+ applicable;
34
+ - the model order, units, parameter convention, and valid state range in the
35
+ documentation; and
36
+ - an entry under `Unreleased` in `CHANGELOG.md`.
37
+
38
+ Do not silently change an existing scientific convention. Follow the
39
+ [API stability policy](https://peritheos.readthedocs.io/en/latest/api-stability/)
40
+ and document any migration path.
41
+
42
+ ## Pull requests
43
+
44
+ Keep each pull request focused. Explain the physical or statistical motivation,
45
+ identify the validation source, and call out any API or numerical-compatibility
46
+ impact. All checks must pass before merging.
@@ -0,0 +1,9 @@
1
+ include mkdocs.yml
2
+ include CHANGELOG.md
3
+ include CITATION.cff
4
+ include CODE_OF_CONDUCT.md
5
+ include CONTRIBUTING.md
6
+ include SECURITY.md
7
+ include SUPPORT.md
8
+ recursive-include docs *.md *.txt
9
+ recursive-include tests/data *.json
@@ -1,13 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peritheos
3
- Version: 0.2.0
3
+ Version: 0.4.0
4
4
  Summary: A library for thermodynamic equations of state calculations
5
5
  Author-email: Clemens Prescher <clemens.prescher@gmail.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/cprescher/peritheos
8
+ Project-URL: Documentation, https://peritheos.readthedocs.io/
9
+ Project-URL: Source, https://github.com/cprescher/peritheos
8
10
  Project-URL: Bug Tracker, https://github.com/cprescher/peritheos/issues
11
+ Project-URL: Changelog, https://github.com/cprescher/peritheos/blob/main/CHANGELOG.md
9
12
  Keywords: equation-of-state,high-pressure,thermodynamics
10
- Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Development Status :: 4 - Beta
11
14
  Classifier: Intended Audience :: Science/Research
12
15
  Classifier: Programming Language :: Python :: 3
13
16
  Classifier: Programming Language :: Python :: 3.9
@@ -21,7 +24,7 @@ Classifier: Topic :: Scientific/Engineering :: Physics
21
24
  Requires-Python: >=3.9
22
25
  Description-Content-Type: text/markdown
23
26
  License-File: LICENSE
24
- Requires-Dist: numpy>=1.20.0
27
+ Requires-Dist: numpy>=1.21.0
25
28
  Requires-Dist: scipy>=1.7.0
26
29
  Dynamic: license-file
27
30
 
@@ -29,22 +32,39 @@ Dynamic: license-file
29
32
 
30
33
  A Python library for thermodynamic equations of state calculations for solid materials.
31
34
 
35
+ Full model, fitting, units, and development documentation is available at
36
+ [peritheos.readthedocs.io](https://peritheos.readthedocs.io/).
37
+ Release history is recorded in the [changelog](CHANGELOG.md).
38
+
32
39
  ## Features
33
40
 
34
41
  - Room temperature equations of state (EOS) implementations
35
42
  - Birch-Murnaghan
43
+ - Murnaghan
44
+ - Natural strain (orders 2-4)
45
+ - Modified Tait
36
46
  - Vinet
37
47
  - Holzapfel
38
48
  - Thermal equations of state (EOS) implementations
49
+ - Mie-Gruneisen-Debye
50
+ - Mie-Gruneisen-Einstein
51
+ - Holland-Powell thermal modified Tait
39
52
  - Sokolova 2016, including its complete thermal-pressure parameter set
53
+ - P-V and P-V-T parameter fitting with covariance and diagnostics
54
+ - Joint reference-isotherm and thermal fitting with cross-covariance
55
+ - Correlated observation errors and robust least-squares losses
56
+ - Reproducible fit summaries and versioned JSON export
57
+ - EOS prediction uncertainty from fitted covariance or published parameter errors
58
+ - Thermoelastic derivatives, heat capacities, and vibrational potentials
40
59
 
41
60
  ## Unit conventions
42
61
 
43
62
  - Public pressure and bulk-modulus values are in GPa.
44
63
  - Temperatures are in K.
45
- - Birch-Murnaghan and Vinet accept any consistent volume unit.
46
- - Holzapfel and Sokolova 2016 require molar volume in J bar^-1, which is
47
- equivalent to cm^3/mol divided by 10.
64
+ - Birch-Murnaghan, Murnaghan, modified Tait, and Vinet accept any consistent
65
+ volume unit.
66
+ - Holzapfel and all thermal EOS implementations require molar volume in
67
+ J bar^-1 mol^-1, which is equivalent to cm^3/mol divided by 10.
48
68
 
49
69
  ## Installation
50
70
 
@@ -84,6 +104,28 @@ print(f"Recovered volume: {volume}")
84
104
 
85
105
  ### Thermal equations of state
86
106
 
107
+ Mie-Gruneisen-Debye and Mie-Gruneisen-Einstein models can wrap any of the
108
+ room-temperature equations of state:
109
+
110
+ ```python
111
+ from peritheos.eos.rt import BM3
112
+ from peritheos.eos.thermal import MieGruneisenDebye
113
+
114
+ # Thermal models require molar volume in J bar^-1 mol^-1.
115
+ rt_eos = BM3(V0=1.0, K0=160.0, K0_prime=4.0)
116
+ eos = MieGruneisenDebye(
117
+ rt_eos=rt_eos,
118
+ Tr=300.0,
119
+ theta0=800.0,
120
+ gamma0=1.5,
121
+ q=1.0,
122
+ n=2,
123
+ )
124
+
125
+ pressure = eos.pressure(V=0.9, T=2000.0)
126
+ volume = eos.volume(P=pressure, T=2000.0)
127
+ ```
128
+
87
129
  Diamond thermal equation of state from sokolova et al. 2016
88
130
 
89
131
  ```python
@@ -143,3 +185,10 @@ print(f"RT pressure: {rt_pressure} GPa")
143
185
  print(f"Total pressure: {pressure} GPa")
144
186
  print(f"Recovered volume: {recovered_volume} J bar^-1")
145
187
  ```
188
+
189
+ ## Citation and support
190
+
191
+ Use the repository's `CITATION.cff` to cite Peritheos and cite the original
192
+ publication for each EOS used. Reproducible bugs and numerical discrepancies
193
+ can be reported through [GitHub Issues](https://github.com/CPrescher/peritheos/issues).
194
+ See [SUPPORT.md](SUPPORT.md) for the information needed to investigate a result.
@@ -2,22 +2,39 @@
2
2
 
3
3
  A Python library for thermodynamic equations of state calculations for solid materials.
4
4
 
5
+ Full model, fitting, units, and development documentation is available at
6
+ [peritheos.readthedocs.io](https://peritheos.readthedocs.io/).
7
+ Release history is recorded in the [changelog](CHANGELOG.md).
8
+
5
9
  ## Features
6
10
 
7
11
  - Room temperature equations of state (EOS) implementations
8
12
  - Birch-Murnaghan
13
+ - Murnaghan
14
+ - Natural strain (orders 2-4)
15
+ - Modified Tait
9
16
  - Vinet
10
17
  - Holzapfel
11
18
  - Thermal equations of state (EOS) implementations
19
+ - Mie-Gruneisen-Debye
20
+ - Mie-Gruneisen-Einstein
21
+ - Holland-Powell thermal modified Tait
12
22
  - Sokolova 2016, including its complete thermal-pressure parameter set
23
+ - P-V and P-V-T parameter fitting with covariance and diagnostics
24
+ - Joint reference-isotherm and thermal fitting with cross-covariance
25
+ - Correlated observation errors and robust least-squares losses
26
+ - Reproducible fit summaries and versioned JSON export
27
+ - EOS prediction uncertainty from fitted covariance or published parameter errors
28
+ - Thermoelastic derivatives, heat capacities, and vibrational potentials
13
29
 
14
30
  ## Unit conventions
15
31
 
16
32
  - Public pressure and bulk-modulus values are in GPa.
17
33
  - Temperatures are in K.
18
- - Birch-Murnaghan and Vinet accept any consistent volume unit.
19
- - Holzapfel and Sokolova 2016 require molar volume in J bar^-1, which is
20
- equivalent to cm^3/mol divided by 10.
34
+ - Birch-Murnaghan, Murnaghan, modified Tait, and Vinet accept any consistent
35
+ volume unit.
36
+ - Holzapfel and all thermal EOS implementations require molar volume in
37
+ J bar^-1 mol^-1, which is equivalent to cm^3/mol divided by 10.
21
38
 
22
39
  ## Installation
23
40
 
@@ -57,6 +74,28 @@ print(f"Recovered volume: {volume}")
57
74
 
58
75
  ### Thermal equations of state
59
76
 
77
+ Mie-Gruneisen-Debye and Mie-Gruneisen-Einstein models can wrap any of the
78
+ room-temperature equations of state:
79
+
80
+ ```python
81
+ from peritheos.eos.rt import BM3
82
+ from peritheos.eos.thermal import MieGruneisenDebye
83
+
84
+ # Thermal models require molar volume in J bar^-1 mol^-1.
85
+ rt_eos = BM3(V0=1.0, K0=160.0, K0_prime=4.0)
86
+ eos = MieGruneisenDebye(
87
+ rt_eos=rt_eos,
88
+ Tr=300.0,
89
+ theta0=800.0,
90
+ gamma0=1.5,
91
+ q=1.0,
92
+ n=2,
93
+ )
94
+
95
+ pressure = eos.pressure(V=0.9, T=2000.0)
96
+ volume = eos.volume(P=pressure, T=2000.0)
97
+ ```
98
+
60
99
  Diamond thermal equation of state from sokolova et al. 2016
61
100
 
62
101
  ```python
@@ -116,3 +155,10 @@ print(f"RT pressure: {rt_pressure} GPa")
116
155
  print(f"Total pressure: {pressure} GPa")
117
156
  print(f"Recovered volume: {recovered_volume} J bar^-1")
118
157
  ```
158
+
159
+ ## Citation and support
160
+
161
+ Use the repository's `CITATION.cff` to cite Peritheos and cite the original
162
+ publication for each EOS used. Reproducible bugs and numerical discrepancies
163
+ can be reported through [GitHub Issues](https://github.com/CPrescher/peritheos/issues).
164
+ See [SUPPORT.md](SUPPORT.md) for the information needed to investigate a result.
@@ -0,0 +1,25 @@
1
+ # Security policy
2
+
3
+ ## Supported versions
4
+
5
+ Peritheos supports the latest released minor series. Security fixes may be
6
+ backported when an older release remains widely used, but no backport is
7
+ guaranteed before version 1.0.
8
+
9
+ ## Reporting a vulnerability
10
+
11
+ Please do not open a public issue for a vulnerability that could expose users.
12
+ Use the repository's
13
+ [private vulnerability reporting](https://github.com/CPrescher/peritheos/security/advisories/new)
14
+ or email Clemens Prescher at `clemens.prescher@gmail.com` with:
15
+
16
+ - the affected version;
17
+ - a minimal reproduction or proof of concept;
18
+ - the expected impact; and
19
+ - any proposed mitigation.
20
+
21
+ You should receive an acknowledgement within seven days. A fix and disclosure
22
+ timeline will be coordinated after the report is reproduced.
23
+
24
+ Numerical inaccuracies without a security impact should use the scientific
25
+ validation issue template instead.
@@ -0,0 +1,14 @@
1
+ # Support
2
+
3
+ Use [GitHub Issues](https://github.com/CPrescher/peritheos/issues) for confirmed
4
+ bugs, documentation problems, and focused feature requests.
5
+
6
+ For a numerical discrepancy, include the Peritheos version, model and complete
7
+ parameter set, units, input state, observed result, expected result, and the
8
+ publication or independent program used for comparison. A minimal Python
9
+ example is strongly preferred.
10
+
11
+ Peritheos is research software supplied without warranty. Users remain
12
+ responsible for checking model choice, reference state, units, weighting, and
13
+ extrapolation limits before relying on results in publications or safety-
14
+ critical decisions.
@@ -0,0 +1,35 @@
1
+ # API stability
2
+
3
+ Peritheos follows [Semantic Versioning](https://semver.org/). Before 1.0, a
4
+ minor release may include a necessary breaking correction, particularly when a
5
+ published equation or unit convention was implemented incorrectly. Such a
6
+ change must be prominent in the changelog and release notes.
7
+
8
+ ## Public API
9
+
10
+ The supported public API consists of:
11
+
12
+ - names documented in the [API reference](api.md);
13
+ - names exported by a module's `__all__`;
14
+ - constructor parameters and documented public methods of exported EOS classes;
15
+ - the documented GPa, kelvin, and molar-volume conventions; and
16
+ - scalar and NumPy broadcasting behavior described in the documentation.
17
+
18
+ Names beginning with an underscore, implementation details not documented in
19
+ the API reference, and exact optimizer messages are private.
20
+
21
+ ## Compatibility commitments
22
+
23
+ `volume()` is the preferred pressure-to-volume method. `calculate_volume()` is
24
+ a supported compatibility alias and will remain available throughout the 1.x
25
+ series.
26
+
27
+ After 1.0, planned public API removals will normally emit
28
+ `DeprecationWarning` for at least two minor releases. Scientific corrections
29
+ that cannot preserve old behavior will include a reproducible before-and-after
30
+ case and a migration note.
31
+
32
+ Patch releases may improve numerical precision, validation, warning text, or
33
+ solver robustness without treating the last floating-point bit or exact error
34
+ message as stable. Published calculations should record the Peritheos version,
35
+ model order, complete parameters, units, and uncertainty convention.
@@ -0,0 +1,105 @@
1
+ # API reference
2
+
3
+ ## Isothermal equations of state
4
+
5
+ ```python
6
+ from peritheos.eos.rt import (
7
+ BM2,
8
+ BM3,
9
+ BM4,
10
+ Holzapfel,
11
+ ModifiedTait,
12
+ Murnaghan,
13
+ NaturalStrain2,
14
+ NaturalStrain3,
15
+ NaturalStrain4,
16
+ Vinet,
17
+ )
18
+ ```
19
+
20
+ Common methods:
21
+
22
+ - `pressure(V)`
23
+ - `bulk_modulus(V)`
24
+ - `volume(P)` and `calculate_volume(P)`
25
+
26
+ ## Thermal equations of state
27
+
28
+ ```python
29
+ from peritheos.eos.thermal import (
30
+ HollandPowell2011,
31
+ MieGruneisenDebye,
32
+ MieGruneisenEinstein,
33
+ Sokolova2016,
34
+ ThermalModifiedTait,
35
+ )
36
+ ```
37
+
38
+ Common methods:
39
+
40
+ - `thermal_pressure(V, T)`
41
+ - `pressure(V, T)`
42
+ - `volume(P, T)`
43
+ - `bulk_modulus(V, T)`
44
+ - `isothermal_compressibility(V, T)`
45
+ - `thermal_expansivity(V, T)`
46
+ - `molar_heat_capacity_v(V, T)` when a caloric model exists
47
+ - `molar_heat_capacity_p(V, T)` when a caloric model exists
48
+ - `adiabatic_bulk_modulus(V, T)` when a caloric model exists
49
+ - `gruneisen_parameter(V, T)` when a caloric model exists
50
+
51
+ Mie-Gruneisen models additionally expose `gruneisen_parameter()`,
52
+ `characteristic_temperature()`, and the vibrational thermodynamic methods
53
+ documented under [Thermoelastic properties](thermoelastic-properties.md).
54
+
55
+ ## Fitting
56
+
57
+ ```python
58
+ from peritheos.fitting import FitResult, fit_joint_eos, fit_rt_eos, fit_thermal_eos
59
+ ```
60
+
61
+ `FitResult` contains the fitted `model`, parameter and uncertainty mappings,
62
+ covariance and correlation matrices, raw and weighted residuals, chi-square,
63
+ degrees of freedom, AIC, BIC, convergence status, and solver message. It also
64
+ reports `adjusted_volume`, `adjusted_temperature`, `volume_corrections`, and
65
+ `temperature_corrections` for errors-in-variables fits. See
66
+ [Fitting P-V and P-V-T data](fitting.md) for the pressure, volume, and
67
+ temperature uncertainty API.
68
+
69
+ `FitResult.summary()` returns a compact text report. `FitResult.to_dict()` and
70
+ `FitResult.to_json()` export a versioned, JSON-safe record containing the model
71
+ identity and reconstructable parameters, fit arrays, diagnostics, and solver
72
+ configuration. Passing a path to `to_json()` also writes the record to disk.
73
+
74
+ `fit_joint_eos()` estimates reference-isotherm and thermal parameters in one
75
+ regression. Reference parameters use dotted names such as `rt_eos.V0`; its
76
+ covariance includes reference/thermal cross-correlations and is directly
77
+ compatible with `FitResult.eos_uncertainty()`.
78
+
79
+ ## Units
80
+
81
+ ```python
82
+ from peritheos.units import (
83
+ convert_density,
84
+ convert_molar_volume,
85
+ density_from_molar_volume,
86
+ molar_volume_from_density,
87
+ )
88
+ ```
89
+
90
+ ## Uncertainty propagation
91
+
92
+ ```python
93
+ from peritheos import EOSUncertainty, ParameterUncertainty, PredictionUncertainty
94
+ ```
95
+
96
+ `EOSUncertainty` wraps a deterministic EOS and provides `pressure()`, `volume()`,
97
+ `bulk_modulus()`, and the generic `evaluate()` method. Each returns a
98
+ `PredictionUncertainty` containing the nominal value, standard error, confidence
99
+ limits, statistical assumptions, and an optional output covariance matrix.
100
+
101
+ `FitResult.eos_uncertainty()` constructs the wrapper directly from fitted
102
+ parameter covariance. See [Uncertainty in EOS calculations](uncertainty.md).
103
+ Partial parameter-error sets are supported. Parameters omitted from the error
104
+ mapping or covariance ordering are treated as exact, rather than as having an
105
+ unknown error that Peritheos will estimate.
@@ -0,0 +1,40 @@
1
+ # Development
2
+
3
+ ## Test suite
4
+
5
+ ```bash
6
+ uv sync --all-groups
7
+ uv run ruff check .
8
+ uv run ruff format --check .
9
+ uv run pytest -q -W error --cov --cov-report=term-missing
10
+ ```
11
+
12
+ If the default uv cache is unavailable in a sandbox:
13
+
14
+ ```bash
15
+ UV_CACHE_DIR=/tmp/peritheos-uv-cache uv run pytest -q
16
+ ```
17
+
18
+ ## Documentation
19
+
20
+ ```bash
21
+ uv run --group docs mkdocs build --strict
22
+ ```
23
+
24
+ ## Adding an isothermal EOS
25
+
26
+ Subclass `EosBase`, validate `V0` and modulus parameters using the shared
27
+ validators, and implement analytic `pressure()` and `bulk_modulus()` methods.
28
+ The inherited volume solver supplies array-aware inversion. Add reference-state,
29
+ derivative, array, invalid-input, and round-trip tests.
30
+
31
+ ## Adding a thermal EOS
32
+
33
+ Subclass `ThermalEOS` and implement `thermal_pressure(V, T)`. The base class
34
+ provides total pressure, inversion, isothermal bulk modulus, compressibility,
35
+ and expansivity. Implement `molar_heat_capacity_v()` only when the model has a
36
+ defined caloric potential; the base class then provides `C_P` and `K_S`.
37
+
38
+ Document the required molar-volume unit, reference temperature, pressure unit,
39
+ parameter domain, source equations, and whether energy methods are absolute or
40
+ reference contributions.