duartegroup / autodE

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

Q-Chem TS optimisation nearly converged error #274

Closed asterlingchem closed 1 year ago

asterlingchem commented 1 year ago

Describe the bug A NotImplementedError is thrown by the QChem.py wrapper when a TS optimisation gets close but does not converge. (Unsure if this counts as a bug or as a feature request)

To Reproduce This is the Python script used to submit the calculation:

import autode as ade

ade.Config.n_cores = 16
ade.Config.lcode = 'XTB'
ade.Config.hcode = 'QChem'

kwds = ade.Config.QChem.keywords
kwds.opt.max_opt_cycles = 200

if __name__ == "__main__":

    sm = ade.Reactant(name='sm',smiles='CC(O[O])COOC')
    p1 = ade.Product(name='p1', smiles='CC1COOO1')
    p2 = ade.Product(name='p2', smiles='[O]C')

    reaction = ade.Reaction(sm, p1, p2, name='rxn1_step1')
    reaction.calculate_reaction_profile()

The error traceback is attached.

TSopt_error.txt

Expected behavior Unsure what other wrappers do here ā€“ presumably there is some handling of TS optimisations that are almost converged? It would be great if a new job were set up, either with an improved TS guess from the higher level method, or if there is still a sensible imaginary frequency at the final geometry of the failed TS search then using that as a guess for the next TS optimisation job.

Environment

t-young31 commented 1 year ago

Thanks for raising this šŸ˜„

It's already "fixed" in v1.4.0, so would appreciate if you could try it out and see if it's any better!

presumably there is some handling of TS optimisations that are almost converged?

this is exactly what did happen, if the imaginary mode was still present.

Do you think it's worthwhile adding a keywords.set_max_opt_cycles(num=200) method to set all of the opt, low_opt and opt_ts keywords maximum number of optimisation cycles ā€“ perhaps it's confusing that opt doesn't set all of them?!