Skip to content

Commit

Permalink
Calculate the translational mode if doesn't exist
Browse files Browse the repository at this point in the history
Sometimes the translational mode is not appended to modes for monoatomic
species. If it doesn't exist, determine it from the mass.
  • Loading branch information
alongd committed Jun 14, 2019
1 parent 9da9be0 commit 4e3c8ff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arkane/statmech.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,20 @@ def load(self, pdep=False):
spinMultiplicity=spinMultiplicity,
opticalIsomers=opticalIsomers,
label=self.species.label)
translational_mode_exists = False
for mode in conformer.modes:
if isinstance(mode, (LinearRotor, NonlinearRotor)):
self.supporting_info.append(mode)
break
if isinstance(mode, (Translation, IdealGasTranslation)):
translational_mode_exists = True
if unscaled_frequencies:
self.supporting_info.append(unscaled_frequencies)

if not translational_mode_exists:
# Sometimes the translational mode is not appended to modes for monoatomic species
conformer.modes.append(IdealGasTranslation(mass=self.species.molecularWeight))

if conformer.spinMultiplicity == 0:
raise ValueError("Could not read spin multiplicity from log file {0},\n"
"please specify the multiplicity in the input file.".format(self.path))
Expand Down

0 comments on commit 4e3c8ff

Please sign in to comment.