def do_freeh(job): """ Does freeh analysis on job if requested """ if job.freqopt == 'numforce': newdir = os.path.join(job.indir, 'numforce') else: newdir = job.indir os.chdir(newdir) freeh = Freeh() logging.debug('doing freeh') try: freeh.run_freeh() except Exception as e: logging.warn('freeh failed with exception {}'.format(e)) else: logging.debug('freeh completed') job.params, job.data = proc_freeh() os.chdir(TOPDIR) if job.params: write_freeh(job) logging.debug('freeh written')
def test_freeh_proc(self): """Test the freehfile processing""" resultparams = { "pstart": "0.1000E+00", "pend": "0.1000E+00", "nump": "1", "tstart": "298.1", "tend": "298.1", "numt": "1", } resultdata = { "zpe": "481.3", "t": ["298.15"], "p": ["0.1000000"], "qtrans": ["19.81"], "qrot": ["15.66"], "qvib": ["15.89"], "pot": ["353.99"], "eng": ["530.06"], "entr": ["0.59886"], "cv": ["0.2849985"], "cp": ["0.2933128"], "enth": ["532.54"], } funcparams, funcdata = proc_freeh("testfreeh") self.assertEqual(funcparams, resultparams) self.assertEqual(funcdata, resultdata)