ReactionMechanismGenerator / RMG-Py

Python version of the amazing Reaction Mechanism Generator (RMG).
http://reactionmechanismgenerator.github.io/RMG-Py/
Other
381 stars 226 forks source link

TransitionState object has no attribute 'molecular_weight' when running Arkane #1739

Closed nateharms closed 4 years ago

nateharms commented 4 years ago

Bug Description

When I'm trying to run an Arkane kinetics job, I'm getting the following error:

~/Code/RMG-Py/arkane/main.py in execute(self)
    207                 job.execute(output_directory=self.output_directory, plot=self.plot)
    208             if isinstance(job, StatMechJob):
--> 209                 job.execute(output_directory=self.output_directory, plot=self.plot, pdep=is_pdep(self.job_list))
    210                 if hasattr(job, 'supporting_info'):
    211                     supporting_info.append(job.supporting_info)

~/Code/RMG-Py/arkane/statmech.py in execute(self, output_directory, plot, pdep)
    205         If `plot` is True, then plots of the hindered rotor fits will be saved.
    206         """
--> 207         self.load(pdep, plot)
    208         if output_directory is not None:
    209             try:

~/Code/RMG-Py/arkane/statmech.py in load(self, pdep, plot)
    419         else:
    420             # Sometimes the translational mode is not appended to modes for monoatomic species
--> 421             conformer.modes.append(IdealGasTranslation(mass=self.species.molecular_weight))
    422 
    423         if conformer.spin_multiplicity == 0:

AttributeError: 'rmgpy.species.TransitionState' object has no attribute 'molecular_weight'

It's seeming like the

How To Reproduce

The Arkane input file is in the ts directory in the following github repo: https://github.com/comocheng/test_scratch/

Expected Behavior

I would expect this to return kinetics. This reaction was chosen before because it was able to return kinetics in RMG-2.4.1

Installation Information

mliu49 commented 4 years ago

After briefly looking at this, it's not clear whether this is related to py3 changes. The TransitionState class has never had a molecular_weight or molecularWeight attribute.

When you say that this reaction was able to return kinetics in RMG 2.4.1, do you mean that this exact input file worked?

nateharms commented 4 years ago

@mliu49 from my memory, it was able to work with 2.4.1 - I can double-check this this this evening or tomorrow. It looks like the TransitionState is being treated as a Species object when it's being loaded... But then again, I've mainly been using Arkane as a black box so I'm not 100% sure if I'm on the right track.

mliu49 commented 4 years ago

The Gaussian log for the TS in the repo you linked seems to not have converged. I think this error might be a side effect of Arkane being unable to find the conformer information from the log file. It looks for the '- Thermochemistry -' keyword, which I couldn't find in the log file.

nateharms commented 4 years ago

Ah, the log file was what the issue was. It was able to work now. Would it be advantageous to add an error letting us know that the log file is corrupt / not converged? (I know most people would check before running, but just as a failsafe)

mliu49 commented 4 years ago

I agree, Arkane should throw an explicit error if it does not find the expected keywords in the logfile, and perhaps also check for things like "Error termination" and raise a separate error.

mliu49 commented 4 years ago

Resolved by #1766.