Giter VIP home page Giter VIP logo

Comments (5)

eneas77 avatar eneas77 commented on June 21, 2024

Hi,

Any updates about this?

Thanks,

E77

from autode.

t-young31 avatar t-young31 commented on June 21, 2024

Hope you don't mind but I edited the issue to make the error/code easier to read

Thanks for raising –this looks like an optimiser bug to me, probably present since v1.3.0 – I'll take a look. I'm hoping @shoubhikraj might have fixed it already in #262

from autode.

t-young31 avatar t-young31 commented on June 21, 2024

I cant reproduce this error but there's definitely something bad going on – it shouldn't take 68 iterations to converge N2O3 & fail to run the internals->cartesians transform 😞

@shoubhikraj would you mind trying ade.Molecule(smiles='[O-][N+](=O)N=O').optimise(method=ade.methods.NWChem()) with the trim optimiser when you have the chance? thanks!

from autode.

shoubhikraj avatar shoubhikraj commented on June 21, 2024

@t-young31 @eneas77

I do not have access to NWChem right now, but I can reproduce the error even with xTB and the new optimiser:

>>> import autode as ade
>>> mol = ade.Molecule(smiles='[O-][N+](=O)N=O')
>>> opt = ade.opt.optimisers.HybridTRMOptimiser(maxiter=100,gtol=1.e-3,etol=1.e-4)
>>> opt.run(mol, method=ade.methods.XTB())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "G:\autodE\autode\opt\optimisers\base.py", line 135, in run
    self._step()  # Update self._coords
  File "G:\autodE\autode\opt\optimisers\trm.py", line 174, in _step
    self._coords = self._coords + step  # finally, take the step!
  File "G:\autodE\autode\opt\coordinates\base.py", line 264, in __add__
    new_coords.iadd(other)
  File "G:\autodE\autode\opt\coordinates\dic.py", line 243, in iadd
    raise RuntimeError(
RuntimeError: Iterative back-transform did not converge
>>> mol.coordinates
Coordinates([[-1.38900795 -0.83276619  0.04883061]
 [-0.58297449  0.02862588 -0.01147048]
 [-0.67159798  1.20019831 -0.15331935]
 [ 0.90290826 -0.58392015  0.17367619]
 [ 1.74067215  0.18786215 -0.05771697]] Å)

The optimiser throws the error much earlier (~16 iterations) when the dic-> cartesian transform fails. I suspect the problem is coming from the nearly 180 degree dihedral angle. When I restart the optimisation (which rebuilds the internal coordinates) it works (I assume because the dihedrals are now excluded from the primitive set):

>>> opt = ade.opt.optimisers.HybridTRMOptimiser(maxiter=100,gtol=1.e-3,etol=1.e-4)
>>> opt.run(mol, method=ade.methods.XTB())
>>> mol.coordinates
Coordinates([[-1.44320967e+00 -8.13930256e-01  8.45857398e-02]
 [-5.93660808e-01 -5.68579976e-04 -1.19083114e-02]
 [-5.96507906e-01  1.17034244e+00 -1.76402679e-01]
 [ 9.38350317e-01 -6.14585625e-01  1.07541973e-01]
 [ 1.69502807e+00  2.58742025e-01 -3.81672248e-03]] Å)

If you look at the final optimised structure, the two O-N-N-O dihedral angles are 179.773 and -0.264 degrees:
image

One way to solve this could be to modify the optimisers so that whenever the back-tranform fails to converge, it will rebuild internal coordinates or perhaps switch to Cartesians.

from autode.

eneas77 avatar eneas77 commented on June 21, 2024

Hi,

Did you try to run this example when you closed the enhancement on #151 ?
I suppose the answer, as there is no one, is you didn't run it.

Perhaps you should include that basic QC: every case ending in bug/enhancement should be tested once the fork job is done. :-)

Just my two shilings on this matter.

Thanks a lot.

E77

from autode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.