#!/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 = 'SYMADD: Detection of molecular symmetry',
      to_string='References for the basis sets',
      rel_tolerance   = 1.0e-8)
f.add(from_string = 'Electronic energy',
      num_lines   = 8,
      rel_tolerance   = 1.0e-9)
f.add(from_string = '                                   Eigenvalues',
      to_re       = 'Occupation in fermion',
      rel_tolerance   = 1.0e-7)

test.run(['lda.inp'], ['H2O.mol', 'CH4.mol', 'SF6.mol', 'transCHFCHF.mol'], f)

sys.exit(test.return_code)
