duartegroup / autodE

automated reaction profile generation
https://duartegroup.github.io/autodE/
MIT License
171 stars 52 forks source link

Error with transition state example #204

Closed althea-hansel closed 1 year ago

althea-hansel commented 1 year ago

Describe the bug Tried running the transition state reaction example, got a CouldNotGetProperty exception for "energy"

To Reproduce Running with ORCA and XTB. Exception occurs during locate_transition_state() function call.

import autode as ade

ade.Config.n_cores = 32

rxn = ade.Reaction("CC(N=[N+]=[N-])=O>>CN=C=O.N#N")
rxn.locate_transition_state()
rxn.ts.print_xyz_file(filename="ts.xyz")

Expected behavior Expected no exception to occur.

Environment

Additional context

Traceback (most recent call last):
  File "/gpfs/home/ahansel/autode/test_rxn_ts.py", line 8, in <module>
    rxn.locate_transition_state()
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/utils.py", line 350, in wrapped_function
    return func(*args, **kwargs)
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/utils.py", line 154, in wrapped_function
    result = func(*args, **kwargs)
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/reactions/reaction.py", line 635, in locate_transition_state
    self.tss = find_tss(self)
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/transition_states/locate_tss.py", line 61, in find_tss
    ts = get_ts(str(reaction), reactant, product, bond_rearrangement)
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/transition_states/locate_tss.py", line 311, in get_ts
    if not ts_guess.could_have_correct_imag_mode:
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/transition_states/base.py", line 157, in could_have_correct_imag_mode
    self._run_hess_calculation(method=get_hmethod())
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/species/species.py", line 883, in _run_hess_calculation
    calc.run()
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/calculations/calculation.py", line 116, in run
    self._executor.run()
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/calculations/executors.py", line 82, in run
    self.set_properties()
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/utils.py", line 383, in wrapped_function
    return func(*args, **kwargs)
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/calculations/executors.py", line 155, in set_properties
    self.molecule.energy = self.method.energy_from(self)
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/wrappers/methods.py", line 170, in energy_from
    energy = self._energy_from(calc)
  File "/gpfs/home/ahansel/miniconda3/envs/autode/lib/python3.10/site-packages/autode/wrappers/ORCA.py", line 264, in _energy_from
    raise CouldNotGetProperty(name="energy")
autode.exceptions.CouldNotGetProperty: Could not get energy
t-young31 commented 1 year ago

Hi @althea-hansel – thanks for the report!

What do the <preffix>_orca.out files look like in the generated folder? This exception is usually raised when something's gone wrong in an external QM package and thus there's isn't much/any to parse by autodE

althea-hansel commented 1 year ago

This was all that was in the *_orca.out file:

Unrecognized orca command. Run `orca --help` for more info
t-young31 commented 1 year ago

cool – so it looks like maybe ORCA (the QM package) isn't installed and available in your PATH environment variable. Instead, the orca executable being used is this one. How did you install it?

althea-hansel commented 1 year ago

My apologies, I needed to load the orca module. Here is the new output file. The same error is occurring with auto

TnsWyR_ll_ad_0-2_0-1_2-3_hess_orca.out.txt

t-young31 commented 1 year ago

nice – so that one looks like a generic mpi error. have you loaded the 'right' openmpi module?

althea-hansel commented 1 year ago

I am not sure what you mean by the "right" openmpi module. I have Open MPI v 4.1.1 loaded

t-young31 commented 1 year ago

sorry – not clear. by 'right' I mean the one that ORCA expects to find e.g. if your ORCA install is built against openmpi v3 then it needs to be that one! (happy to help out here but I'm not sure this is an autodE issue..)

althea-hansel commented 1 year ago

Thank you, I just wanted to make sure that autodE didn't need a specific version. I have been able to sort out the openMPI issue now and the program is running. Thank you for the assistance!

t-young31 commented 1 year ago

awesome – glad you sorted it out. please feel to reach out with any other questions/problems! oh and any ORCA version above v4.0 should work 👍🏼