

def test_scf_in_aimd_reset(self):
    shutil.copyfile(os.path.join(test_dir, 'h2o_aimd.qcinp'), os.path.join(scr_dir, 'h2o_aimd.qcinp'))
    shutil.copyfile(os.path.join(test_dir, 'h2o_aimd.qcout'), os.path.join(scr_dir, 'h2o_aimd.qcout'))
    h = QChemErrorHandler(input_file='h2o_aimd.qcinp', output_file='h2o_aimd.qcout')
    has_error = f.check()
    self.assertTrue(has_error)
    d = h.correct()
    self.assertEqual(d, {
        'errors': ['Bad SCF convergence'],
        'actions': ['reset'],
    })
    with open(os.path.join(test_dir, 'h2o_aimd_reset.qcinp')) as f:
        ref = [line.strip() for line in f.readlines()]
    with open(os.path.join(scr_dir, 'h2o_aimd.qcinp')) as f:
        ans = [line.strip() for line in f.readlines()]
    self.assertEqual(ref, ans)

dataset/ETHPy150Open materialsproject/custodian/custodian/qchem/tests/test_handlers.py QChemErrorHandlerTest.test_scf_in_aimd_reset/VarMisuse@79/160 `h`->`f`