├── .github
└── workflows
│ ├── build-docs.yml
│ ├── build-n-publish.yml
│ ├── lint-code.yml
│ └── run-tests.yml
├── .gitignore
├── .nojekyll
├── CODE_OF_CONDUCT.md
├── LICENSE
├── MANIFEST.in
├── README.md
├── citation.cff
├── docs
├── api.md
├── background.md
├── contributing.md
├── data
│ ├── BaS
│ │ ├── BaS_Fm-3m.dat
│ │ └── aims.out
│ ├── BaZrS3
│ │ ├── BaZrS3_Pnma.dat
│ │ └── aims.out
│ └── ZrS2
│ │ ├── ZrS2_P-3m1.dat
│ │ └── aims.out
├── images
│ ├── .gitkeep
│ └── 1FAD6_color.png
├── index.md
├── installation.md
└── tutorial.ipynb
├── mkdocs.yml
├── pyproject.toml
├── scripts
└── conversions.py
├── setup.cfg
├── setup.py
├── tests
├── .gitkeep
├── conftest.py
├── data
│ ├── BaS_Fm-3m.dat
│ ├── BaS_hse06_outfile
│ └── BaS_pbesol_relax_outfile
├── regression
│ ├── CZTS.ipynb
│ └── data
│ │ ├── CZTS.dat
│ │ ├── CZTS_out.dat
│ │ ├── Cu.dat
│ │ ├── Cu_out.dat
│ │ ├── S.dat
│ │ ├── S2.dat
│ │ ├── S_out.dat
│ │ ├── Sn.dat
│ │ ├── Sn_out.dat
│ │ ├── Zn.dat
│ │ └── Zn_out.dat
└── test_calculations.py
└── thermopot
├── __init__.py
├── calculations.py
├── interpolate.py
├── materials.py
├── potential.py
├── potentials.py
└── reactions.py
/.github/workflows/build-docs.yml:
--------------------------------------------------------------------------------
1 | name: build-docs
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | workflow_dispatch:
9 |
10 | jobs:
11 | deploy:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - uses: actions/checkout@v2
15 | with:
16 | fetch-depth: 0
17 | - uses: actions/setup-python@v2
18 | with:
19 | python-version: 3.x
20 | - run: pip install mkdocs mkdocs-material mkdocstrings[python] mkdocs-jupyter
21 | - run: mkdocs gh-deploy --force
22 |
--------------------------------------------------------------------------------
/.github/workflows/build-n-publish.yml:
--------------------------------------------------------------------------------
1 | name: build-n-publish
2 |
3 | on: push
4 |
5 | jobs:
6 | build-n-publish:
7 | name: build and publish Python package distributions to PyPI
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@master
11 | - name: Set up Python 3.9
12 | uses: actions/setup-python@v1
13 | with:
14 | python-version: 3.9
15 | - name: Install build
16 | run: pip install build --user
17 | - name: Build a binary wheel and source tarball
18 | run: python3 -m build --sdist --wheel --outdir dist/
19 | - name: Publish distribution to PYPI
20 | if: startsWith(github.ref, 'refs/tags')
21 | uses: pypa/gh-action-pypi-publish@master
22 | with:
23 | password: ${{ secrets.PYPI_API_TOKEN }}
24 |
--------------------------------------------------------------------------------
/.github/workflows/lint-code.yml:
--------------------------------------------------------------------------------
1 | name: lint-code
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | lint:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v2
10 | - uses: psf/black@stable
11 | with:
12 | options: "--verbose"
13 | - uses: EndBug/add-and-commit@v9
14 |
--------------------------------------------------------------------------------
/.github/workflows/run-tests.yml:
--------------------------------------------------------------------------------
1 | name: run-tests
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | - prakriti_try
8 |
9 | workflow_dispatch:
10 |
11 | jobs:
12 | deploy:
13 | runs-on: ubuntu-latest
14 | steps:
15 | - uses: actions/checkout@v2
16 | with:
17 | fetch-depth: 0
18 | - uses: actions/setup-python@v2
19 | with:
20 | python-version: 3.x
21 | - run: |
22 | pip install pytest
23 | pip install -e .
24 | - run: pytest tests/
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .ipynb_checkpoints/
2 | *.pyc
3 | plots/*.png
4 | plots/*.pdf
5 | README.pdf
6 |
--------------------------------------------------------------------------------
/.nojekyll:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | l.whalley@northumbria.ac.uk.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | prune *
2 | exclude *
3 |
4 | # Core Package and Basic User Documentation
5 | graft thermopot
6 | include README.md
7 | include LICENSE
8 |
9 | # Development Files and Full Documentation
10 | graft .github
11 | graft docs
12 | graft tests
13 |
14 | # Project Metadata
15 | include pyproject.toml setup.cfg setup.py MANIFEST.in
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ThermoPot: An ab-initio thermodynamic modelling package [](https://zenodo.org/badge/latestdoi/490745937)
5 | ============================
6 |
7 | ⚠️ This repository is still in development, and some functionality is untested. Use with caution.
8 |
9 |   
10 |
11 | Software for ab-initio thermodynamic modelling of material formation and decomposition.
12 |
13 | - 📚 The documentation is [here](https://NU-CEM.github.io/ThermoPot).
14 | - 🖊 If you use this package for your own work please [cite accordingly](https://github.com/NU-CEM/ThermoPot/blob/main/citation.cff).
15 | - 🔄 This code is made available under the GNU General Public Licence (GPL) v3.
16 |
17 | This work adapts and extends a previous repository developed by Adam Jackson: [Thermodynamic model of CZTS](http://dx.doi.org/10.5281/zenodo.57130).
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/citation.cff:
--------------------------------------------------------------------------------
1 | cff-version: 1.2.0
2 | message: "If you use this software, please cite it as below."
3 | authors:
4 | - family-names: "Jackson"
5 | given-names: "Adam"
6 | orcid: "https://orcid.org/0000-0001-5272-6530 "
7 | - family-names: "Kayastha"
8 | given-names: "Prakriti"
9 | orcid: "https://orcid.org/0000-0002-4852-6445"
10 | - family-names: "Walsh"
11 | given-names: "Aron"
12 | orcid: "https://orcid.org/0000-0001-5460-7033"
13 | - family-names: "Whalley"
14 | given-names: "Lucy"
15 | orcid: "https://orcid.org/0000-0002-2992-9871"
16 | title: "BaZrS3-thermodynamic-model"
17 | url: "https://github.com/NU-CEM/BaZrS3-thermodynamic-model"
18 |
--------------------------------------------------------------------------------
/docs/api.md:
--------------------------------------------------------------------------------
1 | # API documentation
2 |
3 | ::: thermopot.calculations
4 |
5 | ::: thermopot.materials
6 |
7 | ::: thermopot.reactions
8 |
9 | ::: thermopot.potential
10 |
11 | ::: thermopot.potentials
12 |
13 | ::: thermopot.interpolate
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/docs/background.md:
--------------------------------------------------------------------------------
1 | This software is used to calculate the thermodynamic potentials of materials and ideal gases. The calculations are based on energetic and vibrational data from theory (for example, density functional theory) or experiment. By calculating the thermodynamic potentials of both products and reactants, this software can also produce a thermodynamic model for the stability of a material under arbitrary temperatures and pressures.
2 |
3 | ## Research outputs
4 |
5 | - This model was originally developed for the photovoltaic material CZTS and published in a [2014 publication in *J. Mater. Chem. A*](http://dx.doi.org/10.1039/C4TA00892H).
6 | - It has been more recently applied to the chalcogenide perovskite BaZrS3 and published in a [2023 publication in *Solar RRL*](https://doi.org/10.1002/solr.202201078).
7 |
8 | ## Experimental data
9 |
10 | Experimental data is used to model the pressure and temperature dependance of gases. In particular the NIST-JANAF thermochemical tables are used: Chase, M. W. J. NIST-JANAF Thermochemical Tables, Fourth Edition. J. Phys. Chem. Ref. Data, Monogr. 9, 1-1951 (1998). https://srd.nist.gov/JPCRD/jpcrdM9.pdf.
11 |
12 | ## Further reading
13 |
14 | - Materials Stability and Nature's bike shop: A comics guide to predicting new materials, Anubhav Jain (2014). Link [here](https://hackingmaterials.files.wordpress.com/2014/05/phasediagram_comic2.pdf)
15 | - Phase Diagrams: The Beginning of Wisdom. Rainer Schmid-Fetzer (2014): Link [here](https://files.core.ac.uk/pdf/2612/81879090.pdf).
16 |
--------------------------------------------------------------------------------
/docs/contributing.md:
--------------------------------------------------------------------------------
1 | Thanks for your interest in ThermoPot - we welcome your help in improving and extending this package.
2 |
3 | This project follows the [all-contributors](https://allcontributors.org/)
4 | specification. Contributions of any kind are welcome! A full list of
5 | possible contribution types can be found [here](https://allcontributors.
6 | org/docs/en/emoji-key). **You do not need to be an experienced programmer
7 | to help improve ThermoPot.**
8 |
9 | All contributions will be recognised on the README.md.
10 | You are encouraged to log your own contribution using the [all-contributors bot](https://allcontributors.org/docs/en/bot/usage). The project lead(s) will also maintain this list.
11 |
12 | ThermoPot contributors are asked to follow the [Contributor Covenant Code of
13 | Conduct](https://github.com/NU-CEM/ThermoPot/blob/main/CODE_OF_CONDUCT.md).
14 |
15 | ## Contributions workflow
16 |
17 | Code contributions are primarily managed through Github pull requests. For external contributions we prefer the “fork and pull” workflow:
18 |
19 | 1. open an Issue to discuss the proposed contribution.
20 | 2. make your own project fork and implement the changes there
21 | 3. open a pull requestion (PR) to merge the changes into the main project. Further discussion might also take place at this stage.
22 |
23 | Note: Please, where applicable and possible, write tests and documentation for your proposed code contributions (further details below). Support can be given to those who are writing tests and documentation for the first time 😊
24 |
25 | ## Communication
26 |
27 | As a rule of thumb, the more public the information exchange, the better! With this in mind, we encourage you to [raise an issue](https://github.com/NU-CEM/ThermoPot/issues/new/choose) on the ThermoPot repository.
28 |
29 | However we also understand that this public way of working is not suitable for everyone. As an alternative, you can get [get in contact](https://lucydot.github.io/about/) with the project lead Lucy.
30 |
31 | ## Testing
32 |
33 | Github Actions and [Pytest](https://docs.pytest.org/) is used to automatically [test all commits](https://github.com/NU-CEM/ThermoPot/actions/workflows/run-tests.yml) to the main branch of the ThermoPot repository. If possible, please write tests for your code when issuing a Pull Request; `./tests/conftest.py` contains pytest fixtures which may be of use. Test files and test data can be found in the `tests/` folder.
34 |
35 | ## Documentation
36 |
37 | Github Actions is used to automatically [build and publish code documentation](https://github.com/NU-CEM/ThermoPot/actions/workflows/build-docs.yml) after each commit to the main branch of the ThermoPot repository. All documentation is written in Markdown using the [MkDocs framework](https://www.mkdocs.org/) and the [Material theme](https://squidfunk.github.io/mkdocs-material/). This also includes the automatic generation of API documentation using the [mkdocstrings](https://github.com/mkdocstrings/mkdocstrings) plugin.
38 |
39 | If possible, please update the documentation when issuing a Pull Request. This includes both the web pages written in Markdown, and in-code docstrings. The latter are particularly important, and we request that these are written [Google-style](https://gist.github.com/redlotus/3bc387c2591e3e908c9b63b97b11d24e).
40 |
41 | All documentation source can be found in the `docs/` folder. MkDocs is configured with the `/.mkdocs.yml` folder in the project root.
42 |
43 | ## Linting
44 |
45 | Github Actions and [Black](https://github.com/psf/black) are used to
46 | automatically [re-format all Python code](https://github.
47 | com/NU-CEM/ThermoPot/actions/workflows/lint-code.yml) committed to the
48 | repository. The code
49 | will be formatted according to the PEP8
50 | specification. As this is an automatic step you do not need lint/format your code to any specification before issuing a PR.
51 |
52 | ## Publishing
53 |
54 | Github Actions (surprise, surprise!) is used to automatically [build and publish the ThermoPot package](https://github.com/NU-CEM/ThermoPot/actions/workflows/build-n-publish.yml) after every tagged release. Before tagging the release, we need to remember to update the version number in `__init__.py`. It's so easy to forget!
55 |
--------------------------------------------------------------------------------
/docs/data/BaS/BaS_Fm-3m.dat:
--------------------------------------------------------------------------------
1 | # T [K] F [kJ/mol] S [J/K/mol] C_v [J/K/mol] E [kJ/mol]
2 | 0.000 4.5962143 0.0000000 0.0000000 4.5962143
3 | 10.000 4.5960613 0.0674022 0.2464706 4.5967353
4 | 20.000 4.5922486 0.9320407 3.2439747 4.6108894
5 | 30.000 4.5724108 3.2516967 8.7516426 4.6699617
6 | 40.000 4.5238649 6.5820137 14.6709375 4.7871455
7 | 50.000 4.4389478 10.4643077 20.2356235 4.9621632
8 | 60.000 4.3137611 14.5953830 25.0968553 5.1894841
9 | 70.000 4.1468729 18.7791647 29.1573406 5.4614145
10 | 80.000 3.9384046 22.8966666 32.4716818 5.7701379
11 | 90.000 3.6893848 26.8817029 35.1531092 6.1087381
12 | 100.000 3.4013229 30.7016849 37.3213848 6.4714914
13 | 110.000 3.0759438 34.3442293 39.0819739 6.8538091
14 | 120.000 2.7150330 37.8085650 40.5209358 7.2520608
15 | 130.000 2.3203483 41.1002707 41.7061087 7.6633835
16 | 140.000 1.8935738 44.2281437 42.6901840 8.0855140
17 | 150.000 1.4362976 47.2023738 43.5139078 8.5166537
18 | 160.000 0.9500033 50.0335013 44.2088289 8.9553635
19 | 170.000 0.4360701 52.7318420 44.7994822 9.4004833
20 | 180.000 -0.1042236 55.3071870 45.3050661 9.8510701
21 | 190.000 -0.6696941 57.7686628 45.7407085 10.3063518
22 | 200.000 -1.2592454 60.1246841 46.1184192 10.7656914
23 | 210.000 -1.8718621 62.3829589 46.4478041 11.2285593
24 | 220.000 -2.5066023 64.5505211 46.7366040 11.6945124
25 | 230.000 -3.1625915 66.6337769 46.9911015 12.1631772
26 | 240.000 -3.8390163 68.6385565 47.2164317 12.6342373
27 | 250.000 -4.5351188 70.5701662 47.4168197 13.1074228
28 | 260.000 -5.2501919 72.4334389 47.5957642 13.5825022
29 | 270.000 -5.9835745 74.2327809 47.7561797 14.0592763
30 | 280.000 -6.7346478 75.9722146 47.9005083 14.5375723
31 | 290.000 -7.5028314 77.6554178 48.0308077 15.0172398
32 | 300.000 -8.2875800 79.2857583 48.1488200 15.4981475
33 | 310.000 -9.0883807 80.8663254 48.2560281 15.9801802
34 | 320.000 -9.9047501 82.3999574 48.3536999 16.4632363
35 | 330.000 -10.7362321 83.8892671 48.4429241 16.9472260
36 | 340.000 -11.5823957 85.3366632 48.5246399 17.4320697
37 | 350.000 -12.4428331 86.7443704 48.5996603 17.9176965
38 | 360.000 -13.3171577 88.1144465 48.6686922 18.4040430
39 | 370.000 -14.2050030 89.4487985 48.7323522 18.8910525
40 | 380.000 -15.1060205 90.7491960 48.7911798 19.3786739
41 | 390.000 -16.0198792 92.0172840 48.8456493 19.8668615
42 | 400.000 -16.9462636 93.2545936 48.8961783 20.3555738
43 | 410.000 -17.8848733 94.4625523 48.9431357 20.8447732
44 | 420.000 -18.8354213 95.6424929 48.9868488 21.3344257
45 | 430.000 -19.7976339 96.7956610 49.0276081 21.8245003
46 | 440.000 -20.7712492 97.9232229 49.0656727 22.3149689
47 | 450.000 -21.7560166 99.0262716 49.1012739 22.8058056
48 | 460.000 -22.7516963 100.1058330 49.1346189 23.2969868
49 | 470.000 -23.7580582 101.1628708 49.1658936 23.7884911
50 | 480.000 -24.7748817 102.1982918 49.1952651 24.2802984
51 | 490.000 -25.8019548 103.2129497 49.2228844 24.7723905
52 | 500.000 -26.8390742 104.2076497 49.2488874 25.2647507
53 | 510.000 -27.8860439 105.1831513 49.2733975 25.7573633
54 | 520.000 -28.9426756 106.1401723 49.2965264 26.2502140
55 | 530.000 -30.0087880 107.0793916 49.3183757 26.7432896
56 | 540.000 -31.0842062 108.0014515 49.3390377 27.2365776
57 | 550.000 -32.1687618 108.9069609 49.3585967 27.7300666
58 | 560.000 -33.2622922 109.7964970 49.3771295 28.2237461
59 | 570.000 -34.3646404 110.6706077 49.3947066 28.7176060
60 | 580.000 -35.4756547 111.5298137 49.4113923 29.2116373
61 | 590.000 -36.5951886 112.3746097 49.4272458 29.7058311
62 | 600.000 -37.7231004 113.2054666 49.4423213 30.2001796
63 | 610.000 -38.8592530 114.0228329 49.4566688 30.6946751
64 | 620.000 -40.0035135 114.8271358 49.4703344 31.1893107
65 | 630.000 -41.1557535 115.6187828 49.4833604 31.6840797
66 | 640.000 -42.3158483 116.3981628 49.4957862 32.1789759
67 | 650.000 -43.4836771 117.1656471 49.5076478 32.6739935
68 | 660.000 -44.6591228 117.9215907 49.5189790 33.1691271
69 | 670.000 -45.8420716 118.6663329 49.5298107 33.6643714
70 | 680.000 -47.0324132 119.4001984 49.5401719 34.1597217
71 | 690.000 -48.2300403 120.1234981 49.5500894 34.6551734
72 | 700.000 -49.4348489 120.8365300 49.5595881 35.1507221
73 | 710.000 -50.6467377 121.5395796 49.5686912 35.6463638
74 | 720.000 -51.8656081 122.2329206 49.5774203 36.1420947
75 | 730.000 -53.0913646 122.9168160 49.5857957 36.6379111
76 | 740.000 -54.3239138 123.5915180 49.5938361 37.1338095
77 | 750.000 -55.5631651 124.2572691 49.6015592 37.6297867
78 | 760.000 -56.8090301 124.9143024 49.6089813 38.1258397
79 | 770.000 -58.0614228 125.5628419 49.6161180 38.6219654
80 | 780.000 -59.3202594 126.2031032 49.6229836 39.1181611
81 | 790.000 -60.5854580 126.8352940 49.6295916 39.6144242
82 | 800.000 -61.8569390 127.4596140 49.6359549 40.1107521
83 | 810.000 -63.1346247 128.0762558 49.6420853 40.6071425
84 | 820.000 -64.4184392 128.6854052 49.6479939 41.1035931
85 | 830.000 -65.7083084 129.2872411 49.6536915 41.6001017
86 | 840.000 -67.0041602 129.8819363 49.6591878 42.0966663
87 | 850.000 -68.3059239 130.4696573 49.6644923 42.5932848
88 | 860.000 -69.6135306 131.0505653 49.6696138 43.0899555
89 | 870.000 -70.9269130 131.6248156 49.6745605 43.5866765
90 | 880.000 -72.2460052 132.1925584 49.6793404 44.0834462
91 | 890.000 -73.5707430 132.7539391 49.6839608 44.5802628
92 | 900.000 -74.9010633 133.3090980 49.6884287 45.0771249
93 | 910.000 -76.2369046 133.8581709 49.6927508 45.5740309
94 | 920.000 -77.5782069 134.4012894 49.6969334 46.0709794
95 | 930.000 -78.9249110 134.9385808 49.7009823 46.5679691
96 | 940.000 -80.2769595 135.4701682 49.7049032 47.0649986
97 | 950.000 -81.6342958 135.9961711 49.7087015 47.5620668
98 | 960.000 -82.9968647 136.5167051 49.7123822 48.0591723
99 | 970.000 -84.3646120 137.0318825 49.7159501 48.5563140
100 | 980.000 -85.7374848 137.5418120 49.7194097 49.0534909
101 | 990.000 -87.1154311 138.0465990 49.7227655 49.5507019
102 | 1000.000 -88.4984000 138.5463459 49.7260214 50.0479459
103 | 1010.000 -89.8863416 139.0411520 49.7291815 50.5452220
104 | 1020.000 -91.2792069 139.5311138 49.7322494 51.0425292
105 | 1030.000 -92.6769480 140.0163249 49.7352286 51.5398667
106 | 1040.000 -94.0795178 140.4968763 49.7381227 52.0372335
107 | 1050.000 -95.4868703 140.9728563 49.7409347 52.5346289
108 | 1060.000 -96.8989600 141.4443509 49.7436678 53.0320519
109 | 1070.000 -98.3157426 141.9114435 49.7463249 53.5295020
110 | 1080.000 -99.7371745 142.3742155 49.7489087 54.0269782
111 | 1090.000 -101.1632128 142.8327456 49.7514220 54.5244799
112 | 1100.000 -102.5938155 143.2871108 49.7538672 55.0220064
113 | 1110.000 -104.0289414 143.7373860 49.7562469 55.5195570
114 | 1120.000 -105.4685499 144.1836437 49.7585633 56.0171311
115 | 1130.000 -106.9126011 144.6259550 49.7608186 56.5147281
116 | 1140.000 -108.3610560 145.0643889 49.7630150 57.0123473
117 | 1150.000 -109.8138762 145.4990125 49.7651546 57.5099882
118 | 1160.000 -111.2710238 145.9298914 49.7672392 58.0076502
119 | 1170.000 -112.7324617 146.3570894 49.7692707 58.5053328
120 | 1180.000 -114.1981535 146.7806686 49.7712509 59.0030355
121 | 1190.000 -115.6680633 147.2006898 49.7731815 59.5007577
122 | 1200.000 -117.1421557 147.6172122 49.7750642 59.9984989
123 | 1210.000 -118.6203960 148.0302932 49.7769006 60.4962588
124 | 1220.000 -120.1027502 148.4399894 49.7786920 60.9940368
125 | 1230.000 -121.5891847 148.8463554 49.7804401 61.4918325
126 | 1240.000 -123.0796664 149.2494451 49.7821461 61.9896455
127 | 1250.000 -124.5741629 149.6493105 49.7838115 62.4874753
128 | 1260.000 -126.0726421 150.0460029 49.7854374 62.9853216
129 | 1270.000 -127.5750725 150.4395720 49.7870252 63.4831839
130 | 1280.000 -129.0814232 150.8300665 49.7885760 63.9810619
131 | 1290.000 -130.5916638 151.2175341 49.7900910 64.4789553
132 | 1300.000 -132.1057640 151.6020213 49.7915712 64.9768636
133 | 1310.000 -133.6236944 151.9835733 49.7930177 65.4747866
134 | 1320.000 -135.1454258 152.3622346 49.7944315 65.9727239
135 | 1330.000 -136.6709296 152.7380487 49.7958137 66.4706751
136 | 1340.000 -138.2001775 153.1110578 49.7971650 66.9686401
137 | 1350.000 -139.7331415 153.4813036 49.7984865 67.4666183
138 | 1360.000 -141.2697944 153.8488266 49.7997791 67.9646097
139 | 1370.000 -142.8101091 154.2136664 49.8010434 68.4626138
140 | 1380.000 -144.3540590 154.5758619 49.8022805 68.9606305
141 | 1390.000 -145.9016177 154.9354511 49.8034910 69.4586593
142 | 1400.000 -147.4527594 155.2924712 49.8046757 69.9567002
143 | 1410.000 -149.0074587 155.6469585 49.8058353 70.4547528
144 | 1420.000 -150.5656903 155.9989487 49.8069706 70.9528168
145 | 1430.000 -152.1274294 156.3484766 49.8080821 71.4508921
146 | 1440.000 -153.6926517 156.6955765 49.8091707 71.9489784
147 | 1450.000 -155.2613330 157.0402817 49.8102368 72.4470754
148 | 1460.000 -156.8334495 157.3826250 49.8112811 72.9451831
149 | 1470.000 -158.4089777 157.7226386 49.8123043 73.4433010
150 | 1480.000 -159.9878946 158.0603538 49.8133067 73.9414291
151 | 1490.000 -161.5701772 158.3958015 49.8142892 74.4395671
152 | 1500.000 -163.1558031 158.7290120 49.8152520 74.9377148
153 | 1510.000 -164.7447501 159.0600147 49.8161959 75.4358720
154 | 1520.000 -166.3369962 159.3888387 49.8171211 75.9340386
155 | 1530.000 -167.9325197 159.7155125 49.8180284 76.4322144
156 | 1540.000 -169.5312994 160.0400640 49.8189180 76.9303992
157 | 1550.000 -171.1333140 160.3625205 49.8197905 77.4285927
158 | 1560.000 -172.7385429 160.6829088 49.8206463 77.9267949
159 | 1570.000 -174.3469654 161.0012554 49.8214859 78.4250056
160 | 1580.000 -175.9585613 161.3175860 49.8223095 78.9232246
161 | 1590.000 -177.5733105 161.6319259 49.8231177 79.4214517
162 | 1600.000 -179.1911932 161.9443001 49.8239109 79.9196869
163 | 1610.000 -180.8121900 162.2547328 49.8246893 80.4179299
164 | 1620.000 -182.4362815 162.5632482 49.8254533 80.9161806
165 | 1630.000 -184.0634486 162.8698697 49.8262034 81.4144389
166 | 1640.000 -185.6936726 163.1746203 49.8269398 81.9127046
167 | 1650.000 -187.3269349 163.4775228 49.8276628 82.4109777
168 | 1660.000 -188.9632170 163.7785993 49.8283729 82.9092578
169 | 1670.000 -190.6025009 164.0778718 49.8290702 83.4075451
170 | 1680.000 -192.2447685 164.3753617 49.8297552 83.9058392
171 | 1690.000 -193.8900022 164.6710902 49.8304280 84.4041401
172 | 1700.000 -195.5381845 164.9650778 49.8310890 84.9024477
173 | 1710.000 -197.1892980 165.2573450 49.8317385 85.4007619
174 | 1720.000 -198.8433257 165.5479117 49.8323767 85.8990825
175 | 1730.000 -200.5002507 165.8367977 49.8330039 86.3974094
176 | 1740.000 -202.1600562 166.1240222 49.8336203 86.8957425
177 | 1750.000 -203.8227257 166.4096042 49.8342262 87.3940817
178 | 1760.000 -205.4882428 166.6935624 49.8348218 87.8924270
179 | 1770.000 -207.1565915 166.9759151 49.8354073 88.3907782
180 | 1780.000 -208.8277558 167.2566803 49.8359830 88.8891351
181 | 1790.000 -210.5017199 167.5358758 49.8365491 89.3874978
182 | 1800.000 -212.1784682 167.8135190 49.8371058 89.8858661
183 | 1810.000 -213.8579852 168.0896271 49.8376533 90.3842399
184 | 1820.000 -215.5402557 168.3642169 49.8381918 90.8826191
185 | 1830.000 -217.2252645 168.6373050 49.8387216 91.3810037
186 | 1840.000 -218.9129968 168.9089078 49.8392427 91.8793935
187 | 1850.000 -220.6034378 169.1790412 49.8397554 92.3777885
188 | 1860.000 -222.2965728 169.4477212 49.8402599 92.8761886
189 | 1870.000 -223.9923874 169.7149631 49.8407563 93.3745937
190 | 1880.000 -225.6908673 169.9807824 49.8412448 93.8730037
191 | 1890.000 -227.3919984 170.2451941 49.8417256 94.3714185
192 | 1900.000 -229.0957666 170.5082130 49.8421988 94.8698382
193 | 1910.000 -230.8021580 170.7698537 49.8426646 95.3682625
194 | 1920.000 -232.5111591 171.0301305 49.8431232 95.8666914
195 | 1930.000 -234.2227561 171.2890575 49.8435746 96.3651249
196 | 1940.000 -235.9369358 171.5466488 49.8440191 96.8635629
197 | 1950.000 -237.6536847 171.8029179 49.8444568 97.3620053
198 | 1960.000 -239.3729898 172.0578785 49.8448878 97.8604520
199 | 1970.000 -241.0948380 172.3115436 49.8453123 98.3589030
200 | 1980.000 -242.8192164 172.5639266 49.8457304 98.8573582
201 | 1990.000 -244.5461123 172.8150401 49.8461421 99.3558176
202 | 2000.000 -246.2755130 173.0648970 49.8465478 99.8542811
203 |
--------------------------------------------------------------------------------
/docs/data/BaZrS3/BaZrS3_Pnma.dat:
--------------------------------------------------------------------------------
1 | # T [K] F [kJ/mol] S [J/K/mol] C_v [J/K/mol] E [kJ/mol]
2 | 0.000 61.8411565 0.0000000 0.0000000 61.8411565
3 | 10.000 61.8393868 0.9384821 4.0772256 61.8487716
4 | 20.000 61.7864518 11.9339475 34.9094255 62.0251308
5 | 30.000 61.5643977 33.7922854 76.2426484 62.5781663
6 | 40.000 61.0910899 61.5909574 119.0683267 63.5547282
7 | 50.000 60.3217463 92.6686849 160.6152279 64.9551805
8 | 60.000 59.2322619 125.4001700 198.9734140 66.7562721
9 | 70.000 57.8118747 158.7045825 233.3196903 68.9211955
10 | 80.000 56.0586320 191.8790927 263.5649550 71.4089594
11 | 90.000 53.9762141 224.4829894 289.9707241 74.1796831
12 | 100.000 51.5717706 256.2511352 312.9302628 77.1968841
13 | 110.000 48.8544844 287.0338297 332.8642613 80.4282057
14 | 120.000 45.8346322 316.7566340 350.1746668 83.8454283
15 | 130.000 42.5229737 345.3938443 365.2259652 87.4241735
16 | 140.000 38.9303578 372.9509653 378.3394124 91.1434929
17 | 150.000 35.0674724 399.4530818 389.7934092 94.9854347
18 | 160.000 30.9446905 424.9371179 399.8266979 98.9346293
19 | 170.000 26.5719786 449.4466809 408.6426880 102.9779144
20 | 180.000 21.9588490 473.0286383 416.4140297 107.1040039
21 | 190.000 17.1143382 495.7308664 423.2869894 111.3032029
22 | 200.000 12.0470058 517.6007907 429.3854192 115.5671640
23 | 210.000 6.7649430 538.6844664 434.8142460 119.8886810
24 | 220.000 1.2757900 559.0260231 439.6624749 124.2615150
25 | 230.000 -4.4132436 578.6673571 444.0057431 128.6802485
26 | 240.000 -10.2953551 597.6479899 447.9084695 133.1401625
27 | 250.000 -16.3641250 616.0050348 451.4256560 137.6371337
28 | 260.000 -22.6134932 633.7732362 454.6043914 142.1675482
29 | 270.000 -29.0377354 650.9850522 457.4851037 146.7282287
30 | 280.000 -35.6314408 667.6707651 460.1026031 151.3163734
31 | 290.000 -42.3894913 683.8586047 462.4869517 155.9295040
32 | 300.000 -49.3070412 699.5748789 464.6641874 160.5654224
33 | 310.000 -56.3794989 714.8441034 466.6569290 165.2221731
34 | 320.000 -63.6025095 729.6891296 468.4848824 169.8980120
35 | 330.000 -70.9719387 744.1312661 470.1652652 174.5913791
36 | 340.000 -78.4838583 758.1903945 471.7131623 179.3008759
37 | 350.000 -86.1345319 771.8850772 473.1418274 184.0252451
38 | 360.000 -93.9204029 785.2326583 474.4629355 188.7633541
39 | 370.000 -101.8380823 798.2493569 475.6867983 193.5141798
40 | 380.000 -109.8843378 810.9503533 476.8225466 198.2767964
41 | 390.000 -118.0560845 823.3498682 477.8782848 203.0503641
42 | 400.000 -126.3503748 835.4612358 478.8612242 207.8341195
43 | 410.000 -134.7643905 847.2969706 479.7777958 212.6273674
44 | 420.000 -143.2954347 858.8688289 480.6337477 217.4294735
45 | 430.000 -151.9409244 870.1878651 481.4342291 222.2398576
46 | 440.000 -160.6983840 881.2644832 482.1838621 227.0579886
47 | 450.000 -169.5654388 892.1084844 482.8868040 231.8833792
48 | 460.000 -178.5398092 902.7291103 483.5468021 236.7155816
49 | 470.000 -187.6193055 913.1350828 484.1672398 241.5541834
50 | 480.000 -196.8018228 923.3346407 484.7511781 246.3988047
51 | 490.000 -206.0853363 933.3355732 485.3013913 251.2490946
52 | 500.000 -215.4678968 943.1452507 485.8203980 256.1047286
53 | 510.000 -224.9476271 952.7706535 486.3104887 260.9654062
54 | 520.000 -234.5227177 962.2183974 486.7737498 265.8308489
55 | 530.000 -244.1914238 971.4947583 487.2120848 270.7007981
56 | 540.000 -253.9520615 980.6056942 487.6272331 275.5750133
57 | 550.000 -263.8030052 989.5568654 488.0207864 280.4532708
58 | 560.000 -273.7426842 998.3536539 488.3942033 285.3353620
59 | 570.000 -283.7695807 1007.0011806 488.7488225 290.2210922
60 | 580.000 -293.8822266 1015.5043215 489.0858743 295.1102799
61 | 590.000 -304.0792014 1023.8677226 489.4064907 300.0027549
62 | 600.000 -314.3591300 1032.0958140 489.7117148 304.8983584
63 | 610.000 -324.7206807 1040.1928228 490.0025087 309.7969411
64 | 620.000 -335.1625630 1048.1627846 490.2797613 314.6983634
65 | 630.000 -345.6835258 1056.0095552 490.5442945 319.6024940
66 | 640.000 -356.2823558 1063.7368207 490.7968692 324.5092095
67 | 650.000 -366.9578756 1071.3481069 491.0381906 329.4183939
68 | 660.000 -377.7089426 1078.8467887 491.2689130 334.3299379
69 | 670.000 -388.5344469 1086.2360980 491.4896443 339.2437388
70 | 680.000 -399.4333103 1093.5191320 491.7009495 344.1596994
71 | 690.000 -410.4044852 1100.6988599 491.9033547 349.0777281
72 | 700.000 -421.4469527 1107.7781302 492.0973497 353.9977385
73 | 710.000 -432.5597220 1114.7596770 492.2833916 358.9196486
74 | 720.000 -443.7418292 1121.6461256 492.4619068 363.8433812
75 | 730.000 -454.9923360 1128.4399986 492.6332938 368.7688630
76 | 740.000 -466.3103287 1135.1437207 492.7979250 373.6960246
77 | 750.000 -477.6949177 1141.7596238 492.9561492 378.6248002
78 | 760.000 -489.1452359 1148.2899516 493.1082929 383.5551273
79 | 770.000 -500.6604386 1154.7368642 493.2546622 388.4869468
80 | 780.000 -512.2397021 1161.1024415 493.3955443 393.4202023
81 | 790.000 -523.8822230 1167.3886877 493.5312089 398.3548403
82 | 800.000 -535.5872179 1173.5975347 493.6619092 403.2908099
83 | 810.000 -547.3539220 1179.7308453 493.7878836 408.2280627
84 | 820.000 -559.1815890 1185.7904165 493.9093561 413.1665526
85 | 830.000 -571.0694903 1191.7779829 494.0265380 418.1062355
86 | 840.000 -583.0169142 1197.6952189 494.1396279 423.0470697
87 | 850.000 -595.0231656 1203.5437420 494.2488137 427.9890151
88 | 860.000 -607.0875652 1209.3251148 494.3542721 432.9320335
89 | 870.000 -619.2094491 1215.0408480 494.4561703 437.8760886
90 | 880.000 -631.3881683 1220.6924021 494.5546662 442.8211456
91 | 890.000 -643.6230880 1226.2811900 494.6499091 447.7671711
92 | 900.000 -655.9135874 1231.8085787 494.7420401 452.7141334
93 | 910.000 -668.2590593 1237.2758915 494.8311928 457.6620020
94 | 920.000 -680.6589093 1242.6844098 494.9174939 462.6107478
95 | 930.000 -693.1125556 1248.0353746 495.0010632 467.5603428
96 | 940.000 -705.6194289 1253.3299885 495.0820145 472.5107603
97 | 950.000 -718.1789715 1258.5694170 495.1604557 477.4619747
98 | 960.000 -730.7906371 1263.7547901 495.2364890 482.4139614
99 | 970.000 -743.4538907 1268.8872036 495.3102119 487.3666968
100 | 980.000 -756.1682082 1273.9677208 495.3817166 492.3201582
101 | 990.000 -768.9330756 1278.9973733 495.4510911 497.2743240
102 | 1000.000 -781.7479894 1283.9771627 495.5184188 502.2291732
103 | 1010.000 -794.6124559 1288.9080611 495.5837793 507.1846858
104 | 1020.000 -807.5259908 1293.7910131 495.6472483 512.1408425
105 | 1030.000 -820.4881194 1298.6269360 495.7088978 517.0976247
106 | 1040.000 -833.4983758 1303.4167215 495.7687965 522.0550146
107 | 1050.000 -846.5563029 1308.1612362 495.8270100 527.0129950
108 | 1060.000 -859.6614524 1312.8613225 495.8836008 531.9715494
109 | 1070.000 -872.8133840 1317.5177999 495.9386283 536.9306618
110 | 1080.000 -886.0116657 1322.1314654 495.9921496 541.8903170
111 | 1090.000 -899.2558732 1326.7030947 496.0442189 546.8505000
112 | 1100.000 -912.5455900 1331.2334424 496.0948882 551.8111967
113 | 1110.000 -925.8804069 1335.7232434 496.1442072 556.7723933
114 | 1120.000 -939.2599221 1340.1732130 496.1922232 561.7340765
115 | 1130.000 -952.6837407 1344.5840480 496.2389817 566.6962335
116 | 1140.000 -966.1514749 1348.9564271 496.2845261 571.6588521
117 | 1150.000 -979.6627433 1353.2910117 496.3288980 576.6219202
118 | 1160.000 -993.2171713 1357.5884461 496.3721372 581.5854263
119 | 1170.000 -1006.8143905 1361.8493587 496.4142818 586.5493592
120 | 1180.000 -1020.4540387 1366.0743619 496.4553685 591.5137084
121 | 1190.000 -1034.1357600 1370.2640531 496.4954322 596.4784632
122 | 1200.000 -1047.8592040 1374.4190148 496.5345065 601.4436137
123 | 1210.000 -1061.6240264 1378.5398153 496.5726238 606.4091501
124 | 1220.000 -1075.4298883 1382.6270094 496.6098149 611.3750631
125 | 1230.000 -1089.2764564 1386.6811381 496.6461095 616.3413435
126 | 1240.000 -1103.1634026 1390.7027299 496.6815363 621.3079824
127 | 1250.000 -1117.0904042 1394.6923005 496.7161225 626.2749714
128 | 1260.000 -1131.0571436 1398.6503537 496.7498945 631.2423021
129 | 1270.000 -1145.0633079 1402.5773815 496.7828777 636.2099666
130 | 1280.000 -1159.1085894 1406.4738645 496.8150963 641.1779571
131 | 1290.000 -1173.1926849 1410.3402721 496.8465738 646.1462661
132 | 1300.000 -1187.3152961 1414.1770633 496.8773327 651.1148862
133 | 1310.000 -1201.4761290 1417.9846866 496.9073947 656.0838104
134 | 1320.000 -1215.6748941 1421.7635803 496.9367806 661.0530319
135 | 1330.000 -1229.9113063 1425.5141730 496.9655105 666.0225439
136 | 1340.000 -1244.1850846 1429.2368840 496.9936037 670.9923399
137 | 1350.000 -1258.4959524 1432.9321231 497.0210790 675.9624139
138 | 1360.000 -1272.8436368 1436.6002914 497.0479542 680.9327595
139 | 1370.000 -1287.2278693 1440.2417812 497.0742467 685.9033710
140 | 1380.000 -1301.6483848 1443.8569764 497.0999733 690.8742426
141 | 1390.000 -1316.1049224 1447.4462525 497.1251499 695.8453686
142 | 1400.000 -1330.5972247 1451.0099775 497.1497921 700.8167438
143 | 1410.000 -1345.1250380 1454.5485112 497.1739150 705.7883628
144 | 1420.000 -1359.6881121 1458.0622060 497.1975329 710.7602204
145 | 1430.000 -1374.2862005 1461.5514072 497.2206600 715.7323118
146 | 1440.000 -1388.9190597 1465.0164526 497.2433096 720.7046320
147 | 1450.000 -1403.5864501 1468.4576735 497.2654948 725.6771764
148 | 1460.000 -1418.2881349 1471.8753940 497.2872281 730.6499404
149 | 1470.000 -1433.0238807 1475.2699321 497.3085219 735.6229195
150 | 1480.000 -1447.7934573 1478.6415991 497.3293878 740.5961094
151 | 1490.000 -1462.5966375 1481.9907002 497.3498372 745.5695059
152 | 1500.000 -1477.4331971 1485.3175346 497.3698810 750.5431048
153 | 1510.000 -1492.3029149 1488.6223954 497.3895300 755.5169022
154 | 1520.000 -1507.2055727 1491.9055703 497.4087944 760.4908941
155 | 1530.000 -1522.1409550 1495.1673410 497.4276842 765.4650768
156 | 1540.000 -1537.1088491 1498.4079842 497.4462091 770.4394466
157 | 1550.000 -1552.1090451 1501.6277709 497.4643782 775.4139998
158 | 1560.000 -1567.1413359 1504.8269672 497.4822008 780.3887330
159 | 1570.000 -1582.2055167 1508.0058340 497.4996855 785.3636427
160 | 1580.000 -1597.3013856 1511.1646274 497.5168408 790.3387256
161 | 1590.000 -1612.4287432 1514.3035985 497.5336750 795.3139785
162 | 1600.000 -1627.5873924 1517.4229940 497.5501959 800.2893981
163 | 1610.000 -1642.7771386 1520.5230559 497.5664113 805.2649814
164 | 1620.000 -1657.9977898 1523.6040217 497.5823287 810.2407253
165 | 1630.000 -1673.2491562 1526.6661246 497.5979553 815.2166270
166 | 1640.000 -1688.5310502 1529.7095937 497.6132982 820.1926835
167 | 1650.000 -1703.8432867 1532.7346538 497.6283641 825.1688920
168 | 1660.000 -1719.1856826 1535.7415256 497.6431598 830.1452498
169 | 1670.000 -1734.5580573 1538.7304261 497.6576916 835.1217543
170 | 1680.000 -1749.9602320 1541.7015683 497.6719657 840.0984028
171 | 1690.000 -1765.3920302 1544.6551615 497.6859882 845.0751928
172 | 1700.000 -1780.8532774 1547.5914113 497.6997650 850.0521218
173 | 1710.000 -1796.3438013 1550.5105196 497.7133018 855.0291873
174 | 1720.000 -1811.8634313 1553.4126851 497.7266040 860.0063870
175 | 1730.000 -1827.4119991 1556.2981027 497.7396772 864.9837186
176 | 1740.000 -1842.9893382 1559.1669644 497.7525265 869.9611798
177 | 1750.000 -1858.5952839 1562.0194584 497.7651569 874.9387684
178 | 1760.000 -1874.2296734 1564.8557703 497.7775735 879.9164822
179 | 1770.000 -1889.8923459 1567.6760820 497.7897811 884.8943192
180 | 1780.000 -1905.5831423 1570.4805728 497.8017842 889.8722772
181 | 1790.000 -1921.3019052 1573.2694187 497.8135875 894.8503542
182 | 1800.000 -1937.0484791 1576.0427930 497.8251952 899.8285483
183 | 1810.000 -1952.8227101 1578.8008661 497.8366118 904.8068575
184 | 1820.000 -1968.6244460 1581.5438054 497.8478414 909.7852799
185 | 1830.000 -1984.4535363 1584.2717760 497.8588881 914.7638137
186 | 1840.000 -2000.3098322 1586.9849398 497.8697558 919.7424571
187 | 1850.000 -2016.1931863 1589.6834565 497.8804483 924.7212082
188 | 1860.000 -2032.1034530 1592.3674830 497.8909693 929.7000655
189 | 1870.000 -2048.0404882 1595.0371739 497.9013226 934.6790271
190 | 1880.000 -2064.0041492 1597.6926811 497.9115117 939.6580914
191 | 1890.000 -2079.9942950 1600.3341544 497.9215400 944.6372567
192 | 1900.000 -2096.0107860 1602.9617409 497.9314109 949.6165216
193 | 1910.000 -2112.0534840 1605.5755856 497.9411277 954.5958845
194 | 1920.000 -2128.1222524 1608.1758313 497.9506935 959.5753437
195 | 1930.000 -2144.2169558 1610.7626184 497.9601115 964.5548978
196 | 1940.000 -2160.3374603 1613.3360854 497.9693846 969.5345454
197 | 1950.000 -2176.4836335 1615.8963685 497.9785159 974.5142851
198 | 1960.000 -2192.6553442 1618.4436018 497.9875083 979.4941153
199 | 1970.000 -2208.8524625 1620.9779174 497.9963644 984.4740348
200 | 1980.000 -2225.0748599 1623.4994455 498.0050871 989.4540421
201 | 1990.000 -2241.3224092 1626.0083142 498.0136790 994.4341361
202 | 2000.000 -2257.5949844 1628.5046499 498.0221427 999.4143153
203 |
--------------------------------------------------------------------------------
/docs/data/ZrS2/ZrS2_P-3m1.dat:
--------------------------------------------------------------------------------
1 | # T [K] F [kJ/mol] S [J/K/mol] C_v [J/K/mol] E [kJ/mol]
2 | 0.000 11.4452141 0.0000000 0.0000000 11.4452141
3 | 10.000 11.4449079 0.1357056 0.4669651 11.4462649
4 | 20.000 11.4390154 1.2642849 3.5119555 11.4643011
5 | 30.000 11.4161792 3.4170592 7.3496659 11.5186910
6 | 40.000 11.3691299 6.0478514 11.1384367 11.6110440
7 | 50.000 11.2942926 8.9618471 15.1931856 11.7423849
8 | 60.000 11.1890859 12.1179980 19.6163719 11.9161658
9 | 70.000 11.0512149 15.4888148 24.2534173 12.1354319
10 | 80.000 10.8787388 19.0305579 28.8768897 12.4011834
11 | 90.000 10.6702124 22.6897424 33.2987076 12.7122892
12 | 100.000 10.4247293 26.4135736 37.4013583 13.0660866
13 | 110.000 10.1418792 30.1562264 41.1297836 13.4590642
14 | 120.000 9.8216651 33.8810736 44.4725563 13.8873939
15 | 130.000 9.4644100 37.5605224 47.4445502 14.3472779
16 | 140.000 9.0706726 41.1747937 50.0743584 14.8351437
17 | 150.000 8.6411768 44.7104109 52.3962041 15.3477384
18 | 160.000 8.1767557 48.1587674 54.4451757 15.8821584
19 | 170.000 7.6783091 51.5149109 56.2546565 16.4358440
20 | 180.000 7.1467726 54.7765698 57.8551062 17.0065552
21 | 190.000 6.5830940 57.9434004 59.2736290 17.5923401
22 | 200.000 5.9882174 61.0164172 60.5339739 18.1915009
23 | 210.000 5.3630719 63.9975685 61.6567539 18.8025613
24 | 220.000 4.7085637 66.8894237 62.6597600 19.4242370
25 | 230.000 4.0255713 69.6949446 63.5583008 20.0554085
26 | 240.000 3.3149420 72.4173200 64.3655328 20.6950988
27 | 250.000 2.5774910 75.0598466 65.0927629 21.3424527
28 | 260.000 1.8140002 77.6258454 65.7497165 21.9967200
29 | 270.000 1.0252183 80.1186021 66.3447710 22.6572408
30 | 280.000 0.2118616 82.5413275 66.8851565 23.3234333
31 | 290.000 -0.6253852 84.8971307 67.3771267 23.9947827
32 | 300.000 -1.4858680 87.1890018 67.8261031 24.6708326
33 | 310.000 -2.3689617 89.4198029 68.2367982 25.3511772
34 | 320.000 -3.2740696 91.5922633 68.6133184 26.0354547
35 | 330.000 -4.2006212 93.7089783 68.9592516 26.7233416
36 | 340.000 -5.1480715 95.7724112 69.2777405 27.4145483
37 | 350.000 -6.1158996 97.7848966 69.5715455 28.1088142
38 | 360.000 -7.1036070 99.7486446 69.8430971 28.8059050
39 | 370.000 -8.1107170 101.6657464 70.0945410 29.5056092
40 | 380.000 -9.1367731 103.5381796 70.3277761 30.2077352
41 | 390.000 -10.1813380 105.3678143 70.5444867 30.9121096
42 | 400.000 -11.2439926 107.1564186 70.7461709 31.6185748
43 | 410.000 -12.3243351 108.9056647 70.9341635 32.3269874
44 | 420.000 -13.4219800 110.6171344 71.1096571 33.0372165
45 | 430.000 -14.5365569 112.2923241 71.2737194 33.7491425
46 | 440.000 -15.6677103 113.9326505 71.4273079 34.4626559
47 | 450.000 -16.8150982 115.5394550 71.5712838 35.1776566
48 | 460.000 -17.9783919 117.1140088 71.7064225 35.8940522
49 | 470.000 -19.1572749 118.6575166 71.8334238 36.6117579
50 | 480.000 -20.3514425 120.1711212 71.9529206 37.3306956
51 | 490.000 -21.5606012 121.6559071 72.0654861 38.0507932
52 | 500.000 -22.7844680 123.1129041 72.1716405 38.7719840
53 | 510.000 -24.0227700 124.5430906 72.2718564 39.4942062
54 | 520.000 -25.2752436 125.9473969 72.3665644 40.2174028
55 | 530.000 -26.5416346 127.3267077 72.4561570 40.9415205
56 | 540.000 -27.8216972 128.6818654 72.5409927 41.6665101
57 | 550.000 -29.1151941 130.0136721 72.6213995 42.3923256
58 | 560.000 -30.4218954 131.3228923 72.6976776 43.1189243
59 | 570.000 -31.7415791 132.6102550 72.7701028 43.8462663
60 | 580.000 -33.0740300 133.8764557 72.8389282 44.5743143
61 | 590.000 -34.4190398 135.1221584 72.9043867 45.3030336
62 | 600.000 -35.7764069 136.3479975 72.9666927 46.0323916
63 | 610.000 -37.1459356 137.5545791 73.0260440 46.7623576
64 | 620.000 -38.5274362 138.7424830 73.0826232 47.4929032
65 | 630.000 -39.9207249 139.9122640 73.1365993 48.2240014
66 | 640.000 -41.3256229 141.0644530 73.1881284 48.9556270
67 | 650.000 -42.7419570 142.1995589 73.2373554 49.6877563
68 | 660.000 -44.1695588 143.3180692 73.2844145 50.4203669
69 | 670.000 -45.6082646 144.4204514 73.3294304 51.1534378
70 | 680.000 -47.0579155 145.5071539 73.3725191 51.8869491
71 | 690.000 -48.5183569 146.5786072 73.4137884 52.6208821
72 | 700.000 -49.9894382 147.6352248 73.4533388 53.3552192
73 | 710.000 -51.4710132 148.6774038 73.4912640 54.0899435
74 | 720.000 -52.9629394 149.7055260 73.5276512 54.8250393
75 | 730.000 -54.4650781 150.7199586 73.5625823 55.5604917
76 | 740.000 -55.9772942 151.7210547 73.5961334 56.2962864
77 | 750.000 -57.4994559 152.7091545 73.6283760 57.0324100
78 | 760.000 -59.0314350 153.6845852 73.6593769 57.7688497
79 | 770.000 -60.5731064 154.6476623 73.6891988 58.5055936
80 | 780.000 -62.1243481 155.5986898 73.7179006 59.2426300
81 | 790.000 -63.6850410 156.5379608 73.7455373 59.9799480
82 | 800.000 -65.2550691 157.4657580 73.7721607 60.7175373
83 | 810.000 -66.8343189 158.3823542 73.7978198 61.4553880
84 | 820.000 -68.4226797 159.2880127 73.8225602 62.1934907
85 | 830.000 -70.0200435 160.1829877 73.8464251 62.9318363
86 | 840.000 -71.6263047 161.0675251 73.8694553 63.6704164
87 | 850.000 -73.2413600 161.9418621 73.8916890 64.4092228
88 | 860.000 -74.8651087 162.8062283 73.9131625 65.1482476
89 | 870.000 -76.4974521 163.6608456 73.9339099 65.8874836
90 | 880.000 -78.1382938 164.5059288 73.9539634 66.6269235
91 | 890.000 -79.7875396 165.3416856 73.9733535 67.3665607
92 | 900.000 -81.4450971 166.1683173 73.9921092 68.1063885
93 | 910.000 -83.1108761 166.9860186 74.0102576 68.8464008
94 | 920.000 -84.7847883 167.7949783 74.0278247 69.5865917
95 | 930.000 -86.4667472 168.5953792 74.0448350 70.3269555
96 | 940.000 -88.1566680 169.3873985 74.0613116 71.0674866
97 | 950.000 -89.8544678 170.1712082 74.0772765 71.8081800
98 | 960.000 -91.5600653 170.9469748 74.0927508 72.5490305
99 | 970.000 -93.2733810 171.7148602 74.1077542 73.2900334
100 | 980.000 -94.9943368 172.4750213 74.1223056 74.0311841
101 | 990.000 -96.7228562 173.2276104 74.1364229 74.7724781
102 | 1000.000 -98.4588642 173.9727754 74.1501232 75.5139112
103 | 1010.000 -100.2022874 174.7106600 74.1634227 76.2554792
104 | 1020.000 -101.9530536 175.4414039 74.1763369 76.9971783
105 | 1030.000 -103.7110922 176.1651426 74.1888804 77.7390047
106 | 1040.000 -105.4763336 176.8820080 74.2010673 78.4809548
107 | 1050.000 -107.2487098 177.5921283 74.2129109 79.2230249
108 | 1060.000 -109.0281541 178.2956283 74.2244239 79.9652119
109 | 1070.000 -110.8146007 178.9926290 74.2356186 80.7075123
110 | 1080.000 -112.6079854 179.6832487 74.2465066 81.4499232
111 | 1090.000 -114.4082448 180.3676021 74.2570988 82.1924415
112 | 1100.000 -116.2153169 181.0458011 74.2674060 82.9350642
113 | 1110.000 -118.0291407 181.7179544 74.2774382 83.6777887
114 | 1120.000 -119.8496562 182.3841682 74.2872050 84.4206121
115 | 1130.000 -121.6768046 183.0445456 74.2967159 85.1635319
116 | 1140.000 -123.5105280 183.6991874 74.3059795 85.9065456
117 | 1150.000 -125.3507696 184.3481916 74.3150044 86.6496507
118 | 1160.000 -127.1974734 184.9916537 74.3237987 87.3928449
119 | 1170.000 -129.0505845 185.6296670 74.3323702 88.1361260
120 | 1180.000 -130.9100488 186.2623224 74.3407264 88.8794916
121 | 1190.000 -132.7758134 186.8897085 74.3488742 89.6229398
122 | 1200.000 -134.6478257 187.5119118 74.3568207 90.3664684
123 | 1210.000 -136.5260346 188.1290167 74.3645724 91.1100756
124 | 1220.000 -138.4103893 188.7411054 74.3721356 91.8537593
125 | 1230.000 -140.3008402 189.3482585 74.3795163 92.5975177
126 | 1240.000 -142.1973383 189.9505543 74.3867204 93.3413490
127 | 1250.000 -144.0998354 190.5480695 74.3937534 94.0852515
128 | 1260.000 -146.0082840 191.1408790 74.4006208 94.8292235
129 | 1270.000 -147.9226375 191.7290558 74.4073276 95.5732634
130 | 1280.000 -149.8428499 192.3126715 74.4138788 96.3173695
131 | 1290.000 -151.7688760 192.8917957 74.4202792 97.0615405
132 | 1300.000 -153.7006711 193.4664967 74.4265333 97.8057746
133 | 1310.000 -155.6381914 194.0368413 74.4326457 98.5500707
134 | 1320.000 -157.5813936 194.6028945 74.4386205 99.2944271
135 | 1330.000 -159.5302352 195.1647202 74.4444618 100.0388426
136 | 1340.000 -161.4846742 195.7223806 74.4501736 100.7833159
137 | 1350.000 -163.4446691 196.2759369 74.4557596 101.5278457
138 | 1360.000 -165.4101794 196.8254486 74.4612236 102.2724307
139 | 1370.000 -167.3811648 197.3709741 74.4665690 103.0170697
140 | 1380.000 -169.3575858 197.9125706 74.4717992 103.7617617
141 | 1390.000 -171.3394033 198.4502940 74.4769176 104.5065054
142 | 1400.000 -173.3265790 198.9841990 74.4819273 105.2512997
143 | 1410.000 -175.3190748 199.5143392 74.4868313 105.9961436
144 | 1420.000 -177.3168534 200.0407671 74.4916327 106.7410360
145 | 1430.000 -179.3198779 200.5635341 74.4963341 107.4859759
146 | 1440.000 -181.3281120 201.0826905 74.5009385 108.2309623
147 | 1450.000 -183.3415198 201.5982856 74.5054483 108.9759943
148 | 1460.000 -185.3600660 202.1103678 74.5098663 109.7210710
149 | 1470.000 -187.3837156 202.6189844 74.5141949 110.4661914
150 | 1480.000 -189.4124343 203.1241817 74.5184364 111.2113546
151 | 1490.000 -191.4461880 203.6260053 74.5225932 111.9565598
152 | 1500.000 -193.4849433 204.1244997 74.5266675 112.7018062
153 | 1510.000 -195.5286671 204.6197086 74.5306615 113.4470929
154 | 1520.000 -197.5773267 205.1116749 74.5345773 114.1924191
155 | 1530.000 -199.6308899 205.6004406 74.5384170 114.9377842
156 | 1540.000 -201.6893250 206.0860469 74.5421823 115.6831872
157 | 1550.000 -203.7526004 206.5685342 74.5458754 116.4286276
158 | 1560.000 -205.8206854 207.0479422 74.5494980 117.1741045
159 | 1570.000 -207.8935492 207.5243098 74.5530518 117.9196173
160 | 1580.000 -209.9711616 207.9976752 74.5565387 118.6651653
161 | 1590.000 -212.0534928 208.4680759 74.5599603 119.4107479
162 | 1600.000 -214.1405133 208.9355485 74.5633181 120.1563643
163 | 1610.000 -216.2321941 209.4001293 74.5666139 120.9020140
164 | 1620.000 -218.3285064 209.8618536 74.5698490 121.6476964
165 | 1630.000 -220.4294218 210.3207562 74.5730250 122.3934108
166 | 1640.000 -222.5349122 210.7768713 74.5761434 123.1391567
167 | 1650.000 -224.6449500 211.2302324 74.5792054 123.8849335
168 | 1660.000 -226.7595078 211.6808725 74.5822124 124.6307406
169 | 1670.000 -228.8785585 212.1288240 74.5851658 125.3765776
170 | 1680.000 -231.0020754 212.5741186 74.5880668 126.1224438
171 | 1690.000 -233.1300321 213.0167875 74.5909166 126.8683387
172 | 1700.000 -235.2624025 213.4568614 74.5937165 127.6142619
173 | 1710.000 -237.3991608 213.8943706 74.5964676 128.3602129
174 | 1720.000 -239.5402815 214.3293445 74.5991710 129.1061911
175 | 1730.000 -241.6857393 214.7618124 74.6018278 129.8521962
176 | 1740.000 -243.8355095 215.1918029 74.6044391 130.5982275
177 | 1750.000 -245.9895672 215.6193440 74.6070059 131.3442848
178 | 1760.000 -248.1478883 216.0444635 74.6095293 132.0903675
179 | 1770.000 -250.3104485 216.4671886 74.6120101 132.8364752
180 | 1780.000 -252.4772242 216.8875459 74.6144494 133.5826076
181 | 1790.000 -254.6481916 217.3055619 74.6168480 134.3287641
182 | 1800.000 -256.8233277 217.7212623 74.6192069 135.0749444
183 | 1810.000 -259.0026092 218.1346726 74.6215269 135.8211481
184 | 1820.000 -261.1860136 218.5458178 74.6238089 136.5673748
185 | 1830.000 -263.3735181 218.9547226 74.6260538 137.3136241
186 | 1840.000 -265.5651006 219.3614111 74.6282622 138.0598958
187 | 1850.000 -267.7607390 219.7659072 74.6304350 138.8061893
188 | 1860.000 -269.9604116 220.1682344 74.6325730 139.5525043
189 | 1870.000 -272.1640966 220.5684156 74.6346769 140.2988406
190 | 1880.000 -274.3717728 220.9664737 74.6367474 141.0451978
191 | 1890.000 -276.5834191 221.3624310 74.6387852 141.7915755
192 | 1900.000 -278.7990145 221.7563094 74.6407910 142.5379734
193 | 1910.000 -281.0185384 222.1481307 74.6427655 143.2843912
194 | 1920.000 -283.2419703 222.5379161 74.6447093 144.0308286
195 | 1930.000 -285.4692900 222.9256867 74.6466230 144.7772853
196 | 1940.000 -287.7004774 223.3114631 74.6485073 145.5237609
197 | 1950.000 -289.9355127 223.6952656 74.6503628 146.2702553
198 | 1960.000 -292.1743762 224.0771144 74.6521900 147.0167681
199 | 1970.000 -294.4170485 224.4570292 74.6539895 147.7632990
200 | 1980.000 -296.6635104 224.8350294 74.6557619 148.5098478
201 | 1990.000 -298.9137428 225.2111341 74.6575078 149.2564142
202 | 2000.000 -301.1677268 225.5853623 74.6592275 150.0029979
203 |
--------------------------------------------------------------------------------
/docs/images/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs/images/1FAD6_color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NU-CEM/ThermoPot/88510a568fe655f2679f6d72bec7f29a9488a0d1/docs/images/1FAD6_color.png
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 |   
2 |
3 | ⚠️ This repository is still in development, and some functionality is untested. Use with caution.
4 |
5 | ThermoPot is used for ab-initio thermodynamic modelling of material formation and decomposition.
6 |
7 | - 📚 The documentation is [here](https://NU-CEM.github.io/ThermoPot).
8 | - 🖊 If you use this package for your research please [cite accordingly](https://github.com/NU-CEM/ThermoPot/blob/main/citation.cff).
9 | - 🔄 This code is made available under the GNU General Public Licence (GPL) v3.
10 |
11 | This work adapts and extends a previous repository developed by Adam Jackson and Aron Walsh: [Thermodynamic model of CZTS](http://dx.doi.org/10.5281/zenodo.57130).
12 |
13 | ## Features
14 |
15 | ThermoPot calculates temperature and pressure dependent thermodynamic potentials using first-principles data as an input. Thermopot can:
16 |
17 | - calculate the internal energy, enthalpy and Gibbs free energy at a given temperature and pressure
18 | - calculate the change in energy/enthalpy for a given reaction
19 | - work with thermochemical tables to model gases
20 | - plot potentials as a function of T and P
21 | - predict thermodynamic stability as a function of T and P
22 | - Parse DFT data from an FHI-aims output file and lattice dynamics data from Phonopy output
23 | - Parse experimental data from the NIST-JANAF thermochemical tables.
24 |
25 | ## Supported software
26 |
27 | ThermoPot is compatible with a range of materials modelling packages as DFT energies and thermal properties data can be provided by the user. ThermoPot also supports parsing of FHI-aims output files, phonopy output and NIST-JANAF thermochemical data tables.
28 |
29 | ## Related software
30 |
31 | There are other codes that can calculate thermodynamic potentials and phase diagrams. The best code depends on your use case:
32 |
33 | - [Surfinpy](https://github.com/symmy596/SurfinPy) generates phase diagrams for bulk and surface systems.
34 | - [pycalphad](https://pycalphad.org/docs/latest/) uses the CALPHAD method to generate phase diagram and predict thermodynamic properties.
35 | - [thermo](https://thermo.readthedocs.io/cubic_equations_of_state.html) uses cubic equations of state to generate phase diagrams for liquids and gases.
36 |
--------------------------------------------------------------------------------
/docs/installation.md:
--------------------------------------------------------------------------------
1 | ThermoPot can be installed using the Python package manader `pip`:
2 |
3 | `pip install thermopot`
4 |
5 | If you use conda/anaconda, the safest thing to do is to create a new environment and then install ThermoPot:
6 |
7 | ```
8 | conda create -n thermopot python
9 | conda activate thermopot
10 | pip install thermopot
11 | ```
12 |
13 | If you wish, you can install the latest developer version of ThermoPot from Github. For this you will may want to specify a particular branch. Note that although the latest Github versions may include more features, it may not be stable. To install the latest, possibly unstable version:
14 |
15 | ```
16 | git clone https://github.com/NU-CEM/ThermoPot.git
17 | cd ThermoPot
18 | git checkout
19 | pip install .
20 | ```
21 |
--------------------------------------------------------------------------------
/mkdocs.yml:
--------------------------------------------------------------------------------
1 | site_name: ThermoPot Docs
2 | site_description: 'Documentation site for thermopot Python package'
3 | site_author: 'NU-CEM'
4 | docs_dir: docs/
5 | repo_name: 'NU-CEM/ThermoPot'
6 | repo_url: 'https://github.com/NU-CEM/ThermoPot'
7 | nav:
8 | - Welcome: index.md
9 | - Background: background.md
10 | - Installation: installation.md
11 | - Tutorial: tutorial.ipynb
12 | - API: api.md
13 | - Contributing: contributing.md
14 |
15 | theme:
16 | name: 'material'
17 | logo: images/1FAD6_color.png
18 | favicon: images/1FAD6_color.png
19 |
20 | plugins:
21 | - search
22 | - mkdocstrings
23 | - mkdocs-jupyter:
24 | include_source: True
25 |
26 | markdown_extensions:
27 | - def_list
28 | - tables
29 | - admonition
30 | - pymdownx.details
31 | - pymdownx.superfences
32 | - pymdownx.mark
33 | - attr_list
34 | - abbr
35 | - pymdownx.snippets
36 | - pymdownx.emoji:
37 | emoji_index: !!python/name:materialx.emoji.twemoji
38 | emoji_generator: !!python/name:materialx.emoji.to_svg
39 | - pymdownx.tabbed:
40 | alternate_style: true
41 | - pymdownx.superfences:
42 | custom_fences:
43 | - name: mermaid
44 | class: mermaid
45 | format: !!python/name:pymdownx.superfences.fence_code_format
46 | - toc:
47 | permalink:
48 |
49 | extra_javascript:
50 | - https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js
51 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [build-system]
2 | requires = [
3 | "setuptools",
4 | "wheel"
5 | ]
6 | build-backend = "setuptools.build_meta"
--------------------------------------------------------------------------------
/scripts/conversions.py:
--------------------------------------------------------------------------------
1 | """Script converts from older version of phonopy output to newer version.
2 | Both the units and the column order have changed.
3 |
4 | Older version has data organised as: T(K) F(kJ/mol) S(J/K/mol) Cv(J/Kmol) U(kJ/mol).
5 | Newer version has data organised as: T(K) F(eV/cell) U(eV/cell) Cv(kB/cell) -TS(eV/cell)."""
6 |
7 | import pandas as pd
8 | import thermopot
9 |
10 |
11 | def convert_phonopy_filetypes(file_in, file_out):
12 | df_in = pd.read_csv(
13 | file_in, comment="#", delim_whitespace=True, names=["T", "F", "U", "Cv", "-TS"]
14 | )
15 | df_out = df_in
16 | df_out["F"] = df_in["F"] * thermopot.eV2kJmol
17 | df_out["U"] = df_in["U"] * thermopot.eV2kJmol
18 | df_out["Cv"] = df_in["Cv"] * thermopot.kB2JKmol
19 | df_out["-TS"] = df_in["-TS"] * thermopot.eV2Jmol / (-1 * df_in["T"])
20 | df_out = df_out.rename({"-TS": "S"}, axis=1)
21 | df_out = df_out[["T", "F", "S", "Cv", "U"]]
22 | df_out = df_out.fillna(0)
23 | df_out.to_csv(file_out, sep=" ", index=False, header=False)
24 |
25 | return df_out
26 |
--------------------------------------------------------------------------------
/setup.cfg:
--------------------------------------------------------------------------------
1 | [metadata]
2 | name = thermopot
3 | author = NU-CEM
4 | author_email = l.whalley@northumbria.ac.uk
5 | description = Software for ab-initio thermodynamic modelling of material formation and decomposition.
6 | long_description = file: README.md
7 | long_description_content_type = text/markdown
8 | version = attr: thermopot.__version__
9 | url = https://github.com/NU-CEM/ThermoPot
10 | project_urls =
11 | Bug Tracker = https://github.com/NU-CEM/ThermoPot/issues
12 | keywords =
13 | materials science
14 | physics
15 | chemistry
16 | classifiers =
17 | Development Status :: 4 - Beta
18 | Intended Audience :: Science/Research
19 | Programming Language :: Python :: 3
20 | Topic :: Scientific/Engineering
21 | License :: OSI Approved :: GNU General Public License v3 (GPLv3)
22 | Operating System :: OS Independent
23 | license_files =
24 | LICENSE.md
25 |
26 | [options]
27 | python_requires >= 3.0.0
28 | packages = thermopot
29 | install_requires =
30 | matplotlib
31 | numpy
32 | scipy
33 |
34 | [options.extras_require]
35 | tests =
36 | pytest
37 | dev =
38 | black
39 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup
2 |
3 | setup()
4 |
--------------------------------------------------------------------------------
/tests/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/tests/conftest.py:
--------------------------------------------------------------------------------
1 | import pytest
2 | import os
3 | from thermopot import calculations, materials
4 |
5 |
6 | @pytest.fixture()
7 | def BaS_hybrid_calculation():
8 | return calculations.AimsCalculation(
9 | os.path.join(os.path.dirname(__file__), "data/BaS_hse06_outfile")
10 | )
11 |
12 |
13 | @pytest.fixture()
14 | def BaS_pbesol_calculation():
15 | return calculations.AimsCalculation(
16 | os.path.join(os.path.dirname(__file__), "data/BaS_pbesol_relax_outfile")
17 | )
18 |
19 |
20 | @pytest.fixture()
21 | def BaS_solid():
22 | return materials.Solid(
23 | "BaS",
24 | {"Ba": 1, "S": 1},
25 | os.path.join(os.path.dirname(__file__), "data/BaS_phonons"),
26 | BaS_pbesol_calculation,
27 | )
28 |
29 |
30 | @pytest.fixture()
31 | def BaS_BaS_reaction():
32 | return reactions.Reaction({BaS_solid: 1, BaS_solid: 1})
33 |
--------------------------------------------------------------------------------
/tests/data/BaS_Fm-3m.dat:
--------------------------------------------------------------------------------
1 | # T [K] F [kJ/mol] S [J/K/mol] C_v [J/K/mol] E [kJ/mol]
2 | 0.000 4.5968611 0.0000000 0.0000000 4.5968611
3 | 10.000 4.5967084 0.0673372 0.2462014 4.5973818
4 | 20.000 4.5929005 0.9309004 3.2405820 4.6115185
5 | 30.000 4.5730828 3.2488240 8.7467976 4.6705475
6 | 40.000 4.5245731 6.5777312 14.6660905 4.7876823
7 | 50.000 4.4397042 10.4589783 20.2311270 4.9626531
8 | 60.000 4.3145750 14.5892721 25.0927997 5.1899313
9 | 70.000 4.1477510 18.7724629 29.1537393 5.4618234
10 | 80.000 3.9393520 22.8895125 32.4685108 5.7705130
11 | 90.000 3.6904056 26.8741982 35.1503263 6.1090834
12 | 100.000 3.4024201 30.6939049 37.3189421 6.4718106
13 | 110.000 3.0771200 34.3362307 39.0798251 6.8541054
14 | 120.000 2.7162901 37.8003904 40.5190388 7.2523369
15 | 130.000 2.3216879 41.0919530 41.7044271 7.6636418
16 | 140.000 1.8949972 44.2197084 42.6886867 8.0857564
17 | 150.000 1.4378058 47.1938407 43.5125686 8.5168819
18 | 160.000 0.9515973 50.0248862 44.2076256 8.9555791
19 | 170.000 0.4377506 52.7231576 44.7983965 9.4006874
20 | 180.000 -0.1024560 55.2984435 45.3040824 9.8512639
21 | 190.000 -0.6678388 57.7598685 45.7398138 10.3065362
22 | 200.000 -1.2573019 60.1158459 46.1176024 10.7658673
23 | 210.000 -1.8698300 62.3740826 46.4470558 11.2287274
24 | 220.000 -2.5044813 64.5416114 46.7359162 11.6946732
25 | 230.000 -3.1603813 66.6248379 46.9904674 12.1633314
26 | 240.000 -3.8367165 68.6295915 47.2158454 12.6343854
27 | 250.000 -4.5327293 70.5611782 47.4162762 13.1075653
28 | 260.000 -5.2477124 72.4244303 47.5952590 13.5826395
29 | 270.000 -5.9810048 74.2237539 47.7557090 14.0594087
30 | 280.000 -6.7319878 75.9631711 47.9000688 14.5377001
31 | 290.000 -7.5000808 77.6463593 48.0303964 15.0173634
32 | 300.000 -8.2847388 79.2766863 48.1484343 15.4982671
33 | 310.000 -9.0854487 80.8572411 48.2556658 15.9802961
34 | 320.000 -9.9017272 82.3908620 48.3533589 16.4633486
35 | 330.000 -10.7331182 83.8801615 48.4426026 16.9473351
36 | 340.000 -11.5791907 85.3275483 48.5243363 17.4321757
37 | 350.000 -12.4395369 86.7352469 48.5993733 17.9177995
38 | 360.000 -13.3137703 88.1053151 48.6684203 18.4041432
39 | 370.000 -14.2015241 89.4396599 48.7320943 18.8911500
40 | 380.000 -15.1024503 90.7400507 48.7909350 19.3787690
41 | 390.000 -16.0162175 92.0081325 48.8454165 19.8669542
42 | 400.000 -16.9425104 93.2454363 48.8959566 20.3556642
43 | 410.000 -17.8810284 94.4533897 48.9429244 20.8448614
44 | 420.000 -18.8314848 95.6333253 48.9866472 21.3345118
45 | 430.000 -19.7936057 96.7864887 49.0274156 21.8245845
46 | 440.000 -20.7671292 97.9140463 49.0654886 22.3150512
47 | 450.000 -21.7518049 99.0170910 49.1010977 22.8058861
48 | 460.000 -22.7473927 100.0966486 49.1344501 23.2970656
49 | 470.000 -23.7536628 101.1536829 49.1657317 23.7885682
50 | 480.000 -24.7703943 102.1891005 49.1951099 24.2803739
51 | 490.000 -25.7973756 103.2037553 49.2227352 24.7724645
52 | 500.000 -26.8344029 104.1984523 49.2487441 25.2648232
53 | 510.000 -27.8812806 105.1739511 49.2732597 25.7574344
54 | 520.000 -28.9378204 106.1309695 49.2963937 26.2502838
55 | 530.000 -30.0038407 107.0701863 49.3182479 26.7433580
56 | 540.000 -31.0791669 107.9922439 49.3389145 27.2366448
57 | 550.000 -32.1636304 108.8977510 49.3584779 27.7301327
58 | 560.000 -33.2570687 109.7872850 49.3770148 28.2238109
59 | 570.000 -34.3593247 110.6613938 49.3945958 28.7176698
60 | 580.000 -35.4702469 111.5205979 49.4112853 29.2116999
61 | 590.000 -36.5896886 112.3653921 49.4271423 29.7058927
62 | 600.000 -37.7175082 113.1962473 49.4422212 30.2002401
63 | 610.000 -38.8535686 114.0136120 49.4565719 30.6947347
64 | 620.000 -39.9977369 114.8179133 49.4702406 31.1893693
65 | 630.000 -41.1498847 115.6095588 49.4832696 31.6841374
66 | 640.000 -42.3098872 116.3889374 49.4956981 32.1790327
67 | 650.000 -43.4776238 117.1564204 49.5075624 32.6740495
68 | 660.000 -44.6529772 117.9123626 49.5188961 33.1691822
69 | 670.000 -45.8358337 118.6571036 49.5297303 33.6644257
70 | 680.000 -47.0260830 119.3909679 49.5400938 34.1597752
71 | 690.000 -48.2236178 120.1142666 49.5500135 34.6552261
72 | 700.000 -49.4283341 120.8272974 49.5595143 35.1507741
73 | 710.000 -50.6401305 121.5303459 49.5686195 35.6464151
74 | 720.000 -51.8589087 122.2236860 49.5773506 36.1421452
75 | 730.000 -53.0845728 122.9075804 49.5857278 36.6379609
76 | 740.000 -54.3170296 123.5822815 49.5937700 37.1338587
77 | 750.000 -55.5561885 124.2480317 49.6014948 37.6298353
78 | 760.000 -56.8019612 124.9050642 49.6089186 38.1258876
79 | 770.000 -58.0542615 125.5536028 49.6160569 38.6220127
80 | 780.000 -59.3130057 126.1938634 49.6229240 39.1182078
81 | 790.000 -60.5781119 126.8260534 49.6295336 39.6144703
82 | 800.000 -61.8495005 127.4503727 49.6358983 40.1107977
83 | 810.000 -63.1270937 128.0670139 49.6420300 40.6071875
84 | 820.000 -64.4108158 128.6761626 49.6479400 41.1036375
85 | 830.000 -65.7005926 129.2779978 49.6536389 41.6001456
86 | 840.000 -66.9963519 129.8726923 49.6591365 42.0967096
87 | 850.000 -68.2980232 130.4604128 49.6644421 42.5933277
88 | 860.000 -69.6055375 131.0413202 49.6695647 43.0899979
89 | 870.000 -70.9188274 131.6155699 49.6745126 43.5867184
90 | 880.000 -72.2378272 132.1833122 49.6792935 44.0834875
91 | 890.000 -73.5624725 132.7446923 49.6839149 44.5803037
92 | 900.000 -74.8927003 133.2998507 49.6883839 45.0771653
93 | 910.000 -76.2284492 133.8489232 49.6927070 45.5740709
94 | 920.000 -77.5696589 134.3920412 49.6968905 46.0710190
95 | 930.000 -78.9162706 134.9293321 49.7009403 46.5680083
96 | 940.000 -80.2682266 135.4609191 49.7048622 47.0650374
97 | 950.000 -81.6254704 135.9869216 49.7086613 47.5621051
98 | 960.000 -82.9879468 136.5074552 49.7123428 48.0592102
99 | 970.000 -84.3556016 137.0226322 49.7159115 48.5563516
100 | 980.000 -85.7283819 137.5325612 49.7193719 49.0535281
101 | 990.000 -87.1062357 138.0373479 49.7227284 49.5507387
102 | 1000.000 -88.4891121 138.5370944 49.7259851 50.0479823
--------------------------------------------------------------------------------
/tests/regression/data/CZTS.dat:
--------------------------------------------------------------------------------
1 | # Phonon free energy and specific heat from phonopy-FHI-aims
2 | # Phonon zero point energy = 0.298500775 eV
3 | # Temperature (K) Free energy (eV/cell) Internal energy (eV/cell) c_v (kB/cell) -TS_vib(eV/cell)
4 | 0.000 0.298500775 0.298500775 0.000000000 -0.000000000
5 | 9.950 0.298496601 0.298515255 0.082621973 -0.000018655
6 | 19.900 0.298381319 0.298959540 1.207838801 -0.000578222
7 | 29.851 0.297757172 0.300831929 3.189029782 -0.003074757
8 | 39.801 0.296240604 0.304387103 5.057070106 -0.008146499
9 | 49.751 0.293649251 0.309427432 6.662227802 -0.015778181
10 | 59.701 0.289918865 0.315763954 8.097582481 -0.025845089
11 | 69.652 0.285032497 0.323287877 9.439923544 -0.038255381
12 | 79.602 0.278990375 0.331933260 10.714299726 -0.052942885
13 | 89.552 0.271800307 0.341641188 11.916511840 -0.069840882
14 | 99.502 0.263475313 0.352344801 13.034870685 -0.088869488
15 | 109.453 0.254032983 0.363968082 14.060655644 -0.109935099
16 | 119.403 0.243494899 0.376429947 14.990824736 -0.132935048
17 | 129.353 0.231885858 0.389648940 15.827319941 -0.157763082
18 | 139.303 0.219233014 0.403546836 16.575447903 -0.184313822
19 | 149.254 0.205565054 0.418050846 17.242366792 -0.212485791
20 | 159.204 0.190911486 0.433094699 17.835971100 -0.242183213
21 | 169.154 0.175302063 0.448618941 18.364169887 -0.273316878
22 | 179.104 0.158766343 0.464570746 18.834467254 -0.305804403
23 | 189.055 0.141333362 0.480903466 19.253749225 -0.339570104
24 | 199.005 0.123031408 0.497576063 19.628201200 -0.374544655
25 | 208.955 0.103887863 0.514552494 19.963302757 -0.410664631
26 | 218.905 0.083929113 0.531801129 20.263864865 -0.447872016
27 | 228.856 0.063180492 0.549294192 20.534087677 -0.486113700
28 | 238.806 0.041666266 0.567007273 20.777625865 -0.525341007
29 | 248.756 0.019409631 0.584918885 20.997654048 -0.565509254
30 | 258.706 -0.003567263 0.603010079 21.196928388 -0.606577342
31 | 268.657 -0.027243287 0.621264109 21.377842498 -0.648507396
32 | 278.607 -0.051598292 0.639666145 21.542477065 -0.691264436
33 | 288.557 -0.076613068 0.658203023 21.692643238 -0.734816091
34 | 298.507 -0.102269304 0.676863029 21.829920208 -0.779132333
35 | 308.458 -0.128549541 0.695635716 21.955687556 -0.824185257
36 | 318.408 -0.155437127 0.714511745 22.071152974 -0.869948871
37 | 328.358 -0.182916173 0.733482746 22.177375982 -0.916398919
38 | 338.308 -0.210971516 0.752541201 22.275288180 -0.963512718
39 | 348.259 -0.239588674 0.771680346 22.365710555 -1.011269020
40 | 358.209 -0.268753809 0.790894073 22.449368261 -1.059647882
41 | 368.159 -0.298453689 0.810176865 22.526903257 -1.108630554
42 | 378.109 -0.328675658 0.829523720 22.598885133 -1.158199377
43 | 388.060 -0.359407599 0.848930097 22.665820387 -1.208337696
44 | 398.010 -0.390637907 0.868391868 22.728160397 -1.259029774
45 | 407.960 -0.422355457 0.887905267 22.786308279 -1.310260724
46 | 417.910 -0.454549581 0.907466858 22.840624802 -1.362016439
47 | 427.861 -0.487210039 0.927073496 22.891433492 -1.414283535
48 | 437.811 -0.520326998 0.946722302 22.939025059 -1.467049300
49 | 447.761 -0.553891011 0.966410630 22.983661231 -1.520301640
50 | 457.711 -0.587892990 0.986136049 23.025578087 -1.574029039
51 | 467.662 -0.622324198 1.005896321 23.064988964 -1.628220518
52 | 477.612 -0.657176218 1.025689380 23.102086991 -1.682865598
53 | 487.562 -0.692440946 1.045513321 23.137047308 -1.737954267
54 | 497.512 -0.728110570 1.065366380 23.170029008 -1.793476950
55 | 507.463 -0.764177558 1.085246922 23.201176848 -1.849424480
56 | 517.413 -0.800634640 1.105153433 23.230622745 -1.905788074
57 | 527.363 -0.837474801 1.125084507 23.258487106 -1.962559308
58 | 537.313 -0.874691262 1.145038834 23.284879995 -2.019730096
59 | 547.264 -0.912277473 1.165015197 23.309902171 -2.077292670
60 | 557.214 -0.950227101 1.185012461 23.333646002 -2.135239562
61 | 567.164 -0.988534020 1.205029567 23.356196284 -2.193563586
62 | 577.114 -1.027192300 1.225065524 23.377630962 -2.252257824
63 | 587.065 -1.066196199 1.245119408 23.398021784 -2.311315608
64 | 597.015 -1.105540156 1.265190353 23.417434870 -2.370730509
65 | 606.965 -1.145218781 1.285277546 23.435931232 -2.430496326
66 | 616.915 -1.185226845 1.305380226 23.453567236 -2.490607071
67 | 626.866 -1.225559280 1.325497678 23.470395018 -2.551056957
68 | 636.816 -1.266211164 1.345629229 23.486462851 -2.611840394
69 | 646.766 -1.307177723 1.365774248 23.501815487 -2.672951971
70 | 656.716 -1.348454317 1.385932140 23.516494455 -2.734386456
71 | 666.667 -1.390036438 1.406102343 23.530538333 -2.796138781
72 | 676.617 -1.431919706 1.426284328 23.543982998 -2.858204035
73 | 686.567 -1.474099862 1.446477597 23.556861842 -2.920577459
74 | 696.517 -1.516572763 1.466681677 23.569205980 -2.983254441
75 | 706.468 -1.559334378 1.486896123 23.581044430 -3.046230501
76 | 716.418 -1.602380783 1.507120513 23.592404281 -3.109501296
77 | 726.368 -1.645708157 1.527354447 23.603310841 -3.173062604
78 | 736.318 -1.689312781 1.547597547 23.613787778 -3.236910328
79 | 746.269 -1.733191027 1.567849454 23.623857241 -3.301040482
80 | 756.219 -1.777339364 1.588109828 23.633539982 -3.365449192
81 | 766.169 -1.821754346 1.608378346 23.642855451 -3.430132692
82 | 776.119 -1.866432614 1.628654700 23.651821899 -3.495087314
83 | 786.070 -1.911370890 1.648938599 23.660456463 -3.560309490
84 | 796.020 -1.956565978 1.669229766 23.668775245 -3.625795744
85 | 805.970 -2.002014756 1.689527935 23.676793387 -3.691542691
86 | 815.920 -2.047714177 1.709832855 23.684525139 -3.757547032
87 | 825.871 -2.093661264 1.730144288 23.691983920 -3.823805552
88 | 835.821 -2.139853112 1.750462003 23.699182375 -3.890315115
89 | 845.771 -2.186286879 1.770785783 23.706132429 -3.957072662
90 | 855.721 -2.232959789 1.791115420 23.712845335 -4.024075209
91 | 865.672 -2.279869129 1.811450715 23.719331718 -4.091319844
92 | 875.622 -2.327012244 1.831791479 23.725601617 -4.158803723
93 | 885.572 -2.374386539 1.852137529 23.731664523 -4.226524068
94 | 895.522 -2.421989476 1.872488692 23.737529414 -4.294478167
95 | 905.473 -2.469818568 1.892844802 23.743204789 -4.362663370
96 | 915.423 -2.517871385 1.913205700 23.748698699 -4.431077085
97 | 925.373 -2.566145546 1.933571234 23.754018769 -4.499716780
98 | 935.323 -2.614638719 1.953941257 23.759172235 -4.568579976
99 | 945.274 -2.663348622 1.974315631 23.764165956 -4.637664253
100 | 955.224 -2.712273018 1.994694220 23.769006446 -4.706967238
101 | 965.174 -2.761409717 2.015076896 23.773699892 -4.776486612
102 | 975.124 -2.810756570 2.035463535 23.778252170 -4.846220105
103 | 985.075 -2.860311473 2.055854020 23.782668868 -4.916165493
104 | 995.025 -2.910072363 2.076248235 23.786955302 -4.986320598
105 | 1004.975 -2.960037217 2.096646071 23.791116529 -5.056683289
106 | 1014.925 -3.010204051 2.117047424 23.795157365 -5.127251475
107 | 1024.876 -3.060570917 2.137452191 23.799082395 -5.198023109
108 | 1034.826 -3.111135908 2.157860276 23.802895992 -5.268996184
109 | 1044.776 -3.161897148 2.178271585 23.806602323 -5.340168733
110 | 1054.726 -3.212852800 2.198686027 23.810205361 -5.411538827
111 | 1064.677 -3.264001058 2.219103515 23.813708901 -5.483104574
112 | 1074.627 -3.315340151 2.239523967 23.817116562 -5.554864118
113 | 1084.577 -3.366868338 2.259947300 23.820431803 -5.626815638
114 | 1094.527 -3.418583910 2.280373437 23.823657928 -5.698957347
115 | 1104.478 -3.470485189 2.300802304 23.826798095 -5.771287493
116 | 1114.428 -3.522570527 2.321233827 23.829855323 -5.843804355
117 | 1124.378 -3.574838303 2.341667938 23.832832500 -5.916506241
118 | 1134.328 -3.627286926 2.362104567 23.835732391 -5.989391493
119 | 1144.279 -3.679914830 2.382543651 23.838557643 -6.062458481
120 | 1154.229 -3.732720478 2.402985127 23.841310788 -6.135705605
121 | 1164.179 -3.785702358 2.423428933 23.843994255 -6.209131291
122 | 1174.129 -3.838858983 2.443875011 23.846610370 -6.282733994
123 | 1184.080 -3.892188892 2.464323304 23.849161364 -6.356512195
124 | 1194.030 -3.945690646 2.484773757 23.851649376 -6.430464403
125 | 1203.980 -3.999362831 2.505226317 23.854076457 -6.504589148
126 | 1213.930 -4.053204056 2.525680933 23.856444579 -6.578884989
127 | 1223.881 -4.107212952 2.546137555 23.858755630 -6.653350507
128 | 1233.831 -4.161388171 2.566596135 23.861011427 -6.727984306
129 | 1243.781 -4.215728389 2.587056626 23.863213713 -6.802785015
130 | 1253.731 -4.270232300 2.607518983 23.865364166 -6.877751283
131 | 1263.682 -4.324898620 2.627983162 23.867464395 -6.952881782
132 | 1273.632 -4.379726083 2.648449121 23.869515950 -7.028175204
133 | 1283.582 -4.434713445 2.668916819 23.871520321 -7.103630264
134 | 1293.532 -4.489859480 2.689386215 23.873478941 -7.179245695
135 | 1303.483 -4.545162980 2.709857272 23.875393189 -7.255020252
136 | 1313.433 -4.600622755 2.730329952 23.877264394 -7.330952707
137 | 1323.383 -4.656237633 2.750804218 23.879093833 -7.407041851
138 | 1333.333 -4.712006461 2.771280036 23.880882740 -7.483286496
139 | 1343.284 -4.767928100 2.791757370 23.882632300 -7.559685470
140 | 1353.234 -4.824001430 2.812236188 23.884343657 -7.636237618
141 | 1363.184 -4.880225346 2.832716458 23.886017914 -7.712941804
142 | 1373.134 -4.936598760 2.853198147 23.887656134 -7.789796908
143 | 1383.085 -4.993120599 2.873681227 23.889259341 -7.866801825
144 | 1393.035 -5.049789803 2.894165666 23.890828525 -7.943955469
145 | 1402.985 -5.106605331 2.914651436 23.892364641 -8.021256768
146 | 1412.935 -5.163566155 2.935138510 23.893868610 -8.098704664
147 | 1422.886 -5.220671259 2.955626860 23.895341321 -8.176298118
148 | 1432.836 -5.277919643 2.976116459 23.896783633 -8.254036102
149 | 1442.786 -5.335310322 2.996607283 23.898196376 -8.331917605
150 | 1452.736 -5.392842323 3.017099305 23.899580352 -8.409941628
151 | 1462.687 -5.450514684 3.037592502 23.900936336 -8.488107186
152 | 1472.637 -5.508326461 3.058086850 23.902265075 -8.566413311
153 | 1482.587 -5.566276717 3.078582326 23.903567295 -8.644859043
154 | 1492.537 -5.624364532 3.099078907 23.904843695 -8.723443439
155 | 1502.488 -5.682588995 3.119576572 23.906094953 -8.802165567
156 | 1512.438 -5.740949209 3.140075300 23.907321723 -8.881024509
157 | 1522.388 -5.799444287 3.160575069 23.908524640 -8.960019356
158 | 1532.338 -5.858073355 3.181075859 23.909704318 -9.039149214
159 | 1542.289 -5.916835549 3.201577651 23.910861350 -9.118413201
160 | 1552.239 -5.975730017 3.222080426 23.911996312 -9.197810443
161 | 1562.189 -6.034755917 3.242584165 23.913109760 -9.277340082
162 | 1572.139 -6.093912418 3.263088849 23.914202235 -9.357001267
163 | 1582.090 -6.153198700 3.283594461 23.915274259 -9.436793161
164 | 1592.040 -6.212613951 3.304100984 23.916326339 -9.516714935
165 | 1601.990 -6.272157371 3.324608401 23.917358966 -9.596765772
166 | 1611.940 -6.331828170 3.345116694 23.918372616 -9.676944865
167 | 1621.891 -6.391625568 3.365625850 23.919367751 -9.757251417
168 | 1631.841 -6.451548791 3.386135850 23.920344818 -9.837684641
169 | 1641.791 -6.511597079 3.406646681 23.921304252 -9.918243760
170 | 1651.741 -6.571769678 3.427158327 23.922246475 -9.998928005
171 | 1661.692 -6.632065844 3.447670773 23.923171894 -10.079736618
172 | 1671.642 -6.692484843 3.468184007 23.924080907 -10.160668850
173 | 1681.592 -6.753025947 3.488698012 23.924973898 -10.241723959
174 | 1691.542 -6.813688439 3.509212777 23.925851242 -10.322901216
175 | 1701.493 -6.874471609 3.529728287 23.926713302 -10.404199896
176 | 1711.443 -6.935374755 3.550244530 23.927560431 -10.485619285
177 | 1721.393 -6.996397185 3.570761493 23.928392970 -10.567158678
178 | 1731.343 -7.057538212 3.591279164 23.929211253 -10.648817376
179 | 1741.294 -7.118797160 3.611797531 23.930015603 -10.730594690
180 | 1751.244 -7.180173358 3.632316581 23.930806334 -10.812489939
181 | 1761.194 -7.241666144 3.652836303 23.931583752 -10.894502448
182 | 1771.144 -7.303274863 3.673356687 23.932348153 -10.976631550
183 | 1781.095 -7.364998868 3.693877721 23.933099826 -11.058876589
184 | 1791.045 -7.426837518 3.714399393 23.933839053 -11.141236911
185 | 1800.995 -7.488790179 3.734921695 23.934566106 -11.223711874
186 | 1810.945 -7.550856226 3.755444614 23.935281250 -11.306300840
187 | 1820.896 -7.613035038 3.775968142 23.935984744 -11.389003180
188 | 1830.846 -7.675326003 3.796492268 23.936676840 -11.471818271
189 | 1840.796 -7.737728514 3.817016983 23.937357783 -11.554745497
190 | 1850.746 -7.800241972 3.837542277 23.938027809 -11.637784248
191 | 1860.697 -7.862865782 3.858068141 23.938687152 -11.720933923
192 | 1870.647 -7.925599359 3.878594565 23.939336037 -11.804193924
193 | 1880.597 -7.988442121 3.899121542 23.939974684 -11.887563663
194 | 1890.547 -8.051393493 3.919649062 23.940603307 -11.971042555
195 | 1900.498 -8.114452906 3.940177116 23.941222114 -12.054630023
196 | 1910.448 -8.177619799 3.960705698 23.941831309 -12.138325496
197 | 1920.398 -8.240893612 3.981234797 23.942431090 -12.222128409
198 | 1930.348 -8.304273796 4.001764407 23.943021648 -12.306038203
199 | 1940.299 -8.367759805 4.022294519 23.943603173 -12.390054324
200 | 1950.249 -8.431351097 4.042825126 23.944175848 -12.474176224
201 | 1960.199 -8.495047140 4.063356221 23.944739850 -12.558403360
202 | 1970.149 -8.558847403 4.083887795 23.945295355 -12.642735198
203 | 1980.100 -8.622751362 4.104419842 23.945842531 -12.727171204
204 | 1990.050 -8.686758499 4.124952355 23.946381545 -12.811710854
205 | 2000.000 -8.750868300 4.145485326 23.946912558 -12.896353627
--------------------------------------------------------------------------------
/tests/regression/data/CZTS_out.dat:
--------------------------------------------------------------------------------
1 | 0.0 28.800946414940434 0.0 0.0 28.800946414940434
2 | 9.95 28.80054368516415 0.18089787645832647 0.6869573059465662 28.802343522549577
3 | 19.9 28.789420663106313 2.8035146588444504 10.04253055966953 28.845210508331988
4 | 29.851 28.729199632517545 9.938325360740757 26.515068910616375 29.02586858286102
5 | 39.801 28.582873065349965 19.748691280551064 42.046820353717244 29.368890727007173
6 | 49.751 28.332845510496227 30.59964692341259 55.39284401335023 29.855208544582926
7 | 59.701 27.97291797833808 41.7693505288271 67.32704683568707 30.466589974259588
8 | 69.652 27.501455138981367 52.99321112514735 78.48789142481266 31.192538183784798
9 | 79.602 26.91847899108181 64.17190325357664 89.0836445515165 32.02669083387302
10 | 89.552 26.224742892112626 75.2481317620478 99.07939223246048 32.96336349118219
11 | 99.502 25.42150308109806 86.17517301469834 108.37794504289401 33.99610514640657
12 | 109.453 24.510456735030168 96.9103134589638 116.90679573876336 35.11758127405414
13 | 119.403 23.493686200346826 107.42010047576825 124.6406518827589 36.31996845745498
14 | 129.353 22.373584023828705 117.67661641838218 131.59565999499586 37.595407387395696
15 | 139.303 21.152770168184276 127.66114391353125 137.81594196864 38.93635049877092
16 | 149.254 19.83401250813616 137.36155892719285 143.36101414057077 40.33577472074072
17 | 159.204 18.42015813286465 146.77475277628284 148.2965149694115 41.787285873859986
18 | 169.154 16.914077770456416 155.89977032015915 152.6882040388769 43.28514751919262
19 | 179.104 15.318623334358357 164.7402592249505 156.5984739162143 44.824262722583896
20 | 189.055 13.636596372674003 173.30160145770765 160.0845781905594 46.400130636260926
21 | 199.005 11.87072626247846 181.59375610002544 163.19794513899055 48.00879169516403
22 | 208.955 10.023654965135929 189.6251025978395 165.984134507952 49.64676827846748
23 | 218.905 8.097928342619817 197.40563355106744 168.48314691935133 51.31100855511623
24 | 228.856 6.095990754334132 204.94477660271565 170.72990438829757 52.998832548525215
25 | 238.806 4.02018351334818 212.254723660164 172.75479354851637 54.70788505173731
26 | 248.756 1.872744693425894 219.34485275127142 174.58420965101007 56.43609288442118
27 | 258.706 -0.3441885553261953 226.22519887959538 176.2410687016972 58.181627746018414
28 | 268.657 -2.6285775943256544 232.9046013596628 177.74527230638867 59.94287389315727
29 | 278.607 -4.9784783406155295 239.39412395414536 179.11412025936602 61.71840044836238
30 | 288.557 -7.392037310965735 245.70180099490705 180.36267129128564 63.50693727872166
31 | 298.507 -9.867487762459758 251.83611076964482 181.504055526684 65.30735415505461
32 | 308.458 -12.403145157684056 257.80426590583033 182.54974344021426 67.11864309509656
33 | 318.408 -14.99740282288812 263.6155679151704 183.5097763418647 68.9399030223308
34 | 328.358 -17.64872770262983 269.2763814408581 184.3929635710685 70.77032635452744
35 | 338.308 -20.355656789818212 274.7935153802545 185.2070508812007 72.6091877149596
36 | 348.259 -23.11679278387345 280.1725935602935 185.95886433798285 74.45583447684079
37 | 358.209 -25.930800520769626 285.4212982603229 186.6544332072403 76.3096773077624
38 | 368.159 -28.79640330659208 290.5445397361987 187.29909503308096 78.1701838981471
39 | 378.109 -31.712380022977456 295.5477165443186 187.8975856502675 80.03687162836361
40 | 388.06 -34.67756155715643 300.4351489864331 188.4541163174871 81.90930235851879
41 | 398.01 -37.690828196849694 305.21320041588393 188.9724400002474 83.78707779716159
42 | 407.96 -40.75110654273738 309.88562879514814 189.45590839146118 85.66983458053126
43 | 417.91 -43.857367289296405 314.45672148147446 189.90752109149275 87.55724118502661
44 | 427.861 -47.00862242672582 318.9297846520341 190.3299680451751 89.44899416427812
45 | 437.811 -50.20392321475487 323.31014741925054 190.7256663499359 91.3448157370146
46 | 447.761 -53.442358156450965 327.6006813076907 191.09679213344737 93.24445060304727
47 | 457.711 -56.72305039311577 331.80481701258975 191.44530826572986 95.14766420653372
48 | 467.662 -60.04515693240255 335.92508574401575 191.77298852929502 97.05424061330066
49 | 477.612 -63.40786565727079 339.9660103638994 192.08143868799377 98.96398048465193
50 | 487.562 -66.81039465058898 343.92978670737017 192.37211493680903 100.87670001602984
51 | 497.512 -70.25199016894257 347.81918662514886 192.64634004854219 102.7922290073085
52 | 507.463 -73.73192548481 351.63614921635644 192.9053175998584 104.71040970496992
53 | 517.413 -77.24949914982675 355.38456760176746 193.1501444097229 106.63109603022123
54 | 527.363 -80.80403431938797 359.0661207632569 193.38182159763613 108.5541523246855
55 | 537.313 -84.39487691942718 362.68307134203866 193.6012642866117 110.47945219257764
56 | 547.264 -88.02139497101898 366.23690427703525 193.80931023358855 112.40687821124844
57 | 557.214 -91.68297743255505 369.73101591561056 194.00672742884979 114.33632086984595
58 | 567.164 -95.37903323489078 373.1666874639591 194.1942209055676 116.26767799040346
59 | 577.114 -99.1089902200067 376.54578501988084 194.37243873453076 118.2008539559568
60 | 587.065 -102.87229436912574 379.8694421906777 194.54197746180319 120.13575961405915
61 | 597.015 -106.66840912731597 383.14065900476334 194.70338683965318 122.07231140841283
62 | 606.965 -110.49681443863724 386.3604083243593 194.857174150074 124.01043089644288
63 | 616.915 -114.3570057812879 389.53024393003795 195.00380804606561 125.95004465281148
64 | 626.866 -118.24849416760469 392.651025516818 195.14372201045103 127.89108369050625
65 | 636.816 -122.17080469678297 395.7254338273016 195.27731740728424 129.8334830748986
66 | 646.766 -126.12347674784714 398.7541996202508 195.40496632539634 131.77718192374397
67 | 656.716 -130.10606262885617 401.7386288146484 195.52701405610543 133.7221228282698
68 | 666.667 -134.11812738393283 404.6793660817952 195.64378135475033 135.66825156371937
69 | 676.617 -138.15924840732242 407.5788305543015 195.75556651930646 137.61551708935204
70 | 686.567 -142.22901476799547 410.4375627192507 195.86264718630946 139.56387135547237
71 | 696.517 -146.32702672722093 413.2566693249764 195.96528206026377 141.5132687245183
72 | 706.468 -150.45289535262503 416.03662389965586 196.06371241024564 143.46366626051702
73 | 716.418 -154.60624203576455 418.7796304425948 196.15816346673296 145.41502324665836
74 | 726.368 -158.78669810618544 421.4860775736196 196.2488456521456 147.3673010888095
75 | 736.318 -162.99390473493747 424.1569105338351 196.33595575318483 149.3204633155149
76 | 746.269 -167.22751187323578 426.7924666015356 196.41967792688322 151.2744752885403
77 | 756.219 -171.48717883137257 429.39476928541245 196.50018471496898 153.22930420287273
78 | 766.169 -175.77257312089344 431.96408627162344 196.57763783374006 155.18491889375005
79 | 776.119 -180.08337064756768 434.50123021245133 196.65218903045368 157.14128964368984
80 | 786.07 -184.41925513247665 437.00642894961317 196.72398079005572 159.09838837546053
81 | 796.02 -188.77991820849888 439.4815539447802 196.79314699202328 161.05618836262505
82 | 805.97 -193.16505864842745 441.92677467959425 196.85981353394934 163.01466394008514
83 | 815.92 -197.57438246145543 444.34279506750397 196.92409889692618 164.97379089002237
84 | 825.871 -202.00760241074906 446.7297539926657 196.98611465272765 166.93354624892774
85 | 835.821 -206.4644382064185 449.08939346475853 197.0459659377336 168.8939077286895
86 | 845.771 -210.9446156371499 451.4218033358208 197.10375190191075 170.85485439199059
87 | 855.721 -215.44786685966127 453.7275969966183 197.15956610790693 172.8163661698819
88 | 865.672 -219.97393010924654 456.0068408947372 197.21349689688745 174.77842386178241
89 | 875.622 -224.52254921734894 458.2611657191268 197.26562773774253 176.74100923196428
90 | 885.572 -229.09347380453158 460.4905963920983 197.3160375430369 178.70410462361173
91 | 895.522 -233.68645899102157 462.6956705020073 197.36480096001597 180.66769334476234
92 | 905.473 -238.30126481779794 464.87639520631643 197.41198865329747 182.63175937885097
93 | 915.423 -242.93765682550358 467.0343045894777 197.45766756261995 184.59628738470983
94 | 925.373 -247.59540528256272 469.16937059880837 197.50190108576095 186.56126269656838
95 | 935.323 -252.27428518518082 471.28206653344745 197.54474938617187 188.52667113108285
96 | 945.274 -256.97407635383007 473.3723510083927 197.58626949275182 190.49249937327738
97 | 955.224 -261.6945629508224 475.441673630446 197.62651556591038 192.45873430114682
98 | 965.174 -266.43553367328053 477.48996257810904 197.6655390472277 194.42536356456864
99 | 975.124 -271.1967811742257 479.5176371144462 197.70338879248612 196.39237519936165
100 | 985.075 -275.97810244851905 481.5246152478351 197.74011126290281 198.35975791674204
101 | 995.025 -280.77929844692056 483.5122725271544 197.775750658161 200.32750052441122
102 | 1004.975 -285.60017397960326 485.4805010886407 197.81034902449815 202.29559250546802
103 | 1014.925 -290.44053761966825 487.42967356711694 197.84394640436625 204.2640238254379
104 | 1024.876 -295.3002014136885 489.35967478651617 197.87658091957636 206.23278454633166
105 | 1034.826 -300.17898136413567 491.27181455596696 197.90828892927357 208.2018654055574
106 | 1044.776 -305.0766964645267 493.1659549970717 197.93910507982358 210.17125733349394
107 | 1054.726 -309.9931694713065 495.0424290491393 197.96906240458637 212.14095154997597
108 | 1064.677 -314.9282261319653 496.90109384276207 197.99819245694755 214.11093966077968
109 | 1074.627 -319.8816955709798 498.74320050127864 198.0265253269474 216.08121375410775
110 | 1084.577 -324.8534098073868 500.56858630513517 198.05408977431208 218.05176582167772
111 | 1094.527 -329.84320394775375 502.37754973780704 198.08091327002606 220.02258843411897
112 | 1104.478 -334.8509160896933 504.1699251059869 198.10702207116233 221.99367445151688
113 | 1114.428 -339.8763872253782 505.946910931725 198.13244127908348 223.96501673395693
114 | 1124.378 -344.91946095208493 507.7083237776989 198.1571949059576 225.93660872043654
115 | 1134.328 -349.97998376165026 509.45443242045747 198.18130594127385 227.90844365698237
116 | 1144.279 -355.0578045580439 511.1850519174629 198.2047963934147 229.88051546501865
117 | 1154.229 -360.1527750433105 512.9013333656317 198.22768731459956 231.8528180659693
118 | 1164.179 -365.26474933162785 514.6030763390953 198.24999890065808 233.8253454777438
119 | 1174.129 -370.39358394930713 516.2905234889012 198.2717504910304 235.7980921041929
120 | 1184.08 -375.53913793127805 517.9634739886201 198.29296063528253 237.77105244565269
121 | 1194.03 -380.70127243514764 519.6230359627291 198.31364711805006 239.74422119542982
122 | 1203.98 -385.87985103065637 521.2689947262064 198.33382699229577 241.71759323980174
123 | 1213.93 -391.07473950670726 522.9015702427023 198.35351665414 243.6911636580165
124 | 1223.881 -396.2858057748806 524.5205484852596 198.37273180128815 245.66492762580754
125 | 1233.831 -401.5129197729486 526.1269981746507 198.3914875411188 247.63888051187885
126 | 1243.781 -406.75595375433164 527.720693221517 198.40979836574027 249.6130177814198
127 | 1253.731 -412.014781709186 529.3018333292999 198.42767822682086 251.58733509259054
128 | 1263.682 -417.28927975034514 530.8701935695701 198.44514050233093 253.56182820003644
129 | 1273.632 -422.5793257273787 532.4268067846538 198.4621980796875 255.53649305137347
130 | 1283.582 -427.8847996125333 533.9714371993658 198.4788633474399 257.5113256907031
131 | 1293.532 -433.205583114792 535.5042668267338 198.49514822021308 259.4863221621266
132 | 1303.483 -438.54155967987344 537.0250617580439 198.51106416365096 261.4614788956868
133 | 1313.433 -443.8926144902325 538.5348218867454 198.52662222767438 263.4367922249411
134 | 1323.383 -449.2586344650599 540.033303318081 198.54183302985206 265.4122585799321
135 | 1333.333 -454.63950835676764 541.5206725854987 198.55670683023092 267.3878746801585
136 | 1343.284 -460.03512626856246 542.9966882064484 198.57125348144913 269.3636370521485
137 | 1353.234 -465.4453801368725 544.4623197061586 198.58548249525194 271.3395426083713
138 | 1363.184 -470.8701633454055 545.9173168161466 198.59940304249162 273.3155882612964
139 | 1373.134 -476.3093709181204 547.3618320145837 198.61302396144194 275.29177082690774
140 | 1383.085 -481.76289932625565 548.7956176470617 198.62635376611257 277.26808760361604
141 | 1393.035 -487.2306462953593 550.2196152998667 198.6394006878216 279.24453550389075
142 | 1402.985 -492.71251138420047 551.6335693587803 198.65217266688074 281.2211118261425
143 | 1412.935 -498.20839540585786 553.0376197593235 198.6646773609101 283.1978139652673
144 | 1422.886 -503.7182003312341 554.4315141581438 198.67692216146696 285.17463921967595
145 | 1432.836 -509.2418296749968 555.8161678372551 198.68891421067465 287.15158498426433
146 | 1442.786 -514.7791883990941 557.1913210569542 198.70066040953722 289.12864894338463
147 | 1452.736 -520.3301826232977 558.5571026774517 198.71216742625364 291.1058284919328
148 | 1462.687 -525.8947195287182 559.91325617816 198.72344170453246 293.08312141074623
149 | 1472.637 -531.4727080332019 561.2606728048927 198.73448945527724 295.0605253841769
150 | 1482.587 -537.0640577299927 562.599089242692 198.74531671478783 297.0380381930623
151 | 1492.537 -542.6686798525851 563.9286245304637 198.75592929487365 299.0156576182396
152 | 1502.488 -548.2864865028414 565.2490190513058 198.76633283274032 300.99338163351695
153 | 1512.438 -553.917391133419 566.561141247523 198.7765327660464 302.9712082127023
154 | 1522.388 -559.5613081618278 567.8647252835324 198.78653437447562 304.94913523311845
155 | 1532.338 -565.218153259888 569.1598811913211 198.7963427631081 306.9271607650587
156 | 1542.289 -570.8878430642724 570.4463470439453 198.8059628624201 308.9052829753017
157 | 1552.239 -576.570295369478 571.7249698017537 198.8153994615421 310.88350003062624
158 | 1562.189 -582.2654289348553 572.995482001644 198.8246571833154 312.86181009781086
159 | 1572.139 -587.9731635810932 574.2579854101498 198.83374052586416 314.8402113436344
160 | 1582.09 -593.6934201902194 575.5122163202255 198.8426538293379 316.8187021278461
161 | 1592.04 -599.4261204161443 576.7590018004194 198.85140130916923 318.79728081019545
162 | 1601.99 -605.171187070602 577.9980729099642 198.8599870477592 320.7759457504316
163 | 1611.94 -610.9285439301802 579.2295241997123 198.8684150027921 322.7546952118188
164 | 1621.891 -616.69811573632 580.4530906083592 198.87668901554963 324.73352794004757
165 | 1631.841 -622.4798278093741 581.6695804991239 198.88481280259657 326.71244210189667
166 | 1641.791 -628.2736068204904 582.8787240663075 198.89278998072413 328.6914364430567
167 | 1651.741 -634.0793800197281 584.0806091508842 198.90062405863563 330.6705094197625
168 | 1661.692 -639.8970756220004 585.2749699121255 198.90831842031722 332.64965958473397
169 | 1671.642 -645.7266228070732 586.4625970077448 198.91587637492515 334.62888578014713
170 | 1681.592 -651.5679513336252 587.6432200553859 198.923301115213 336.6081863657514
171 | 1691.542 -657.4209920216728 588.8169210707631 198.93059575910425 338.58756028020804
172 | 1701.493 -663.2856763666305 589.9834336332077 198.93776332474886 340.56700607623713
173 | 1711.443 -669.1619366357949 591.1435316465752 198.94480674715211 342.54652259601465
174 | 1721.393 -675.0497060613163 592.2969447688863 198.95172886154577 344.5261085852313
175 | 1731.343 -680.9489183577715 593.4437492997255 198.95853244496033 346.5057628860631
176 | 1741.294 -686.8595083010761 594.5836788878138 198.96522018296727 348.4854843406861
177 | 1751.244 -692.7814111495721 595.7174915913278 198.97179468630776 350.4652716947909
178 | 1761.194 -698.7145630299698 596.8449171491012 198.97825849920747 352.4451238870389
179 | 1771.144 -704.6589007443765 597.9660268713066 198.9846140827472 354.42503995257675
180 | 1781.095 -710.6143618667822 599.0805547151402 198.9908638398068 356.40501873358045
181 | 1791.045 -716.5808845500894 600.189243498804 198.99701011506463 358.3850590722261
182 | 1800.995 -722.5584076225973 601.2918235859779 199.00305517005452 360.365160196631
183 | 1810.945 -728.5468707809732 602.3883616749592 199.00900120810914 362.34532085248577
184 | 1820.896 -734.546214107826 603.4785920644199 199.01485038267424 364.32554026790785
185 | 1830.846 -740.5563785541326 604.5632434053389 199.0206047889944 366.30581738155854
186 | 1840.796 -746.577305553296 605.6420466354588 199.026266464113 368.28615132506974
187 | 1850.746 -752.6089373106026 606.7150642755438 199.0318373702432 370.26654113358836
188 | 1860.697 -758.6512164172798 607.7820313334337 199.03731945296923 372.24698593874626
189 | 1870.647 -764.7040864294079 608.843662756842 199.0427145830452 374.2274847756902
190 | 1880.597 -770.7674911925242 609.8996904501851 199.0480245896529 376.2080369690227
191 | 1890.547 -776.8413752275623 610.9501730353452 199.05325125208734 378.1886415538906
192 | 1900.498 -782.9256836343682 611.9948462943813 199.05839629975665 380.16929766192584
193 | 1910.448 -789.0203622846707 613.0344122961743 199.06346142881137 382.15000471421644
194 | 1920.398 -795.125357146684 614.0686039019556 199.0684482855149 384.13076164942373
195 | 1930.348 -801.2406152499605 615.0974762781614 199.07335845792977 386.1115678886357
196 | 1940.299 -807.3660839135089 616.120766169025 199.07819352580378 388.0924225634845
197 | 1950.249 -813.5017108422793 617.1391632234331 199.08295501068363 390.0733249985727
198 | 1960.199 -819.6474447060749 618.1524014286775 199.0876443842292 392.0542745185029
199 | 1970.149 -825.8032342711844 619.1605327952819 199.0922631097859 394.0352702549072
200 | 1980.1 -831.9690289792939 620.1632950902315 199.09681258418345 396.01631162887367
201 | 1990.05 -838.144778851001 621.1613662048721 199.10129419593713 397.9973979650048
202 | 2000.0 -844.3304342928453 622.1544814403744 199.10570928367537 399.9785284914181
203 |
--------------------------------------------------------------------------------
/tests/regression/data/Cu.dat:
--------------------------------------------------------------------------------
1 | # Phonon free energy and specific heat from phonopy-FHI-aims
2 | # Phonon zero point energy = 0.130542885 eV
3 | # Temperature (K) Free energy (eV/cell) Internal energy (eV/cell) c_v (kB/cell) -TS_vib(eV/cell)
4 | 0.000 0.130542885 0.130542885 0.000000000 -0.000000000
5 | 20.000 0.130520427 0.130613148 0.173002209 -0.000092721
6 | 40.000 0.130127090 0.131862183 1.523755061 -0.001735094
7 | 60.000 0.128442935 0.136360619 3.727236837 -0.007917684
8 | 80.000 0.124660646 0.144579005 5.734445364 -0.019918359
9 | 100.000 0.118432205 0.155841148 7.254390633 -0.037408943
10 | 120.000 0.109713894 0.169338938 8.348078332 -0.059625044
11 | 140.000 0.098601356 0.184439317 9.132523968 -0.085837960
12 | 160.000 0.085240943 0.200695837 9.703050708 -0.115454894
13 | 180.000 0.069789554 0.217800792 10.126090054 -0.148011238
14 | 200.000 0.052397997 0.235540929 10.446147353 -0.183142932
15 | 220.000 0.033204928 0.253766099 10.692977718 -0.220561171
16 | 240.000 0.012335391 0.272368547 10.886714275 -0.260033156
17 | 260.000 -0.010098721 0.291269436 11.041215585 -0.301368157
18 | 280.000 -0.033997501 0.310409999 11.166200734 -0.344407499
19 | 300.000 -0.059271668 0.329745675 11.268613009 -0.389017343
20 | 320.000 -0.085841248 0.349242136 11.353500893 -0.435083384
21 | 340.000 -0.113634377 0.368872552 11.424596151 -0.482506929
22 | 360.000 -0.142586248 0.388615678 11.484699676 -0.531201926
23 | 380.000 -0.172638205 0.408454488 11.535943477 -0.581092693
24 | 400.000 -0.203736965 0.428375190 11.579971564 -0.632112155
25 | 420.000 -0.235833954 0.448366498 11.618066850 -0.684200452
26 | 440.000 -0.268884741 0.468419092 11.651241504 -0.737303833
27 | 460.000 -0.302848549 0.488525213 11.680302218 -0.791373762
28 | 480.000 -0.337687841 0.508678350 11.705897959 -0.846366190
29 | 500.000 -0.373367960 0.528873000 11.728555350 -0.902240960
30 | 520.000 -0.409856823 0.549104482 11.748705179 -0.958961305
31 | 540.000 -0.447124647 0.569368791 11.766702482 -1.016493437
32 | 560.000 -0.485143719 0.589662478 11.782841906 -1.074806197
33 | 580.000 -0.523888195 0.609982559 11.797369571 -1.133870754
34 | 600.000 -0.563333914 0.630326441 11.810492315 -1.193660355
35 | 620.000 -0.603458250 0.650691856 11.822384956 -1.254150106
36 | 640.000 -0.644239965 0.671076816 11.833196040 -1.315316781
37 | 660.000 -0.685659093 0.691479569 11.843052420 -1.377138662
38 | 680.000 -0.727696829 0.711898566 11.852062943 -1.439595395
39 | 700.000 -0.770335430 0.732332431 11.860321418 -1.502667861
40 | 720.000 -0.813558130 0.752779941 11.867909039 -1.566338072
41 | 740.000 -0.857349066 0.773240001 11.874896357 -1.630589067
42 | 760.000 -0.901693200 0.793711631 11.881344914 -1.695404831
43 | 780.000 -0.946576265 0.814193950 11.887308577 -1.760770215
44 | 800.000 -0.991984702 0.834686164 11.892834663 -1.826670866
45 | 820.000 -1.037905614 0.855187554 11.897964867 -1.893093168
46 | 840.000 -1.084326713 0.875697473 11.902736043 -1.960024185
47 | 860.000 -1.131236284 0.896215328 11.907180863 -2.027451613
48 | 880.000 -1.178623145 0.916740584 11.911328373 -2.095363729
49 | 900.000 -1.226476608 0.937272750 11.915204462 -2.163749358
50 | 920.000 -1.274786450 0.957811380 11.918832268 -2.232597830
51 | 940.000 -1.323542886 0.978356063 11.922232516 -2.301898949
52 | 960.000 -1.372736536 0.998906424 11.925423820 -2.371642961
53 | 980.000 -1.422358406 1.019462117 11.928422929 -2.441820523
54 | 1000.000 -1.472399860 1.040022825 11.931244949 -2.512422684
55 | 1020.000 -1.522852603 1.060588253 11.933903536 -2.583440856
56 | 1040.000 -1.573708659 1.081158131 11.936411051 -2.654866790
57 | 1060.000 -1.624960354 1.101732209 11.938778715 -2.726692564
58 | 1080.000 -1.676600301 1.122310255 11.941016724 -2.798910555
59 | 1100.000 -1.728621379 1.142892052 11.943134364 -2.871513431
60 | 1120.000 -1.781016724 1.163477402 11.945140103 -2.944494126
61 | 1140.000 -1.833779715 1.184066118 11.947041683 -3.017845832
62 | 1160.000 -1.886903957 1.204658026 11.948846183 -3.091561983
63 | 1180.000 -1.940383277 1.225252965 11.950560094 -3.165636242
64 | 1200.000 -1.994211704 1.245850785 11.952189375 -3.240062489
65 | 1220.000 -2.048383468 1.266451343 11.953739501 -3.314834811
66 | 1240.000 -2.102892982 1.287054509 11.955215513 -3.389947490
67 | 1260.000 -2.157734839 1.307660158 11.956622058 -3.465394997
68 | 1280.000 -2.212903803 1.328268174 11.957963423 -3.541171977
69 | 1300.000 -2.268394798 1.348878449 11.959243571 -3.617273247
70 | 1320.000 -2.324202903 1.369490880 11.960466168 -3.693693783
71 | 1340.000 -2.380323345 1.390105371 11.961634610 -3.770428716
72 | 1360.000 -2.436751493 1.410721831 11.962752046 -3.847473324
73 | 1380.000 -2.493482848 1.431340176 11.963821401 -3.924823024
74 | 1400.000 -2.550513044 1.451960324 11.964845391 -4.002473368
75 | 1420.000 -2.607837836 1.472582199 11.965826546 -4.080420035
76 | 1440.000 -2.665453097 1.493205730 11.966767219 -4.158658828
77 | 1460.000 -2.723354817 1.513830849 11.967669606 -4.237185667
78 | 1480.000 -2.781539093 1.534457492 11.968535755 -4.315996585
79 | 1500.000 -2.840002125 1.555085598 11.969367580 -4.395087723
80 | 1520.000 -2.898740216 1.575715109 11.970166870 -4.474455325
81 | 1540.000 -2.957749764 1.596345971 11.970935298 -4.554095735
82 | 1560.000 -3.017027262 1.616978132 11.971674432 -4.634005394
83 | 1580.000 -3.076569290 1.637611542 11.972385742 -4.714180833
84 | 1600.000 -3.136372515 1.658246156 11.973070606 -4.794618671
85 | 1620.000 -3.196433687 1.678881928 11.973730318 -4.875315615
86 | 1640.000 -3.256749635 1.699518816 11.974366094 -4.956268451
87 | 1660.000 -3.317317265 1.720156780 11.974979078 -5.037474045
88 | 1680.000 -3.378133557 1.740795781 11.975570346 -5.118929339
89 | 1700.000 -3.439195564 1.761435784 11.976140911 -5.200631348
90 | 1720.000 -3.500500405 1.782076753 11.976691728 -5.282577158
91 | 1740.000 -3.562045268 1.802718655 11.977223697 -5.364763923
92 | 1760.000 -3.623827406 1.823361458 11.977737669 -5.447188863
93 | 1780.000 -3.685844130 1.844005132 11.978234445 -5.529849262
94 | 1800.000 -3.748092816 1.864649648 11.978714784 -5.612742463
95 | 1820.000 -3.810570894 1.885294978 11.979179403 -5.695865871
96 | 1840.000 -3.873275853 1.905941095 11.979628980 -5.779216948
97 | 1860.000 -3.936205234 1.926587975 11.980064158 -5.862793210
98 | 1880.000 -3.999356634 1.947235593 11.980485543 -5.946592227
99 | 1900.000 -4.062727697 1.967883926 11.980893714 -6.030611623
100 | 1920.000 -4.126316118 1.988532952 11.981289216 -6.114849070
101 | 1940.000 -4.190119641 2.009182648 11.981672568 -6.199302289
102 | 1960.000 -4.254136055 2.029832995 11.982044263 -6.283969050
103 | 1980.000 -4.318363193 2.050483973 11.982404769 -6.368847166
104 | 2000.000 -4.382798934 2.071135563 11.982754529 -6.453934497
--------------------------------------------------------------------------------
/tests/regression/data/Cu_out.dat:
--------------------------------------------------------------------------------
1 | 0.0 12.595473615560065 0.0 0.0 12.595473615560065
2 | 20.0 12.593306747971239 0.44731082399027133 1.438420399588434 12.602252964451047
3 | 40.0 12.555355496889854 4.1852780213790615 12.669204493906308 12.722766521259683
4 | 60.0 12.392859242367722 12.732339506456961 30.989971350240218 13.156799612755137
5 | 80.0 12.027923832016379 24.022868543329015 47.67883161482015 13.9497533154827
6 | 100.0 11.426970633520938 36.094142897369736 60.316359735559516 15.036384923257911
7 | 120.0 10.585781501131631 47.941184776724775 69.40978522482905 16.338723674338603
8 | 140.0 9.513584581468727 59.15788628133857 75.93202914132449 17.79568875734146
9 | 160.0 8.224500695859138 69.62314870532221 80.67565239371132 19.36420448871069
10 | 180.0 6.7336682964276795 79.33840809117935 84.19299722203633 21.014581752839963
11 | 200.0 5.055638143141202 88.35303310028392 86.85410167023892 22.726244763197986
12 | 220.0 3.2037885062105964 96.7314447156417 88.90636351305653 24.484706343651773
13 | 240.0 1.1901842975058892 104.53910591555201 90.51717887400274 26.279569717238374
14 | 260.0 -0.9743784497056455 111.83694892128783 91.80177424045345 28.10322826982919
15 | 280.0 -3.280260175347564 118.67954259561985 92.84095858963826 29.95001184791133
16 | 300.0 -5.718846572482566 125.1148918036087 93.69246162176579 31.815620968600047
17 | 320.0 -8.28242132315942 131.18489002054258 94.39825876001792 33.6967434834142
18 | 340.0 -10.96405060547042 136.92600381283341 94.98937762498687 35.590790690892945
19 | 360.0 -13.757481494496648 142.36998404069988 95.48910613681862 37.49571276015531
20 | 380.0 -16.657054546597077 147.54453020666742 95.9151708046452 39.40986693193655
21 | 400.0 -19.65762873382019 152.47387803589055 96.28124068815549 41.331922480536036
22 | 420.0 -22.754517377643417 157.17930440509247 96.59798251953036 43.260790472495415
23 | 440.0 -25.94343353827519 161.6795572790784 96.87381194008353 45.195571664519306
24 | 460.0 -29.220442833327528 165.99121795705062 97.11543616029337 47.13551742691577
25 | 480.0 -32.58192349288851 170.12900612518854 97.3282509920218 49.07999954368733
26 | 500.0 -36.02453162480273 174.10603736170813 97.51663502251618 51.02848705605134
27 | 520.0 -39.545171690159684 177.9340384737073 97.68417002249886 52.980528316168105
28 | 540.0 -43.14097006631275 181.62353124094426 97.83380792551993 54.93573690028249
29 | 560.0 -46.80925285525279 185.18398729595853 97.96799856304646 56.89378003048399
30 | 580.0 -50.5475264900564 188.62395911137577 98.08878829061803 58.85436979454155
31 | 600.0 -54.35345978861416 191.95119299100523 98.19789685505361 60.81725600598898
32 | 620.0 -58.22486967380144 195.1727250159588 98.29677777407923 62.78221983609301
33 | 640.0 -62.15970699013462 198.29496322210628 98.38666612785894 64.7490694720134
34 | 660.0 -66.15604531147251 201.32375936806176 98.46861663091926 66.71763587144827
35 | 680.0 -70.21207023114454 204.2644703084745 98.54353428757277 68.68776957861813
36 | 700.0 -74.32606980990283 207.1220109137269 98.61219906924322 70.65933782970602
37 | 720.0 -78.49642637466903 209.90090151986814 98.67528606040844 72.63222262315072
38 | 740.0 -82.72160937861965 212.60530768396382 98.73338185472059 74.60631830751358
39 | 760.0 -87.0001678753302 215.23907658223592 98.78699814083811 76.58153032716908
40 | 780.0 -91.33072530856732 217.80576793218845 98.83658279391888 78.55777367853968
41 | 800.0 -95.71197343371271 220.30868148248038 98.88252922939058 80.5349717522716
42 | 820.0 -100.14266787943801 222.75088177420625 98.92518411877208 82.51305517541113
43 | 840.0 -104.62162303398206 225.13521959457742 98.96485388326872 84.49196152194831
44 | 860.0 -109.14770857167906 227.46435144679725 99.00181017300314 86.47163357608123
45 | 880.0 -113.71984559354517 229.74075603602537 99.03629448985654 88.45201971815719
46 | 900.0 -118.33700286435071 231.96675048692092 99.06852208695169 90.43307257387812
47 | 920.0 -122.99819401454533 234.14450339709916 99.0986853443246 92.41474911078589
48 | 940.0 -127.70247493515424 236.27604745591836 99.12695657921304 94.39700967340902
49 | 960.0 -132.4489405937621 238.36329038541186 99.15349055702421 96.37981807974793
50 | 980.0 -137.23672320129182 240.40802463996894 99.17842653669247 98.36314094587773
51 | 1000.0 -142.06498951041516 242.41193709987797 99.20189011649015 100.34694768594814
52 | 1020.0 -146.93293917530218 244.376616678518 99.22399483871877 102.33120983678614
53 | 1040.0 -151.83980262894383 246.30356151566914 99.24484347845072 104.31590134735212
54 | 1060.0 -156.78483944290141 248.1941864487733 99.26452933227107 106.300998096313
55 | 1080.0 -161.76733688002653 250.0498282246416 99.28313717444067 108.28647769907175
56 | 1100.0 -166.78660786826916 251.8717518968913 99.30074421305937 110.27231921831131
57 | 1120.0 -171.84199013230958 253.66115507343343 99.31742085499664 112.25850354993588
58 | 1140.0 -176.93284484276379 255.41917315567267 99.33323147082207 114.24501265118839
59 | 1160.0 -182.05855497593288 257.1468833703051 99.34823491861653 116.23182973362103
60 | 1180.0 -187.21852492786167 258.84530863640424 99.36248516755687 118.21893926309534
61 | 1200.0 -192.41217858463202 260.5154211262029 99.37603176352583 120.2063267668115
62 | 1220.0 -197.63895922587756 262.158145633807 99.38892022820626 122.193978447367
63 | 1240.0 -202.89832778804782 263.7743624622832 99.4011924748042 124.1818817616687
64 | 1260.0 -208.18976257495189 265.36491049523966 99.41288714062746 126.17002464905005
65 | 1280.0 -213.5127583893908 266.9305893020338 99.42403986977726 128.15839591721254
66 | 1300.0 -218.86682547181874 268.47216201350693 99.43468361246896 130.1469851457403
67 | 1320.0 -224.25148901791633 269.9903571322427 99.44484884952253 132.13578239664412
68 | 1340.0 -229.66628850319324 271.48587082875025 99.45456381685301 134.1247784073321
69 | 1360.0 -235.11077710407653 272.9593687512614 99.46385469670318 136.11396439763902
70 | 1380.0 -240.58452073305696 274.4114876781551 99.47274580887623 138.103332262797
71 | 1400.0 -246.08709813517441 275.8428373044166 99.48125973545258 140.09287409100884
72 | 1420.0 -251.61809973019407 277.25400160534036 99.4894175120227 142.0825825493892
73 | 1440.0 -257.1771273231503 278.64554042160773 99.4972387025171 144.07245078747957
74 | 1460.0 -262.7637940078612 280.0179906497424 99.5047415654957 146.0624722442774
75 | 1480.0 -268.3777232020755 281.37186753161944 99.51194312897796 148.05264074472132
76 | 1500.0 -274.0185482615312 282.7076657764916 99.5188593068453 150.04295040320616
77 | 1520.0 -279.68591247995545 284.0258605944329 99.52550497367137 152.03339562358263
78 | 1540.0 -285.3794683171818 285.3269087745614 99.53189403955211 154.02397119564282
79 | 1560.0 -291.0988773991507 286.61124968032055 99.53803954156491 156.01467210214943
80 | 1580.0 -296.8438097460261 287.87930592490335 99.54395370196984 158.00549351883583
81 | 1600.0 -302.61394377219614 289.1314842975364 99.54964797809636 159.99643110386214
82 | 1620.0 -308.40896590033134 290.36817674026815 99.5551331288591 161.98748041890306
83 | 1640.0 -314.2285701754437 291.58976072379164 99.56041926464462 163.97863741157462
84 | 1660.0 -320.0724580719154 292.7966001773367 99.56551589719815 165.9698982224635
85 | 1680.0 -325.9403382040436 293.98904606498263 99.57043197288145 167.96125908864187
86 | 1700.0 -331.8319262295545 295.16743697804554 99.57517591424518 169.95271663312295
87 | 1720.0 -337.7469441742062 296.3320997422332 99.57975566160113 171.9442673824349
88 | 1740.0 -343.6851207212448 297.483349927475 99.58417869796564 173.93590815256172
89 | 1760.0 -349.646190825463 298.62149237781273 99.58845209894642 175.92763585597277
90 | 1780.0 -355.62989503780267 299.7468217055678 99.59258252442801 177.91944759810812
91 | 1800.0 -361.6359801807523 300.8596225917556 99.59657628508755 179.91134058089312
92 | 1820.0 -367.6641982870084 301.96017049080297 99.60043934239474 181.90331210273845
93 | 1840.0 -373.7143070819019 303.04873186980547 99.60417733355521 183.89535955854018
94 | 1860.0 -379.78606930800123 304.1255645360951 99.60779560476846 185.8874806326503
95 | 1880.0 -385.87925311105323 305.19091809786636 99.61129919459881 187.87967291293552
96 | 1900.0 -391.9936311716154 306.24503439570987 99.61469291712014 189.87193418023324
97 | 1920.0 -398.1289810909973 307.288147605658 99.61798130371454 191.8642623118661
98 | 1940.0 -404.2850851982895 308.3204846840006 99.62116866958813 193.85665508867146
99 | 1960.0 -410.4617301644229 309.3422657356382 99.62425911377099 195.8491106774281
100 | 1980.0 -416.6587069056825 310.3537040677332 99.62725652743161 197.84162714842924
101 | 2000.0 -422.8758107766791 311.3550067225664 99.63016459387693 199.83420266845366
102 |
--------------------------------------------------------------------------------
/tests/regression/data/S2.dat:
--------------------------------------------------------------------------------
1 | T Cp S -(G-H(Tr))/T H-H_Tr Delta_H Delta_G Log_Kf
2 | K J/molK J/molK J/molK kJ/mol kJ/mol kJ/mol n/a
3 | 0 0 0 0 -9.124 128.300 128.300 0
4 | 100 29.367 195.067 255.684 -06.062 129.983 112.980 -59.015
5 | 200 030.452 215.621 231.072 -3.090 129.670 96.001 -25.073
6 | 250 031.513 222.529 228.695 -1.541 129.180 87.637 -18.311
7 | 298.15 032.490 228.165 228.165 0 128.600 79.687 -13.961
8 | 300 032.525 228.366 228.166 0.060 128.576 79.384 -13.822
9 | 350 033.387 233.447 228.565 1.709 127.892 71.238 -10.632
10 | 400 034.090 237.953 229.462 03.396 112.718 63.371 -8.275
11 | 450 034.656 242.002 230.634 05.115 120.586 56.063 -6.508
12 | 500 035.111 245.678 231.958 06.860 118.326 49.019 -5.121
13 | 600 035.781 252.142 234.798 10.407 114.703 35.511 -3.092
14 | 700 036.260 257.695 237.681 14.009 111.612 22.562 -1.684
15 | 800 036.637 262.562 240.493 17.655 108.835 10.033 -0.655
16 | 900 036.966 266.896 243.191 021.335 0 0 0
17 | 1000 037.277 270.807 245.760 025.047 0 0 0
18 | 1100 037.584 274.374 248.201 028.790 0 0 0
19 | 1200 037.894 277.658 250.521 032.564 0 0 0
20 | 1300 038.205 280.703 252.727 036.369 0 0 0
21 | 1400 038.514 283.546 254.828 040.205 0 0 0
22 | 1500 038.818 286.213 256.832 044.072 0 0 0
23 | 1600 039.112 288.728 258.748 047.968 0 0 0
24 | 1700 039.394 291.108 260.582 051.894 0 0 0
25 | 1800 039.661 293.367 262.341 055.847 0 0 0
26 | 1900 39.911 295.518 264.031 059.825 0 0 0
27 | 2000 40.144 297.571 265.657 063.828 0 0 0
28 | 2100 40.352 299.535 267.224 067.853 0 0 0
--------------------------------------------------------------------------------
/tests/test_calculations.py:
--------------------------------------------------------------------------------
1 | import math
2 |
3 |
4 | def test_get_volume(BaS_hybrid_calculation):
5 | assert math.isclose(BaS_hybrid_calculation.volume, 63.2552)
6 |
--------------------------------------------------------------------------------
/thermopot/__init__.py:
--------------------------------------------------------------------------------
1 | __version__ = "1.1.1"
2 |
3 | from scipy import constants
4 |
5 | eV2Jmol = (
6 | constants.physical_constants["electron volt-joule relationship"][0] * constants.N_A
7 | )
8 |
9 | eV2kJmol = (
10 | constants.physical_constants["electron volt-joule relationship"][0]
11 | * constants.N_A
12 | / 1000
13 | )
14 |
15 | kB2JKmol = constants.physical_constants["Boltzmann constant"][0] * constants.N_A
16 |
--------------------------------------------------------------------------------
/thermopot/calculations.py:
--------------------------------------------------------------------------------
1 | """
2 | Module to parse and store data from electronic structure calculations.
3 | Contains the parent class Calculation to store data from a variety of sources.
4 | Contains the child class AimsCalculation to read and store data from a FHI-aims calculation.
5 | """
6 |
7 | import re
8 |
9 |
10 | class Calculation:
11 | """
12 | Parent class for parsing and storing data from electronic structure calculations.
13 |
14 | Example:
15 |
16 | BaS_calc = Calculation(volume=63.2552, energy=-235926.586148547, xc='pbesol', NAtoms=2)
17 |
18 | Attributes:
19 |
20 | volume (float): volume of the periodic unit cell in Angstrom^3
21 | filepath (str): path to the calculation output files
22 | energy (float): DFT total energy in eV
23 | xc (str): XC functional used to calculate the total energy
24 | NAtoms (int): number of atoms in the periodic unit cell
25 |
26 | Note:
27 |
28 | If gas is True then no volume attribute is required.
29 | """
30 |
31 | def __init__(
32 | self, energy=None, xc=None, NAtoms=None, volume=None, filepath=None, gas=False
33 | ):
34 | """
35 | Note:
36 |
37 | All attributes are None until set by derived classes or specified by user.
38 |
39 | Args:
40 |
41 | volume (float): volume of the periodic unit cell in Angstrom^3
42 | filepath (str, optional): path to the calculation output files
43 | energy (float): DFT total energy in eV
44 | xc (str): XC functional used to calculate the total energy
45 | NAtoms (int): number of atoms in the periodic unit cell
46 | gas (bool): True if gas species, False otherwise
47 |
48 | Note:
49 |
50 | If gas is True then volume is None
51 | """
52 | if not gas:
53 | self.volume = volume
54 | self.filepath = filepath
55 | self.energy = energy
56 | self.xc = xc
57 | self.NAtoms = NAtoms
58 |
59 | # self.check_attributes()
60 |
61 | def check_attributes(self):
62 | """Check that the Calculation class attributes make basic sense."""
63 |
64 | assert (
65 | type(self.filepath) == str or self.filepath is None
66 | ), "filepath must be a string"
67 | assert type(self.energy) == float, "energy must be a float"
68 | assert type(self.xc) == str, "xc must be a string"
69 | assert (
70 | type(self.NAtoms) == int
71 | ) and self.NAtoms >= 1, "NAtoms must be an integer >= 1"
72 | assert (
73 | type(self.volume) == float
74 | ) and self.volume > 0, "volume must be a float > 0"
75 |
76 |
77 | class AimsCalculation(Calculation):
78 | """Class for parsing and storing data from a FHI-AIMS total energy calculation.
79 |
80 | Example:
81 |
82 | BaS_calc = AimsCalculation("./aims_output/output.aims")
83 |
84 | Attributes:
85 |
86 | volume (float): volume of the periodic unit cell in Angstrom^3
87 | filepath (str): path to the calculation output files
88 | energy (float): DFT total energy in eV
89 | xc (str): XC functional used to calculate the total energy
90 | NAtoms (int): number of atoms in the periodic unit cell
91 | """
92 |
93 | def __init__(self, filepath="./calculation.out", gas=False):
94 | """
95 | Args:
96 |
97 | filepath (str): path to the calculation output files
98 | gas (bool): True if gas species, False otherwise
99 |
100 | Note:
101 |
102 | If gas is True then volume is None
103 | """
104 | super().__init__()
105 | self.filepath = filepath
106 | if not gas:
107 | self.volume = self.get_volume()
108 | self.energy = self.get_energy()
109 | self.xc = self.get_xc()
110 | self.NAtoms = self.get_NAtoms()
111 |
112 | def get_volume(self):
113 | """
114 | Returns:
115 |
116 | (float): volume of the periodic unit cell in Angstrom^3
117 | """
118 | with open(self.filepath) as contents:
119 | return float(
120 | re.findall("Unit cell volume\s+:\s*(.*)\sA", contents.read())[-1]
121 | )
122 |
123 | def get_energy(self):
124 | """
125 | Returns:
126 |
127 | (float): DFT total energy in eV
128 | """
129 | with open(self.filepath) as contents:
130 | return float(
131 | re.findall(
132 | "Total energy of the DFT[^0-9]+(-\d*\.?\d*) eV", contents.read()
133 | )[-1]
134 | )
135 |
136 | def get_xc(self):
137 | """
138 | Returns:
139 |
140 | (str): XC functional used to calculate the total energy
141 | """
142 | with open(self.filepath) as contents:
143 | return re.findall("xc (\S+)", contents.read())[0]
144 |
145 | def get_NAtoms(self):
146 | """
147 | Returns:
148 |
149 | (int): number of atoms in the periodic unit cell
150 | """
151 | with open(self.filepath) as contents:
152 | return int(
153 | re.findall("Number of atoms\s +:\s + (\S+)", contents.read())[-1]
154 | )
155 |
--------------------------------------------------------------------------------
/thermopot/interpolate.py:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Copyright Adam J. Jackson (2015) #
3 | # #
4 | # This program is free software: you can redistribute it and/or modify #
5 | # it under the terms of the GNU General Public License as published by #
6 | # the Free Software Foundation, either version 3 of the License, or #
7 | # (at your option) any later version. #
8 | # #
9 | # This program is distributed in the hope that it will be useful, #
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of #
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12 | # GNU General Public License for more details. #
13 | # #
14 | # You should have received a copy of the GNU General Public License #
15 | # along with this program. If not, see . #
16 | ################################################################################
17 |
18 | import numpy as np
19 | from scipy.interpolate import interp1d, interp2d
20 | from numpy import genfromtxt
21 | import re
22 | from thermopot import *
23 |
24 |
25 | def get_potential_aims(file, property):
26 | """Thermodynamic property interpolation function. Requires phonopy-FHI-aims output file.
27 | Reads data for S and Cv expressed in J/K/mol, F and U in kJ/mol,
28 | TS in J/mol.
29 | Outputs data for S and Cv in kB/cell, U, F and TS in eV/cell.
30 | """
31 | data = genfromtxt(file)
32 | T = data[:, 0]
33 | if property in ("Cv", "Cp", "heat_capacity", "C"):
34 | potential = data[:, 3] / kB2JKmol
35 | elif property in ("U", "internal_energy"):
36 | potential = data[:, 4] / eV2kJmol
37 | elif property in ("F", "A", "Helmholtz", "free_energy"):
38 | potential = data[:, 1] / eV2kJmol
39 | elif property in ("S", "Entropy", "entropy"):
40 | potential = data[:, 2] / kB2JKmol
41 | elif property in ("TS"):
42 | potential = (T * data[:, 2]) / eV2Jmol
43 | else:
44 | raise RuntimeError("Property not found")
45 | thefunction = interp1d(T, potential, kind="linear")
46 |
47 | return thefunction
48 |
49 |
50 | def get_potential_nist_table(file, property):
51 | """Thermodynamic property interpolation function. Requires NIST-JANAF table. All properties in J, mol and K"""
52 | data = genfromtxt(file, skip_header=2)
53 | T = data[:, 0]
54 | if property in ("Cp", "C", "heat_capacity"):
55 | potential = data[:, 1]
56 | elif property in ("S", "entropy"):
57 | potential = data[:, 2]
58 | elif property in ("H", "enthalpy"):
59 | potential = (data[:, 4] - data[0, 4]) * 1e3
60 | elif property in ("U", "internal_energy"):
61 | # U = H - PV; for ideal gas molar PV = RT so U = H - RT
62 | from scipy.constants import R as R
63 |
64 | potential = (data[:, 4] - data[0, 4]) * 1e3 - R * data[:, 0]
65 | elif property in ("DH", "Delta_H", "standard_enthalpy_change"):
66 | potential = data[:, 4] * 1e3
67 | else:
68 | raise RuntimeError("Property not found")
69 |
70 | thefunction = interp1d(T, potential, kind="cubic")
71 | return thefunction
72 |
73 |
74 | def get_potential_sulfur_table(filename):
75 | """
76 | Read thermodynamic property as function of T, P from datafile.
77 |
78 | Datafile should be generated by the code at http://github.com/WMD-bath/sulfur-model
79 | or follow the same format
80 |
81 | """
82 | # Import chemical potential in J mol-1 vs T, P from file
83 | data = genfromtxt(filename, comments="#", delimiter=",")
84 | T = data[:, 0].flatten()
85 | with open(filename, "r") as f:
86 | header = f.readline()
87 | P = [float(p) for p in re.findall(r"\d+.\d+", header)]
88 | thefunction = interp2d(T, np.log(P), data[:, 1:].transpose(), kind="cubic")
89 |
90 | def lin_P_function(T, P):
91 | return thefunction(T, np.log(P))
92 |
93 | return lin_P_function
94 |
--------------------------------------------------------------------------------
/thermopot/materials.py:
--------------------------------------------------------------------------------
1 | """
2 | Module contains the classes Sulfur_model, Solid and IdealGas to store basic material data.
3 | Each class provides methods for calculating various thermodynamic properties.
4 | """
5 |
6 | import numpy as np
7 | import scipy
8 | from scipy import constants, special
9 | from thermopot import interpolate
10 |
11 | from pathlib import (
12 | Path,
13 | ) # get correct path for datafiles when called from another directory
14 |
15 | materials_directory = str(Path.cwd())
16 | # Append a trailing slash to make coherent directory name - this would select the
17 | # root directory in the case of no prefix, so we need to check
18 | if materials_directory:
19 | materials_directory = materials_directory + "/"
20 |
21 |
22 | class Sulfur_model(object):
23 | """
24 | Class with parameterised model for sulfur chemical potential.
25 | From work of Jackson et al, https://doi.org/10.1039/C5SC03088A.
26 | Region of validity is 400 - 1500 K, 10^0 - 10^7 Pa.
27 | You must provide a reference energy from e.g. a DFT total energy calculation.
28 | """
29 |
30 | def __init__(self, reference_energy):
31 | self.reference_energy = reference_energy
32 |
33 | def mu(self, T, P, units="eV", xc=None):
34 | """
35 | Returns the chemical potential of one atom of Sulfur
36 |
37 | Args:
38 |
39 | T (float/ndarray): 1D Numpy array containing temperature data (in Kelvin) as floats, or a single temperature as a float.
40 | P (float/ndarray): 2D Numpy array with a single row containing pressure data (in Pa) as floats, or a single pressure as a float.
41 |
42 | Note:
43 |
44 | T, P are orthogonal 2D arrays of length m and n, populated in one row/column: in this case mu is an m x n matrix.
45 | Other T, P arrays will result in undefined behaviour.
46 |
47 | Returns:
48 |
49 | mu (float/ndarray): Chemical potential of one sulfur atom expressed as floats in a m x n Numpy array where T, P are orthogonal 2D arrays of length m and n
50 | """
51 |
52 | Kb = scipy.constants.physical_constants["Boltzmann constant in eV/K"][0]
53 |
54 | if (
55 | np.any(T > 1500)
56 | or np.any(T < 400)
57 | or np.any(P > 10**7)
58 | or np.any(P < 10**0)
59 | ):
60 | print(
61 | """WARNING!: You are using the sulfur model beyond the temperature and/or pressure range it was fitted to.
62 | Region of validity is 400 - 1500 K, 10^0 - 10^7 Pa. """
63 | )
64 |
65 | def T_tr(P):
66 | return (
67 | 5.077e2
68 | + 7.272e1 * np.log10(P)
69 | - 8.295 * np.log10(P) ** 2
70 | + 1.828 * np.log10(P) ** 3
71 | )
72 |
73 | def mu_S_2(T, P):
74 | return (
75 | 1.207
76 | - 1.848e-3 * T
77 | - 8.566e-7 * T**2
78 | + 4.001e-10 * T**3
79 | - 8.654e-14 * T**4
80 | + Kb * T * np.log(P / 1e5)
81 | )
82 |
83 | def mu_S_8(T, P):
84 | return (
85 | 7.62e-1
86 | - 2.457e-3 * T
87 | - 4.012e-6 * T**2
88 | + 1.808e-9 * T**3
89 | - 3.810e-13 * T**4
90 | + Kb * T * np.log(P / 1e5)
91 | )
92 |
93 | def a_p(P):
94 | return 1.465e-02 - 2.115e-03 * np.log10(P) + 6.905e-04 * np.log10(P) ** 2
95 |
96 | b = 10
97 | c = 80
98 | w = 100
99 |
100 | mu_eV = (
101 | 0.5 * (special.erfc((T - T_tr(P)) / w) * mu_S_8(T, P) / 8)
102 | + 0.5 * ((special.erf((T - T_tr(P)) / w) + 1) * mu_S_2(T, P) / 2)
103 | - a_p(P) * np.exp(-((T - T_tr(P) + b) ** 2) / (2 * c**2))
104 | + self.reference_energy
105 | )
106 |
107 | if units == "eV":
108 | return mu_eV
109 |
110 | elif units == "J":
111 | return (
112 | mu_eV
113 | * constants.physical_constants["electron volt-joule relationship"][0]
114 | * constants.N_A
115 | )
116 |
117 | elif units == "kJ":
118 | return (
119 | mu_eV
120 | * constants.physical_constants["electron volt-joule relationship"][0]
121 | * constants.N_A
122 | * 0.001
123 | )
124 |
125 |
126 | class Material(object):
127 | """
128 | Parent class for storing materials properties.
129 |
130 | Attributes:
131 |
132 | name (str): Identifying string
133 | stoichiometry (dict): relates element to the number of atoms in a single formula unit
134 | energies (dict): relates xc functional to DFT total energy in eV
135 | N (int): number of atoms per formula unit
136 | """
137 |
138 | def __init__(self, name, stoichiometry, energies):
139 | self.name = name
140 | self.stoichiometry = stoichiometry
141 | self.energies = energies
142 | self.N = sum(self.stoichiometry.values())
143 |
144 |
145 | class Solid(Material):
146 | """
147 | Class for solid material data.
148 |
149 | Note:
150 |
151 | The material is assumed to be incompressible and without thermal expansion.
152 |
153 | Example:
154 |
155 | BaS = Solid('BaS',{'Ba':1,'S':1},"./phonon_data/Ba_S",calculation=BaS_calc)
156 |
157 | Attributes:
158 |
159 | name (str): Identifying string
160 | stoichiometry (dict): relates element to the number of atoms in a single formula unit
161 | energies (dict): relates xc functional to DFT total energy in eV
162 | N (int): number of atoms per formula unit
163 | fu_cell (int): number of formula units in periodic unit cell
164 | volume (float): volume of unit cell in Angstroms^3
165 | phonon_filepath (str): path to the phonon output data
166 | NAtoms (int): number of atoms in periodic unit cell
167 | """
168 |
169 | def __init__(
170 | self,
171 | name,
172 | stoichiometry,
173 | phonon_filepath,
174 | calculation=False,
175 | volume=False,
176 | energies=False,
177 | NAtoms=1,
178 | ):
179 | """
180 | Args:
181 |
182 | name (str): Identifying string
183 | stoichiometry (dict): relates element to the number of atoms in a single formula unit
184 | phonon_filepath (str): path to the phonon output data
185 | calculation (thermopot.calculation.Calculation, optional): instance of the thermopot.calculation.Calculation class
186 | volume (float, optional): volume of unit cell in Angstroms^3
187 | energies (dict, optional): relates xc functional to DFT total energy in eV
188 | NAtoms (int): number of atoms in periodic unit cell
189 | """
190 |
191 | if calculation is not False:
192 | if type(calculation) is not list:
193 | Material.__init__(
194 | self, name, stoichiometry, {calculation.xc: calculation.energy}
195 | )
196 | self.volume = calculation.volume
197 | self.NAtoms = calculation.NAtoms
198 | else:
199 | pass
200 |
201 | else:
202 | Material.__init__(self, name, stoichiometry, energies)
203 |
204 | self.NAtoms = NAtoms
205 | self.volume = volume
206 |
207 | self.fu_cell = self.NAtoms / self.N
208 | self.phonon_filepath = materials_directory + phonon_filepath
209 |
210 | def U(self, T, xc="pbesol", units="eV"):
211 | """
212 | Calculates the internal energy of one formula unit of solid.
213 |
214 | Example:
215 |
216 | U = BaS.U(300,xc="pbesol",units="eV")
217 |
218 | Args:
219 |
220 | T (float/ndarray): 1D Numpy array containing temperature data (in Kelvin) as floats, or a single temperature as a float.
221 | xc (str, optional): DFT XC functional used to calculate the ground state energy
222 | units (str, optional): specifies the units as "eV", "J" (J/mol) or "kJ" (kJ/mol)
223 |
224 | Returns:
225 |
226 | U (float/ndarray): 1D Numpy array (with the same dimensions as T) containing the internal energies of one formula unit of solid, or a single internal energy float when a single temperature is passed as an argument.
227 |
228 | """
229 | U_func = interpolate.get_potential_aims(self.phonon_filepath, "U")
230 | E_dft = self.energies[xc]
231 |
232 | U_eV = (E_dft + U_func(T)) / self.fu_cell
233 |
234 | if units == "eV":
235 | return U_eV
236 |
237 | elif units == "J":
238 | return (
239 | U_eV(T, xc=xc)
240 | * constants.physical_constants["electron volt-joule relationship"][0]
241 | * constants.N_A
242 | )
243 |
244 | elif units == "kJ":
245 | return (
246 | U_eV(T, xc=xc)
247 | * constants.physical_constants["electron volt-joule relationship"][0]
248 | * constants.N_A
249 | * 0.001
250 | )
251 |
252 | def H(self, T, P, xc="pbesol", units="eV"):
253 | """
254 | Calculates the Enthalpy (H = U + PV) of one formula unit of solid.
255 |
256 | Examples:
257 |
258 | H = BaS.H(300,1E3,xc="pbesol",units="eV")
259 | H = BaS.H(np.linspace(100,700,1000),np.array(np.logspace(1, 7, 100),ndmin=2).transpose())
260 |
261 | Args:
262 |
263 | T (float/ndarray): 1D Numpy array containing temperature data (in Kelvin) as floats, or a single temperature as a float.
264 | P (float/ndarray): 2D Numpy array with a single row containing pressure data (in Pa) as floats, or a single pressure as a float.
265 | xc (str, optional): DFT XC functional used to calculate the ground state energy
266 | units (str, optional): specifies the units as "eV", "J" (J/mol) or "kJ" (kJ/mol)
267 |
268 | Note:
269 |
270 | T, P are orthogonal 2D arrays of length m and n, populated in one row/column: in this case H is an m x n matrix.
271 | Other T, P arrays will result in undefined behaviour.
272 |
273 | Returns:
274 |
275 | H (float/ndarray): Enthalpy of one formula unit of solid expressed as floats in a m x n Numpy array where T, P are orthogonal 2D arrays of length m and n
276 | """
277 | U_func = interpolate.get_potential_aims(self.phonon_filepath, "U")
278 | PV = (
279 | P
280 | * self.volume
281 | * 1e-30
282 | * constants.physical_constants["joule-electron volt relationship"][0]
283 | / constants.N_A
284 | )
285 | E_dft = self.energies[xc]
286 | H_eV = ((E_dft + U_func(T)) + PV) / self.fu_cell
287 |
288 | if units == "eV":
289 | return H_eV
290 |
291 | elif units == "J":
292 | return (
293 | H_eV
294 | * constants.physical_constants["electron volt-joule relationship"][0]
295 | * constants.N_A
296 | )
297 |
298 | elif units == "kJ":
299 | return (
300 | H_eV
301 | * constants.physical_constants["electron volt-joule relationship"][0]
302 | * constants.N_A
303 | * 0.001
304 | )
305 |
306 | def mu(self, T, P, xc="pbesol", units="eV"):
307 | """
308 | Calculates the Gibbs Free Energy (mu = U + PV - TS) of one formula unit of solid.
309 |
310 | Examples:
311 |
312 | mu = BaS.mu(300,1E3,xc="pbesol",units="eV")
313 | mu = BaS.mu(np.linspace(100,700,1000),np.array(np.logspace(1, 7, 100),ndmin=2).transpose())
314 |
315 | Args:
316 |
317 | T (float/ndarray): 1D Numpy array containing temperature data (in Kelvin) as floats, or a single temperature as a float.
318 | P (float/ndarray): 2D Numpy array with a single row containing pressure data (in Pa) as floats, or a single pressure as a float.
319 | xc (str, optional): DFT XC functional used to calculate the ground state energy
320 | units (str, optional): specifies the units as "eV", "J" (J/mol) or "kJ" (kJ/mol)
321 |
322 | Note:
323 |
324 | T, P are orthogonal 2D arrays of length m and n, populated in one row/column: in this case mu is an m x n matrix.
325 | Other T, P arrays will result in undefined behaviour.
326 |
327 | Returns:
328 |
329 | mu (float/ndarray): Gibbs Free Energy of one formula unit of solid expressed as floats in a m x n Numpy array where T, P are orthogonal 2D arrays of length m and n
330 | """
331 | TS_func = interpolate.get_potential_aims(self.phonon_filepath, "TS")
332 | H = self.H(T, P, xc=xc)
333 | mu_eV = H - (TS_func(T)) / self.fu_cell
334 |
335 | if units == "eV":
336 | return mu_eV
337 |
338 | elif units == "J":
339 | return (
340 | mu_eV
341 | * constants.physical_constants["electron volt-joule relationship"][0]
342 | * constants.N_A
343 | )
344 |
345 | elif units == "kJ":
346 | return (
347 | mu_eV
348 | * constants.physical_constants["electron volt-joule relationship"][0]
349 | * constants.N_A
350 | * 0.001
351 | )
352 |
353 | def Cv(self, T, units="kB"):
354 | """
355 | Calculates the Constant-volume heat capacity of one formula unit of solid.
356 |
357 | Examples:
358 |
359 | Cv = BaS.mu(300,xc="pbesol",units="eV")
360 | Cv = BaS.mu(np.linspace(100,700,1000),xc="pbesol",units="kJ")
361 |
362 | Args:
363 |
364 | T (float/ndarray): 1D Numpy array containing temperature data (in Kelvin) as floats, or a single temperature as a float.
365 | xc (str, optional): DFT XC functional used to calculate the ground state energy
366 | units (str, optional): specifies the units as "eV", "J" (J/mol) or "kJ" (kJ/mol)
367 |
368 | Returns:
369 |
370 | Cv (float/ndarray): 1D Numpy array (with the same dimensions as T) containing the Constant-volume heat capacity of one formula unit of solid, or a single heat capacity float when a single temperature is passed as an argument.
371 | """
372 | Cv_func = interpolate.get_potential_aims(self.phonon_filepath, "Cv")
373 | Cv_kB = Cv_func(T) / self.fu_cell
374 |
375 | if units == "kB":
376 | return Cv_kB
377 |
378 | elif units == "eV":
379 | return Cv_kB * constants.physical_constants["Boltzmann constant in eV/K"][0]
380 |
381 | elif units == "J":
382 | return (
383 | Cv_kB
384 | * constants.physical_constants["Boltzmann constant"][0]
385 | * constants.N_A
386 | )
387 |
388 | elif units == "kJ":
389 | return (
390 | Cv_kB
391 | * constants.physical_constants["Boltzmann constant"][0]
392 | * constants.N_A
393 | * 0.001
394 | )
395 |
396 |
397 | class IdealGas(Material):
398 | """
399 | Class for ideal gas properties.
400 |
401 | Example:
402 |
403 | S2_gas = materials.IdealGas("S2", {"S":2}, "./thermo_data/S2",calculation=S2_gas_calc)
404 |
405 | Attributes:
406 |
407 | name (str): Identifying string
408 | stoichiometry (dict): relates element to the number of atoms in a single formula unit
409 | thermo_dile (str): path to the thermodynamics data
410 | calculation (thermopot.calculation.Calculation, optional): instance of the thermopot.calculation.Calculation class
411 | energies (dict, optional): relates xc functional to DFT total energy in eV
412 | zpe_pbesol (float, optional): zero point energy calculated using the pbesol XC-functional
413 | zpe_hse06 (float, optional): zero point energy calculated using the hse06 XC-functional
414 | zpe_lit (float, optional): zero point energy calculated using literature values
415 |
416 | Note:
417 |
418 | Ideal gas law PV=nRT is applied: specifically (dH/dP) at const. T = 0 and int(mu)^P2_P1 dP = kTln(P2/P1).
419 | Enthalpy has no P dependence as volume is not restricted / expansion step is defined as isothermal
420 | """
421 |
422 | def __init__(
423 | self,
424 | name,
425 | stoichiometry,
426 | thermo_file,
427 | calculation=False,
428 | energies=False,
429 | zpe_pbesol=0,
430 | zpe_hse06=0,
431 | zpe_lit=0,
432 | ):
433 | """
434 | Args:
435 |
436 | name (str): Identifying string
437 | stoichiometry (dict): relates element to the number of atoms in a single formula unit
438 | thermo_dile (str): path to the thermodynamics data
439 | calculation (thermopot.calculation.Calculation, optional): instance of the thermopot.calculation.Calculation class
440 | energies (dict, optional): relates xc functional to DFT total energy in eV
441 | zpe_pbesol (float, optional): zero point energy calculated using the pbesol XC-functional
442 | zpe_hse06 (float, optional): zero point energy calculated using the hse06 XC-functional
443 | zpe_lit (float, optional): zero point energy calculated using literature values
444 | """
445 | if calculation is not False:
446 | Material.__init__(
447 | self, name, stoichiometry, {calculation.xc: calculation.energy}
448 | )
449 | else:
450 | Material.__init__(self, name, stoichiometry, energies)
451 | self.thermo_file = materials_directory + thermo_file
452 |
453 | if zpe_hse06 > 0:
454 | self.zpe = zpe_pbesol
455 | elif zpe_pbesol > 0:
456 | self.zpe = zpe_pbesol
457 | elif zpe_lit > 0:
458 | self.zpe = zpe_lit
459 | else:
460 | self.zpe = 0
461 |
462 | def U(self, T, xc="pbesol", units="eV"):
463 | """
464 | Calculates the internal energy of one formula unit of ideal gas.
465 |
466 | Example:
467 |
468 | U = S2_gas.U(300,xc="pbesol",units="eV")
469 |
470 | Args:
471 |
472 | T (float/ndarray): 1D Numpy array containing temperature data (in Kelvin) as floats, or a single temperature as a float.
473 | xc (str, optional): DFT XC functional used to calculate the ground state energy
474 | units (str, optional): specifies the units as "eV", "J" (J/mol) or "kJ" (kJ/mol)
475 |
476 | Returns:
477 |
478 | U (float/ndarray): 1D Numpy array (with the same dimensions as T) containing the internal energies of one formula unit of gas, or a single internal energy float when a single temperature is passed as an argument.
479 |
480 | """
481 | U_func = interpolate.get_potential_nist_table(self.thermo_file, "U")
482 | E_dft = self.energies[xc]
483 | U_eV = (
484 | E_dft
485 | + self.zpe
486 | + U_func(T)
487 | * constants.physical_constants["joule-electron volt relationship"][0]
488 | / constants.N_A
489 | )
490 |
491 | if units == "eV":
492 | return U_eV
493 |
494 | elif units == "J":
495 | return (
496 | U_eV
497 | * constants.physical_constants["electron volt-joule relationship"][0]
498 | * constants.N_A
499 | )
500 |
501 | elif units == "kJ":
502 | return (
503 | U_eV
504 | * constants.physical_constants["electron volt-joule relationship"][0]
505 | * constants.N_A
506 | * 0.001
507 | )
508 |
509 | def H(self, T, xc="pbesol", units="eV"):
510 | """
511 | Calculates the Enthalpy of one formula unit of ideal gas.
512 |
513 | Examples:
514 |
515 | H = S2_gas.H(300,xc="pbesol",units="eV")
516 | H = S2_gas.H(np.linspace(100,700,1000))
517 |
518 | Args:
519 |
520 | T (float/ndarray): 1D Numpy array containing temperature data (in Kelvin) as floats, or a single temperature as a float.
521 | xc (str, optional): DFT XC functional used to calculate the ground state energy
522 | units (str, optional): specifies the units as "eV", "J" (J/mol) or "kJ" (kJ/mol)
523 |
524 | Returns:
525 |
526 | H (float/ndarray): 1D Numpy array (with the same dimensions as T) containing the enthalpy of one formula unit of gas, or a single enthalpy float when a single temperature is passed as an argument.
527 | """
528 | H_func = interpolate.get_potential_nist_table(self.thermo_file, "H")
529 | E_dft = self.energies[xc]
530 | H_eV = (
531 | E_dft
532 | + self.zpe
533 | + H_func(T)
534 | * constants.physical_constants["joule-electron volt relationship"][0]
535 | / constants.N_A
536 | )
537 |
538 | if units == "eV":
539 | return H_eV
540 |
541 | elif units == "J":
542 | return (
543 | H_eV
544 | * constants.physical_constants["electron volt-joule relationship"][0]
545 | * constants.N_A
546 | )
547 |
548 | elif units == "kJ":
549 | return (
550 | H_eV
551 | * constants.physical_constants["electron volt-joule relationship"][0]
552 | * constants.N_A
553 | * 0.001
554 | )
555 |
556 | def mu(self, T, P, xc="pbesol", units="eV"):
557 | """
558 | Calculates the Gibbs Free Energy of one formula unit of ideal gas.
559 |
560 | Examples:
561 |
562 | mu = S2_gas.mu(300,xc="pbesol",units="eV")
563 | mu = S2_gas.mu(np.linspace(100,700,1000))
564 |
565 | Args:
566 |
567 | T (float/ndarray): 1D Numpy array containing temperature data (in Kelvin) as floats, or a single temperature as a float.
568 | P (float/ndarray): 2D Numpy array with a single row containing pressure data (in Pa) as floats, or a single pressure as a float.
569 | xc (str, optional): DFT XC functional used to calculate the ground state energy
570 | units (str, optional): specifies the units as "eV", "J" (J/mol) or "kJ" (kJ/mol)
571 |
572 | Note:
573 |
574 | T, P are orthogonal 2D arrays of length m and n, populated in one row/column: in this case mu is an m x n matrix.
575 | Other T, P arrays will result in undefined behaviour.
576 |
577 | Returns:
578 |
579 | mu (float/ndarray): Gibbs Free Energy of one formula unit of ideal gas expressed as floats in a m x n Numpy array where T, P are orthogonal 2D arrays of length m and n
580 | """
581 |
582 | S_func = interpolate.get_potential_nist_table(self.thermo_file, "S")
583 | S = (
584 | S_func(T)
585 | * constants.physical_constants["joule-electron volt relationship"][0]
586 | / constants.N_A
587 | )
588 | H = self.H(T, xc=xc)
589 | mu_eV = (
590 | H
591 | - T * S
592 | + constants.physical_constants["Boltzmann constant in eV/K"][0]
593 | * T
594 | * np.log(P / 1e5)
595 | )
596 |
597 | if units == "eV":
598 | return mu_eV
599 |
600 | elif units == "J":
601 | return (
602 | mu_eV
603 | * constants.physical_constants["electron volt-joule relationship"][0]
604 | * constants.N_A
605 | )
606 |
607 | elif units == "kJ":
608 | return (
609 | mu_eV
610 | * constants.physical_constants["electron volt-joule relationship"][0]
611 | * constants.N_A
612 | * 0.001
613 | )
614 |
--------------------------------------------------------------------------------
/thermopot/potential.py:
--------------------------------------------------------------------------------
1 | import matplotlib.pyplot as plt
2 | import matplotlib as mpl
3 |
4 |
5 | class Potential:
6 | def __init__(self, potential, T, P):
7 | self.potential = potential
8 | self.T = T
9 | self.P = P
10 |
11 | def plot_TvsP(
12 | self,
13 | potential_label="$\Delta G_f$ / kJ mol$^{-1}$",
14 | scale_range=[-600, 0],
15 | precision="%d",
16 | T_units="K",
17 | P_units="Pa",
18 | log_scale=True,
19 | ):
20 | """
21 | T is an array e.g. np.linspace(100, 1500, 100) # K
22 | P is an array orthogonal to T. e.g. np.array(np.logspace(1, 7, 100), ndmin=2).transpose() # Pa
23 | potential is returned from a reactions.reaction method called for an instance with attributes T,P.
24 | If T has length m and P has length n, P will be a 2D array with dimensions m x n.
25 | e.g. reactions.reaction({Ba:1,S:2}, {BaS2:1}},temperature=T,pressure=P).Dmu_eV_pbesol()
26 | potential_label is the label of the contour colorbar e.g. '$\Delta G_f$ / kJ mol$^{-1}$'
27 | scale_range is the scale of the colorbar e.g. [-380, -240]
28 | logscale determines if the y-axis Pressure is logarithmic
29 | """
30 |
31 | mpl.rcParams["font.family"] = "serif"
32 | mpl.rcParams["font.serif"] = "Times New Roman"
33 | mpl.rcParams["font.size"] = 16
34 |
35 | # Unit conversions (all calculations are in SI units, conversion needed for plots)
36 | if T_units == "K":
37 | x_values = self.T
38 | x_unitlabel = "K"
39 | elif T_units == "C":
40 | x_values = self.T - 273.15
41 | x_unitlabel = "$^\circ$ C"
42 | else:
43 | raise ValueError("Invalid temperature unit: {0}".format(T_units))
44 |
45 | if P_units == "Pa":
46 | y_values = self.P.flatten()
47 | elif P_units == "Bar" or P_units == "bar":
48 | y_values = self.P.flatten() * 1e-5
49 | elif P_units == "mbar":
50 | y_values = self.P.flatten() * 1e-5 * 1e3
51 | elif P_units == "kPa":
52 | y_values = self.P.flatten() * 1e-3
53 | elif P_units == "mmHg" or P_units == "torr":
54 | y_values = self.P.flatten() * 760 / (1.01325e5)
55 | else:
56 | raise ValueError("Invalid pressure unit: {0}.".format(T_units))
57 |
58 | fig = plt.figure()
59 | ax = fig.add_subplot(1, 1, 1)
60 | colormap = plt.get_cmap("summer")
61 |
62 | a = plt.contour(
63 | x_values, y_values, self.potential, 10, linewidths=1, colors="k"
64 | )
65 | plt.pcolormesh(
66 | x_values,
67 | y_values,
68 | self.potential,
69 | cmap=colormap,
70 | vmin=scale_range[0],
71 | vmax=scale_range[1],
72 | shading="auto",
73 | )
74 | colours = plt.colorbar()
75 | colours.set_label(potential_label, labelpad=20)
76 |
77 | if log_scale:
78 | ax.set_yscale("log")
79 | plt.clabel(a, fmt=precision)
80 |
81 | plt.xlabel("Temperature / {0}".format(x_unitlabel))
82 | plt.ylabel("Pressure / {0}".format(P_units))
83 |
84 | return plt
85 |
--------------------------------------------------------------------------------
/thermopot/potentials.py:
--------------------------------------------------------------------------------
1 | import matplotlib.pyplot as plt
2 | import matplotlib as mpl
3 | import matplotlib.patches as mpatches
4 | import numpy as np
5 |
6 |
7 | class Potentials:
8 | def __init__(self, *potentials):
9 | self.potentials = potentials
10 | self.minimum_potential = self.find_potential_minimum()
11 | self.T = self.potentials[0].T
12 | self.P = self.potentials[0].P
13 |
14 | # TODO: check that all the potentials are plottable over T/P range
15 |
16 | def plot_TvsP(
17 | self,
18 | material_labels=None,
19 | T_units="K",
20 | P_units="Pa",
21 | log_scale=True,
22 | ):
23 | """
24 | T is an array e.g. np.linspace(100, 1500, 100) # K
25 | P is an array orthogonal to T. e.g. np.array(np.logspace(1, 7, 100), ndmin=2).transpose() # Pa
26 | potential is returned from a reactions.reaction method called for an instance with attributes T,P.
27 | If T has length m and P has length n, P will be a 2D array with dimensions m x n.
28 | e.g. reactions.reaction({Ba:1,S:2}, {BaS2:1}},temperature=T,pressure=P).Dmu_eV_pbesol()
29 | potential_label is the label of the contour colorbar e.g. '$\Delta G_f$ / kJ mol$^{-1}$'
30 | scale_range is the scale of the colorbar e.g. [-380, -240]
31 | log_scale determines if the Pressure y-axis is logarithmic
32 | """
33 |
34 | mpl.rcParams["font.family"] = "serif"
35 | mpl.rcParams["font.serif"] = "Times New Roman"
36 | mpl.rcParams["font.size"] = 16
37 |
38 | # Unit conversions (all calculations are in SI units, conversion needed for plots)
39 |
40 | if T_units == "K":
41 | x_values = self.T
42 | x_unitlabel = "K"
43 | elif T_units == "C":
44 | x_values = self.T - 273.15
45 | x_unitlabel = "$^\circ$ C"
46 | else:
47 | raise ValueError("Invalid temperature unit: {0}".format(T_units))
48 |
49 | if P_units == "Pa":
50 | y_values = self.P.flatten()
51 | elif P_units == "Bar" or P_units == "bar":
52 | y_values = self.P.flatten() * 1e-5
53 | elif P_units == "mbar":
54 | y_values = self.P.flatten() * 1e-5 * 1e3
55 | elif P_units == "kPa":
56 | y_values = self.P.flatten() * 1e-3
57 | elif P_units == "mmHg" or P_units == "torr":
58 | y_values = self.P.flatten() * 760 / (1.01325e5)
59 | else:
60 | raise ValueError("Invalid pressure unit: {0}.".format(T_units))
61 |
62 | fig = plt.figure()
63 | ax = fig.add_subplot(1, 1, 1)
64 | colormap = plt.get_cmap("summer")
65 |
66 | potential = self.find_potential_minimum()
67 | plt.pcolormesh(
68 | x_values,
69 | y_values,
70 | potential / (len(material_labels) - 1),
71 | cmap=colormap,
72 | shading="auto",
73 | )
74 | # TODO: sort the colour map out so consistent with grid. Now ranges from 0 to 1
75 |
76 | # Set borders in the interval [0, 1]
77 | bound = np.linspace(0, 1, len(material_labels))
78 |
79 | # AT THE MOMENT THIS IS BROKEN!!!!
80 | # plt.legend(
81 | # [mpatches.Patch(color=colormap(i)) for i in bound],
82 | # ["{:s}".format(material_labels[i]) for i in range(len(material_labels))],
83 | # )
84 |
85 | plt.xlabel("Temperature / {0}".format(x_unitlabel))
86 | plt.ylabel("Pressure / {0}".format(P_units))
87 | if log_scale:
88 | ax.set_yscale("log")
89 |
90 | return plt
91 |
92 | def find_potential_minimum(self):
93 | assert (
94 | len(set([potential.potential.shape for potential in self.potentials])) == 1
95 | ), "potential arrays must have the same dimension"
96 |
97 | minimum_potential = self.potentials[0].potential
98 | for i, potential in enumerate(self.potentials):
99 | minimum_potential = np.minimum(
100 | minimum_potential, self.potentials[i + 1].potential
101 | )
102 | if i + 2 == len(self.potentials):
103 | break
104 |
105 | for i, potential in enumerate(self.potentials):
106 | minimum_potential[potential.potential == minimum_potential] = i
107 |
108 | return minimum_potential
109 |
--------------------------------------------------------------------------------
/thermopot/reactions.py:
--------------------------------------------------------------------------------
1 | from thermopot import potential
2 |
3 | # TODO: Write a function to ensure that the reaction is balanced.
4 |
5 |
6 | class Reaction:
7 | """
8 | Class for reaction data
9 |
10 | Sets properties:
11 | -------------------
12 | reaction.reactants (Dict relating reactant materials to a number of formula units)
13 | reaction.products (Dict relating product materials to a number of formular units)
14 |
15 | Sets methods:
16 | -------------------
17 | reaction.DH(T,P) : Enthalpy of formation
18 | reaction.DU(T,P) : Internal energy change
19 | reaction.Dmu(T,P) : Gibbs free energy of formation
20 | """
21 |
22 | def __init__(
23 | self,
24 | reactants_dictionary,
25 | products_dictionary,
26 | temperature=298.15,
27 | pressure=1e5,
28 | fu=1,
29 | ):
30 | """
31 | reactants_dictionary and products dictionary takes the form { class_instance : formula units }
32 | and can have an arbitrary number of key-value pairs. `Class instance` is an instance of the `materials.solid`
33 | or `materials.ideal_gas` classes.
34 |
35 | temperature is provided in kelvin, pressure is provided in Pa.
36 |
37 | fu is the number of formula units of the final reactant(s). It is used to scale the calculated changes in energy/enthalpy.
38 |
39 | """
40 | self.reactants = reactants_dictionary
41 | self.products = products_dictionary
42 | self.T = temperature
43 | self.P = pressure
44 | self.fu_scaling = fu
45 |
46 | def DH(self, T=None, P=None, xc="pbesol", units="eV"):
47 | T = self.T if T is None else T
48 | P = self.P if P is None else P
49 |
50 | reactants_enthalpy, products_enthalpy = 0, 0
51 | for material, fu in self.reactants.items():
52 | reactants_enthalpy += material.H(T, P, xc=xc, units=units) * fu
53 | for material, fu in self.products.items():
54 | products_enthalpy += material.H(T, P, xc=xc, units=units) * fu
55 |
56 | return potential.Potential(
57 | (products_enthalpy - reactants_enthalpy) / self.fu_scaling, T, P
58 | )
59 |
60 | def DU(self, T=None, P=None, xc="pbesol", units="eV"):
61 | T = self.T if T is None else T
62 | P = self.P if P is None else P
63 |
64 | reactants_energy, products_energy = 0, 0
65 | for material, fu in self.reactants.items():
66 | reactants_energy += material.U(T, xc=xc, units=units) * fu
67 | for material, fu in self.products.items():
68 | products_energy += material.U(T, xc=xc, units=units) * fu
69 |
70 | return potential.Potential(
71 | (products_energy - reactants_energy) / self.fu_scaling, T, P
72 | )
73 |
74 | def Dmu(self, T=None, P=None, xc="pbesol", units="eV"):
75 | T = self.T if T is None else T
76 | P = self.P if P is None else P
77 |
78 | reactants_energy, products_energy = 0, 0
79 | for material, fu in self.reactants.items():
80 | reactants_energy += material.mu(T, P, xc=xc, units=units) * fu
81 | for material, fu in self.products.items():
82 | products_energy += material.mu(T, P, xc=xc, units=units) * fu
83 |
84 | return potential.Potential(
85 | (products_energy - reactants_energy) / self.fu_scaling, T, P
86 | )
87 |
88 | def DE(self, xc="pbesol"):
89 | # units here are whatever is specified when creating material...
90 |
91 | reactants_energy, products_energy = 0, 0
92 |
93 | for material, fu in self.reactants.items():
94 | reactants_energy += (material.energies[xc] / material.fu_cell) * fu
95 | for material, fu in self.products.items():
96 | products_energy += (material.energies[xc] / material.fu_cell) * fu
97 |
98 | return (products_energy - reactants_energy) / self.fu_scaling
99 |
--------------------------------------------------------------------------------