Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constraints are ignored by xTB for Molecule().optimise() #245

Closed
shoubhikraj opened this issue Feb 1, 2023 · 1 comment · Fixed by #247
Closed

Constraints are ignored by xTB for Molecule().optimise() #245

shoubhikraj opened this issue Feb 1, 2023 · 1 comment · Fixed by #247
Assignees
Labels
bug Something isn't working
Milestone

Comments

@shoubhikraj
Copy link
Collaborator

>>> import autode as ade
>>> mol = ade.Molecule(smiles='CCCO')
>>> mol.coordinates
Coordinates([[-1.306  -0.4675  0.2225]
 [-0.1404 -0.1831 -0.6519]
 [ 0.8531  0.7802 -0.0408]
 [ 1.3596  0.2682  1.1512]
 [-1.3114 -1.555   0.5116]
 [-1.3189  0.1064  1.1666]
 [-2.2933 -0.2964 -0.2571]
 [-0.486   0.1993 -1.6328]
 [ 0.4404 -1.1305 -0.8473]
 [ 1.7187  0.9044 -0.7223]
 [ 0.4255  1.7678  0.1718]
 [ 2.0586 -0.3937  0.9285]] Å)
>>> mol.constraints.cartesain = [0,1]
>>> mol.optimise(method=ade.methods.XTB())
>>> mol.coordinates
Coordinates([[-1.27720409 -0.52228338  0.25626575]
 [-0.05931335 -0.31812982 -0.63671753]
 [ 0.82733842  0.82100849 -0.12973593]
 [ 1.36479762  0.57179659  1.14757381]
 [-1.84804755 -1.39098091 -0.06346189]
 [-0.96362728 -0.66905583  1.28723299]
 [-1.92374216  0.35140304  0.21850671]
 [-0.37494956 -0.08805323 -1.65564772]
 [ 0.53117733 -1.23878808 -0.66867035]
 [ 1.63575406  1.00972798 -0.85285968]
 [ 0.24001634  1.73564627 -0.02231566]
 [ 1.84770022 -0.26219111  1.1198295 ]] Å)

All atoms are optimised by xTB, despite constraints. (Is this something that would be best to use autode.opt.optimisers?) However, when optimised with ORCA, the constraints are present in the optimisation, as the coordinates of those atoms do not move.

  • Operating System: Windows 10
  • Python version: 3.10
  • autodE version: 1.4.0
@t-young31 t-young31 added the bug Something isn't working label Feb 1, 2023
@t-young31 t-young31 added this to the v1.3.5 milestone Feb 1, 2023
@t-young31
Copy link
Member

t-young31 commented Feb 1, 2023

Thanks for finding this @shoubhikraj – looks like at some point the format of the cartesian constraints has changed in XTB, and so they're just ignored in the input file 😞

Happy to have a go fixing this

@t-young31 t-young31 linked a pull request Feb 5, 2023 that will close this issue
3 tasks
@t-young31 t-young31 self-assigned this Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants