Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing monoatomic species in Arkane/molpro #1521

Merged
merged 2 commits into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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