two_electron 2.1.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.
- two_electron-2.1.0/.circleci/config.yml +56 -0
- two_electron-2.1.0/.github/workflows/CI.yml +186 -0
- two_electron-2.1.0/.gitignore +18 -0
- two_electron-2.1.0/.gitmodules +0 -0
- two_electron-2.1.0/.travis.yml +27 -0
- two_electron-2.1.0/Cargo.lock +228 -0
- two_electron-2.1.0/Cargo.toml +14 -0
- two_electron-2.1.0/PKG-INFO +9 -0
- two_electron-2.1.0/README.md +1 -0
- two_electron-2.1.0/generate_testdata.ipynb +141 -0
- two_electron-2.1.0/makefile +12 -0
- two_electron-2.1.0/pyproject.toml +24 -0
- two_electron-2.1.0/python/sirfck/__init__.py +2 -0
- two_electron-2.1.0/python/tests/__init__.py +4 -0
- two_electron-2.1.0/python/tests/test_eri.d/AOTWOINT +0 -0
- two_electron-2.1.0/python/tests/test_eri.d/AOTWOINT.db +0 -0
- two_electron-2.1.0/python/tests/test_eri.d/H2O/H2O_ccpVDZ.mol +10 -0
- two_electron-2.1.0/python/tests/test_eri.d/H2O/aotwoint.db +0 -0
- two_electron-2.1.0/python/tests/test_eri.d/H2O/cmo.py +42 -0
- two_electron-2.1.0/python/tests/test_eri.d/H2O/dcao +583 -0
- two_electron-2.1.0/python/tests/test_eri.d/H2O/df.py +142 -0
- two_electron-2.1.0/python/tests/test_eri.d/H2O/fcao +576 -0
- two_electron-2.1.0/python/tests/test_eri.d/H2O/hf.dal +8 -0
- two_electron-2.1.0/python/tests/test_eri.d/H2O/hf_H2O_ccpVDZ.AOTWOINT +0 -0
- two_electron-2.1.0/python/tests/test_eri.d/acetaldehyde/acetaldehyde.mol +15 -0
- two_electron-2.1.0/python/tests/test_eri.d/acetaldehyde/dcao +1 -0
- two_electron-2.1.0/python/tests/test_eri.d/acetaldehyde/fcao +1 -0
- two_electron-2.1.0/python/tests/test_eri.d/acetaldehyde/hf.dal +6 -0
- two_electron-2.1.0/python/tests/test_eri.d/acetaldehyde/hf_acetaldehyde.out +1040 -0
- two_electron-2.1.0/python/tests/test_eri.d/acetaldehyde_small/acetaldehyde.mol +15 -0
- two_electron-2.1.0/python/tests/test_eri.d/acetaldehyde_small/dcao +1 -0
- two_electron-2.1.0/python/tests/test_eri.d/acetaldehyde_small/fcao +1 -0
- two_electron-2.1.0/python/tests/test_eri.d/acetaldehyde_small/hf.dal +6 -0
- two_electron-2.1.0/python/tests/test_eri.py +114 -0
- two_electron-2.1.0/python/tests/test_fockab.d/AOTWOINT +0 -0
- two_electron-2.1.0/python/tests/test_fockab.py +89 -0
- two_electron-2.1.0/python/tests/test_fockab2.d/AOTWOINT +0 -0
- two_electron-2.1.0/python/tests/test_fockab2.d/da.ref +7 -0
- two_electron-2.1.0/python/tests/test_fockab2.d/db.ref +7 -0
- two_electron-2.1.0/python/tests/test_fockab2.d/fa.ref +7 -0
- two_electron-2.1.0/python/tests/test_fockab2.d/fb.ref +7 -0
- two_electron-2.1.0/python/tests/test_fockab2.py +67 -0
- two_electron-2.1.0/python/tests/test_so.d/AO2SOINT +0 -0
- two_electron-2.1.0/python/tests/test_so.d/ao2soint.db +0 -0
- two_electron-2.1.0/python/tests/test_so.py +67 -0
- two_electron-2.1.0/python/tests/test_two.d/AOTWOINT +0 -0
- two_electron-2.1.0/python/tests/test_two.d/H2O/H2O_ccpVDZ.mol +10 -0
- two_electron-2.1.0/python/tests/test_two.d/H2O/cmo.py +42 -0
- two_electron-2.1.0/python/tests/test_two.d/H2O/dcao +583 -0
- two_electron-2.1.0/python/tests/test_two.d/H2O/df.py +142 -0
- two_electron-2.1.0/python/tests/test_two.d/H2O/fcao +576 -0
- two_electron-2.1.0/python/tests/test_two.d/H2O/hf.dal +8 -0
- two_electron-2.1.0/python/tests/test_two.d/H2O/hf_H2O_ccpVDZ.AOTWOINT +0 -0
- two_electron-2.1.0/python/tests/test_two.d/acetaldehyde/acetaldehyde.mol +15 -0
- two_electron-2.1.0/python/tests/test_two.d/acetaldehyde/dcao +1 -0
- two_electron-2.1.0/python/tests/test_two.d/acetaldehyde/fcao +1 -0
- two_electron-2.1.0/python/tests/test_two.d/acetaldehyde/hf.dal +6 -0
- two_electron-2.1.0/python/tests/test_two.d/acetaldehyde/hf_acetaldehyde.out +1040 -0
- two_electron-2.1.0/python/tests/test_two.d/acetaldehyde_small/acetaldehyde.mol +15 -0
- two_electron-2.1.0/python/tests/test_two.d/acetaldehyde_small/dcao +1 -0
- two_electron-2.1.0/python/tests/test_two.d/acetaldehyde_small/fcao +1 -0
- two_electron-2.1.0/python/tests/test_two.d/acetaldehyde_small/hf.dal +6 -0
- two_electron-2.1.0/python/tests/test_twoso.d/AO2SOINT +0 -0
- two_electron-2.1.0/python/tests/test_twoso.d/ao2soint.db +0 -0
- two_electron-2.1.0/python/tests/test_twoso.py +67 -0
- two_electron-2.1.0/python/tests/test_twoso_Cl.d/AO2SOINT +0 -0
- two_electron-2.1.0/python/tests/test_twoso_Cl.d/Cl.mol +7 -0
- two_electron-2.1.0/python/tests/test_twoso_Cl.d/cmo +27 -0
- two_electron-2.1.0/python/tests/test_twoso_Cl.d/lr2a_Cl.out +16837 -0
- two_electron-2.1.0/python/tests/test_twoso_Cl.d/lr2b_Cl.out +16945 -0
- two_electron-2.1.0/python/tests/test_twoso_Cl.d/makefile +5 -0
- two_electron-2.1.0/python/tests/test_twoso_Cl.d/mc.dal +28 -0
- two_electron-2.1.0/python/tests/test_twoso_Cl.d/mc_Cl.out +970 -0
- two_electron-2.1.0/python/tests/test_twoso_Cl.py +108 -0
- two_electron-2.1.0/python/tests/test_vb.d/H2O/H1.npy +0 -0
- two_electron-2.1.0/python/tests/test_vb.d/H2O/H2.npy +0 -0
- two_electron-2.1.0/python/tests/test_vb.d/H2O/H2O_STO3G.mol +10 -0
- two_electron-2.1.0/python/tests/test_vb.d/H2O/hf.dal +8 -0
- two_electron-2.1.0/python/tests/test_vb.d/H2O/hf_H2O_STO3G.AOTWOINT +0 -0
- two_electron-2.1.0/python/tests/test_vb.py +59 -0
- two_electron-2.1.0/python/two/__init__.py +9 -0
- two_electron-2.1.0/python/two/core.py +240 -0
- two_electron-2.1.0/python/two/eri.py +460 -0
- two_electron-2.1.0/python/two/sirfck.f +111 -0
- two_electron-2.1.0/python/two/so.py +211 -0
- two_electron-2.1.0/python/two/twoso.py +207 -0
- two_electron-2.1.0/python/two/vb.py +69 -0
- two_electron-2.1.0/requirements-dev.txt +4 -0
- two_electron-2.1.0/requirements.txt +2 -0
- two_electron-2.1.0/setup.py +32 -0
- two_electron-2.1.0/src/lib.rs +176 -0
- two_electron-2.1.0/tox.ini +10 -0
- two_electron-2.1.0/uv.lock +270 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Python CircleCI 2.0 configuration file
|
|
2
|
+
#
|
|
3
|
+
# Check https://circleci.com/docs/2.0/language-python/ for more details
|
|
4
|
+
#
|
|
5
|
+
version: 2
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
docker:
|
|
9
|
+
# specify the version you desire here
|
|
10
|
+
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
|
|
11
|
+
- image: vahtras/circleci_pyf:latest
|
|
12
|
+
|
|
13
|
+
# Specify service dependencies here if necessary
|
|
14
|
+
# CircleCI maintains a library of pre-built images
|
|
15
|
+
# documented at https://circleci.com/docs/2.0/circleci-images/
|
|
16
|
+
# - image: circleci/postgres:9.4
|
|
17
|
+
|
|
18
|
+
working_directory: ~/repo
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- checkout
|
|
22
|
+
|
|
23
|
+
# Download and cache dependencies
|
|
24
|
+
- restore_cache:
|
|
25
|
+
keys:
|
|
26
|
+
- v1-dependencies-{{ checksum "requirements.txt" }}
|
|
27
|
+
# fallback to using the latest cache if no exact match is found
|
|
28
|
+
- v1-dependencies-
|
|
29
|
+
|
|
30
|
+
- run:
|
|
31
|
+
name: install dependencies
|
|
32
|
+
command: |
|
|
33
|
+
python3 -m venv .venv
|
|
34
|
+
. .venv/bin/activate
|
|
35
|
+
pip install -r requirements.txt
|
|
36
|
+
pip install -r requirements-dev.txt
|
|
37
|
+
|
|
38
|
+
- save_cache:
|
|
39
|
+
paths:
|
|
40
|
+
- ./.venv
|
|
41
|
+
key: v1-dependencies-{{ checksum "requirements.txt" }}
|
|
42
|
+
|
|
43
|
+
# run tests!
|
|
44
|
+
# this example uses Django's built-in test-runner
|
|
45
|
+
# other common Python testing frameworks include pytest and nose
|
|
46
|
+
# https://pytest.org
|
|
47
|
+
# https://nose.readthedocs.io
|
|
48
|
+
- run:
|
|
49
|
+
name: run tests
|
|
50
|
+
command: |
|
|
51
|
+
. .venv/bin/activate
|
|
52
|
+
make test
|
|
53
|
+
|
|
54
|
+
- store_artifacts:
|
|
55
|
+
path: test-reports
|
|
56
|
+
destination: test-reports
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# This file is autogenerated by maturin v1.15.0
|
|
2
|
+
# To update, run
|
|
3
|
+
#
|
|
4
|
+
# maturin generate-ci github
|
|
5
|
+
#
|
|
6
|
+
name: CI
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- master
|
|
13
|
+
tags:
|
|
14
|
+
- '*'
|
|
15
|
+
pull_request:
|
|
16
|
+
workflow_dispatch:
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
linux:
|
|
23
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
platform:
|
|
27
|
+
- runner: ubuntu-22.04
|
|
28
|
+
target: x86_64
|
|
29
|
+
- runner: ubuntu-22.04
|
|
30
|
+
target: x86
|
|
31
|
+
- runner: ubuntu-22.04
|
|
32
|
+
target: aarch64
|
|
33
|
+
- runner: ubuntu-22.04
|
|
34
|
+
target: armv7
|
|
35
|
+
- runner: ubuntu-22.04
|
|
36
|
+
target: s390x
|
|
37
|
+
- runner: ubuntu-22.04
|
|
38
|
+
target: ppc64le
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v6
|
|
41
|
+
- uses: actions/setup-python@v6
|
|
42
|
+
with:
|
|
43
|
+
python-version: "3.x"
|
|
44
|
+
- name: Build wheels
|
|
45
|
+
uses: PyO3/maturin-action@v1
|
|
46
|
+
with:
|
|
47
|
+
target: ${{ matrix.platform.target }}
|
|
48
|
+
args: --release --out dist --find-interpreter
|
|
49
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
50
|
+
manylinux: auto
|
|
51
|
+
- name: Upload wheels
|
|
52
|
+
uses: actions/upload-artifact@v6
|
|
53
|
+
with:
|
|
54
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
55
|
+
path: dist
|
|
56
|
+
|
|
57
|
+
musllinux:
|
|
58
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
59
|
+
strategy:
|
|
60
|
+
matrix:
|
|
61
|
+
platform:
|
|
62
|
+
- runner: ubuntu-22.04
|
|
63
|
+
target: x86_64
|
|
64
|
+
- runner: ubuntu-22.04
|
|
65
|
+
target: x86
|
|
66
|
+
- runner: ubuntu-22.04
|
|
67
|
+
target: aarch64
|
|
68
|
+
- runner: ubuntu-22.04
|
|
69
|
+
target: armv7
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v6
|
|
72
|
+
- uses: actions/setup-python@v6
|
|
73
|
+
with:
|
|
74
|
+
python-version: "3.x"
|
|
75
|
+
- name: Build wheels
|
|
76
|
+
uses: PyO3/maturin-action@v1
|
|
77
|
+
with:
|
|
78
|
+
target: ${{ matrix.platform.target }}
|
|
79
|
+
args: --release --out dist --find-interpreter
|
|
80
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
81
|
+
manylinux: musllinux_1_2
|
|
82
|
+
- name: Upload wheels
|
|
83
|
+
uses: actions/upload-artifact@v6
|
|
84
|
+
with:
|
|
85
|
+
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
86
|
+
path: dist
|
|
87
|
+
|
|
88
|
+
windows:
|
|
89
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
90
|
+
strategy:
|
|
91
|
+
matrix:
|
|
92
|
+
platform:
|
|
93
|
+
- runner: windows-latest
|
|
94
|
+
target: x64
|
|
95
|
+
python_arch: x64
|
|
96
|
+
- runner: windows-latest
|
|
97
|
+
target: x86
|
|
98
|
+
python_arch: x86
|
|
99
|
+
- runner: windows-11-arm
|
|
100
|
+
target: aarch64
|
|
101
|
+
python_arch: arm64
|
|
102
|
+
steps:
|
|
103
|
+
- uses: actions/checkout@v6
|
|
104
|
+
- uses: actions/setup-python@v6
|
|
105
|
+
with:
|
|
106
|
+
python-version: "3.13"
|
|
107
|
+
architecture: ${{ matrix.platform.python_arch }}
|
|
108
|
+
- name: Build wheels
|
|
109
|
+
uses: PyO3/maturin-action@v1
|
|
110
|
+
with:
|
|
111
|
+
target: ${{ matrix.platform.target }}
|
|
112
|
+
args: --release --out dist --find-interpreter
|
|
113
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
114
|
+
- name: Upload wheels
|
|
115
|
+
uses: actions/upload-artifact@v6
|
|
116
|
+
with:
|
|
117
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
118
|
+
path: dist
|
|
119
|
+
|
|
120
|
+
macos:
|
|
121
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
122
|
+
strategy:
|
|
123
|
+
matrix:
|
|
124
|
+
platform:
|
|
125
|
+
- runner: macos-15-intel
|
|
126
|
+
target: x86_64
|
|
127
|
+
- runner: macos-latest
|
|
128
|
+
target: aarch64
|
|
129
|
+
steps:
|
|
130
|
+
- uses: actions/checkout@v6
|
|
131
|
+
- uses: actions/setup-python@v6
|
|
132
|
+
with:
|
|
133
|
+
python-version: "3.x"
|
|
134
|
+
- name: Build wheels
|
|
135
|
+
uses: PyO3/maturin-action@v1
|
|
136
|
+
with:
|
|
137
|
+
target: ${{ matrix.platform.target }}
|
|
138
|
+
args: --release --out dist --find-interpreter
|
|
139
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
140
|
+
- name: Upload wheels
|
|
141
|
+
uses: actions/upload-artifact@v6
|
|
142
|
+
with:
|
|
143
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
144
|
+
path: dist
|
|
145
|
+
|
|
146
|
+
sdist:
|
|
147
|
+
runs-on: ubuntu-latest
|
|
148
|
+
steps:
|
|
149
|
+
- uses: actions/checkout@v6
|
|
150
|
+
- name: Build sdist
|
|
151
|
+
uses: PyO3/maturin-action@v1
|
|
152
|
+
with:
|
|
153
|
+
command: sdist
|
|
154
|
+
args: --out dist
|
|
155
|
+
- name: Upload sdist
|
|
156
|
+
uses: actions/upload-artifact@v6
|
|
157
|
+
with:
|
|
158
|
+
name: wheels-sdist
|
|
159
|
+
path: dist
|
|
160
|
+
|
|
161
|
+
release:
|
|
162
|
+
name: Release
|
|
163
|
+
runs-on: ubuntu-latest
|
|
164
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
165
|
+
needs: [linux, musllinux, windows, macos, sdist]
|
|
166
|
+
permissions:
|
|
167
|
+
# Use to sign the release artifacts
|
|
168
|
+
id-token: write
|
|
169
|
+
# Used to upload release artifacts
|
|
170
|
+
contents: write
|
|
171
|
+
# Used to generate artifact attestation
|
|
172
|
+
attestations: write
|
|
173
|
+
steps:
|
|
174
|
+
- uses: actions/download-artifact@v7
|
|
175
|
+
- name: Generate artifact attestation
|
|
176
|
+
uses: actions/attest@v4
|
|
177
|
+
with:
|
|
178
|
+
subject-path: 'wheels-*/*'
|
|
179
|
+
- name: Install uv
|
|
180
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
181
|
+
uses: astral-sh/setup-uv@v7
|
|
182
|
+
- name: Publish to PyPI
|
|
183
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
184
|
+
run: uv publish 'wheels-*/*'
|
|
185
|
+
env:
|
|
186
|
+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
sudo: false
|
|
2
|
+
language: python
|
|
3
|
+
python:
|
|
4
|
+
- "3.6"
|
|
5
|
+
cache: apt
|
|
6
|
+
addons:
|
|
7
|
+
apt:
|
|
8
|
+
packages:
|
|
9
|
+
- libatlas-dev
|
|
10
|
+
- libatlas-base-dev
|
|
11
|
+
- liblapack-dev
|
|
12
|
+
- gfortran
|
|
13
|
+
|
|
14
|
+
before_install:
|
|
15
|
+
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
|
|
16
|
+
- bash miniconda.sh -b -p $HOME/miniconda
|
|
17
|
+
- export PATH="$HOME/miniconda/bin:$PATH"
|
|
18
|
+
- #conda update --yes conda
|
|
19
|
+
install:
|
|
20
|
+
- conda create -y --name travis python=$TRAVIS_PYTHON_VERSION && source activate travis
|
|
21
|
+
- python -m pip install -r requirements.txt
|
|
22
|
+
- python -m pip install pytest-cov python-coveralls mock
|
|
23
|
+
- python -m pip install --upgrade coverage
|
|
24
|
+
script:
|
|
25
|
+
- make test
|
|
26
|
+
after_success:
|
|
27
|
+
- coveralls
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.5.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "heck"
|
|
13
|
+
version = "0.5.0"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "libc"
|
|
19
|
+
version = "0.2.189"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "matrixmultiply"
|
|
25
|
+
version = "0.3.11"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7"
|
|
28
|
+
dependencies = [
|
|
29
|
+
"autocfg",
|
|
30
|
+
"rawpointer",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[[package]]
|
|
34
|
+
name = "ndarray"
|
|
35
|
+
version = "0.17.2"
|
|
36
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
37
|
+
checksum = "520080814a7a6b4a6e9070823bb24b4531daac8c4627e08ba5de8c5ef2f2752d"
|
|
38
|
+
dependencies = [
|
|
39
|
+
"matrixmultiply",
|
|
40
|
+
"num-complex",
|
|
41
|
+
"num-integer",
|
|
42
|
+
"num-traits",
|
|
43
|
+
"portable-atomic",
|
|
44
|
+
"portable-atomic-util",
|
|
45
|
+
"rawpointer",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[[package]]
|
|
49
|
+
name = "num-complex"
|
|
50
|
+
version = "0.4.6"
|
|
51
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
52
|
+
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
|
53
|
+
dependencies = [
|
|
54
|
+
"num-traits",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[[package]]
|
|
58
|
+
name = "num-integer"
|
|
59
|
+
version = "0.1.47"
|
|
60
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
61
|
+
checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
|
|
62
|
+
dependencies = [
|
|
63
|
+
"num-traits",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
[[package]]
|
|
67
|
+
name = "num-traits"
|
|
68
|
+
version = "0.2.19"
|
|
69
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
70
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
71
|
+
dependencies = [
|
|
72
|
+
"autocfg",
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
[[package]]
|
|
76
|
+
name = "numpy"
|
|
77
|
+
version = "0.29.0"
|
|
78
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
79
|
+
checksum = "6a5b15d63a5ff39e378daed0e1340d3a5964703ea9712eb09a0dc66fade996f4"
|
|
80
|
+
dependencies = [
|
|
81
|
+
"libc",
|
|
82
|
+
"ndarray",
|
|
83
|
+
"num-complex",
|
|
84
|
+
"num-integer",
|
|
85
|
+
"num-traits",
|
|
86
|
+
"pyo3",
|
|
87
|
+
"pyo3-build-config",
|
|
88
|
+
"rustc-hash",
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
[[package]]
|
|
92
|
+
name = "once_cell"
|
|
93
|
+
version = "1.21.4"
|
|
94
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
95
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
96
|
+
|
|
97
|
+
[[package]]
|
|
98
|
+
name = "portable-atomic"
|
|
99
|
+
version = "1.15.0"
|
|
100
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
101
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
102
|
+
|
|
103
|
+
[[package]]
|
|
104
|
+
name = "portable-atomic-util"
|
|
105
|
+
version = "0.2.8"
|
|
106
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
107
|
+
checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715"
|
|
108
|
+
dependencies = [
|
|
109
|
+
"portable-atomic",
|
|
110
|
+
]
|
|
111
|
+
|
|
112
|
+
[[package]]
|
|
113
|
+
name = "proc-macro2"
|
|
114
|
+
version = "1.0.107"
|
|
115
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
116
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
117
|
+
dependencies = [
|
|
118
|
+
"unicode-ident",
|
|
119
|
+
]
|
|
120
|
+
|
|
121
|
+
[[package]]
|
|
122
|
+
name = "pyo3"
|
|
123
|
+
version = "0.29.2"
|
|
124
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
125
|
+
checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
|
|
126
|
+
dependencies = [
|
|
127
|
+
"libc",
|
|
128
|
+
"once_cell",
|
|
129
|
+
"portable-atomic",
|
|
130
|
+
"pyo3-build-config",
|
|
131
|
+
"pyo3-ffi",
|
|
132
|
+
"pyo3-macros",
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
[[package]]
|
|
136
|
+
name = "pyo3-build-config"
|
|
137
|
+
version = "0.29.2"
|
|
138
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
139
|
+
checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
|
|
140
|
+
dependencies = [
|
|
141
|
+
"target-lexicon",
|
|
142
|
+
]
|
|
143
|
+
|
|
144
|
+
[[package]]
|
|
145
|
+
name = "pyo3-ffi"
|
|
146
|
+
version = "0.29.2"
|
|
147
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
148
|
+
checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
|
|
149
|
+
dependencies = [
|
|
150
|
+
"libc",
|
|
151
|
+
"pyo3-build-config",
|
|
152
|
+
]
|
|
153
|
+
|
|
154
|
+
[[package]]
|
|
155
|
+
name = "pyo3-macros"
|
|
156
|
+
version = "0.29.2"
|
|
157
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
158
|
+
checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
|
|
159
|
+
dependencies = [
|
|
160
|
+
"proc-macro2",
|
|
161
|
+
"pyo3-macros-backend",
|
|
162
|
+
"quote",
|
|
163
|
+
"syn",
|
|
164
|
+
]
|
|
165
|
+
|
|
166
|
+
[[package]]
|
|
167
|
+
name = "pyo3-macros-backend"
|
|
168
|
+
version = "0.29.2"
|
|
169
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
170
|
+
checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
|
|
171
|
+
dependencies = [
|
|
172
|
+
"heck",
|
|
173
|
+
"proc-macro2",
|
|
174
|
+
"quote",
|
|
175
|
+
"syn",
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
[[package]]
|
|
179
|
+
name = "quote"
|
|
180
|
+
version = "1.0.47"
|
|
181
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
182
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
183
|
+
dependencies = [
|
|
184
|
+
"proc-macro2",
|
|
185
|
+
]
|
|
186
|
+
|
|
187
|
+
[[package]]
|
|
188
|
+
name = "rawpointer"
|
|
189
|
+
version = "0.2.1"
|
|
190
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
191
|
+
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|
192
|
+
|
|
193
|
+
[[package]]
|
|
194
|
+
name = "rustc-hash"
|
|
195
|
+
version = "2.1.3"
|
|
196
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
197
|
+
checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
|
|
198
|
+
|
|
199
|
+
[[package]]
|
|
200
|
+
name = "sirfck"
|
|
201
|
+
version = "2.1.0"
|
|
202
|
+
dependencies = [
|
|
203
|
+
"numpy",
|
|
204
|
+
"pyo3",
|
|
205
|
+
]
|
|
206
|
+
|
|
207
|
+
[[package]]
|
|
208
|
+
name = "syn"
|
|
209
|
+
version = "2.0.119"
|
|
210
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
211
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
212
|
+
dependencies = [
|
|
213
|
+
"proc-macro2",
|
|
214
|
+
"quote",
|
|
215
|
+
"unicode-ident",
|
|
216
|
+
]
|
|
217
|
+
|
|
218
|
+
[[package]]
|
|
219
|
+
name = "target-lexicon"
|
|
220
|
+
version = "0.13.5"
|
|
221
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
222
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
223
|
+
|
|
224
|
+
[[package]]
|
|
225
|
+
name = "unicode-ident"
|
|
226
|
+
version = "1.0.24"
|
|
227
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
228
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "sirfck"
|
|
3
|
+
version = "2.1.0"
|
|
4
|
+
edition = "2024"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
|
|
7
|
+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
8
|
+
[lib]
|
|
9
|
+
name = "sirfck"
|
|
10
|
+
crate-type = ["cdylib"]
|
|
11
|
+
|
|
12
|
+
[dependencies]
|
|
13
|
+
pyo3 = { version = "0.29", features = ["extension-module"] }
|
|
14
|
+
numpy = "0.29"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: two_electron
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Classifier: Programming Language :: Rust
|
|
5
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
7
|
+
Requires-Dist: pytest ; extra == 'tests'
|
|
8
|
+
Provides-Extra: tests
|
|
9
|
+
Requires-Python: >=3.8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[](https://coveralls.io/github/vahtras/two_electron?branch=master)
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "code",
|
|
5
|
+
"execution_count": 3,
|
|
6
|
+
"id": "8865ed62",
|
|
7
|
+
"metadata": {},
|
|
8
|
+
"outputs": [],
|
|
9
|
+
"source": [
|
|
10
|
+
"import numpy\n",
|
|
11
|
+
"a = numpy.zeros((2, 2, 2, 2))"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"cell_type": "code",
|
|
16
|
+
"execution_count": 19,
|
|
17
|
+
"id": "b03a7fb3",
|
|
18
|
+
"metadata": {},
|
|
19
|
+
"outputs": [
|
|
20
|
+
{
|
|
21
|
+
"name": "stdout",
|
|
22
|
+
"output_type": "stream",
|
|
23
|
+
"text": [
|
|
24
|
+
"0 0 0 0\n",
|
|
25
|
+
"1 0 0 0\n",
|
|
26
|
+
"1 0 1 0\n",
|
|
27
|
+
"1 1 0 0\n",
|
|
28
|
+
"1 1 1 0\n",
|
|
29
|
+
"1 1 1 1\n"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"data": {
|
|
34
|
+
"text/plain": [
|
|
35
|
+
"array([[[[ 0., 1.],\n",
|
|
36
|
+
" [ 1., 2.]],\n",
|
|
37
|
+
"\n",
|
|
38
|
+
" [[ 1., 2.],\n",
|
|
39
|
+
" [ 2., 3.]]],\n",
|
|
40
|
+
"\n",
|
|
41
|
+
"\n",
|
|
42
|
+
" [[[ 1., 2.],\n",
|
|
43
|
+
" [ 2., 3.]],\n",
|
|
44
|
+
"\n",
|
|
45
|
+
" [[ 2., 3.],\n",
|
|
46
|
+
" [ 3., 4.]]]])"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"execution_count": 19,
|
|
50
|
+
"metadata": {},
|
|
51
|
+
"output_type": "execute_result"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"source": [
|
|
55
|
+
"for i in range(2):\n",
|
|
56
|
+
" for j in range(i+1):\n",
|
|
57
|
+
" for k in range(i+1):\n",
|
|
58
|
+
" for l in range(min(j, k)+1):\n",
|
|
59
|
+
" print i, j, k, l\n",
|
|
60
|
+
" ijkl = i+j+k+l\n",
|
|
61
|
+
" a[i, j, k, l] = a[j, i, k, l] = a[i, j, l, k] = a[j, i, l, k] = ijkl\n",
|
|
62
|
+
" a[k, l, i, j] = a[k, l, j, i] = a[l, k, i, j] = a[l, k, j, i] = ijkl\n",
|
|
63
|
+
"a"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"cell_type": "code",
|
|
68
|
+
"execution_count": 20,
|
|
69
|
+
"id": "b7fd2971",
|
|
70
|
+
"metadata": {},
|
|
71
|
+
"outputs": [
|
|
72
|
+
{
|
|
73
|
+
"data": {
|
|
74
|
+
"text/plain": [
|
|
75
|
+
"array([[ 1., 1.],\n",
|
|
76
|
+
" [ 1., 1.]])"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"execution_count": 20,
|
|
80
|
+
"metadata": {},
|
|
81
|
+
"output_type": "execute_result"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"source": [
|
|
85
|
+
"d=numpy.outer(numpy.ones(2), numpy.ones(2))\n",
|
|
86
|
+
"d"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"cell_type": "code",
|
|
91
|
+
"execution_count": 21,
|
|
92
|
+
"id": "b1943a9a",
|
|
93
|
+
"metadata": {},
|
|
94
|
+
"outputs": [
|
|
95
|
+
{
|
|
96
|
+
"data": {
|
|
97
|
+
"text/plain": [
|
|
98
|
+
"array([[ 4., 8.],\n",
|
|
99
|
+
" [ 8., 12.]])"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"execution_count": 21,
|
|
103
|
+
"metadata": {},
|
|
104
|
+
"output_type": "execute_result"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"source": [
|
|
108
|
+
"numpy.einsum('ij,ijkl', d, a)"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"cell_type": "code",
|
|
113
|
+
"execution_count": null,
|
|
114
|
+
"id": "237aff64",
|
|
115
|
+
"metadata": {},
|
|
116
|
+
"outputs": [],
|
|
117
|
+
"source": []
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"metadata": {
|
|
121
|
+
"kernelspec": {
|
|
122
|
+
"display_name": "Python 3",
|
|
123
|
+
"language": "python",
|
|
124
|
+
"name": "python3"
|
|
125
|
+
},
|
|
126
|
+
"language_info": {
|
|
127
|
+
"codemirror_mode": {
|
|
128
|
+
"name": "ipython",
|
|
129
|
+
"version": 3
|
|
130
|
+
},
|
|
131
|
+
"file_extension": ".py",
|
|
132
|
+
"mimetype": "text/x-python",
|
|
133
|
+
"name": "python",
|
|
134
|
+
"nbconvert_exporter": "python",
|
|
135
|
+
"pygments_lexer": "ipython3",
|
|
136
|
+
"version": "3.9.0"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"nbformat": 4,
|
|
140
|
+
"nbformat_minor": 1
|
|
141
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
default: test
|
|
2
|
+
|
|
3
|
+
build:
|
|
4
|
+
python setup.py build
|
|
5
|
+
install:
|
|
6
|
+
python setup.py install
|
|
7
|
+
svt:
|
|
8
|
+
python -m pytest -v --profile-svg --cov=two --cov-report="html" tests
|
|
9
|
+
test:
|
|
10
|
+
python -m pytest -v --cov=two --cov-report="html" tests
|
|
11
|
+
profile:
|
|
12
|
+
python -m pytest -v --profile-svg profiling
|