#!/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(from_string = 'TOTAL ENERGY',
      num_lines   = 12,
      rel_tolerance   = 1.0e-10)
f.add(from_string = '* Dipole moment',
      num_lines   = 9,
      rel_tolerance   = 1.0e-6)

test.run(['x2c.scf.inp'], ['HeNe2.lsym1.mol', 'He2Ne2.lsym1.mol', 'HeNe3.lsym.mol'], f)
test.run(['x2c.molecule.scf.inp'], ['HeNe2.xyz'], f)

sys.exit(test.return_code)
