qupled 0.0.4__tar.gz → 0.0.5__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-0.0.4 → qupled-0.0.5}/.clang-format +1 -1
- qupled-0.0.4/.github/workflows/build-and-test-macos.yml → qupled-0.0.5/.github/workflows/build-and-test-base.yml +10 -11
- qupled-0.0.5/.github/workflows/build-and-test.yml +13 -0
- {qupled-0.0.4 → qupled-0.0.5}/.github/workflows/release.yml +8 -14
- {qupled-0.0.4 → qupled-0.0.5}/PKG-INFO +7 -6
- {qupled-0.0.4 → qupled-0.0.5}/README.md +6 -5
- qupled-0.0.5/dev/devtool.py +193 -0
- {qupled-0.0.4 → qupled-0.0.5}/docs/conf.py +1 -1
- qupled-0.0.4/examples/readme/animation.py → qupled-0.0.5/examples/readme/create_cover.py +66 -95
- qupled-0.0.5/examples/readme/qupled_animation_dark.svg +2862 -0
- qupled-0.0.5/examples/readme/qupled_animation_light.svg +3072 -0
- {qupled-0.0.4 → qupled-0.0.5}/pyproject.toml +1 -1
- qupled-0.0.5/src/qupled/native/include/dual.hpp +277 -0
- qupled-0.0.5/src/qupled/native/include/esa.hpp +59 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/input.hpp +4 -4
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/rpa.hpp +5 -6
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/chemical_potential.cpp +2 -2
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/esa.cpp +107 -85
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/input.cpp +15 -15
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/numerics.cpp +2 -2
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/qstls.cpp +9 -9
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/rpa.cpp +51 -83
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/stls.cpp +30 -25
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/vsbase.cpp +7 -7
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled.egg-info/PKG-INFO +7 -6
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled.egg-info/SOURCES.txt +3 -6
- qupled-0.0.4/.github/workflows/build-and-test-linux-mpi.yml +0 -62
- qupled-0.0.4/.github/workflows/build-and-test-linux.yml +0 -63
- qupled-0.0.4/.github/workflows/build-and-test-macos-mpi.yml +0 -64
- qupled-0.0.4/.github/workflows/build-and-test.yml +0 -28
- qupled-0.0.4/CMakeLists.txt +0 -2
- qupled-0.0.4/dev/devtool.py +0 -114
- qupled-0.0.4/examples/readme/qupled_animation_dark.svg +0 -18921
- qupled-0.0.4/examples/readme/qupled_animation_light.svg +0 -20307
- qupled-0.0.4/src/qupled/native/include/esa.hpp +0 -30
- {qupled-0.0.4 → qupled-0.0.5}/.github/workflows/formatting.yml +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/.gitignore +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/.readthedocs.yaml +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/LICENSE +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/MANIFEST.in +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/dev/requirements.txt +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/devtool +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/docs/_static/css/rdt_theme_python_properties.css +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/docs/contribute.rst +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/docs/examples.rst +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/docs/index.rst +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/docs/introduction.rst +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/docs/make.bat +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/docs/qupled.rst +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/docs/requirements.txt +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/fixedAdrQVSStls.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/fixedAdrQstls.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/fixedAdrQstlsIet.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/initialGuessQstls.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/initialGuessQstlsIet.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/initialGuessStls.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/solveQVSStls.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/solveQuantumSchemes.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/solveRpaAndESA.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/solveStls.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/solveStlsIet.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/solveVSStls.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/examples/docs/tests/test_examples.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/setup.cfg +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/setup.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/__init__.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/classic.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/bin_util.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/chemical_potential.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/free_energy.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/internal_energy.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/logger.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/mpi_util.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/num_util.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/numerics.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/python_util.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/python_wrappers.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/qstls.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/qvs.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/rdf.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/stls.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/thermo_util.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/vector2D.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/vector3D.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/vector_util.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/vsbase.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/include/vsstls.hpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/CMakeLists.txt +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/free_energy.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/internal_energy.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/logger.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/mpi_util.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/num_util.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/python_modules.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/python_util.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/python_wrappers.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/qvs.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/rdf.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/thermo_util.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/vector2D.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/vector3D.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/vector_util.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/native/src/vsstls.cpp +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/quantum.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled/util.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled.egg-info/dependency_links.txt +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled.egg-info/not-zip-safe +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled.egg-info/requires.txt +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/src/qupled.egg-info/top_level.txt +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_esa.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_esa_native.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_hdf.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_plot.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_qstls.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_qstls_iet.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_qstls_input.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_qstls_native.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_qvs.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_qvs_input.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_qvs_native.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_rpa.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_rpa_input.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_rpa_native.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_stls.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_stls_iet.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_stls_input.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_stls_native.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_vsstls.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_vsstls_input.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tests/test_vsstls_native.py +0 -0
- {qupled-0.0.4 → qupled-0.0.5}/tox.ini +0 -0
@@ -47,7 +47,7 @@ BraceWrapping:
|
|
47
47
|
SplitEmptyFunction: true
|
48
48
|
SplitEmptyRecord: true
|
49
49
|
SplitEmptyNamespace: true
|
50
|
-
BreakBeforeBinaryOperators:
|
50
|
+
BreakBeforeBinaryOperators: NonAssignment
|
51
51
|
BreakBeforeConceptDeclarations: true
|
52
52
|
BreakBeforeBraces: Attach
|
53
53
|
BreakBeforeInheritanceComma: false
|
@@ -1,4 +1,4 @@
|
|
1
|
-
name: Build & Test
|
1
|
+
name: Build & Test
|
2
2
|
|
3
3
|
on:
|
4
4
|
workflow_call:
|
@@ -15,39 +15,38 @@ env:
|
|
15
15
|
PYTHON_VENV_ROOT: ${{ github.workspace }}/python-venv
|
16
16
|
|
17
17
|
jobs:
|
18
|
-
|
19
18
|
build_and_test:
|
20
|
-
|
21
|
-
|
19
|
+
runs-on: ${{ matrix.os }}
|
20
|
+
strategy:
|
21
|
+
matrix:
|
22
|
+
os: [macos-latest, ubuntu-latest]
|
22
23
|
|
23
24
|
steps:
|
24
25
|
- name: Checkout repository
|
25
26
|
uses: actions/checkout@v2
|
26
27
|
|
27
28
|
- name: Set up Python
|
29
|
+
if: ${{ matrix.os == 'macos-latest' }}
|
28
30
|
uses: actions/setup-python@v4
|
29
31
|
with:
|
30
32
|
python-version: "3.12"
|
31
33
|
|
32
34
|
- name: Install dependencies
|
33
35
|
run: |
|
34
|
-
|
35
|
-
brew install cmake gsl libomp fmt boost-python3
|
36
|
+
./devtool install-deps
|
36
37
|
python3 -m venv ${PYTHON_VENV_ROOT}
|
37
38
|
|
38
39
|
- name: Set build version
|
39
40
|
if: ${{ inputs.build-version != '' }}
|
40
41
|
run: |
|
41
|
-
|
42
|
-
sed -i "" "s/^version = \".*\"/version = \"${BUILD_VERSION}\"/" pyproject.toml
|
42
|
+
./devtool update-version ${{ inputs.build-version }}
|
43
43
|
|
44
44
|
- name: Build
|
45
45
|
run: |
|
46
46
|
source ${PYTHON_VENV_ROOT}/bin/activate
|
47
47
|
pip3 install --upgrade pip
|
48
48
|
pip3 install build setuptools
|
49
|
-
|
50
|
-
./devtool build --nompi
|
49
|
+
./devtool build
|
51
50
|
|
52
51
|
- name: Tests
|
53
52
|
run: |
|
@@ -59,5 +58,5 @@ jobs:
|
|
59
58
|
if: ${{ success() && inputs.upload-artifact == 'true' }}
|
60
59
|
uses: actions/upload-artifact@v4
|
61
60
|
with:
|
62
|
-
name: qupled
|
61
|
+
name: qupled-${{ matrix.os }}
|
63
62
|
path: dist
|
@@ -10,14 +10,8 @@ env:
|
|
10
10
|
|
11
11
|
jobs:
|
12
12
|
|
13
|
-
build-and-test
|
14
|
-
uses: ./.github/workflows/build-and-test-
|
15
|
-
with:
|
16
|
-
upload-artifact: true
|
17
|
-
build-version: ${GITHUB_REF#refs/tags/v}
|
18
|
-
|
19
|
-
build-and-test-macos:
|
20
|
-
uses: ./.github/workflows/build-and-test-macos-mpi.yml
|
13
|
+
build-and-test:
|
14
|
+
uses: ./.github/workflows/build-and-test-base.yml
|
21
15
|
with:
|
22
16
|
upload-artifact: true
|
23
17
|
build-version: ${GITHUB_REF#refs/tags/v}
|
@@ -25,15 +19,15 @@ jobs:
|
|
25
19
|
publish:
|
26
20
|
|
27
21
|
runs-on: ubuntu-latest
|
28
|
-
needs: [build-and-test
|
22
|
+
needs: [build-and-test]
|
29
23
|
|
30
24
|
steps:
|
31
25
|
|
32
26
|
- name: Download linux package
|
33
27
|
uses: actions/download-artifact@v4
|
34
28
|
with:
|
35
|
-
name: qupled-
|
36
|
-
path: qupled-
|
29
|
+
name: qupled-ubuntu-latest
|
30
|
+
path: qupled-ubuntu-latest
|
37
31
|
|
38
32
|
- name: Set up Python environment
|
39
33
|
run: |
|
@@ -44,8 +38,8 @@ jobs:
|
|
44
38
|
|
45
39
|
- name: Publish to PyPI
|
46
40
|
env:
|
47
|
-
TWINE_USERNAME:
|
48
|
-
TWINE_PASSWORD: ${{ secrets.
|
41
|
+
TWINE_USERNAME: __token__
|
42
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
49
43
|
run: |
|
50
44
|
source ${PYTHON_VENV_ROOT}/bin/activate
|
51
|
-
twine upload --non-interactive qupled-
|
45
|
+
twine upload --non-interactive qupled-ubuntu-latest/*.tar.gz
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qupled
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.5
|
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
6
|
Classifier: Programming Language :: Python :: 3.10
|
@@ -31,10 +31,8 @@ Requires-Dist: sphinxcontrib-serializinghtml~=2.0.0; extra == "docs"
|
|
31
31
|
|
32
32
|
Qupled is a Python package designed for calculating the properties of quantum plasmas using the dielectric formalism. By combining a straightforward Python interface with the speed of C++, it allows for efficient and accurate computations of quantum plasma properties.
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
<img src="examples/readme/qupled_animation_dark.svg#gh-dark-mode-only" width="100%">
|
37
|
-
<p>
|
34
|
+

|
35
|
+

|
38
36
|
|
39
37
|
## Status
|
40
38
|
[](https://github.com/fedluc/qupled/actions/workflows/build-and-test.yml)
|
@@ -62,11 +60,14 @@ Qupled has been used in the following publications:
|
|
62
60
|
|
63
61
|
<ol>
|
64
62
|
<li>
|
65
|
-
<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>
|
63
|
+
<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>
|
66
64
|
</li>
|
67
65
|
<li>
|
68
66
|
<a href="https://pubs.aip.org/aip/jcp/article/158/14/141102/2877795/Quantum-version-of-the-integral-equation-theory">Tolias, P., Lucco Castello, F., & Dornheim, T. (2023). Quantum version of the integral equation theory-based dielectric scheme for strongly coupled electron liquids. <i>The Journal of Chemical Physics</i>, <i>158</i>(14)</a>
|
69
67
|
</li>
|
68
|
+
<li>
|
69
|
+
<a href="https://iopscience.iop.org/article/10.1209/0295-5075/ac7166/meta">Lucco Castello, F., Tolias, P., & Dornheim, T. (2022). Classical bridge functions in classical and quantum plasma liquids. <i>Europhysics Letters</i>, <i>138</i>(4)</a>
|
70
|
+
</li>
|
70
71
|
<li>
|
71
72
|
<a href="https://pubs.aip.org/aip/jcp/article/155/13/134115/353165/Integral-equation-theory-based-dielectric-scheme">Tolias, P., Lucco Castello, F., & Dornheim, T. (2021). Integral equation theory based dielectric scheme for strongly coupled electron liquids. <i>The Journal of Chemical Physics</i>, <i>155</i>(13)</a>
|
72
73
|
</li>
|
@@ -2,10 +2,8 @@
|
|
2
2
|
|
3
3
|
Qupled is a Python package designed for calculating the properties of quantum plasmas using the dielectric formalism. By combining a straightforward Python interface with the speed of C++, it allows for efficient and accurate computations of quantum plasma properties.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
<img src="examples/readme/qupled_animation_dark.svg#gh-dark-mode-only" width="100%">
|
8
|
-
<p>
|
5
|
+

|
6
|
+

|
9
7
|
|
10
8
|
## Status
|
11
9
|
[](https://github.com/fedluc/qupled/actions/workflows/build-and-test.yml)
|
@@ -33,11 +31,14 @@ Qupled has been used in the following publications:
|
|
33
31
|
|
34
32
|
<ol>
|
35
33
|
<li>
|
36
|
-
<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>
|
34
|
+
<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>
|
37
35
|
</li>
|
38
36
|
<li>
|
39
37
|
<a href="https://pubs.aip.org/aip/jcp/article/158/14/141102/2877795/Quantum-version-of-the-integral-equation-theory">Tolias, P., Lucco Castello, F., & Dornheim, T. (2023). Quantum version of the integral equation theory-based dielectric scheme for strongly coupled electron liquids. <i>The Journal of Chemical Physics</i>, <i>158</i>(14)</a>
|
40
38
|
</li>
|
39
|
+
<li>
|
40
|
+
<a href="https://iopscience.iop.org/article/10.1209/0295-5075/ac7166/meta">Lucco Castello, F., Tolias, P., & Dornheim, T. (2022). Classical bridge functions in classical and quantum plasma liquids. <i>Europhysics Letters</i>, <i>138</i>(4)</a>
|
41
|
+
</li>
|
41
42
|
<li>
|
42
43
|
<a href="https://pubs.aip.org/aip/jcp/article/155/13/134115/353165/Integral-equation-theory-based-dielectric-scheme">Tolias, P., Lucco Castello, F., & Dornheim, T. (2021). Integral equation theory based dielectric scheme for strongly coupled electron liquids. <i>The Journal of Chemical Physics</i>, <i>155</i>(13)</a>
|
43
44
|
</li>
|
@@ -0,0 +1,193 @@
|
|
1
|
+
import os
|
2
|
+
import argparse
|
3
|
+
import subprocess
|
4
|
+
import shutil
|
5
|
+
from pathlib import Path
|
6
|
+
|
7
|
+
|
8
|
+
def build(nompi):
|
9
|
+
# Build without MPI
|
10
|
+
if nompi:
|
11
|
+
os.environ["USE_MPI"] = "OFF"
|
12
|
+
# Set environment variable for OpenMP on macOS
|
13
|
+
if os.name == "posix" and shutil.which("brew"):
|
14
|
+
brew_prefix = subprocess.run(
|
15
|
+
["brew", "--prefix"], capture_output=True, text=True
|
16
|
+
).stdout.strip()
|
17
|
+
os.environ["OpenMP_ROOT"] = str(Path(brew_prefix, "opt", "libomp"))
|
18
|
+
subprocess.run(["python3", "-m", "build"], check=True)
|
19
|
+
print("Build completed.")
|
20
|
+
|
21
|
+
|
22
|
+
def get_wheel_file():
|
23
|
+
wheel_file = list(Path().rglob("qupled*.whl"))
|
24
|
+
if not wheel_file:
|
25
|
+
print("No .whl files found. Ensure the package is built first.")
|
26
|
+
return None
|
27
|
+
else:
|
28
|
+
return str(wheel_file[0])
|
29
|
+
|
30
|
+
|
31
|
+
def run_tox(environment):
|
32
|
+
tox_path = Path(".tox")
|
33
|
+
if tox_path.exists():
|
34
|
+
shutil.rmtree(tox_path)
|
35
|
+
wheel_file = get_wheel_file()
|
36
|
+
if wheel_file is not None:
|
37
|
+
os.environ["WHEEL_FILE"] = wheel_file
|
38
|
+
subprocess.run(["tox", "-e", environment], check=True)
|
39
|
+
|
40
|
+
|
41
|
+
def test():
|
42
|
+
run_tox("test")
|
43
|
+
|
44
|
+
|
45
|
+
def examples():
|
46
|
+
run_tox("examples")
|
47
|
+
|
48
|
+
|
49
|
+
def format_code():
|
50
|
+
subprocess.run(["black", "."], check=True)
|
51
|
+
native_files_folder = Path("src", "qupled", "native")
|
52
|
+
cpp_files = list(native_files_folder.rglob("*.cpp"))
|
53
|
+
hpp_files = list(native_files_folder.rglob("*.hpp"))
|
54
|
+
for f in cpp_files + hpp_files:
|
55
|
+
subprocess.run(["clang-format", "--style=file", "-i", str(f)], check=True)
|
56
|
+
|
57
|
+
|
58
|
+
def docs():
|
59
|
+
subprocess.run(["sphinx-build", "-b", "html", "docs", str(Path("docs", "_build"))])
|
60
|
+
|
61
|
+
|
62
|
+
def clean():
|
63
|
+
folders_to_clean = [
|
64
|
+
Path("dist"),
|
65
|
+
Path("src", "qupled.egg-info"),
|
66
|
+
Path("docs", "_build"),
|
67
|
+
]
|
68
|
+
for folder in folders_to_clean:
|
69
|
+
if folder.exists():
|
70
|
+
print(f"Removing folder: {folder}")
|
71
|
+
shutil.rmtree(folder)
|
72
|
+
|
73
|
+
|
74
|
+
def install():
|
75
|
+
wheel_file = get_wheel_file()
|
76
|
+
if wheel_file is not None:
|
77
|
+
subprocess.run(["pip", "install", "--force-reinstall", wheel_file], check=True)
|
78
|
+
|
79
|
+
|
80
|
+
def install_dependencies():
|
81
|
+
print("Installing dependencies...")
|
82
|
+
if os.name == "posix":
|
83
|
+
if shutil.which("apt-get"):
|
84
|
+
subprocess.run(["sudo", "apt-get", "update"], check=True)
|
85
|
+
subprocess.run(
|
86
|
+
[
|
87
|
+
"sudo",
|
88
|
+
"apt-get",
|
89
|
+
"install",
|
90
|
+
"-y",
|
91
|
+
"cmake",
|
92
|
+
"libboost-all-dev",
|
93
|
+
"libopenmpi-dev",
|
94
|
+
"libgsl-dev",
|
95
|
+
"libomp-dev",
|
96
|
+
"libfmt-dev",
|
97
|
+
"python3-dev",
|
98
|
+
],
|
99
|
+
check=True,
|
100
|
+
)
|
101
|
+
elif shutil.which("brew"):
|
102
|
+
subprocess.run(["brew", "update"], check=True)
|
103
|
+
subprocess.run(
|
104
|
+
[
|
105
|
+
"brew",
|
106
|
+
"install",
|
107
|
+
"cmake",
|
108
|
+
"gsl",
|
109
|
+
"libomp",
|
110
|
+
"openmpi",
|
111
|
+
"fmt",
|
112
|
+
"boost-python3",
|
113
|
+
],
|
114
|
+
check=True,
|
115
|
+
)
|
116
|
+
else:
|
117
|
+
print("Unsupported package manager. Please install dependencies manually.")
|
118
|
+
else:
|
119
|
+
print("Unsupported operating system. Please install dependencies manually.")
|
120
|
+
|
121
|
+
|
122
|
+
def update_version(build_version):
|
123
|
+
pyproject_file = Path("pyproject.toml")
|
124
|
+
if not pyproject_file.exists():
|
125
|
+
return
|
126
|
+
with pyproject_file.open("r") as file:
|
127
|
+
content = file.readlines()
|
128
|
+
with pyproject_file.open("w") as file:
|
129
|
+
for line in content:
|
130
|
+
if line.startswith("version = "):
|
131
|
+
file.write(f'version = "{build_version}"')
|
132
|
+
file.write("\n")
|
133
|
+
else:
|
134
|
+
file.write(line)
|
135
|
+
|
136
|
+
|
137
|
+
def run():
|
138
|
+
parser = argparse.ArgumentParser(
|
139
|
+
description="""A utility script for building, testing, formatting,
|
140
|
+
and generating documentation for the qupled project."""
|
141
|
+
)
|
142
|
+
|
143
|
+
subparsers = parser.add_subparsers(dest="command", help="Sub-command to run")
|
144
|
+
|
145
|
+
# Build command
|
146
|
+
build_parser = subparsers.add_parser("build", help="Build the qupled package")
|
147
|
+
build_parser.add_argument(
|
148
|
+
"--nompi",
|
149
|
+
action="store_true",
|
150
|
+
help="Build without MPI support (default: False).",
|
151
|
+
)
|
152
|
+
|
153
|
+
# Update version command
|
154
|
+
version_parser = subparsers.add_parser(
|
155
|
+
"update-version", help="Update package version"
|
156
|
+
)
|
157
|
+
version_parser.add_argument("build_version", help="The new version number.")
|
158
|
+
|
159
|
+
# Other commands
|
160
|
+
subparsers.add_parser("clean", help="Clean up build artifacts")
|
161
|
+
subparsers.add_parser("docs", help="Generate documentation")
|
162
|
+
subparsers.add_parser("examples", help="Run tests for the examples")
|
163
|
+
subparsers.add_parser("format", help="Format the source code")
|
164
|
+
subparsers.add_parser("install", help="Install the qupled package")
|
165
|
+
subparsers.add_parser("install-deps", help="Install system dependencies")
|
166
|
+
subparsers.add_parser("test", help="Run tests")
|
167
|
+
|
168
|
+
args = parser.parse_args()
|
169
|
+
|
170
|
+
if args.command == "build":
|
171
|
+
build(args.nompi)
|
172
|
+
elif args.command == "clean":
|
173
|
+
clean()
|
174
|
+
elif args.command == "docs":
|
175
|
+
docs()
|
176
|
+
elif args.command == "examples":
|
177
|
+
examples()
|
178
|
+
elif args.command == "format":
|
179
|
+
format_code()
|
180
|
+
elif args.command == "install":
|
181
|
+
install()
|
182
|
+
elif args.command == "test":
|
183
|
+
test()
|
184
|
+
elif args.command == "install-deps":
|
185
|
+
install_dependencies()
|
186
|
+
elif args.command == "update-version":
|
187
|
+
update_version(args.build_version)
|
188
|
+
else:
|
189
|
+
parser.print_help()
|
190
|
+
|
191
|
+
|
192
|
+
if __name__ == "__main__":
|
193
|
+
run()
|
@@ -14,7 +14,7 @@ author = "Federico Lucco Castello"
|
|
14
14
|
import os
|
15
15
|
import sys
|
16
16
|
|
17
|
-
sys.path.insert(0, os.path.abspath(".."))
|
17
|
+
sys.path.insert(0, os.path.abspath(os.path.join("..", "src")))
|
18
18
|
|
19
19
|
# -- General configuration ---------------------------------------------------
|
20
20
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
@@ -1,74 +1,47 @@
|
|
1
1
|
import os
|
2
|
+
import tempfile
|
3
|
+
import shutil
|
2
4
|
import numpy as np
|
3
5
|
import matplotlib as mpl
|
4
6
|
from matplotlib import pyplot as plt
|
5
7
|
from matplotlib import colormaps as cm
|
6
|
-
from
|
7
|
-
|
8
|
-
import qupled.quantum as qpq
|
8
|
+
from qupled.util import Hdf
|
9
|
+
from qupled.quantum import Qstls
|
9
10
|
|
10
11
|
|
11
12
|
def main():
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
14
|
+
original_dir = os.getcwd()
|
15
|
+
os.chdir(temp_dir)
|
16
|
+
try:
|
17
|
+
svg_files = create_svg_files()
|
18
|
+
for svg_file in svg_files:
|
19
|
+
shutil.copy(svg_file, original_dir)
|
20
|
+
finally:
|
21
|
+
os.chdir(original_dir)
|
22
|
+
|
23
|
+
|
24
|
+
def create_svg_files():
|
25
|
+
plot_data, error = get_plot_data()
|
26
|
+
if plot_data is not None:
|
27
|
+
svg_files = []
|
28
|
+
for darkmode in [True, False]:
|
29
|
+
svg_files.append(create_one_svg_file(darkmode, plot_data, error))
|
30
|
+
return svg_files
|
31
|
+
else:
|
32
|
+
return []
|
33
|
+
|
34
|
+
|
35
|
+
def get_plot_data():
|
36
|
+
plot_data = None
|
37
|
+
error = []
|
38
|
+
while plot_data is None or plot_data.error > 1e-5:
|
39
|
+
plot_data = solve_qstls()
|
40
|
+
error.append(plot_data.error)
|
41
|
+
return plot_data, error
|
16
42
|
|
17
43
|
|
18
|
-
def
|
19
|
-
fig, ax = plt.subplots()
|
20
|
-
images = []
|
21
|
-
error = []
|
22
|
-
file_names = []
|
23
|
-
for i in range(nFiles):
|
24
|
-
file_names.append(create_one_svg_file(i, error, darkmode))
|
25
|
-
return file_names
|
26
|
-
|
27
|
-
|
28
|
-
def combine_svg_files(svg_files, darkmode):
|
29
|
-
svg_template = """
|
30
|
-
<svg width="864pt" height="576pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
31
|
-
{}
|
32
|
-
</svg>
|
33
|
-
"""
|
34
|
-
image_template = """
|
35
|
-
<g visibility="hidden">
|
36
|
-
{}
|
37
|
-
</g>
|
38
|
-
"""
|
39
|
-
image_duration = 0.18 # in seconds
|
40
|
-
svg_image = ""
|
41
|
-
animation_file = "qupled_animation_light.svg"
|
42
|
-
if darkmode:
|
43
|
-
animation_file = "qupled_animation_dark.svg"
|
44
|
-
for i in range(len(svg_files)):
|
45
|
-
svg_file = svg_files[i]
|
46
|
-
begin_visible = i * image_duration
|
47
|
-
begin_hidden = begin_visible + image_duration
|
48
|
-
with open(svg_file, "r") as f:
|
49
|
-
svg_content = f.read()
|
50
|
-
svg_content = svg_content[svg_content.index("<svg") :]
|
51
|
-
svg_content = add_animation(svg_content, begin_visible, begin_hidden)
|
52
|
-
svg_image += image_template.format(svg_content)
|
53
|
-
os.remove(svg_file)
|
54
|
-
with open(animation_file, "w") as fw:
|
55
|
-
fw.write(svg_template.format(svg_image))
|
56
|
-
optimise_svg(animation_file)
|
57
|
-
|
58
|
-
|
59
|
-
def add_animation(svg_content, begin, end):
|
60
|
-
animation_xml = f"""
|
61
|
-
<animate attributeName="visibility" values="hidden;visible" begin="{begin}s"/>
|
62
|
-
<animate attributeName="visibility" values="visible;hidden" begin="{end}s"/>
|
63
|
-
"""
|
64
|
-
index = svg_content.index("</svg>")
|
65
|
-
modified_svg_content = svg_content[:index] + animation_xml + svg_content[index:]
|
66
|
-
return modified_svg_content
|
67
|
-
|
68
|
-
|
69
|
-
def create_one_svg_file(i, errorList, darkmode):
|
70
|
-
# Solve scheme
|
71
|
-
plot_data = solve_qstls(i)
|
44
|
+
def create_one_svg_file(darkmode, plot_data, error):
|
72
45
|
# Get plot settings
|
73
46
|
settings = PlotSettings(darkmode)
|
74
47
|
plt.figure(figsize=settings.figure_size)
|
@@ -78,39 +51,39 @@ def create_one_svg_file(i, errorList, darkmode):
|
|
78
51
|
# Plot quantities of interest
|
79
52
|
plot_density_response(plt, plot_data, settings)
|
80
53
|
plot_ssf(plt, plot_data, settings)
|
81
|
-
plot_error(plt,
|
54
|
+
plot_error(plt, error, settings)
|
82
55
|
# Combine plots
|
83
56
|
plt.tight_layout()
|
84
57
|
# Save figure
|
85
|
-
file_name =
|
58
|
+
file_name = settings.figure_name
|
86
59
|
plt.savefig(file_name)
|
87
60
|
plt.close()
|
88
|
-
# Optimise svg file
|
89
|
-
optimise_svg(file_name)
|
90
61
|
return file_name
|
91
62
|
|
92
63
|
|
93
|
-
def solve_qstls(
|
94
|
-
qstls =
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
64
|
+
def solve_qstls():
|
65
|
+
qstls = Qstls()
|
66
|
+
rs = 15.0
|
67
|
+
theta = 1.0
|
68
|
+
inputs = Qstls.Input(rs, theta)
|
69
|
+
inputs.mixing = 0.3
|
70
|
+
inputs.resolution = 0.1
|
71
|
+
inputs.cutoff = 10
|
72
|
+
inputs.matsubara = 16
|
73
|
+
inputs.threads = 16
|
74
|
+
inputs.iterations = 0
|
75
|
+
guess_file = f"rs{rs:.3f}_theta{theta:.3f}_QSTLS.h5"
|
76
|
+
adr_file = f"adr_fixed_theta{theta:.3f}_matsubara{inputs.matsubara}_QSTLS.bin"
|
77
|
+
inputs.guess = (
|
78
|
+
Qstls.getInitialGuess(guess_file)
|
79
|
+
if os.path.exists(guess_file)
|
80
|
+
else inputs.guess
|
103
81
|
)
|
104
|
-
if
|
105
|
-
|
106
|
-
|
107
|
-
qstls.compute()
|
82
|
+
inputs.fixed = adr_file if os.path.exists(adr_file) else inputs.fixed
|
83
|
+
qstls.compute(inputs)
|
84
|
+
results = Hdf().read(qstls.hdfFileName, ["wvg", "adr", "ssf", "idr", "error"])
|
108
85
|
return QStlsData(
|
109
|
-
|
110
|
-
qstls.scheme.adr,
|
111
|
-
qstls.scheme.idr,
|
112
|
-
qstls.scheme.ssf,
|
113
|
-
qstls.scheme.error,
|
86
|
+
results["wvg"], results["adr"], results["idr"], results["ssf"], results["error"]
|
114
87
|
)
|
115
88
|
|
116
89
|
|
@@ -161,14 +134,12 @@ def plot_ssf(plt, plot_data, settings):
|
|
161
134
|
plt.yticks(fontsize=settings.ticksz)
|
162
135
|
|
163
136
|
|
164
|
-
def plot_error(plt,
|
165
|
-
|
137
|
+
def plot_error(plt, error, settings):
|
138
|
+
iterations = range(len(error))
|
166
139
|
horizontalLineColor = mpl.rcParams["text.color"]
|
167
140
|
plt.subplot(2, 1, 1)
|
168
|
-
plt.plot(
|
169
|
-
|
170
|
-
)
|
171
|
-
plt.scatter(iteration, error, color="red", s=150, alpha=1)
|
141
|
+
plt.plot(iterations, error, color=settings.color, linewidth=settings.width)
|
142
|
+
plt.scatter(iterations[-1], error[-1], color="red", s=150, alpha=1)
|
172
143
|
plt.axhline(y=1.0e-5, color=horizontalLineColor, linestyle="--")
|
173
144
|
plt.text(
|
174
145
|
3, 1.5e-5, "Convergence", horizontalalignment="center", fontsize=settings.ticksz
|
@@ -223,14 +194,14 @@ class PlotSettings:
|
|
223
194
|
self.labelsz = 16
|
224
195
|
self.ticksz = 14
|
225
196
|
self.width = 2.0
|
226
|
-
self.theme = "ggplot"
|
227
|
-
self.colormap = cm["viridis"].reversed()
|
197
|
+
self.theme = "dark_background" if darkmode else "ggplot"
|
198
|
+
self.colormap = cm["plasma"] if darkmode else cm["viridis"].reversed()
|
228
199
|
self.xlim = 6
|
229
|
-
if darkmode:
|
230
|
-
self.theme = "dark_background"
|
231
|
-
self.colormap = cm["plasma"]
|
232
200
|
self.color = self.colormap(1.0)
|
233
201
|
self.figure_size = (12, 8)
|
202
|
+
self.figure_name = (
|
203
|
+
"qupled_animation_dark.svg" if darkmode else "qupled_animation_light.svg"
|
204
|
+
)
|
234
205
|
|
235
206
|
|
236
207
|
if __name__ == "__main__":
|