qupled 1.0.3__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qupled-1.2.0/.devcontainer/Dockerfile +25 -0
- qupled-1.2.0/.devcontainer/devcontainer.json +16 -0
- {qupled-1.0.3 → qupled-1.2.0}/.gitignore +7 -5
- {qupled-1.0.3 → qupled-1.2.0}/PKG-INFO +14 -10
- {qupled-1.0.3 → qupled-1.2.0}/README.md +8 -5
- {qupled-1.0.3 → qupled-1.2.0}/dev/devtool.py +40 -40
- qupled-1.2.0/dev/requirements-apt.txt +9 -0
- qupled-1.2.0/dev/requirements-brew.txt +8 -0
- {qupled-1.0.3 → qupled-1.2.0}/docs/conf.py +1 -1
- qupled-1.2.0/docs/contribute.rst +61 -0
- {qupled-1.0.3 → qupled-1.2.0}/docs/examples.rst +11 -49
- {qupled-1.0.3 → qupled-1.2.0}/docs/introduction.rst +6 -3
- qupled-1.2.0/docs/qupled.rst +228 -0
- qupled-1.2.0/docs/requirements.txt +2 -0
- qupled-1.0.3/examples/docs/fixed_adr_qstls.py → qupled-1.2.0/examples/docs/fixed_adr.py +10 -13
- {qupled-1.0.3 → qupled-1.2.0}/examples/docs/initial_guess_stls.py +6 -6
- {qupled-1.0.3 → qupled-1.2.0}/examples/docs/solve_quantum_schemes.py +9 -11
- {qupled-1.0.3 → qupled-1.2.0}/examples/docs/solve_qvsstls.py +6 -9
- qupled-1.2.0/examples/docs/solve_rpa_and_esa.py +37 -0
- qupled-1.2.0/examples/docs/solve_stls.py +21 -0
- {qupled-1.0.3 → qupled-1.2.0}/examples/docs/solve_stls_iet.py +5 -5
- {qupled-1.0.3 → qupled-1.2.0}/examples/docs/solve_vsstls.py +6 -12
- {qupled-1.0.3 → qupled-1.2.0}/examples/readme/create_cover.py +58 -105
- {qupled-1.0.3 → qupled-1.2.0}/examples/readme/qupled_animation_dark.svg +1044 -819
- {qupled-1.0.3 → qupled-1.2.0}/examples/readme/qupled_animation_light.svg +1200 -970
- qupled-1.2.0/examples/tests/test_examples.py +122 -0
- {qupled-1.0.3 → qupled-1.2.0}/pyproject.toml +4 -4
- qupled-1.2.0/src/qupled/database.py +640 -0
- qupled-1.2.0/src/qupled/esa.py +27 -0
- qupled-1.2.0/src/qupled/hf.py +263 -0
- qupled-1.2.0/src/qupled/mpi.py +72 -0
- qupled-1.2.0/src/qupled/native/include/database.hpp +18 -0
- qupled-1.2.0/src/qupled/native/include/esa.hpp +84 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/free_energy.hpp +4 -4
- qupled-1.2.0/src/qupled/native/include/hf.hpp +196 -0
- qupled-1.2.0/src/qupled/native/include/iet.hpp +101 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/input.hpp +91 -154
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/internal_energy.hpp +4 -7
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/logger.hpp +5 -2
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/num_util.hpp +3 -0
- qupled-1.2.0/src/qupled/native/include/python_interface/inputs.hpp +10 -0
- qupled-1.2.0/src/qupled/native/include/python_interface/schemes.hpp +11 -0
- qupled-1.0.3/src/qupled/native/include/python_util.hpp → qupled-1.2.0/src/qupled/native/include/python_interface/util.hpp +2 -2
- qupled-1.2.0/src/qupled/native/include/python_interface/utilities.hpp +11 -0
- qupled-1.2.0/src/qupled/native/include/qstls.hpp +266 -0
- qupled-1.2.0/src/qupled/native/include/qstlsiet.hpp +128 -0
- qupled-1.0.3/src/qupled/native/include/qvs.hpp → qupled-1.2.0/src/qupled/native/include/qvsstls.hpp +42 -48
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/rdf.hpp +6 -12
- qupled-1.2.0/src/qupled/native/include/rpa.hpp +128 -0
- qupled-1.2.0/src/qupled/native/include/stls.hpp +126 -0
- qupled-1.2.0/src/qupled/native/include/stlsiet.hpp +87 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/vector2D.hpp +6 -2
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/vector3D.hpp +2 -3
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/vsbase.hpp +42 -37
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/vsstls.hpp +34 -36
- qupled-1.2.0/src/qupled/native/src/CMakeLists.txt +88 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/esa.cpp +42 -57
- qupled-1.2.0/src/qupled/native/src/free_energy.cpp +10 -0
- qupled-1.0.3/src/qupled/native/src/rpa.cpp → qupled-1.2.0/src/qupled/native/src/hf.cpp +76 -142
- qupled-1.2.0/src/qupled/native/src/iet.cpp +217 -0
- qupled-1.2.0/src/qupled/native/src/input.cpp +211 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/internal_energy.cpp +3 -3
- qupled-1.2.0/src/qupled/native/src/python_interface/inputs.cpp +240 -0
- qupled-1.2.0/src/qupled/native/src/python_interface/native.cpp +39 -0
- qupled-1.2.0/src/qupled/native/src/python_interface/schemes.cpp +151 -0
- qupled-1.0.3/src/qupled/native/src/python_util.cpp → qupled-1.2.0/src/qupled/native/src/python_interface/util.cpp +1 -1
- qupled-1.2.0/src/qupled/native/src/python_interface/utilities.cpp +76 -0
- qupled-1.2.0/src/qupled/native/src/qstls.cpp +316 -0
- qupled-1.2.0/src/qupled/native/src/qstlsiet.cpp +246 -0
- qupled-1.0.3/src/qupled/native/src/qvs.cpp → qupled-1.2.0/src/qupled/native/src/qvsstls.cpp +65 -154
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/rdf.cpp +5 -5
- qupled-1.2.0/src/qupled/native/src/rpa.cpp +106 -0
- qupled-1.2.0/src/qupled/native/src/stls.cpp +137 -0
- qupled-1.2.0/src/qupled/native/src/stlsiet.cpp +91 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/thermo_util.cpp +12 -7
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/vector2D.cpp +6 -2
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/vector3D.cpp +0 -8
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/vsbase.cpp +69 -57
- qupled-1.2.0/src/qupled/native/src/vsstls.cpp +112 -0
- qupled-1.2.0/src/qupled/output.py +92 -0
- qupled-1.2.0/src/qupled/qstls.py +68 -0
- qupled-1.2.0/src/qupled/qstlsiet.py +37 -0
- qupled-1.2.0/src/qupled/qvsstls.py +59 -0
- qupled-1.2.0/src/qupled/rpa.py +27 -0
- qupled-1.2.0/src/qupled/stls.py +94 -0
- qupled-1.2.0/src/qupled/stlsiet.py +97 -0
- qupled-1.2.0/src/qupled/vsstls.py +203 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled.egg-info/PKG-INFO +14 -10
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled.egg-info/SOURCES.txt +47 -34
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled.egg-info/requires.txt +2 -2
- qupled-1.2.0/tests/native/conftest.py +11 -0
- {qupled-1.0.3/tests → qupled-1.2.0/tests/native}/test_esa_native.py +7 -11
- qupled-1.2.0/tests/native/test_hf_native.py +38 -0
- qupled-1.2.0/tests/native/test_qstls_iet_native.py +56 -0
- qupled-1.2.0/tests/native/test_qstls_native.py +52 -0
- qupled-1.2.0/tests/native/test_qvsstls_native.py +62 -0
- {qupled-1.0.3/tests → qupled-1.2.0/tests/native}/test_rpa_native.py +7 -10
- qupled-1.2.0/tests/native/test_stls_iet_native.py +45 -0
- qupled-1.2.0/tests/native/test_stls_native.py +42 -0
- {qupled-1.0.3/tests → qupled-1.2.0/tests/native}/test_vsstls_native.py +19 -18
- qupled-1.2.0/tests/test_database.py +673 -0
- qupled-1.2.0/tests/test_esa.py +27 -0
- qupled-1.2.0/tests/test_hf.py +217 -0
- qupled-1.2.0/tests/test_mpi.py +63 -0
- qupled-1.2.0/tests/test_output.py +39 -0
- qupled-1.2.0/tests/test_qstls.py +96 -0
- qupled-1.2.0/tests/test_qstlsiet.py +47 -0
- qupled-1.2.0/tests/test_qvsstls.py +57 -0
- qupled-1.2.0/tests/test_rpa.py +42 -0
- qupled-1.2.0/tests/test_stls.py +101 -0
- qupled-1.2.0/tests/test_stlsiet.py +78 -0
- qupled-1.2.0/tests/test_vsstls.py +201 -0
- {qupled-1.0.3 → qupled-1.2.0}/tox.ini +5 -1
- qupled-1.0.3/docs/contribute.rst +0 -34
- qupled-1.0.3/docs/qupled.rst +0 -533
- qupled-1.0.3/docs/requirements.txt +0 -4
- qupled-1.0.3/examples/docs/fixed_adr_qstls_iet.py +0 -27
- qupled-1.0.3/examples/docs/fixed_adr_qvsstls.py +0 -27
- qupled-1.0.3/examples/docs/initial_guess_qstls.py +0 -19
- qupled-1.0.3/examples/docs/initial_guess_qstls_iet.py +0 -20
- qupled-1.0.3/examples/docs/solve_rpa_and_esa.py +0 -49
- qupled-1.0.3/examples/docs/solve_stls.py +0 -28
- qupled-1.0.3/examples/tests/test_examples.py +0 -87
- qupled-1.0.3/src/qupled/base.py +0 -268
- qupled-1.0.3/src/qupled/classic.py +0 -7
- qupled-1.0.3/src/qupled/esa.py +0 -41
- qupled-1.0.3/src/qupled/native/include/bin_util.hpp +0 -58
- qupled-1.0.3/src/qupled/native/include/esa.hpp +0 -59
- qupled-1.0.3/src/qupled/native/include/python_wrappers.hpp +0 -195
- qupled-1.0.3/src/qupled/native/include/qstls.hpp +0 -389
- qupled-1.0.3/src/qupled/native/include/rpa.hpp +0 -291
- qupled-1.0.3/src/qupled/native/include/stls.hpp +0 -200
- qupled-1.0.3/src/qupled/native/src/CMakeLists.txt +0 -82
- qupled-1.0.3/src/qupled/native/src/free_energy.cpp +0 -10
- qupled-1.0.3/src/qupled/native/src/input.cpp +0 -377
- qupled-1.0.3/src/qupled/native/src/python_modules.cpp +0 -209
- qupled-1.0.3/src/qupled/native/src/python_wrappers.cpp +0 -281
- qupled-1.0.3/src/qupled/native/src/qstls.cpp +0 -818
- qupled-1.0.3/src/qupled/native/src/stls.cpp +0 -447
- qupled-1.0.3/src/qupled/native/src/vsstls.cpp +0 -189
- qupled-1.0.3/src/qupled/qstls.py +0 -51
- qupled-1.0.3/src/qupled/qstlsiet.py +0 -107
- qupled-1.0.3/src/qupled/quantum.py +0 -5
- qupled-1.0.3/src/qupled/qvsstls.py +0 -109
- qupled-1.0.3/src/qupled/rpa.py +0 -72
- qupled-1.0.3/src/qupled/stls.py +0 -58
- qupled-1.0.3/src/qupled/stlsiet.py +0 -73
- qupled-1.0.3/src/qupled/util.py +0 -434
- qupled-1.0.3/src/qupled/vsstls.py +0 -103
- qupled-1.0.3/tests/test_esa.py +0 -29
- qupled-1.0.3/tests/test_hdf.py +0 -235
- qupled-1.0.3/tests/test_plot.py +0 -26
- qupled-1.0.3/tests/test_qstls.py +0 -83
- qupled-1.0.3/tests/test_qstls_iet.py +0 -142
- qupled-1.0.3/tests/test_qstls_input.py +0 -125
- qupled-1.0.3/tests/test_qstls_native.py +0 -88
- qupled-1.0.3/tests/test_qvs.py +0 -161
- qupled-1.0.3/tests/test_qvs_input.py +0 -177
- qupled-1.0.3/tests/test_qvs_native.py +0 -62
- qupled-1.0.3/tests/test_rpa.py +0 -110
- qupled-1.0.3/tests/test_rpa_input.py +0 -189
- qupled-1.0.3/tests/test_stls.py +0 -77
- qupled-1.0.3/tests/test_stls_iet.py +0 -65
- qupled-1.0.3/tests/test_stls_input.py +0 -153
- qupled-1.0.3/tests/test_stls_native.py +0 -90
- qupled-1.0.3/tests/test_vsstls.py +0 -86
- qupled-1.0.3/tests/test_vsstls_input.py +0 -163
- {qupled-1.0.3 → qupled-1.2.0}/.clang-format +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/.github/workflows/build-and-test-base.yml +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/.github/workflows/build-and-test.yml +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/.github/workflows/formatting.yml +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/.github/workflows/release.yml +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/.readthedocs.yaml +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/LICENSE +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/MANIFEST.in +0 -0
- /qupled-1.0.3/dev/requirements.txt → /qupled-1.2.0/dev/requirements-pip.txt +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/devtool +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/docs/_static/css/rdt_theme_python_properties.css +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/docs/index.rst +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/docs/make.bat +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/setup.cfg +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/setup.py +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/__init__.py +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/chemical_potential.hpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/dual.hpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/mpi_util.hpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/numerics.hpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/thermo_util.hpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/include/vector_util.hpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/chemical_potential.cpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/logger.cpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/mpi_util.cpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/num_util.cpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/numerics.cpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled/native/src/vector_util.cpp +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled.egg-info/dependency_links.txt +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled.egg-info/not-zip-safe +0 -0
- {qupled-1.0.3 → qupled-1.2.0}/src/qupled.egg-info/top_level.txt +0 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
|
2
|
+
|
3
|
+
# Install Python and clean up
|
4
|
+
RUN apt-get update && apt-get install -y \
|
5
|
+
python3 python3-venv python3-pip && \
|
6
|
+
rm -rf /var/lib/apt/lists/*
|
7
|
+
|
8
|
+
# Set up Python environment
|
9
|
+
ENV PYTHON_VENV_ROOT=/workspaces/qupled_venv
|
10
|
+
RUN python3 -m venv $PYTHON_VENV_ROOT && \
|
11
|
+
chown -R vscode:vscode $PYTHON_VENV_ROOT
|
12
|
+
|
13
|
+
# Copy project files, set permissions, and install dependencies
|
14
|
+
ENV SETUP_DIR=/setup_dir
|
15
|
+
COPY dev $SETUP_DIR/dev/
|
16
|
+
COPY devtool $SETUP_DIR/devtool
|
17
|
+
WORKDIR $SETUP_DIR
|
18
|
+
RUN chmod +x devtool && \
|
19
|
+
. $PYTHON_VENV_ROOT/bin/activate && \
|
20
|
+
./devtool install-deps
|
21
|
+
WORKDIR /
|
22
|
+
RUN rm -rf $SETUP_DIR
|
23
|
+
|
24
|
+
# Automatically activate the Python environment on container start
|
25
|
+
RUN echo "source $PYTHON_VENV_ROOT/bin/activate" >> /etc/bash.bashrc
|
@@ -1,19 +1,19 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: qupled
|
3
|
-
Version: 1.0
|
3
|
+
Version: 1.2.0
|
4
4
|
Summary: qupled: a package to investigate quantum plasmas via the dielectric formalism
|
5
5
|
Author-email: Federico Lucco Castello <federico.luccocastello@gmail.com>
|
6
|
+
License-Expression: GPL-3.0-or-later
|
6
7
|
Classifier: Programming Language :: Python :: 3.10
|
7
8
|
Classifier: Operating System :: MacOS
|
8
9
|
Classifier: Operating System :: POSIX :: Linux
|
9
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
10
10
|
Requires-Python: <3.14,>=3.10
|
11
11
|
Description-Content-Type: text/markdown
|
12
12
|
License-File: LICENSE
|
13
|
+
Requires-Dist: blosc2~=3.2
|
13
14
|
Requires-Dist: matplotlib~=3.7
|
14
15
|
Requires-Dist: numpy<2.0
|
15
|
-
Requires-Dist:
|
16
|
-
Requires-Dist: tables~=3.10
|
16
|
+
Requires-Dist: SQLAlchemy~=2.0
|
17
17
|
Provides-Extra: testing
|
18
18
|
Requires-Dist: pytest~=8.0; extra == "testing"
|
19
19
|
Requires-Dist: pytest-mock~=3.12; extra == "testing"
|
@@ -26,6 +26,7 @@ Requires-Dist: sphinxcontrib-jquery~=4.1; extra == "docs"
|
|
26
26
|
Requires-Dist: sphinxcontrib-jsmath~=1.0.1; extra == "docs"
|
27
27
|
Requires-Dist: sphinxcontrib-qthelp~=2.0.0; extra == "docs"
|
28
28
|
Requires-Dist: sphinxcontrib-serializinghtml~=2.0.0; extra == "docs"
|
29
|
+
Dynamic: license-file
|
29
30
|
|
30
31
|
# Qupled
|
31
32
|
|
@@ -41,24 +42,27 @@ Qupled is a Python package designed for calculating the properties of quantum pl
|
|
41
42
|
|
42
43
|
## Running
|
43
44
|
|
44
|
-
After [installation](https://qupled.readthedocs.io/en/latest/introduction.html#installing-qupled) qupled can be used as a regular Python package
|
45
|
+
After [installation](https://qupled.readthedocs.io/en/latest/introduction.html#installing-qupled) qupled can be used as a regular Python package.
|
45
46
|
|
46
47
|
```python
|
47
48
|
# Solve the stls dielectric scheme for coupling = 10 and degeneracy 1.0
|
48
|
-
|
49
|
-
inputs =
|
50
|
-
Stls().compute(inputs)
|
49
|
+
import qupled.stls as stls
|
50
|
+
inputs = stls.Input(10.0, 1.0)
|
51
|
+
stls.Stls().compute(inputs)
|
51
52
|
```
|
52
53
|
|
53
54
|
## Documentation
|
54
55
|
|
55
|
-
More detailed information on the package together with a list of examples is available in the [documentation](http://qupled.readthedocs.io/)
|
56
|
+
More detailed information on the package together with a list of examples is available in the [documentation](http://qupled.readthedocs.io/).
|
56
57
|
|
57
58
|
## Publications
|
58
59
|
|
59
60
|
Qupled has been used in the following publications:
|
60
61
|
|
61
62
|
<ol>
|
63
|
+
<li>
|
64
|
+
<a href="https://onlinelibrary.wiley.com/doi/10.1002/ctpp.70014">Tolias, P., Kalkavouras, F., Dornheim, T. & Lucco Castello, F. (2025). Dynamic Properties of the Warm Dense Uniform Electron Gas With the qSTLS Dielectric Scheme. <i>Contributions to Plasma Physics</i>, 0:e70014</a>
|
65
|
+
</li>
|
62
66
|
<li>
|
63
67
|
<a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.109.125134">Tolias, P., Lucco Castello, F., Kalkavouras, F., & Dornheim, T. (2024). Revisiting the Vashishta-Singwi dielectric scheme for the warm dense uniform electron fluid. <i>Physical Review B</i>, <i>109</i>(12)</a>
|
64
68
|
</li>
|
@@ -12,24 +12,27 @@ Qupled is a Python package designed for calculating the properties of quantum pl
|
|
12
12
|
|
13
13
|
## Running
|
14
14
|
|
15
|
-
After [installation](https://qupled.readthedocs.io/en/latest/introduction.html#installing-qupled) qupled can be used as a regular Python package
|
15
|
+
After [installation](https://qupled.readthedocs.io/en/latest/introduction.html#installing-qupled) qupled can be used as a regular Python package.
|
16
16
|
|
17
17
|
```python
|
18
18
|
# Solve the stls dielectric scheme for coupling = 10 and degeneracy 1.0
|
19
|
-
|
20
|
-
inputs =
|
21
|
-
Stls().compute(inputs)
|
19
|
+
import qupled.stls as stls
|
20
|
+
inputs = stls.Input(10.0, 1.0)
|
21
|
+
stls.Stls().compute(inputs)
|
22
22
|
```
|
23
23
|
|
24
24
|
## Documentation
|
25
25
|
|
26
|
-
More detailed information on the package together with a list of examples is available in the [documentation](http://qupled.readthedocs.io/)
|
26
|
+
More detailed information on the package together with a list of examples is available in the [documentation](http://qupled.readthedocs.io/).
|
27
27
|
|
28
28
|
## Publications
|
29
29
|
|
30
30
|
Qupled has been used in the following publications:
|
31
31
|
|
32
32
|
<ol>
|
33
|
+
<li>
|
34
|
+
<a href="https://onlinelibrary.wiley.com/doi/10.1002/ctpp.70014">Tolias, P., Kalkavouras, F., Dornheim, T. & Lucco Castello, F. (2025). Dynamic Properties of the Warm Dense Uniform Electron Gas With the qSTLS Dielectric Scheme. <i>Contributions to Plasma Physics</i>, 0:e70014</a>
|
35
|
+
</li>
|
33
36
|
<li>
|
34
37
|
<a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.109.125134">Tolias, P., Lucco Castello, F., Kalkavouras, F., & Dornheim, T. (2024). Revisiting the Vashishta-Singwi dielectric scheme for the warm dense uniform electron fluid. <i>Physical Review B</i>, <i>109</i>(12)</a>
|
35
38
|
</li>
|
@@ -5,9 +5,9 @@ import shutil
|
|
5
5
|
from pathlib import Path
|
6
6
|
|
7
7
|
|
8
|
-
def build(
|
8
|
+
def build(no_mpi, native_only):
|
9
9
|
# Build without MPI
|
10
|
-
if
|
10
|
+
if no_mpi:
|
11
11
|
os.environ["USE_MPI"] = "OFF"
|
12
12
|
# Set environment variable for OpenMP on macOS
|
13
13
|
if os.name == "posix" and shutil.which("brew"):
|
@@ -46,8 +46,11 @@ def run_tox(environment):
|
|
46
46
|
subprocess.run(["tox", "-e", environment], check=True)
|
47
47
|
|
48
48
|
|
49
|
-
def test():
|
50
|
-
|
49
|
+
def test(no_native):
|
50
|
+
if no_native:
|
51
|
+
run_tox("no_native")
|
52
|
+
else:
|
53
|
+
run_tox("test")
|
51
54
|
|
52
55
|
|
53
56
|
def examples():
|
@@ -83,49 +86,39 @@ def clean():
|
|
83
86
|
def install():
|
84
87
|
wheel_file = get_wheel_file()
|
85
88
|
if wheel_file is not None:
|
86
|
-
subprocess.run(["pip", "
|
89
|
+
subprocess.run(["pip", "uninstall", "-y", wheel_file], check=True)
|
90
|
+
subprocess.run(["pip", "install", wheel_file], check=True)
|
87
91
|
|
88
92
|
|
89
93
|
def install_dependencies():
|
90
94
|
print("Installing dependencies...")
|
95
|
+
script_dir = Path(__file__).resolve().parent
|
96
|
+
pip_requirements = script_dir / "requirements-pip.txt"
|
91
97
|
if os.name == "posix":
|
92
98
|
if shutil.which("apt-get"):
|
93
|
-
|
94
|
-
subprocess.run(
|
95
|
-
[
|
96
|
-
"sudo",
|
97
|
-
"apt-get",
|
98
|
-
"install",
|
99
|
-
"-y",
|
100
|
-
"cmake",
|
101
|
-
"libboost-all-dev",
|
102
|
-
"libopenmpi-dev",
|
103
|
-
"libgsl-dev",
|
104
|
-
"libomp-dev",
|
105
|
-
"libfmt-dev",
|
106
|
-
"python3-dev",
|
107
|
-
],
|
108
|
-
check=True,
|
109
|
-
)
|
99
|
+
_install_with_apt(script_dir / "requirements-apt.txt")
|
110
100
|
elif shutil.which("brew"):
|
111
|
-
|
112
|
-
subprocess.run(
|
113
|
-
[
|
114
|
-
"brew",
|
115
|
-
"install",
|
116
|
-
"cmake",
|
117
|
-
"gsl",
|
118
|
-
"libomp",
|
119
|
-
"openmpi",
|
120
|
-
"fmt",
|
121
|
-
"boost-python3",
|
122
|
-
],
|
123
|
-
check=True,
|
124
|
-
)
|
101
|
+
_install_with_brew(script_dir / "requirements-brew.txt")
|
125
102
|
else:
|
126
103
|
print("Unsupported package manager. Please install dependencies manually.")
|
127
104
|
else:
|
128
105
|
print("Unsupported operating system. Please install dependencies manually.")
|
106
|
+
subprocess.run(["pip", "install", "-r", str(pip_requirements)], check=True)
|
107
|
+
|
108
|
+
|
109
|
+
def _install_with_apt(apt_requirements):
|
110
|
+
subprocess.run(["sudo", "apt-get", "update"], check=True)
|
111
|
+
with apt_requirements.open("r") as apt_file:
|
112
|
+
subprocess.run(
|
113
|
+
["xargs", "sudo", "apt-get", "install", "-y"],
|
114
|
+
stdin=apt_file,
|
115
|
+
check=True,
|
116
|
+
)
|
117
|
+
|
118
|
+
|
119
|
+
def _install_with_brew(brew_requirements):
|
120
|
+
subprocess.run(["brew", "update"], check=True)
|
121
|
+
subprocess.run(["brew", "bundle", f"--file={brew_requirements}"], check=True)
|
129
122
|
|
130
123
|
|
131
124
|
def update_version(build_version):
|
@@ -154,7 +147,7 @@ def run():
|
|
154
147
|
# Build command
|
155
148
|
build_parser = subparsers.add_parser("build", help="Build the qupled package")
|
156
149
|
build_parser.add_argument(
|
157
|
-
"--
|
150
|
+
"--no_mpi",
|
158
151
|
action="store_true",
|
159
152
|
help="Build without MPI support (default: False).",
|
160
153
|
)
|
@@ -164,6 +157,14 @@ def run():
|
|
164
157
|
help="Build only native code in C++ (default: False).",
|
165
158
|
)
|
166
159
|
|
160
|
+
# Test command
|
161
|
+
test_parser = subparsers.add_parser("test", help="Run tests")
|
162
|
+
test_parser.add_argument(
|
163
|
+
"--no-native",
|
164
|
+
action="store_true",
|
165
|
+
help="Exclude the tests for the native classes (default: False).",
|
166
|
+
)
|
167
|
+
|
167
168
|
# Update version command
|
168
169
|
version_parser = subparsers.add_parser(
|
169
170
|
"update-version", help="Update package version"
|
@@ -177,12 +178,11 @@ def run():
|
|
177
178
|
subparsers.add_parser("format", help="Format the source code")
|
178
179
|
subparsers.add_parser("install", help="Install the qupled package")
|
179
180
|
subparsers.add_parser("install-deps", help="Install system dependencies")
|
180
|
-
subparsers.add_parser("test", help="Run tests")
|
181
181
|
|
182
182
|
args = parser.parse_args()
|
183
183
|
|
184
184
|
if args.command == "build":
|
185
|
-
build(args.
|
185
|
+
build(args.no_mpi, args.native_only)
|
186
186
|
elif args.command == "clean":
|
187
187
|
clean()
|
188
188
|
elif args.command == "docs":
|
@@ -194,7 +194,7 @@ def run():
|
|
194
194
|
elif args.command == "install":
|
195
195
|
install()
|
196
196
|
elif args.command == "test":
|
197
|
-
test()
|
197
|
+
test(args.no_native)
|
198
198
|
elif args.command == "install-deps":
|
199
199
|
install_dependencies()
|
200
200
|
elif args.command == "update-version":
|
@@ -23,7 +23,7 @@ extensions = ["sphinx.ext.napoleon", "sphinx.ext.autodoc", "sphinx.ext.mathjax"]
|
|
23
23
|
templates_path = ["_templates"]
|
24
24
|
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
25
25
|
autodoc_member_order = "bysource"
|
26
|
-
autodoc_mock_imports = ["qupled.native"]
|
26
|
+
autodoc_mock_imports = ["qupled.native", "sqlalchemy", "blosc2"]
|
27
27
|
|
28
28
|
# -- Options for HTML output -------------------------------------------------
|
29
29
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
@@ -0,0 +1,61 @@
|
|
1
|
+
How to contribute
|
2
|
+
=================
|
3
|
+
|
4
|
+
The following guidelines explain how to contribute to both the codebase and the documentation.
|
5
|
+
|
6
|
+
Setup the development environment
|
7
|
+
---------------------------------
|
8
|
+
|
9
|
+
There are two options for setting up your development environment:
|
10
|
+
|
11
|
+
1. **The Easy Option: Use the Development Container**
|
12
|
+
|
13
|
+
This project includes a pre-configured development container to simplify the setup process.
|
14
|
+
The development container provides all necessary tools, including an up-to-date version of Git,
|
15
|
+
Python, and other dependencies.
|
16
|
+
|
17
|
+
To use the development container, ensure you have Docker and Visual Studio Code installed.
|
18
|
+
Then, open the project in Visual Studio Code and follow these steps:
|
19
|
+
|
20
|
+
- Install the `Remote - Containers` extension if you haven't already.
|
21
|
+
- When prompted, reopen the project in the container.
|
22
|
+
|
23
|
+
Once the container is running, all tools and dependencies will be available in the environment.
|
24
|
+
You can start developing immediately without additional setup.
|
25
|
+
|
26
|
+
2. **The DIY Option: Manual Setup**
|
27
|
+
|
28
|
+
If you prefer to set up the environment manually, start by installing the required Python
|
29
|
+
packages with the following command:
|
30
|
+
|
31
|
+
.. code-block:: console
|
32
|
+
|
33
|
+
pip install -r dev/requirements.txt
|
34
|
+
|
35
|
+
Additionally, ensure that you have all the necessary :ref:`external dependencies <external_dependencies>`
|
36
|
+
installed.
|
37
|
+
|
38
|
+
Formatting
|
39
|
+
----------
|
40
|
+
|
41
|
+
To maintain consistent code formatting across the C++ and Python codebases, we use
|
42
|
+
`clang-format <https://clang.llvm.org/docs/ClangFormat.html>`_ and
|
43
|
+
`black <https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html>`_.
|
44
|
+
The formatting is automatically checked every time new code is pushed to the repository.
|
45
|
+
To manually ensure the correct formatting is applied, run:
|
46
|
+
|
47
|
+
.. code-block:: console
|
48
|
+
|
49
|
+
./devtool format
|
50
|
+
|
51
|
+
Documentation
|
52
|
+
-------------
|
53
|
+
|
54
|
+
The documentation is stored in the ``docs`` directory, and changes can be made by editing the ``.rst`` files within it.
|
55
|
+
Once you've made your changes, you can verify and build the documentation using:
|
56
|
+
|
57
|
+
.. code-block:: console
|
58
|
+
|
59
|
+
./devtool docs
|
60
|
+
|
61
|
+
The generated output can be viewed by opening ``docs/_build/index.html`` in your browser.
|
@@ -74,28 +74,14 @@ the pre-compute values of the free energy integrand.
|
|
74
74
|
Define an initial guess
|
75
75
|
-----------------------
|
76
76
|
|
77
|
-
The following
|
78
|
-
schemes (STLS and STLS-IET) and for the quantum schemes (QSTLS and QSTLS-IET). If
|
77
|
+
The following example shows how to define an initial guess for the STLS scheme. If
|
79
78
|
an initial guess is not specified the code will use the default, namely zero static
|
80
|
-
local field correction
|
81
|
-
for the quantum schemes.
|
79
|
+
local field correction.
|
82
80
|
|
83
81
|
.. literalinclude:: ../examples/docs/initial_guess_stls.py
|
84
82
|
:language: python
|
85
83
|
|
86
|
-
|
87
|
-
specify the initial guess as the solution obtained from the first solution. Having
|
88
|
-
provided a nearly exact initial guess the scheme converges in a single iteration.
|
89
|
-
|
90
|
-
.. literalinclude:: ../examples/docs/initial_guess_qstls.py
|
91
|
-
:language: python
|
92
|
-
|
93
|
-
The QSTLS-IET scheme requires to specify an initial guess for the auxiliary density
|
94
|
-
response and the number of matsubara frequencies corresponding to such initial guess.
|
95
|
-
These specifications can be skipped in all other schemes.
|
96
|
-
|
97
|
-
.. literalinclude:: ../examples/docs/initial_guess_qstls_iet.py
|
98
|
-
:language: python
|
84
|
+
For other schemes the initial guess can be specified in a similar manner.
|
99
85
|
|
100
86
|
Speed-up the quantum schemes
|
101
87
|
----------------------------
|
@@ -112,37 +98,13 @@ that can be employed to speed up the calculations:
|
|
112
98
|
|
113
99
|
* *Pre-computation*: The calculations for the quantum schemes can be made significantly
|
114
100
|
faster if part of the calculation of the auxiliary density response can be skipped.
|
115
|
-
|
116
|
-
|
117
|
-
only on the degeneracy parameter and is printed to specific ouput files when a quantum
|
118
|
-
scheme is solved. These output files can be used in successive calculations to avoid
|
119
|
-
recomputing the fixed component and to speed-up the solution of the quantum schemes.
|
120
|
-
The following two examples illustrate how this can be done for both the QSTLS and
|
121
|
-
the QSTLS-IET schemes.
|
122
|
-
|
123
|
-
For the QSTLS scheme it is sufficient to pass the name of binary file containing the fixed component.
|
124
|
-
This allows to obtain identical results (compare the internal energies printed at the end of
|
125
|
-
the example) in a fraction of the time. We can also recycle the same fixed component for
|
126
|
-
different coupling parameters provided that the degeneracy parameter stays the same. On the
|
127
|
-
other hand, when changing the degeneracy parameter the fixed component must also be updated
|
128
|
-
otherwise the calculation fails as shown at the end of the example.
|
129
|
-
|
130
|
-
.. literalinclude:: ../examples/docs/fixed_adr_qstls.py
|
131
|
-
:language: python
|
132
|
-
|
133
|
-
For the QSTLS-IET schemes we must pass the name of two files: the binary file with the
|
134
|
-
fixed auxiliary density response from the QSTLS scheme and a zip file containing a collection
|
135
|
-
of binary files representing the fixed component for the QSTLS-IET scheme. Here the fixed
|
136
|
-
component depends only on the degeneracy parameter but not on the coupling
|
137
|
-
parameter and not on the theory used for the bridge function.
|
101
|
+
Qupled will look into the database used to store the results to try to find the
|
102
|
+
necessary data to skip the full calculation of the auxiliary density response.
|
138
103
|
|
139
|
-
|
140
|
-
|
104
|
+
The following example shows the effect of pre-computation. The example first
|
105
|
+
computes the auxiliary density response for a given set of parameters and then
|
106
|
+
it uses the pre-computed data to speed up the calculation of the auxiliary density
|
107
|
+
response for a different set of parameters.
|
141
108
|
|
142
|
-
|
143
|
-
|
144
|
-
coupling parameters provided that the degeneracy parameter and the degeneracy parameter
|
145
|
-
resolution remain the same.
|
146
|
-
|
147
|
-
.. literalinclude:: ../examples/docs/fixed_adr_qvsstls.py
|
148
|
-
:language: python
|
109
|
+
.. literalinclude:: ../examples/docs/fixed_adr.py
|
110
|
+
:language: python
|
@@ -37,14 +37,17 @@ is the Fermi energy and :math:`h` is Planck's constant.
|
|
37
37
|
Installing qupled
|
38
38
|
-----------------
|
39
39
|
|
40
|
+
.. _external_dependencies:
|
41
|
+
|
40
42
|
External dependencies
|
41
43
|
~~~~~~~~~~~~~~~~~~~~~
|
42
44
|
|
43
45
|
The installation of qupled may require compiling some C++ code, depending on the platform and installation method.
|
44
46
|
Therefore, ensure the following dependencies are met before attempting to install or run qupled:
|
45
47
|
|
46
|
-
- `CMake <https://cmake.org/download/>`_
|
47
48
|
- `Boost <https://www.boost.org/doc/libs/1_80_0/libs/python/doc/html/index.html>`_
|
49
|
+
- `CMake <https://cmake.org/download/>`_
|
50
|
+
- `fmt <https://github.com/fmtlib/fmt>`_
|
48
51
|
- `GNU Scientific Library <https://www.gnu.org/software/gsl/>`_
|
49
52
|
- `OpenMP <https://en.wikipedia.org/wiki/OpenMP>`_
|
50
53
|
- `Open-MPI <https://www.open-mpi.org/software/ompi/v5.0/>`_
|
@@ -53,13 +56,13 @@ For linux distributions all these dependencies can be installed with
|
|
53
56
|
|
54
57
|
.. code-block:: console
|
55
58
|
|
56
|
-
sudo apt-get install -y cmake libboost-all-dev libopenmpi-dev libgsl-dev libomp-dev
|
59
|
+
sudo apt-get install -y cmake libboost-all-dev libopenmpi-dev libgsl-dev libomp-dev python3-dev libsqlite3-dev libsqlitecpp-dev
|
57
60
|
|
58
61
|
For macOS they can be installed directly from homebrew
|
59
62
|
|
60
63
|
.. code-block:: console
|
61
64
|
|
62
|
-
brew install cmake gsl libomp openmpi
|
65
|
+
brew install cmake gsl libomp openmpi boost-python3 sqlite sqlitecpp
|
63
66
|
|
64
67
|
Install with pip
|
65
68
|
~~~~~~~~~~~~~~~~
|