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

WIP: Added ase Nudged Elastic Band in the NewtonNet recipe #2176

Open
wants to merge 461 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
461 commits
Select commit Hold shift + click to select a range
c3b8c41
pre-commit auto-fixes
pre-commit-ci[bot] Jun 21, 2024
6f92356
Auto stash before merge of "neb_nn" and "origin/neb_nn"
kumaranu Jun 21, 2024
0314718
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 21, 2024
a4f684f
Auto stash before merge of "neb_nn" and "origin/neb_nn"
kumaranu Jun 21, 2024
e7c0311
Added test for BFGSLinesearch exception.
kumaranu Jun 21, 2024
a31f20c
pre-commit auto-fixes
pre-commit-ci[bot] Jun 21, 2024
60050fb
added docstring to test_run_neb2
kumaranu Jun 21, 2024
c18f48b
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 21, 2024
027e759
pre-commit auto-fixes
pre-commit-ci[bot] Jun 21, 2024
0840c8c
Auto stash before merge of "neb_nn" and "origin/neb_nn"
kumaranu Jun 21, 2024
c1427d8
Removed unused code from test_run_neb
kumaranu Jun 21, 2024
1646d42
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 21, 2024
bfc9ced
pre-commit auto-fixes
pre-commit-ci[bot] Jun 21, 2024
716e628
Auto stash before merge of "neb_nn" and "origin/neb_nn"
kumaranu Jun 21, 2024
a9d5ff2
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 21, 2024
30d11dc
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 21, 2024
33b8d4e
pre-commit auto-fixes
pre-commit-ci[bot] Jun 21, 2024
f615130
Added docstrings to summarize_neb_run and summarize_neb_run2
kumaranu Jun 21, 2024
40c29ca
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 21, 2024
87a08ce
Got rid of random molecule and replaced it with C60.
kumaranu Jun 22, 2024
dc10ecc
pre-commit auto-fixes
pre-commit-ci[bot] Jun 22, 2024
4fea200
Added seed to test_ase for geodesic.
kumaranu Jun 22, 2024
6c6583b
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 22, 2024
f18ea76
pre-commit auto-fixes
pre-commit-ci[bot] Jun 22, 2024
f06ac43
Merge branch 'main' into neb_nn
Andrew-S-Rosen Jun 26, 2024
28ced33
pre-commit auto-fixes
pre-commit-ci[bot] Jun 26, 2024
b13b4aa
Added print statements for newtonnet model and config.
kumaranu Jun 26, 2024
953ec3a
pre-commit auto-fixes
pre-commit-ci[bot] Jun 26, 2024
b3c9c1a
Auto stash before merge of "neb_nn" and "origin/neb_nn"
kumaranu Jun 26, 2024
04e92dc
pre-commit auto-fixes
pre-commit-ci[bot] Jun 26, 2024
411ac3c
Trying noqa to get rid of pre-commit warning for random seed.
kumaranu Jun 27, 2024
2acf47f
Moved optimizer import.
kumaranu Jun 27, 2024
695febf
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 27, 2024
f44380d
Merge branch 'main' into neb_nn
kumaranu Jun 27, 2024
dc124cc
Auto stash before merge of "neb_nn" and "origin/neb_nn"
kumaranu Jun 27, 2024
d6f8b5f
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 27, 2024
62ab50a
pre-commit auto-fixes
pre-commit-ci[bot] Jun 27, 2024
fe98bce
Auto stash before merge of "neb_nn" and "origin/neb_nn"
kumaranu Jun 27, 2024
92b10d3
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 27, 2024
9e76d64
Auto stash before merge of "neb_nn" and "origin/neb_nn"
kumaranu Jun 27, 2024
1cadf16
pre-commit auto-fixes
pre-commit-ci[bot] Jun 27, 2024
f9c854b
Just trying to run the tests again.
kumaranu Jun 27, 2024
ad207b8
Added strip decorators to the ts_job calls inside neb_ts_job and geod…
kumaranu Jun 27, 2024
109c1d8
Added hess_method=None to avoid doing hessian calculations all the time.
kumaranu Jun 27, 2024
4143de1
Merge branch 'main' into neb_nn
kumaranu Jun 27, 2024
c79b2a1
Added opt_kwargs to the ts_job calls to allow hessian=True sella calc…
kumaranu Jun 28, 2024
2774be2
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 28, 2024
c85d539
pre-commit auto-fixes
pre-commit-ci[bot] Jun 28, 2024
70b43d3
Made tests more robust for newtonnet.
kumaranu Jun 28, 2024
bf0a280
Correct calc_kwargs and opt_kwargs to make sure hessians are calculat…
kumaranu Jun 28, 2024
c24cb76
Modified add hessian and std function to allow calc_kwargs.
kumaranu Jun 28, 2024
adc8396
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 28, 2024
a1c3c9f
pre-commit auto-fixes
pre-commit-ci[bot] Jun 28, 2024
09c9a4d
Changed ts_job call according to the requirements.
kumaranu Jun 28, 2024
dcd284a
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 28, 2024
01105ab
just corrected the newtonnet tests.
kumaranu Jun 28, 2024
0a0cff4
pre-commit auto-fixes
pre-commit-ci[bot] Jun 28, 2024
5400196
Changed opt_kwargs to ts_job_kwargs
kumaranu Jun 29, 2024
9575103
Updated newtonnet tests for ts_job_kwargs.
kumaranu Jun 29, 2024
9697a29
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 29, 2024
8c6b015
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jun 29, 2024
160fa21
Merge branch 'main' into neb_nn
Andrew-S-Rosen Jul 1, 2024
ca46eae
Merge remote-tracking branch 'origin/main' into neb_nn
kumaranu Jul 1, 2024
42d0da2
Merge branch 'Quantum-Accelerators:main' into neb_nn
kumaranu Jul 1, 2024
a7cdef2
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 1, 2024
91d556a
Auto stash before merge of "neb_nn" and "origin/neb_nn"
kumaranu Jul 2, 2024
c025d0d
Added additional fields to neb_summary.
kumaranu Jul 2, 2024
03e23a2
edited tests too. May be will change them later.
kumaranu Jul 2, 2024
045facb
pre-commit auto-fixes
pre-commit-ci[bot] Jul 2, 2024
191e3a8
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 2, 2024
9ff5d75
added geodesic_job the schemas are not added yet.
kumaranu Jul 2, 2024
b8d3f6a
added test for geodesic job
kumaranu Jul 2, 2024
d19ce44
pre-commit auto-fixes
pre-commit-ci[bot] Jul 2, 2024
fe3f2cf
Merge branch 'main' into neb_nn
kumaranu Jul 2, 2024
4254141
modified the schemas for neb_job to only contain n_images of the traj…
kumaranu Jul 2, 2024
ea6392f
Test updated for neb job to check for the length for neb_job.
kumaranu Jul 2, 2024
90943e0
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 2, 2024
fa830b1
pre-commit auto-fixes
pre-commit-ci[bot] Jul 2, 2024
363bd0c
Corrected the tests.
kumaranu Jul 3, 2024
ec3bfd8
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 3, 2024
20c3443
Merge branch 'main' into neb_nn
kumaranu Jul 3, 2024
9bb1c39
Corrected TSSchema and OptSchema in ts.py.
kumaranu Jul 3, 2024
2f5b531
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 3, 2024
f2ef51b
corrected OptSchema imports.
kumaranu Jul 3, 2024
f8b7438
Correct run_neb test.
kumaranu Jul 3, 2024
f88a6ba
pre-commit auto-fixes
pre-commit-ci[bot] Jul 3, 2024
4253d94
Edited runners/test_ase.py to pass the tests.
kumaranu Jul 3, 2024
df6c245
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 3, 2024
a0245c5
Added check environment to look for environment on quacc GitHub.
kumaranu Jul 3, 2024
273ba6b
Changed seed setting from session to module.
kumaranu Jul 3, 2024
741c780
Changed number according to GitHub tests on github.com.
kumaranu Jul 3, 2024
54312a7
Corrected numbers in the test_run_neb.
kumaranu Jul 3, 2024
994dd46
Corrected the value in pytest for run_neb.
kumaranu Jul 3, 2024
93e1356
Merge branch 'main' into neb_nn
kumaranu Jul 11, 2024
6533f83
Changed the scope of the random seed to module from session. It was s…
kumaranu Jul 11, 2024
d709cec
Added geodesic_path.xyz file to directly load the gedesic path for th…
kumaranu Jul 11, 2024
4c1b3a8
Removed unnecessary path of the code after replacing the geodesic pat…
kumaranu Jul 11, 2024
72b0134
pre-commit auto-fixes
pre-commit-ci[bot] Jul 11, 2024
1838b1c
Added n returns to neb test.
kumaranu Jul 12, 2024
13cdff4
Got rid of summar_neb_run2.
kumaranu Jul 12, 2024
59fc5e3
Added n_iter_return = -1 by default inside neb_job.
kumaranu Jul 12, 2024
b1ea1d2
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 12, 2024
b831ab8
pre-commit auto-fixes
pre-commit-ci[bot] Jul 12, 2024
35a13ae
Removed docstring from a test file.
kumaranu Jul 12, 2024
502253b
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 12, 2024
44d365a
Removed geodesic from tests/requirements.txt.
kumaranu Jul 12, 2024
7a8924b
Corrected the relative geodesic path for geodesic_path.xyz file in th…
kumaranu Jul 12, 2024
b870a7d
Added geodesic as a requirement inside the github actions job require…
kumaranu Jul 12, 2024
59ace9c
pre-commit auto-fixes
pre-commit-ci[bot] Jul 12, 2024
160b232
Added trajectory import.
kumaranu Jul 12, 2024
acce40e
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 12, 2024
c0c9655
pre-commit auto-fixes
pre-commit-ci[bot] Jul 12, 2024
8ae1bde
Reduced the relative threshold for error check for neb.
kumaranu Jul 12, 2024
18fd593
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 12, 2024
49da3eb
Changed a few numbers here to match the tests on GitHub.
kumaranu Jul 12, 2024
3120fae
swapped neb_kwargs with run_kwargs. Suggested by Andrew.
kumaranu Jul 12, 2024
dae5796
Added a dynamics object in the returned type hint.
kumaranu Jul 12, 2024
d2d8ffd
Update some loop related to periodic systems.
kumaranu Jul 12, 2024
9a6c9ca
Removed a stray comment.
kumaranu Jul 12, 2024
5ce7cd8
Cleaned up the traj file related things from run_neb.
kumaranu Jul 12, 2024
c38b6c8
pre-commit auto-fixes
pre-commit-ci[bot] Jul 12, 2024
11cd0b9
Corrected a docstring.
kumaranu Jul 12, 2024
905c906
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 12, 2024
cba79d3
Added sweep_cutoff_size and also change the "None" to "auto" in the g…
kumaranu Jul 12, 2024
01bfb17
Corrected the geodesic test to incorporate new tol args.
kumaranu Jul 12, 2024
979d193
Changed the geodesic test to directly put the variables inside the fu…
kumaranu Jul 12, 2024
0ff073c
Added tests for linear and idpp interpolation tests. Also edited the …
kumaranu Jul 12, 2024
d3eab91
Corrected the schema neb function to deal with the interpolate_flags …
kumaranu Jul 12, 2024
dc7c80b
Added interpolation methods from ase like linear and idpp in addition…
kumaranu Jul 12, 2024
bb58d2e
Removed has_geodesic_interpolate condition from neb_job.
kumaranu Jul 12, 2024
99bc8d5
pre-commit auto-fixes
pre-commit-ci[bot] Jul 12, 2024
39494c0
Changed geodesic_interpolate_flags to interpolate_flags inside runner…
kumaranu Jul 12, 2024
3468dcb
Increased the accuracy condition from 1e-2 to 1e-5 for geodesic neb t…
kumaranu Jul 12, 2024
6ba14ef
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 12, 2024
45c4070
Update test numbers in newtonnet tests.
kumaranu Jul 12, 2024
a12fad8
Corrected neb_ts_job function to have correct arguments getting passe…
kumaranu Jul 12, 2024
dd1c6cb
pre-commit auto-fixes
pre-commit-ci[bot] Jul 12, 2024
51aac67
Not sure why the geodesic numbers are not matching but updated them i…
kumaranu Jul 12, 2024
5990dfc
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 12, 2024
9c47266
Added paths to kwargs.
kumaranu Jul 12, 2024
da6c3af
Corrected neb_kwargs text in docstrings
kumaranu Jul 12, 2024
32ad251
Completely got rid of links for geodesic kwargs.
kumaranu Jul 12, 2024
6eb3582
Changed calc_kwargs to **calc_kwargs.
kumaranu Jul 12, 2024
bf752c4
Also changed the test calls to use **calc_kwargs instead of calc_kwar…
kumaranu Jul 12, 2024
b2b0466
pre-commit auto-fixes
pre-commit-ci[bot] Jul 12, 2024
d028529
Merge branch 'main' into neb_nn
Andrew-S-Rosen Jul 24, 2024
43d1504
Removed check_env.yml file.
kumaranu Jul 24, 2024
b9c8bd0
Modified _get_hessian to incorporate **calc_kwargs to allow used defi…
kumaranu Jul 24, 2024
2c46a94
pre-commit auto-fixes
pre-commit-ci[bot] Jul 24, 2024
b7cf522
Trying the resolve the issue with opt.traj's path.
kumaranu Jul 24, 2024
299c440
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 24, 2024
439de1e
Converted geodesic_path to string to have posix_path functions applie…
kumaranu Jul 24, 2024
1bd71bf
pre-commit auto-fixes
pre-commit-ci[bot] Jul 24, 2024
36d933e
Changed the posixpath to string in os.path.dirname(str(os.path.abspat…
kumaranu Jul 24, 2024
314851d
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 25, 2024
fa02d79
changed the posixpath inside os.path.dirname function.
kumaranu Jul 25, 2024
7db0b1f
pre-commit auto-fixes
pre-commit-ci[bot] Jul 25, 2024
d737a93
Merge branch 'main' into neb_nn
kumaranu Jul 25, 2024
0a40aa8
Trying to convert posixpath to str at: traj.filename = str(zpath(…
kumaranu Jul 25, 2024
81b05ce
Corrected the input with string inside zpath as suggested by Andrew.
kumaranu Jul 25, 2024
7187de3
Undid the changes in the test file for the posixpath to string conver…
kumaranu Jul 25, 2024
04bafa4
Moved custom type hints from ts.py to types.py
kumaranu Jul 25, 2024
2a7645a
pre-commit auto-fixes
pre-commit-ci[bot] Jul 25, 2024
6bea8a7
Imported the type-hints from types.py.
kumaranu Jul 25, 2024
9356e8b
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 25, 2024
e5c3aee
pre-commit auto-fixes
pre-commit-ci[bot] Jul 25, 2024
c1704a5
Merge branch 'main' into neb_nn
kumaranu Jul 27, 2024
d5b481e
Removed a comment about 5 images in the neb_job function.
kumaranu Jul 27, 2024
5689e2b
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 27, 2024
a673acd
Changed the key from geodesic_results to initial_images.
kumaranu Jul 27, 2024
afa79da
Again, changed the keys in the neb's returned schema from geodesic_re…
kumaranu Jul 27, 2024
c2605a5
pre-commit auto-fixes
pre-commit-ci[bot] Jul 27, 2024
c2d43f6
Changed a variable's name from i to result to make it more descriptive.
kumaranu Jul 27, 2024
9377a82
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 27, 2024
f9e4af6
pre-commit auto-fixes
pre-commit-ci[bot] Jul 27, 2024
326f925
Added typehints for geodesic jobs.
kumaranu Jul 27, 2024
6fa67ee
updated ts.py to have geodesic schemas instead of dicts.
kumaranu Jul 27, 2024
b88c40c
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 27, 2024
4b33856
pre-commit auto-fixes
pre-commit-ci[bot] Jul 27, 2024
58766ee
Removed an unnecessary check.
kumaranu Jul 27, 2024
ec95533
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 27, 2024
7adf08e
Moved geodesic_path.xyz file to a directory called test_files.
kumaranu Jul 27, 2024
50eaf8b
Updated tests to have correct path to the geodesic_path.xyz file.
kumaranu Jul 27, 2024
e446487
Got rid of tmp_path or unused/empty calc_kwargs from newtonnet's test…
kumaranu Jul 27, 2024
e263622
pre-commit auto-fixes
pre-commit-ci[bot] Jul 27, 2024
60b7aef
Removed neb_ts_job and geodesic_ts_job
kumaranu Jul 27, 2024
93cf42d
Removed tests for neb_ts_job and geodesic_ts_job and the respective i…
kumaranu Jul 27, 2024
003e056
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 27, 2024
ee28b48
pre-commit auto-fixes
pre-commit-ci[bot] Jul 27, 2024
a069d89
Removed tests for nen_ts_job and geodesic_ts_job.
kumaranu Jul 27, 2024
4c2d20f
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 27, 2024
24b04cd
Manually edited the recipes list in the docs. Not sure if this was th…
kumaranu Jul 27, 2024
5483d27
Not sure why this test failed. Trying the new value.
kumaranu Jul 27, 2024
79ec33d
Added a test to raise a value error in run_neb function when optimize…
kumaranu Jul 27, 2024
7da2d1d
Modified run_neb to have none as neb_kwargs.
kumaranu Jul 27, 2024
0130aa3
pre-commit auto-fixes
pre-commit-ci[bot] Jul 27, 2024
2ff1bef
Added Callable back in ase.py.
kumaranu Jul 27, 2024
0d79cbf
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 27, 2024
7b9a9e4
pre-commit auto-fixes
pre-commit-ci[bot] Jul 27, 2024
3c78709
Updated BFGSLineSearch check.
kumaranu Jul 27, 2024
8cab2cc
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 27, 2024
a41fb04
Removed underscore from geodesic because it is not private.
kumaranu Jul 27, 2024
0665ee6
Removed underscore from geodesic because it is not private.
kumaranu Jul 27, 2024
ad975ab
Removed underscore from geodesic because it is not private.
kumaranu Jul 27, 2024
e36c3ea
Changed tolerance variable names to redestribute_tol and smoother_tol.
kumaranu Jul 27, 2024
5a8b6f0
Changed tolerance variable names to redestribute_tol and smoother_tol.
kumaranu Jul 27, 2024
93a93b6
pre-commit auto-fixes
pre-commit-ci[bot] Jul 27, 2024
f6e789b
Changed the default number of n_images in geodesic to 10 instead of 20.
kumaranu Jul 27, 2024
f75f70a
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 27, 2024
00b0e63
corrected spelling for redistribute.
kumaranu Jul 27, 2024
7994881
Corrected assertion value.
kumaranu Jul 27, 2024
bf05f39
Moved geodesic wrapper function from ts ase to atoms directory. Also …
kumaranu Jul 27, 2024
eac9687
Removed the geodesic tests from test_ase.py and the relevant imports.
kumaranu Jul 27, 2024
d363d5e
test file for the geodesic wrapper.
kumaranu Jul 27, 2024
b47725a
getting rid of the geodesic wrapper from ase.
kumaranu Jul 27, 2024
25e79a0
pre-commit auto-fixes
pre-commit-ci[bot] Jul 27, 2024
d545f8b
Changed summarize_neb_run call.
kumaranu Jul 27, 2024
30a7dc6
Made n_images require argument in summarize_neb_run and n_iter_return…
kumaranu Jul 27, 2024
6023819
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 27, 2024
1a4b1a1
Updated run_neb test.
kumaranu Jul 27, 2024
dc4cd86
pre-commit auto-fixes
pre-commit-ci[bot] Jul 27, 2024
4e8a05c
Merge branch 'main' into neb_nn
Andrew-S-Rosen Jul 27, 2024
db157db
Update ts.py
Andrew-S-Rosen Jul 27, 2024
19685f1
Merge branch 'main' into neb_nn
kumaranu Jul 29, 2024
c2ef8cb
Removed calculator from the trajectory object in summarize neb run.
kumaranu Jul 29, 2024
f140801
Changed trajectory to atoms_trajectory in summarize_neb_run to avoid …
kumaranu Jul 29, 2024
18a58dc
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 29, 2024
05862d9
Changed i to result defined for a loop over trajectory_results.
kumaranu Jul 29, 2024
5465aa1
pre-commit auto-fixes
pre-commit-ci[bot] Jul 29, 2024
2c867db
Added typehints and docstrings to the function inside the summarize f…
kumaranu Jul 29, 2024
7c9e819
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 29, 2024
4d9dcc8
pre-commit auto-fixes
pre-commit-ci[bot] Jul 29, 2024
5d92bfa
edited docstring.
kumaranu Jul 29, 2024
c72b95a
Merge branch 'neb_nn' of https://github.com/kumaranu/quacc into neb_nn
kumaranu Jul 29, 2024
fe00971
pre-commit auto-fixes
pre-commit-ci[bot] Jul 29, 2024
9a43dff
Merge branch 'main' into neb_nn
kumaranu Jul 30, 2024
c5ddcfa
Merge branch 'main' into neb_nn
Andrew-S-Rosen Aug 13, 2024
7128288
Merge branch 'main' into neb_nn
Andrew-S-Rosen Aug 16, 2024
777160d
Merge branch 'main' into neb_nn
Andrew-S-Rosen Aug 22, 2024
68d7ec9
Update ase.py
Andrew-S-Rosen Aug 22, 2024
2ba31ad
Update ase.py
Andrew-S-Rosen Aug 22, 2024
fce697e
Merge branch 'Quantum-Accelerators:main' into neb_nn
kumaranu Aug 29, 2024
e35f912
Removed the directory paths from the log and the json files for the o…
kumaranu Aug 29, 2024
49a21db
pre-commit auto-fixes
pre-commit-ci[bot] Aug 29, 2024
fa3150f
Merge branch 'main' into neb_nn
Andrew-S-Rosen Sep 17, 2024
d65aef9
pre-commit auto-fixes
pre-commit-ci[bot] Sep 17, 2024
7bbff3b
Merge branch 'main' into neb_nn
Andrew-S-Rosen Sep 17, 2024
7c680a9
pre-commit auto-fixes
pre-commit-ci[bot] Sep 17, 2024
0f99a89
Remove unused code block
Andrew-S-Rosen Sep 19, 2024
6e374de
Merge branch 'main' into neb_nn
Andrew-S-Rosen Sep 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ jobs:
uv pip install --system -r tests/requirements.txt -r tests/requirements-mlp.txt -r tests/requirements-newtonnet.txt -r tests/requirements-sella.txt -r tests/requirements-phonons.txt "quacc[dev] @ ."

- name: Run tests with pytest
run: pytest -k 'mlp or newtonnet' --durations=10 --cov=quacc --cov-report=xml
run: pytest -k 'mlp or newtonnet or geodesic' --durations=10 --cov=quacc --cov-report=xml

- name: Upload code coverage report to Artifact
uses: actions/upload-artifact@v4
Expand Down
18 changes: 10 additions & 8 deletions docs/user/recipes/recipes_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,16 @@ The list of available quacc recipes is shown below. The "Req'd Extras" column sp

<center>

| Name | Decorator | Documentation | Req'd Extras |
| ------------------- | --------------- | -------------------------------------------- | -------------- |
| NewtonNet Static | `#!Python @job` | [quacc.recipes.newtonnet.core.static_job][] | |
| NewtonNet Relax | `#!Python @job` | [quacc.recipes.newtonnet.core.relax_job][] | |
| NewtonNet Frequency | `#!Python @job` | [quacc.recipes.newtonnet.core.freq_job][] | |
| NewtonNet TS | `#!Python @job` | [quacc.recipes.newtonnet.ts.ts_job][] | `quacc[sella]` |
| NewtonNet IRC | `#!Python @job` | [quacc.recipes.newtonnet.ts.irc_job][] | `quacc[sella]` |
| NewtonNet Quasi IRC | `#!Python @job` | [quacc.recipes.newtonnet.ts.quasi_irc_job][] | `quacc[sella]` |
| Name | Decorator | Documentation | Req'd Extras |
|---------------------| --------------- |-----------------------------------------------| |
| NewtonNet Static | `#!Python @job` | [quacc.recipes.newtonnet.core.static_job][] | |
| NewtonNet Relax | `#!Python @job` | [quacc.recipes.newtonnet.core.relax_job][] | |
| NewtonNet Frequency | `#!Python @job` | [quacc.recipes.newtonnet.core.freq_job][] | |
| NewtonNet TS | `#!Python @job` | [quacc.recipes.newtonnet.ts.ts_job][] | `quacc[sella]` |
| NewtonNet IRC | `#!Python @job` | [quacc.recipes.newtonnet.ts.irc_job][] | `quacc[sella]` |
| NewtonNet Quasi IRC | `#!Python @job` | [quacc.recipes.newtonnet.ts.quasi_irc_job][] | `quacc[sella]` |
| NewtonNet neb | `#!Python @job` | [quacc.recipes.newtonnet.ts.neb_job][] | |
| NewtonNet geodesic | `#!Python @job` | [quacc.recipes.newtonnet.ts.geodesic_job][] | |

</center>

Expand Down
115 changes: 115 additions & 0 deletions src/quacc/atoms/ts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
from __future__ import annotations

import logging
from importlib.util import find_spec
from typing import TYPE_CHECKING

from ase.atoms import Atoms
from monty.dev import requires

from quacc.atoms.core import copy_atoms

LOGGER = logging.getLogger(__name__)

has_geodesic_interpolate = bool(find_spec("geodesic_interpolate"))

if has_geodesic_interpolate:
from geodesic_interpolate.geodesic import Geodesic
from geodesic_interpolate.interpolation import redistribute

if TYPE_CHECKING:
from typing import Literal


@requires(
has_geodesic_interpolate,
"geodesic-interpolate must be installed. Refer to the quacc documentation.",
)
def geodesic_interpolate_wrapper(
reactant: Atoms,
product: Atoms,
n_images: int = 10,
perform_sweep: bool | Literal["auto"] = "auto",
redistribute_tol: float = 1e-2,
smoother_tol: float = 2e-3,
max_iterations: int = 15,
max_micro_iterations: int = 20,
morse_scaling: float = 1.7,
geometry_friction: float = 1e-2,
distance_cutoff: float = 3.0,
sweep_cutoff_size: int = 35,
) -> list[Atoms]:
"""
Interpolates between two geometries and optimizes the path with the geodesic method.

Parameters
----------
reactant
The ASE Atoms object representing the initial geometry.
product
The ASE Atoms object representing the final geometry.
n_images
Number of images for interpolation. Default is 10.
perform_sweep
Whether to sweep across the path optimizing one image at a time.
Default is to perform sweeping updates if there are more than 35 atoms.
redistribute_tol
the value passed to the tol keyword argument of
geodesic_interpolate.interpolation.redistribute. Default is 1e-2.
smoother_tol
the value passed to the tol keyword argument of geodesic_smoother.smooth
or geodesic_smoother.sweep. Default is 2e-3.
max_iterations
Maximum number of minimization iterations. Default is 15.
max_micro_iterations
Maximum number of micro iterations for the sweeping algorithm. Default is 20.
morse_scaling
Exponential parameter for the Morse potential. Default is 1.7.
geometry_friction
Size of friction term used to prevent very large changes in geometry. Default is 1e-2.
distance_cutoff
Cut-off value for the distance between a pair of atoms to be included in the coordinate system. Default is 3.0.
sweep_cutoff_size
Cut off system size that above which sweep function will be called instead of smooth
in Geodesic.

Returns
-------
list[Atoms]
A list of ASE Atoms objects representing the smoothed path between the reactant and product geometries.
"""
reactant = copy_atoms(reactant)
product = copy_atoms(product)

# Read the initial geometries.
chemical_symbols = reactant.get_chemical_symbols()

# First redistribute number of images. Perform interpolation if too few and subsampling if too many images are given
raw_interpolated_positions = redistribute(
chemical_symbols,
[reactant.positions, product.positions],
n_images,
tol=redistribute_tol,
)

# Perform smoothing by minimizing distance in Cartesian coordinates with redundant internal metric
# to find the appropriate geodesic curve on the hyperspace.
geodesic_smoother = Geodesic(
chemical_symbols,
raw_interpolated_positions,
morse_scaling,
threshold=distance_cutoff,
friction=geometry_friction,
)
if perform_sweep == "auto":
perform_sweep = len(chemical_symbols) > sweep_cutoff_size
if perform_sweep:
geodesic_smoother.sweep(
tol=smoother_tol, max_iter=max_iterations, micro_iter=max_micro_iterations
)
else:
geodesic_smoother.smooth(tol=smoother_tol, max_iter=max_iterations)
return [
Atoms(symbols=chemical_symbols, positions=geom)
for geom in geodesic_smoother.path
]
16 changes: 11 additions & 5 deletions src/quacc/recipes/newtonnet/core.py
kumaranu marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def freq_job(
)


def _add_stdev_and_hess(summary: dict[str, Any]) -> dict[str, Any]:
def _add_stdev_and_hess(summary: dict[str, Any], **calc_kwargs) -> dict[str, Any]:
"""
Calculate and add standard deviation values and Hessians to the summary.

Expand All @@ -218,6 +218,10 @@ def _add_stdev_and_hess(summary: dict[str, Any]) -> dict[str, Any]:
----------
summary
A dictionary containing information about the molecular trajectory.
**calc_kwargs
Custom kwargs for the NewtonNet calculator. Set a value to
`quacc.Remove` to remove a pre-existing key entirely. For a list of available
keys, refer to the `newtonnet.utils.ase_interface.MLAseCalculator` calculator.

Returns
-------
Expand All @@ -226,11 +230,13 @@ def _add_stdev_and_hess(summary: dict[str, Any]) -> dict[str, Any]:
Hessian values.
"""
settings = get_settings()
calc_defaults = {
"model_path": settings.NEWTONNET_MODEL_PATH,
"settings_path": settings.NEWTONNET_CONFIG_PATH,
}
calc_flags = recursive_dict_merge(calc_defaults, calc_kwargs)
kumaranu marked this conversation as resolved.
Show resolved Hide resolved
for i, atoms in enumerate(summary["trajectory"]):
calc = NewtonNet(
model_path=settings.NEWTONNET_MODEL_PATH,
settings_path=settings.NEWTONNET_CONFIG_PATH,
)
calc = NewtonNet(**calc_flags)
results = Runner(atoms, calc).run_calc().calc.results
summary["trajectory_results"][i]["hessian"] = results["hessian"]
summary["trajectory_results"][i]["energy_std"] = results["energy_disagreement"]
Expand Down
Loading
Loading