Skip to content

Commit

Permalink
More rigorous check-mos settings
Browse files Browse the repository at this point in the history
  • Loading branch information
q-posev authored Nov 27, 2024
1 parent 7239fa6 commit fe74577
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,25 @@ jobs:
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
trexio check-mos -n 100 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'
python -c 'with open("error-res") as f: error = f.readline().strip(); assert float(error) < 0.01'
echo "=== Check TREXIO file converted from PySCF ==="
trexio check-mos -n 50 trexio_pyscf_h2o.h5 > mos-res
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
python -c 'with open("error-res") as f: error = f.readline().strip(); assert float(error) < 1.0'
python -c 'with open("error-res") as f: error = f.readline().strip(); assert float(error) < 0.01'
echo "=== Check TREXIO file converted from ORCA ==="
trexio check-mos -n 50 trexio_orca_h2o.h5 > mos-res
trexio check-mos -n 100 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'
python -c 'with open("error-res") as f: error = f.readline().strip(); assert float(error) < 0.01'
# benchmark helper converters
trexio convert-to -t molden -o trexio_molden.h5 trexio_gamess.h5
echo "=== Check normalization in spherical file ==="
trexio check-mos -n 100 data/methane_sphe.hdf5 > mos-res
cat 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) < 0.01'
echo "=== Check normalization after transformation into cartesian file ==="
trexio convert-to -t cartesian data/methane_sphe.hdf5 -o methane_cart.hdf5
trexio check-mos -n 100 methane_cart.hdf5 > mos-res
cat 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) < 0.01'

0 comments on commit fe74577

Please sign in to comment.