Skip to content

Commit

Permalink
Merge pull request #1521 from ReactionMechanismGenerator/mp_coord
Browse files Browse the repository at this point in the history
Processing monoatomic species in Arkane/molpro
  • Loading branch information
goldmanm authored Jan 3, 2019
2 parents a70bd44 + bf04302 commit 99f712f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions arkane/molpro.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def getNumberOfAtoms(self):
# Automatically determine the number of atoms
if 'ATOMIC COORDINATES' in line and Natoms == 0:
for i in range(4): line = f.readline()
while 'Bond lengths' not in line:
while 'Bond lengths' not in line and 'nuclear charge' not in line.lower():
Natoms += 1
line = f.readline()
line = f.readline()
Expand Down Expand Up @@ -137,12 +137,13 @@ def loadGeometry(self):
# Close file when finished
f.close()

#If no optimized coordinates were found, uses the input geometry (for example if reading the geometry from a frequency file
# If no optimized coordinates were found, uses the input geometry
# (for example if reading the geometry from a frequency file)
if coord == []:
f = open(self.path, 'r')
line = f.readline()
while line != '':
if 'Atomic Coordinates' in line:
if 'atomic coordinates' in line.lower():
symbol = []; coord = []
for i in range(4):
line = f.readline()
Expand Down
6 changes: 5 additions & 1 deletion arkane/statmech.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,11 @@ def load(self):
atomEnergies=self.atomEnergies,
applyAtomEnergyCorrections=self.applyAtomEnergyCorrections,
applyBondEnergyCorrections=self.applyBondEnergyCorrections)
ZPE = statmechLog.loadZeroPointEnergy() * self.frequencyScaleFactor
if len(number) > 1:
ZPE = statmechLog.loadZeroPointEnergy() * self.frequencyScaleFactor
else:
# Monoatomic species don't have frequencies
ZPE = 0.0
logging.debug('Corrected minimum energy is {0} J/mol'.format(E0))
# The E0_withZPE at this stage contains the ZPE
E0_withZPE = E0 + ZPE
Expand Down

0 comments on commit 99f712f

Please sign in to comment.