qupled 1.2.0__tar.gz → 1.3.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/.github/workflows/build-and-test-base.yml → qupled-1.3.0/.github/workflows/build-and-test.yml +7 -22
- {qupled-1.2.0 → qupled-1.3.0}/.github/workflows/formatting.yml +4 -0
- qupled-1.3.0/.github/workflows/release.yml +117 -0
- {qupled-1.2.0 → qupled-1.3.0}/.gitignore +2 -1
- {qupled-1.2.0 → qupled-1.3.0}/PKG-INFO +1 -1
- {qupled-1.2.0 → qupled-1.3.0}/dev/requirements-apt.txt +0 -1
- {qupled-1.2.0 → qupled-1.3.0}/dev/requirements-brew.txt +0 -1
- {qupled-1.2.0 → qupled-1.3.0}/dev/requirements-pip.txt +1 -0
- {qupled-1.2.0 → qupled-1.3.0}/docs/introduction.rst +4 -4
- qupled-1.3.0/manylinux/Dockerfile.manylinux_2_28 +24 -0
- qupled-1.3.0/manylinux/build_manylinux_2_28 +21 -0
- {qupled-1.2.0 → qupled-1.3.0}/pyproject.toml +18 -1
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/mpi.py +7 -10
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/python_interface/inputs.hpp +3 -1
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/python_interface/schemes.hpp +3 -1
- qupled-1.3.0/src/qupled/native/include/python_interface/util.hpp +37 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/python_interface/utilities.hpp +3 -1
- qupled-1.3.0/src/qupled/native/src/CMakeLists.txt +91 -0
- qupled-1.3.0/src/qupled/native/src/python_interface/inputs.cpp +240 -0
- qupled-1.3.0/src/qupled/native/src/python_interface/native.cpp +43 -0
- qupled-1.3.0/src/qupled/native/src/python_interface/schemes.cpp +161 -0
- qupled-1.3.0/src/qupled/native/src/python_interface/util.cpp +119 -0
- qupled-1.3.0/src/qupled/native/src/python_interface/utilities.cpp +81 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled.egg-info/PKG-INFO +1 -1
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled.egg-info/SOURCES.txt +2 -1
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_mpi.py +7 -7
- qupled-1.2.0/.github/workflows/build-and-test.yml +0 -13
- qupled-1.2.0/.github/workflows/release.yml +0 -45
- qupled-1.2.0/src/qupled/native/include/python_interface/util.hpp +0 -52
- qupled-1.2.0/src/qupled/native/src/CMakeLists.txt +0 -88
- qupled-1.2.0/src/qupled/native/src/python_interface/inputs.cpp +0 -240
- qupled-1.2.0/src/qupled/native/src/python_interface/native.cpp +0 -39
- qupled-1.2.0/src/qupled/native/src/python_interface/schemes.cpp +0 -151
- qupled-1.2.0/src/qupled/native/src/python_interface/util.cpp +0 -105
- qupled-1.2.0/src/qupled/native/src/python_interface/utilities.cpp +0 -76
- {qupled-1.2.0 → qupled-1.3.0}/.clang-format +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/.devcontainer/Dockerfile +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/.devcontainer/devcontainer.json +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/.readthedocs.yaml +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/LICENSE +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/MANIFEST.in +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/README.md +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/dev/devtool.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/devtool +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/docs/_static/css/rdt_theme_python_properties.css +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/docs/conf.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/docs/contribute.rst +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/docs/examples.rst +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/docs/index.rst +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/docs/make.bat +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/docs/qupled.rst +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/docs/requirements.txt +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/docs/fixed_adr.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/docs/initial_guess_stls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/docs/solve_quantum_schemes.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/docs/solve_qvsstls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/docs/solve_rpa_and_esa.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/docs/solve_stls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/docs/solve_stls_iet.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/docs/solve_vsstls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/readme/create_cover.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/readme/qupled_animation_dark.svg +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/readme/qupled_animation_light.svg +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/examples/tests/test_examples.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/setup.cfg +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/setup.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/__init__.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/database.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/esa.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/hf.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/chemical_potential.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/database.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/dual.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/esa.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/free_energy.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/hf.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/iet.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/input.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/internal_energy.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/logger.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/mpi_util.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/num_util.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/numerics.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/qstls.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/qstlsiet.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/qvsstls.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/rdf.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/rpa.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/stls.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/stlsiet.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/thermo_util.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/vector2D.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/vector3D.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/vector_util.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/vsbase.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/include/vsstls.hpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/chemical_potential.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/esa.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/free_energy.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/hf.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/iet.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/input.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/internal_energy.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/logger.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/mpi_util.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/num_util.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/numerics.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/qstls.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/qstlsiet.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/qvsstls.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/rdf.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/rpa.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/stls.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/stlsiet.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/thermo_util.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/vector2D.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/vector3D.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/vector_util.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/vsbase.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/native/src/vsstls.cpp +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/output.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/qstls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/qstlsiet.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/qvsstls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/rpa.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/stls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/stlsiet.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled/vsstls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled.egg-info/dependency_links.txt +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled.egg-info/not-zip-safe +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled.egg-info/requires.txt +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/src/qupled.egg-info/top_level.txt +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/native/conftest.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/native/test_esa_native.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/native/test_hf_native.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/native/test_qstls_iet_native.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/native/test_qstls_native.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/native/test_qvsstls_native.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/native/test_rpa_native.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/native/test_stls_iet_native.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/native/test_stls_native.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/native/test_vsstls_native.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_database.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_esa.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_hf.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_output.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_qstls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_qstlsiet.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_qvsstls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_rpa.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_stls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_stlsiet.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tests/test_vsstls.py +0 -0
- {qupled-1.2.0 → qupled-1.3.0}/tox.ini +0 -0
@@ -1,15 +1,12 @@
|
|
1
1
|
name: Build & Test
|
2
2
|
|
3
3
|
on:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
required: false
|
11
|
-
type: string
|
12
|
-
default: ""
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
13
10
|
|
14
11
|
env:
|
15
12
|
PYTHON_VENV_ROOT: ${{ github.workspace }}/python-venv
|
@@ -30,11 +27,6 @@ jobs:
|
|
30
27
|
./devtool install-deps
|
31
28
|
python3 -m venv ${PYTHON_VENV_ROOT}
|
32
29
|
|
33
|
-
- name: Set build version
|
34
|
-
if: ${{ inputs.build-version != '' }}
|
35
|
-
run: |
|
36
|
-
./devtool update-version ${{ inputs.build-version }}
|
37
|
-
|
38
30
|
- name: Build
|
39
31
|
run: |
|
40
32
|
source ${PYTHON_VENV_ROOT}/bin/activate
|
@@ -46,11 +38,4 @@ jobs:
|
|
46
38
|
run: |
|
47
39
|
source ${PYTHON_VENV_ROOT}/bin/activate
|
48
40
|
pip3 install tox
|
49
|
-
./devtool test
|
50
|
-
|
51
|
-
- name: Upload artifact
|
52
|
-
if: ${{ success() && inputs.upload-artifact == 'true' }}
|
53
|
-
uses: actions/upload-artifact@v4
|
54
|
-
with:
|
55
|
-
name: qupled-${{ matrix.os }}
|
56
|
-
path: dist
|
41
|
+
./devtool test
|
@@ -0,0 +1,117 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- 'v*'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build-sdist:
|
10
|
+
name: Build source distribution
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- name: Checkout source code
|
15
|
+
uses: actions/checkout@v4
|
16
|
+
|
17
|
+
- name: Set build version
|
18
|
+
run: ./devtool update-version ${{ github.ref_name }}
|
19
|
+
|
20
|
+
- name: Build sdist
|
21
|
+
run: |
|
22
|
+
python3 -m venv .venv
|
23
|
+
source .venv/bin/activate
|
24
|
+
pip install build
|
25
|
+
python -m build --sdist --outdir dist
|
26
|
+
|
27
|
+
- name: Upload sdist
|
28
|
+
uses: actions/upload-artifact@v4
|
29
|
+
with:
|
30
|
+
name: sdist
|
31
|
+
path: dist/*.tar.gz
|
32
|
+
|
33
|
+
build-wheels:
|
34
|
+
name: Build ${{ matrix.arch }} wheels
|
35
|
+
runs-on: ubuntu-latest
|
36
|
+
needs: build-sdist
|
37
|
+
|
38
|
+
strategy:
|
39
|
+
matrix:
|
40
|
+
arch: [x86_64] # add also aarch64
|
41
|
+
|
42
|
+
steps:
|
43
|
+
- name: Checkout source code
|
44
|
+
uses: actions/checkout@v4
|
45
|
+
|
46
|
+
- name: Set build version
|
47
|
+
run: ./devtool update-version ${{ github.ref_name }}
|
48
|
+
|
49
|
+
- name: Set up QEMU (for aarch64 emulation)
|
50
|
+
if: matrix.arch == 'aarch64'
|
51
|
+
uses: docker/setup-qemu-action@v3
|
52
|
+
|
53
|
+
- name: Authenticate with GHCR
|
54
|
+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
55
|
+
|
56
|
+
- name: Pull correct manylinux image
|
57
|
+
run: |
|
58
|
+
docker pull --platform linux/${{ matrix.arch }} ghcr.io/fedluc/qupled/qupled_manylinux_${{ matrix.arch }}
|
59
|
+
|
60
|
+
- name: Build wheels using cibuildwheel
|
61
|
+
uses: pypa/cibuildwheel@v2.16.5
|
62
|
+
with:
|
63
|
+
output-dir: wheelhouse
|
64
|
+
env:
|
65
|
+
CIBW_PLATFORM: linux
|
66
|
+
CIBW_ARCHS: ${{ matrix.arch }}
|
67
|
+
CIBW_CONTAINER_PLATFORM: linux/${{ matrix.arch }}
|
68
|
+
|
69
|
+
- name: Upload built wheels
|
70
|
+
uses: actions/upload-artifact@v4
|
71
|
+
with:
|
72
|
+
name: wheels-${{ matrix.arch }}
|
73
|
+
path: wheelhouse/*.whl
|
74
|
+
|
75
|
+
publish:
|
76
|
+
name: Publish to PyPI
|
77
|
+
runs-on: ubuntu-latest
|
78
|
+
needs: [build-sdist, build-wheels]
|
79
|
+
|
80
|
+
steps:
|
81
|
+
- name: Prepare dist folder
|
82
|
+
run: mkdir -p dist
|
83
|
+
|
84
|
+
- name: Download sdist
|
85
|
+
uses: actions/download-artifact@v4
|
86
|
+
with:
|
87
|
+
name: sdist
|
88
|
+
path: temp-sdist
|
89
|
+
|
90
|
+
- name: Download wheels (x86_64)
|
91
|
+
uses: actions/download-artifact@v4
|
92
|
+
with:
|
93
|
+
name: wheels-x86_64
|
94
|
+
path: temp-wheels-x86_64
|
95
|
+
|
96
|
+
# - name: Download wheels (aarch64)
|
97
|
+
# uses: actions/download-artifact@v4
|
98
|
+
# with:
|
99
|
+
# name: wheels-aarch64
|
100
|
+
# path: temp-wheels-aarch64
|
101
|
+
|
102
|
+
- name: Move all files to dist/
|
103
|
+
run: |
|
104
|
+
mv temp-sdist/* dist/ || true
|
105
|
+
mv temp-wheels-*/* dist/ || true
|
106
|
+
|
107
|
+
- name: Publish to PyPI
|
108
|
+
env:
|
109
|
+
TWINE_USERNAME: __token__
|
110
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
111
|
+
run: |
|
112
|
+
python3 -m venv .venv
|
113
|
+
source .venv/bin/activate
|
114
|
+
pip3 install --upgrade pip
|
115
|
+
pip3 install twine
|
116
|
+
twine check dist/*
|
117
|
+
twine upload dist/* --non-interactive
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qupled
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.3.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
6
|
License-Expression: GPL-3.0-or-later
|
@@ -56,13 +56,13 @@ For linux distributions all these dependencies can be installed with
|
|
56
56
|
|
57
57
|
.. code-block:: console
|
58
58
|
|
59
|
-
sudo apt-get install -y cmake
|
59
|
+
sudo apt-get install -y cmake libopenmpi-dev libgsl-dev libomp-dev python3-dev libsqlite3-dev libsqlitecpp-dev
|
60
60
|
|
61
61
|
For macOS they can be installed directly from homebrew
|
62
62
|
|
63
63
|
.. code-block:: console
|
64
64
|
|
65
|
-
brew install cmake gsl libomp openmpi
|
65
|
+
brew install cmake gsl libomp openmpi sqlite sqlitecpp
|
66
66
|
|
67
67
|
Install with pip
|
68
68
|
~~~~~~~~~~~~~~~~
|
@@ -78,13 +78,13 @@ This will also install all the python packages that are necessary for running th
|
|
78
78
|
Install from source
|
79
79
|
~~~~~~~~~~~~~~~~~~~
|
80
80
|
|
81
|
-
Qupled and all its
|
81
|
+
Qupled and all its dependencies can also be installed from source by running
|
82
82
|
|
83
83
|
.. code-block:: console
|
84
84
|
|
85
85
|
git clone https://github.com/fedluc/qupled.git
|
86
86
|
cd qupled
|
87
|
-
|
87
|
+
./devtool install-deps
|
88
88
|
./devtool build
|
89
89
|
./devtool test
|
90
90
|
./devtool install
|
@@ -0,0 +1,24 @@
|
|
1
|
+
ARG ARCH=x86_64
|
2
|
+
FROM quay.io/pypa/manylinux_2_28_${ARCH}
|
3
|
+
|
4
|
+
# Install dev tools and system dependencies
|
5
|
+
RUN dnf -y update && \
|
6
|
+
dnf -y groupinstall "Development Tools" && \
|
7
|
+
dnf -y install \
|
8
|
+
gsl-devel \
|
9
|
+
sqlite-devel \
|
10
|
+
git \
|
11
|
+
wget \
|
12
|
+
cmake \
|
13
|
+
&& dnf clean all
|
14
|
+
|
15
|
+
# Build SQLiteCpp from source
|
16
|
+
RUN cd /tmp && \
|
17
|
+
git clone https://github.com/SRombauts/SQLiteCpp.git && \
|
18
|
+
cd SQLiteCpp && \
|
19
|
+
mkdir build && cd build && \
|
20
|
+
cmake .. && \
|
21
|
+
make -j$(nproc) && \
|
22
|
+
make install && \
|
23
|
+
ldconfig && \
|
24
|
+
cd / && rm -rf /tmp/SQLiteCpp
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
docker buildx create --use
|
4
|
+
|
5
|
+
ARCH="x86_64"
|
6
|
+
docker buildx build \
|
7
|
+
--platform linux/amd64 \
|
8
|
+
-f manylinux/Dockerfile.manylinux_2_28 \
|
9
|
+
--build-arg ARCH=${ARCH} \
|
10
|
+
--push \
|
11
|
+
-t "ghcr.io/fedluc/qupled/qupled_manylinux_${ARCH}" \
|
12
|
+
.
|
13
|
+
|
14
|
+
ARCH="aarch64"
|
15
|
+
docker buildx build \
|
16
|
+
--platform linux/arm64 \
|
17
|
+
-f manylinux/Dockerfile.manylinux_2_28 \
|
18
|
+
--build-arg ARCH=${ARCH} \
|
19
|
+
--push \
|
20
|
+
-t "ghcr.io/fedluc/qupled/qupled_manylinux_${ARCH}" \
|
21
|
+
.
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "qupled"
|
7
|
-
version = "
|
7
|
+
version = "v1.3.0"
|
8
8
|
description = "qupled: a package to investigate quantum plasmas via the dielectric formalism"
|
9
9
|
readme = "README.md"
|
10
10
|
requires-python = ">=3.10, <3.14"
|
@@ -44,3 +44,20 @@ docs = [
|
|
44
44
|
include-package-data = false
|
45
45
|
packages = ["qupled", "qupled.native"]
|
46
46
|
package-dir = { "" = "src" }
|
47
|
+
|
48
|
+
[tool.cibuildwheel]
|
49
|
+
manylinux-x86_64-image = "ghcr.io/fedluc/qupled/qupled_manylinux_x86_64"
|
50
|
+
manylinux-aarch64-image = "ghcr.io/fedluc/qupled/qupled_manylinux_aarch64"
|
51
|
+
build = [
|
52
|
+
"cp310-manylinux_x86_64",
|
53
|
+
"cp311-manylinux_x86_64",
|
54
|
+
"cp312-manylinux_x86_64",
|
55
|
+
"cp313-manylinux_x86_64",
|
56
|
+
"cp310-manylinux_aarch64",
|
57
|
+
"cp311-manylinux_aarch64",
|
58
|
+
"cp312-manylinux_aarch64",
|
59
|
+
"cp313-manylinux_aarch64",
|
60
|
+
]
|
61
|
+
environment = "USE_MPI=OFF"
|
62
|
+
test-command = "pytest {project}/tests --ignore={project}/tests/native"
|
63
|
+
before-test = "pip install pytest pytest-mock"
|
@@ -6,24 +6,21 @@ from qupled import native
|
|
6
6
|
class MPI:
|
7
7
|
"""Class to handle the calls to the MPI API"""
|
8
8
|
|
9
|
-
def __init__(self):
|
10
|
-
self.qp_mpi = native.MPI()
|
11
|
-
|
12
9
|
def rank(self):
|
13
10
|
"""Get rank of the process"""
|
14
|
-
return
|
11
|
+
return native.MPI.rank()
|
15
12
|
|
16
13
|
def is_root(self):
|
17
14
|
"""Check if the current process is root (rank 0)"""
|
18
|
-
return
|
15
|
+
return native.MPI.is_root()
|
19
16
|
|
20
17
|
def barrier(self):
|
21
18
|
"""Setup an MPI barrier"""
|
22
|
-
|
19
|
+
native.MPI.barrier()
|
23
20
|
|
24
21
|
def timer(self):
|
25
22
|
"""Get wall time"""
|
26
|
-
return
|
23
|
+
return native.MPI.timer()
|
27
24
|
|
28
25
|
@staticmethod
|
29
26
|
def run_only_on_root(func):
|
@@ -31,7 +28,7 @@ class MPI:
|
|
31
28
|
|
32
29
|
@functools.wraps(func)
|
33
30
|
def wrapper(*args, **kwargs):
|
34
|
-
if MPI
|
31
|
+
if native.MPI.is_root():
|
35
32
|
return func(*args, **kwargs)
|
36
33
|
|
37
34
|
return wrapper
|
@@ -43,7 +40,7 @@ class MPI:
|
|
43
40
|
@functools.wraps(func)
|
44
41
|
def wrapper(*args, **kwargs):
|
45
42
|
func(*args, **kwargs)
|
46
|
-
MPI
|
43
|
+
native.MPI.barrier()
|
47
44
|
|
48
45
|
return wrapper
|
49
46
|
|
@@ -53,7 +50,7 @@ class MPI:
|
|
53
50
|
|
54
51
|
@functools.wraps(func)
|
55
52
|
def wrapper(*args, **kwargs):
|
56
|
-
mpi = MPI
|
53
|
+
mpi = native.MPI
|
57
54
|
tic = mpi.timer()
|
58
55
|
func(*args, **kwargs)
|
59
56
|
toc = mpi.timer()
|
@@ -1,10 +1,12 @@
|
|
1
1
|
#ifndef PYTHON_INTERFACE_SCHEMES_HPP
|
2
2
|
#define PYTHON_INTERFACE_SCHEMES_HPP
|
3
3
|
|
4
|
+
#include <pybind11/pybind11.h>
|
5
|
+
|
4
6
|
namespace pythonWrappers {
|
5
7
|
|
6
8
|
// Function to expose schemes to Python
|
7
|
-
void exposeSchemes();
|
9
|
+
void exposeSchemes(pybind11::module_ &m);
|
8
10
|
|
9
11
|
} // namespace pythonWrappers
|
10
12
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
#ifndef PYTHON_INTERFACE_UTIL_HPP
|
2
|
+
#define PYTHON_INTERFACE_UTIL_HPP
|
3
|
+
|
4
|
+
#include "vector2D.hpp"
|
5
|
+
#include "vector3D.hpp"
|
6
|
+
#include <pybind11/numpy.h>
|
7
|
+
#include <pybind11/pybind11.h>
|
8
|
+
#include <vector>
|
9
|
+
|
10
|
+
namespace pythonUtil {
|
11
|
+
|
12
|
+
namespace py = pybind11;
|
13
|
+
using py::array;
|
14
|
+
using py::array_t;
|
15
|
+
using py::list;
|
16
|
+
|
17
|
+
// Check if a numpy array is stored in row-major order
|
18
|
+
void CheckRowMajor(const py::array &arr);
|
19
|
+
|
20
|
+
// Convert Python list or 1D array to std::vector<double>
|
21
|
+
std::vector<double> toVector(const py::array_t<double> &arr);
|
22
|
+
std::vector<double> toVector(const py::list &list);
|
23
|
+
|
24
|
+
// Convert 2D array to Vector2D or std::vector<std::vector<double>>
|
25
|
+
Vector2D toVector2D(const py::array_t<double> &arr);
|
26
|
+
std::vector<std::vector<double>>
|
27
|
+
toDoubleVector(const py::array_t<double> &arr);
|
28
|
+
|
29
|
+
// Convert native C++ containers to numpy arrays
|
30
|
+
py::array toNdArray(const std::vector<double> &v);
|
31
|
+
py::array toNdArray2D(const Vector2D &v);
|
32
|
+
py::array toNdArray2D(const std::vector<std::vector<double>> &v);
|
33
|
+
py::array toNdArray3D(const Vector3D &v);
|
34
|
+
|
35
|
+
} // namespace pythonUtil
|
36
|
+
|
37
|
+
#endif // PYTHON_INTERFACE_UTIL_HPP
|
@@ -1,10 +1,12 @@
|
|
1
1
|
#ifndef PYTHON_INTERFACE_UTILITIES_HPP
|
2
2
|
#define PYTHON_INTERFACE_UTILITIES_HPP
|
3
3
|
|
4
|
+
#include <pybind11/pybind11.h>
|
5
|
+
|
4
6
|
namespace pythonWrappers {
|
5
7
|
|
6
8
|
// Function to expose utility functions to Python
|
7
|
-
void exposeUtilities();
|
9
|
+
void exposeUtilities(pybind11::module_ &m);
|
8
10
|
|
9
11
|
} // namespace pythonWrappers
|
10
12
|
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# Set cmake version
|
2
|
+
cmake_minimum_required(VERSION 3.28)
|
3
|
+
|
4
|
+
# Define project name
|
5
|
+
project(native LANGUAGES CXX)
|
6
|
+
|
7
|
+
# Setup python environment
|
8
|
+
find_package(Python3 REQUIRED COMPONENTS Development.Module)
|
9
|
+
|
10
|
+
# Setup pybind11
|
11
|
+
include(FetchContent)
|
12
|
+
FetchContent_Declare(
|
13
|
+
pybind11
|
14
|
+
GIT_REPOSITORY https://github.com/pybind/pybind11.git
|
15
|
+
GIT_TAG v2.13.6
|
16
|
+
)
|
17
|
+
FetchContent_MakeAvailable(pybind11)
|
18
|
+
|
19
|
+
# Setup MPI environment
|
20
|
+
option(USE_MPI "Compile with MPI support" ON)
|
21
|
+
if(USE_MPI)
|
22
|
+
set(MPI_CXX_SKIP_MPICXX TRUE)
|
23
|
+
find_package(MPI REQUIRED)
|
24
|
+
add_compile_definitions(USE_MPI)
|
25
|
+
set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
|
26
|
+
endif()
|
27
|
+
|
28
|
+
# Additional external libraries
|
29
|
+
find_package(OpenMP REQUIRED)
|
30
|
+
find_package(GSL REQUIRED)
|
31
|
+
find_package(SQLite3 REQUIRED)
|
32
|
+
find_package(SQLiteCpp REQUIRED)
|
33
|
+
|
34
|
+
# Set compiler flags
|
35
|
+
set(CMAKE_CXX_STANDARD 20)
|
36
|
+
add_compile_options(-Wall -Wextra -Wpedantic -O3)
|
37
|
+
|
38
|
+
# Source code
|
39
|
+
pybind11_add_module(native
|
40
|
+
logger.cpp
|
41
|
+
numerics.cpp
|
42
|
+
vector2D.cpp
|
43
|
+
vector3D.cpp
|
44
|
+
internal_energy.cpp
|
45
|
+
free_energy.cpp
|
46
|
+
rdf.cpp
|
47
|
+
mpi_util.cpp
|
48
|
+
num_util.cpp
|
49
|
+
vector_util.cpp
|
50
|
+
thermo_util.cpp
|
51
|
+
input.cpp
|
52
|
+
chemical_potential.cpp
|
53
|
+
hf.cpp
|
54
|
+
rpa.cpp
|
55
|
+
esa.cpp
|
56
|
+
stls.cpp
|
57
|
+
iet.cpp
|
58
|
+
stlsiet.cpp
|
59
|
+
qstls.cpp
|
60
|
+
qstlsiet.cpp
|
61
|
+
vsbase.cpp
|
62
|
+
vsstls.cpp
|
63
|
+
qvsstls.cpp
|
64
|
+
python_interface/util.cpp
|
65
|
+
python_interface/inputs.cpp
|
66
|
+
python_interface/schemes.cpp
|
67
|
+
python_interface/utilities.cpp
|
68
|
+
python_interface/native.cpp
|
69
|
+
)
|
70
|
+
|
71
|
+
# Include directories
|
72
|
+
target_include_directories(native PUBLIC
|
73
|
+
../include
|
74
|
+
)
|
75
|
+
|
76
|
+
# Link external libraries
|
77
|
+
if(USE_MPI)
|
78
|
+
target_link_libraries(native PUBLIC MPI::MPI_CXX)
|
79
|
+
endif()
|
80
|
+
target_link_libraries(native PUBLIC
|
81
|
+
OpenMP::OpenMP_CXX
|
82
|
+
GSL::gsl
|
83
|
+
GSL::gslcblas
|
84
|
+
SQLiteCpp
|
85
|
+
SQLite::SQLite3
|
86
|
+
)
|
87
|
+
|
88
|
+
# Install
|
89
|
+
install(TARGETS native
|
90
|
+
DESTINATION .
|
91
|
+
)
|