Skip to content

Commit

Permalink
Merge pull request #1620 from ReactionMechanismGenerator/atoms_s
Browse files Browse the repository at this point in the history
Calculate the translational mode if doesn't exist
  • Loading branch information
alongd authored Jun 14, 2019
2 parents 9da9be0 + 4e3c8ff commit 62d3ca2
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 62d3ca2

Please sign in to comment.