#!/usr/bin/env python

import os
import sys

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

set_exacorr_environment()

test = TestRun(__file__, sys.argv)

f = Filter()
f.add(from_string = 'Final L1amp',
      num_lines   = 2,
      rel_tolerance   = 1.0e-6)

f.add(from_string = 'Individual (non-zero) components',
      to_string   = 'Total contribution to principal components',
      rel_tolerance   = 1.0e-6)

test.run(['ccsd_x2c.inp'], ['H2O_nosym.mol'], f)
#The next run works (LV, Feb 12 2021) but takes too long to be useful
#test.run(['ccsd_energy_large_cvalue_exacorr.inp'], ['h2o.xyz'], f, args=' --incmo')

sys.exit(test.return_code)
