atoMEC
atoMEC is a python-based average-atom code for simulations of high energy density phenomena such as in warm dense matter. It is designed as an open-source and modular python package.
Cite this software
Description
atoMEC is a python-based average-atom code for simulations of high energy density phenomena such as in warm dense matter. It is designed as an open-source and modular python package.
atoMEC uses Kohn-Sham density functional theory, in combination with an average-atom approximation, to solve the electronic structure problem for single-element materials at finite temperature.
More information on the average-atom methodology and Kohn-Sham density functional theory can be found (for example) in this preprint and references therein.
This repository is structured as follows:
├── atoMEC : source code
├── docs : sphinx documentation
├── examples : useful examples to get you started with the package
└── tests : test scripts used during development, will hold tests for CI in the future
Installation
Please see below sub-sections on supported operating systems and Python versions before continuing.
First, clone the atoMEC repository and cd into the main directory.
-
Recommended : using pipenv
This route is recommended because
pipenvautomatically creates a virtual environment and manages dependencies.- First, install
pipenvif it is not already installed, for example viapip install pipenv(or see pipenv for installation instructions) - Next, install
atoMEC's dependencies withpipenv install(use--devoption to install the test dependencies in the same environment) - Use
pipenv shellto activate the virtual environment and install atoMEC withpip install atoMEC(for developers:pip install -e .) - Now run scripts from inside the
atoMECvirtual environment, e.g.python examples/simple.py
- First, install
-
Run the tests (see Testing section below) and report any failures (for example by raising an issue)
Supported operating systems
- Linux and macOS: atoMEC has been installed on various linux distributions and macOS, and is expected to work for most distributions and versions
- Windows: atoMEC does not support Windows installation. This is due to the dependency on
pylibxcwhich currently lacks Windows support.
Supported Python versions
- atoMEC is extensively tested and is known to work seamlessly with Python 3.8. All development and CI testing is done with Python 3.8.
- atoMEC is occasionally tested and is expected to work with Python 3.9
- atoMEC does not work for Python <= 3.7
- atoMEC does not work for Python >= 3.10. This is due to the dependency on
pylibxcwhich breaks for Python >= 3.10.
We are looking into ways to remove, or at least make optional, the dependency on pylibxc, in order to allow installation on Windows and with Python >= 3.10. However, this is not currently a priority.
Running
You can familiarize yourself with the usage of this package by running the example scripts in examples/.
Contributing to atoMEC
We welcome your contributions, please adhere to the following guidelines when contributing to the code:
- In general, contributors should develop on branches based off of
developand merge requests should be todevelop - Please choose a descriptive branch name
- Merges from
developtomasterwill be done after prior consultation of the core development team - Merges from
developtomasterare only done for code releases. This way we always have a cleanmasterthat reflects the current release - Code should be formatted using black style
Testing
- First, install the test requirements (if not already installed in the virtual env with
pipenv install --dev):
# activate environment first (optional)
$ pipenv shell
# install atoMEC as editable project in current directory (for developers)
$ pip install -e .[tests]
# alternatively install package from PyPI with test dependencies
$ pip install atoMEC[tests]
- To run the tests:
$ pytest --cov=atoMEC --random-order tests/
Build documentation locally (for developers)
Install the prerequisites:
$ pip install -r docs/requirements.txt
- Change into
docs/folder. - Run
make apidocs. - Run
make html. This creates a_buildfolder insidedocs. You may also want to usemake html SPHINXOPTS="-W"sometimes. This treats warnings as errors and stops the output at first occurrence of an error (useful for debugging rST syntax). - Open
docs/_build/html/index.html. make cleanif required (e.g. after fixing errors) and building again.
Developers
Scientific Supervision
- Attila Cangi (Center for Advanced Systems Understanding)
- Eli Kraisler (Hebrew University of Jerusalem)
Core Developers and Maintainers
- Tim Callow (Center for Advanced Systems Understanding)
- Daniel Kotik (Center for Advanced Systems Understanding)
Contributions (alphabetical)
- Nathan Rahat (Hebrew University of Jerusalem)
- Ekaterina Tsvetoslavova Stankulova (Center for Advanced Systems Understanding)
Citing atoMEC
If you use code from this repository in a published work, please cite
- T. J. Callow, D. Kotik, E. Kraisler, and A. Cangi, "atoMEC: An open-source average-atom Python code", Proceedings of the 21st Python in Science Conference, edited by Meghann Agarwal, Chris Calloway, Dillon Niederhut, and David Shupe (2022), pp. 31 – 39
- The DOI corresponding to the specific version of atoMEC that you used (DOIs are listed at Zenodo.org)
Mentions
- 1.Author(s): Timothy J. Callow, Eli Kraisler, Attila CangiPublished in Physical Review Research by American Physical Society (APS) in 202310.1103/physrevresearch.5.013049
- 2.Author(s): T. J. Callow, S. B. Hansen, E. Kraisler, A. CangiPublished in Physical Review Research by American Physical Society (APS) in 202210.1103/physrevresearch.4.023055