Skip to content

Commit 2fdcc63

Browse files
jwallenrwest
authored andcommitted
Updated GaussianLog unit tests to use V=0 energies.
The unit tests had not been updated since I switched GaussianLog.loadEnergy() to return the energy at the bottom of the well (i.e. without ZPE).
1 parent dd9d853 commit 2fdcc63

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

rmgpy/cantherm/gaussian.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ def loadEnergy(self):
269269
E0 = float(line.split()[4]) * constants.E_h * constants.Na
270270
elif 'CBS-QB3 (0 K)' in line or 'G3(0 K)' in line:
271271
E0_cbs = float(line.split()[3]) * constants.E_h * constants.Na
272+
# Do NOT read the ZPE from the "E(ZPE)=" line, as this is the scaled version!
272273
elif 'Zero-point correction=' in line:
273274
ZPE = float(line.split()[2]) * constants.E_h * constants.Na
274275
elif '\\ZeroPoint=' in line:
@@ -303,6 +304,7 @@ def loadZeroPointEnergy(self):
303304
line = f.readline()
304305
while line != '':
305306

307+
# Do NOT read the ZPE from the "E(ZPE)=" line, as this is the scaled version!
306308
if 'Zero-point correction=' in line:
307309
ZPE = float(line.split()[2]) * constants.E_h * constants.Na
308310
elif '\\ZeroPoint=' in line:

rmgpy/cantherm/gaussianTest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def testLoadEthyleneFromGaussianLog(self):
4040
self.assertAlmostEqual(rot.getPartitionFunction(Tlist), 2.59622e3, delta=1e-2)
4141
self.assertAlmostEqual(vib.getPartitionFunction(Tlist), 1.0481e0, delta=1e-4)
4242

43-
self.assertAlmostEqual(E0 / constants.Na / constants.E_h, -78.416641, 4)
43+
self.assertAlmostEqual(E0 / constants.Na / constants.E_h, -78.467452, 4)
4444
self.assertEqual(conformer.spinMultiplicity, 1)
4545
self.assertEqual(conformer.opticalIsomers, 1)
4646

@@ -67,7 +67,7 @@ def testLoadOxygenFromGaussianLog(self):
6767
self.assertAlmostEqual(rot.getPartitionFunction(Tlist), 7.13316e1, delta=1e-4)
6868
self.assertAlmostEqual(vib.getPartitionFunction(Tlist), 1.00037e0, delta=1e-4)
6969

70-
self.assertAlmostEqual(E0 / constants.Na / constants.E_h, -150.374756, 4)
70+
self.assertAlmostEqual(E0 / constants.Na / constants.E_h, -150.3784877, 4)
7171
self.assertEqual(conformer.spinMultiplicity, 3)
7272
self.assertEqual(conformer.opticalIsomers, 1)
7373

0 commit comments

Comments
 (0)