ReactionMechanismGenerator / ARC

ARC - Automatic Rate Calculator
https://reactionmechanismgenerator.github.io/ARC/index.html
MIT License
43 stars 21 forks source link

Replacing if level_of_theory is not None with if isinstance(level_of_theory, Level) #618

Closed calvinp0 closed 1 year ago

calvinp0 commented 1 year ago

Describe the bug Running an input.yml file produced this error


Traceback (most recent call last):
  File "/Local/ce_dana/Code/ARC//ARC.py", line 69, in <module>
    main()
  File "/Local/ce_dana/Code/ARC//ARC.py", line 65, in main
    arc_object.execute()
  File "/Local/ce_dana/Code/ARC/arc/main.py", line 583, in execute
    fine_only=self.fine_only,
  File "/Local/ce_dana/Code/ARC/arc/scheduler.py", line 484, in __init__
    self.schedule_jobs()
  File "/Local/ce_dana/Code/ARC/arc/scheduler.py", line 537, in schedule_jobs
    self.determine_most_stable_conformer(label)  # also checks isomorphism
  File "/Local/ce_dana/Code/ARC/arc/scheduler.py", line 2001, in determine_most_stable_conformer
    self.troubleshoot_conformer_isomorphism(label=label)
  File "/Local/ce_dana/Code/ARC/arc/scheduler.py", line 3348, in troubleshoot_conformer_isomorphism
    conformer=conformer,
  File "/Local/ce_dana/Code/ARC/arc/scheduler.py", line 770, in run_job
    if level_of_theory is not None and level_of_theory.args is not None:
AttributeError: 'str' object has no attribute 'args

How to reproduce I believe it was this reaction in my input.yml

project: 'arc_ll_hab'

level_of_theory: wb97xd/def2tzvp

compute_thermo: False

species:
 - label: 'r_82_[O-][N+](=O)O'
   smiles: '[O-][N+](=O)O'
 - label: 'r_82_[H]'
   smiles: '[H]'
 - label: 'r_82_[H][H]'
   smiles: '[H][H]'
 - label: 'r_82_[O-][N+](=O)[O]'
   smiles: '[O-][N+](=O)[O]'

reactions:
 - label: 'r_82_[O-][N+](=O)O + r_82_[H] <=> r_82_[H][H] + r_82_[O-][N+](=O)[O]'

Expected behavior A clear and concise description of what you expected to happen.

change in the code:

if level theory is not None to if isinstance(level_of_theory, Level)