Skip to content

Add basis_r_power to orca and pyscf converters #68

Add basis_r_power to orca and pyscf converters

Add basis_r_power to orca and pyscf converters #68

Workflow file for this run

name: TOOLS CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test_tools:
runs-on: ubuntu-latest
name: x86 Ubuntu latest
steps:
- uses: actions/checkout@v2
- name: create a virtual environment
run: |
python3 -m venv trexio_tools
source trexio_tools/bin/activate
- name: install dependencies
run: pip install -r requirements.txt
- name: install trexio_tools
run: pip install .
- name: check installation
run: trexio --help
- name: run tests
run: |
# benchmark the converters from external codes
echo "== Starting conversion =="
trexio convert-from -t gaussian -i data/chbrclf.log -b hdf5 trexio_gaussi.h5
trexio convert-from -t gamess -i data/GAMESS_CAS.log -b hdf5 trexio_gamess.h5
trexio convert-from -t pyscf -i data/water.chk -b hdf5 trexio_pyscf_h2o_sph.h5
trexio convert-from -t pyscf -i data/diamond_single_k.chk -b hdf5 trexio_pyscf_1k.h5
trexio convert-from -t pyscf -i data/diamond_k_grid.chk -b hdf5 trexio_pyscf_Nk.h5
trexio convert-from -t orca -i data/h2o.json -b hdf5 trexio_orca_h2o_sph.h5
trexio convert-to -t cartesian -o trexio_orca_h2o.h5 trexio_orca_h2o_sph.h5
trexio convert-to -t cartesian -o trexio_pyscf_h2o.h5 trexio_pyscf_h2o_sph.h5
echo "== Done conversion =="
echo "=== Check TREXIO file converted from GAMESS ==="
trexio check-mos -n 50 trexio_gamess.h5 > mos-res
grep "Norm of the error" < mos-res | grep -Eo "([0-9]+\.[0-9]*|\.?[0-9]+)([eE][+-][0-9]+)?" > error-res
python -c 'with open("error-res") as f: error = f.readline().strip(); assert float(error) < 1.0'
echo "=== Check TREXIO file converted from PySCF ==="
trexio check-mos -n 50 trexio_pyscf_h2o.h5 > mos-res
grep "Norm of the error" < mos-res | grep -Eo "([0-9]+\.[0-9]*|\.?[0-9]+)([eE][+-][0-9]+)?" > error-res
python -c 'with open("error-res") as f: error = f.readline().strip(); assert float(error) < 1.0'
echo "=== Check TREXIO file converted from ORCA ==="
trexio check-mos -n 50 trexio_orca_h2o.h5 > mos-res
grep "Norm of the error" < mos-res | grep -Eo "([0-9]+\.[0-9]*|\.?[0-9]+)([eE][+-][0-9]+)?" > error-res
python -c 'with open("error-res") as f: error = f.readline().strip(); assert float(error) < 1.0'
# benchmark helper converters
trexio convert-to -t molden -o trexio_molden.h5 trexio_gamess.h5