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

Fix xtb opt with cartesian coordinates #247

Merged
merged 2 commits into from
Feb 11, 2023

Conversation

t-young31
Copy link
Member

@t-young31 t-young31 commented Feb 5, 2023

Resolves #245

Fixes cartesian coordinate constraints in XTB optimisations. I'm not convinced this ever worked correctly!


Checklist

  • The changes include an associated explanation of how/why
  • Test pass
  • Changelog has been updated

@codecov
Copy link

codecov bot commented Feb 5, 2023

Codecov Report

Merging #247 (5f3151a) into v1.3.5 (0d03666) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 5f3151a differs from pull request most recent head 53ee7b6. Consider uploading reports for the commit 53ee7b6 to get more accurate results

@@           Coverage Diff           @@
##           v1.3.5     #247   +/-   ##
=======================================
  Coverage   97.14%   97.15%           
=======================================
  Files         196      196           
  Lines       20172    20183   +11     
=======================================
+ Hits        19597    19608   +11     
  Misses        575      575           
Flag Coverage Δ
unittests 97.15% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
autode/wrappers/XTB.py 98.53% <100.00%> (-0.03%) ⬇️
tests/test_wrappers/test_xtb.py 99.47% <100.00%> (+0.04%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@t-young31 t-young31 linked an issue Feb 5, 2023 that may be closed by this pull request
else:
list_of_ranges.append(f"{atom_range[0]}-{atom_range[-1]}")
atom_idxs = list(
sorted(int(i) + 1 for i in molecule.constraints.cartesian)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if it would be useful to have autode log a warning if there is only one constrained atom in cartesian. (which does not really make sense). xTB seems to accept if one atom is mentioned in $constrain.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see anything bad happening if only one atom is constrained so not sure it should be a warning. Going to leave as is
(thanks for the review 👍🏼)

Copy link
Collaborator

@shoubhikraj shoubhikraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, with a comment 👍

@t-young31 t-young31 merged commit 4276cab into duartegroup:v1.3.5 Feb 11, 2023
@t-young31 t-young31 deleted the fix_xtb_const_cart_opt branch February 11, 2023 10:03
shoubhikraj added a commit to shoubhikraj/autodE that referenced this pull request Feb 21, 2023
* Ignore doc paths for code CI (duartegroup#235)

* Ignore doc paths for code CI

* Update PR template

* Add "ERROR" level to logging (duartegroup#231)

* add ERROR level to logging

* update docs for logging

* update tests for logging

* update changelog

* Fix parsing Qchem v6 output (duartegroup#234)

* Fix parsing Qchem v6 output

* Fix units for values div mul (duartegroup#242)

* Fix units for div mul

* Update changelog

* Update workflow (duartegroup#244)

* Fix xtb opt with cartesian coordinates (duartegroup#247)

* Fix xtb opt with cartesian coordinates

* Update changelog [skip actions]

* Remove hessian conversion on normal mode calculation (duartegroup#243)

* Ensure no unit conversion in hessian

* Use a copy for value and valuearray

* Raise exception on value `to` with inplace

* Add missed changelog updates

* Template for v1.4.0 (duartegroup#203)

* Make autodE compatible with Windows and change parallel process handling (duartegroup#202)

* make autode compatible with windows: replace multiprocessing with joblib and loky

* remove comment autode/utils.py

* check total memory in utils

* use loky for parallel processing

* loky context is used for better handling of parallelisation

* fixes for timeout wrapper in POSIX

* use class instances instead of class attributes for Config

* pass parent Config state into child processes

* keep default timeout wrapper, also add new wrapper

* separate parallelisation scheme for windows, restore default for linux/mac

* fix test_config_in_worker_proc for posix

* codecov on windows

* add tests for config copy

* change config implementation for updating in worker process

* add context manager for temporary config, minor fix in experimental timeout for windows

* add tests for context manager

* use bash for installing xtb in CI runner

* add tests for cleanup after timeout

* exclude setup.py from codecov

* make config picklable and easily readable

* add test and minor fixes

* move xtb install script to .github/scripts

* use temporary_config for test_utils.py

* update changelog and contributor list

* resolve conflicts with v1.4.0

Co-authored-by: Tom Young <39765193+t-young31@users.noreply.github.com>

* update docs (duartegroup#229)

* update docs for windows installation and temporary_config

* update docs for windows installation and temporary_config

* minor edit

Co-authored-by: Tom Young <39765193+t-young31@users.noreply.github.com>

* Autouse tempoary_config (duartegroup#236)

* minor fixes

---------

Co-authored-by: Tom Young <39765193+t-young31@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Constraints are ignored by xTB for Molecule().optimise()
2 participants