mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-01-05 11:00:30 +01:00
Update the wheels scripts and add benzene data
This commit is contained in:
parent
2876d73885
commit
53a408953d
4
.github/workflows/build-wheels.yml
vendored
4
.github/workflows/build-wheels.yml
vendored
@ -152,7 +152,7 @@ jobs:
|
|||||||
working-directory: python
|
working-directory: python
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: pip install --upgrade pip setuptools build delocate
|
run: pip install --upgrade pip setuptools build delocate pytest
|
||||||
|
|
||||||
- name: Build wheel for a given version of CPython
|
- name: Build wheel for a given version of CPython
|
||||||
run: |
|
run: |
|
||||||
@ -169,7 +169,7 @@ jobs:
|
|||||||
working-directory: python
|
working-directory: python
|
||||||
|
|
||||||
- name: Test the wheel
|
- name: Test the wheel
|
||||||
run: python test_api.py
|
run: pytest -v test_api.py
|
||||||
working-directory: python/test
|
working-directory: python/test
|
||||||
|
|
||||||
- name: Upload produced wheels as artifacts
|
- name: Upload produced wheels as artifacts
|
||||||
|
@ -82,11 +82,14 @@ function build_wheel_for_py()
|
|||||||
# install the produced manylinux wheel in the virtual environment
|
# install the produced manylinux wheel in the virtual environment
|
||||||
python3 -m pip install wheelhouse/trexio-${TR_VERSION}-${CPYTHON}-manylinux*.whl
|
python3 -m pip install wheelhouse/trexio-${TR_VERSION}-${CPYTHON}-manylinux*.whl
|
||||||
|
|
||||||
|
# install pytest for testing
|
||||||
|
pip install pytest
|
||||||
# run test script
|
# run test script
|
||||||
cd test && python3 test_api.py && cd ..
|
pytest -v test/test_api.py
|
||||||
|
|
||||||
# cleaning
|
# cleaning
|
||||||
rm -rf -- dist/ build/ trexio.egg-info/
|
rm -rf -- dist/ build/ trexio.egg-info/
|
||||||
|
rm -- test_file_py.h5 unsafe_test_file_py.h5
|
||||||
|
|
||||||
# deactivate the current environment
|
# deactivate the current environment
|
||||||
deactivate
|
deactivate
|
||||||
|
46
python/test/benzene_data.py
Normal file
46
python/test/benzene_data.py
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
# for the nucleus group
|
||||||
|
nucleus_num = 12
|
||||||
|
|
||||||
|
point_group = 'D6h'
|
||||||
|
|
||||||
|
nucleus_label = ['C', 'C', 'C', 'C', 'C', 'C', 'H', 'H', 'H', 'H', 'H', 'H']
|
||||||
|
|
||||||
|
nucleus_charge = [6., 6., 6., 6., 6., 6., 1., 1., 1., 1., 1., 1.]
|
||||||
|
|
||||||
|
nucleus_coord = [
|
||||||
|
[ 0.00000000 , 1.39250319 , 0.00000000 ],
|
||||||
|
[-1.20594314 , 0.69625160 , 0.00000000 ],
|
||||||
|
[-1.20594314 , -0.69625160 , 0.00000000 ],
|
||||||
|
[ 0.00000000 , -1.39250319 , 0.00000000 ],
|
||||||
|
[ 1.20594314 , -0.69625160 , 0.00000000 ],
|
||||||
|
[ 1.20594314 , 0.69625160 , 0.00000000 ],
|
||||||
|
[-2.14171677 , 1.23652075 , 0.00000000 ],
|
||||||
|
[-2.14171677 , -1.23652075 , 0.00000000 ],
|
||||||
|
[ 0.00000000 , -2.47304151 , 0.00000000 ],
|
||||||
|
[ 2.14171677 , -1.23652075 , 0.00000000 ],
|
||||||
|
[ 2.14171677 , 1.23652075 , 0.00000000 ],
|
||||||
|
[ 0.00000000 , 2.47304151 , 0.00000000 ],
|
||||||
|
]
|
||||||
|
|
||||||
|
# for the basis_nucleus_index
|
||||||
|
basis_shell_num = 24
|
||||||
|
nucleus_index = [i for i in range(basis_shell_num)]
|
||||||
|
|
||||||
|
# for sparse AO_INT_2E
|
||||||
|
ao_num = 600
|
||||||
|
# prepare the sparse data representation
|
||||||
|
num_integrals = 100
|
||||||
|
indices = [i for i in range(num_integrals*4)]
|
||||||
|
values = [(3.14 + float(i)) for i in range(num_integrals)]
|
||||||
|
|
||||||
|
# for determinants
|
||||||
|
mo_num = 150
|
||||||
|
int64_num = int((mo_num - 1)/64 + 1)
|
||||||
|
# prepate the CI data
|
||||||
|
det_num = 2000
|
||||||
|
dets = [i for i in range(det_num * int64_num * 2)]
|
||||||
|
coeffs = [float(i/det_num) for i in range(det_num)]
|
||||||
|
coeffs_s2 = [float(i*2/det_num) for i in range(det_num)]
|
||||||
|
|
||||||
|
det_test = [1, 2, 3, 2, 1, 3]
|
Loading…
Reference in New Issue
Block a user