#!/usr/bin/env python

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dirac import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()
f.add(string      = 'Electronic energy',
      rel_tolerance   = 1.0e-7)
f.add(string      = 'number of electrons from numerical integration',
      rel_tolerance   = 1.0e-7)

test.run(['blyp_cartesian.inp'], ['CH4_cartesian.mol', 'FH_cartesian.mol', 'H2O_cartesian.mol', 'SF6_cartesian.mol'], f)
test.run(['blyp_spherical.inp'], ['CH4_spherical.mol', 'FH_spherical.mol', 'H2O_spherical.mol', 'SF6_spherical.mol'], f)

sys.exit(test.return_code)
