Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multistate #53

Merged
merged 13 commits into from
Dec 19, 2024
27 changes: 18 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,33 @@ jobs:
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 crystal -i data/crystal23_mgo_lda.out -m 1 -b hdf5 crystal.hdf5
trexio convert-from -t orca -i data/h2o.json -b hdf5 trexio_orca_h2o_sph.h5
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 gamess -i data/multistate_gamess.log -b hdf5 multistate_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 crystal -i data/crystal23_mgo_lda.out -m 1 -b hdf5 crystal.hdf5
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 =="
# dummy checks for overwriting
trexio convert-from -t gaussian -i data/chbrclf.log -b hdf5 -w False trexio_gaussi.h5 || echo "Failure as it should"
trexio convert-from -t gaussian -i data/chbrclf.log -b hdf5 -w True trexio_gaussi.h5 && echo "Success as it should"
trexio convert-from -t gaussian -i data/chbrclf.log -b hdf5 trexio_gaussi.h5 || echo "Failure as it should"
trexio convert-from -t gaussian -i data/chbrclf.log -b hdf5 -w trexio_gaussi.h5 && echo "Success as it should"
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
cat error-res
python -c 'with open("error-res") as f: error = f.readline().strip(); assert float(error) < 0.12'
echo "=== Check TREXIO file converted from GAMESS multistate calculation (State 1 of 2) ==="
trexio check-mos -n 50 multistate_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 GAMESS multistate calculation (State 2 of 2) ==="
trexio check-mos -n 50 multistate_gamess_state_1.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 100 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
Expand Down
Loading
Loading