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 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
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 pipenv
automatically creates a virtual environment and manages dependencies.
pipenv
if it is not already installed, for example via pip install pipenv
(or see pipenv for installation instructions)atoMEC
's dependencies with pipenv install
(use --dev
option to install the test dependencies in the same environment)pipenv shell
to activate the virtual environment and install atoMEC with pip install atoMEC
(for developers: pip install -e .
)atoMEC
virtual environment, e.g. python examples/simple.py
Run the tests (see Testing section below) and report any failures (for example by raising an issue)
pylibxc
which currently lacks Windows support.pylibxc
which 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.
You can familiarize yourself with the usage of this package by running the example scripts in examples/
.
We welcome your contributions, please adhere to the following guidelines when contributing to the code:
develop
and merge requests should be to develop
develop
to master
will be done after prior consultation of the core development teamdevelop
to master
are only done for code releases. This way we always have a clean master
that reflects the current releasepipenv 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]
$ pytest --cov=atoMEC --random-order tests/
Install the prerequisites:
$ pip install -r docs/requirements.txt
docs/
folder.make apidocs
.make html
. This creates a _build
folder inside docs
. You may also want to use make html SPHINXOPTS="-W"
sometimes. This treats warnings as errors and stops the output at first occurrence of an error (useful for debugging rST syntax).docs/_build/html/index.html
.make clean
if required (e.g. after fixing errors) and building again.If you use code from this repository in a published work, please cite