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 TC Surface Hopping interface, broken since #62 #80

Merged
merged 1 commit into from
Feb 10, 2022
Merged

Conversation

danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Feb 4, 2022

While the Amber MPI interface that we use for classical MD
expects coordinates in angstromgs, the FMS interface expects bohr,
which I didn't notice when I was refactoring this code.
I really need to write those tests for the TC-SH interface.

Fixes #79.

While the Amber MPI interface that we use for classical MD
expects coordinates in angstromgs, the FMS interface expects bohr,
which I didn't notice when I was refactoring this code.
I really need to write those tests for the TC-SH interface.
@danielhollas danielhollas self-assigned this Feb 4, 2022
@codecov
Copy link

codecov bot commented Feb 4, 2022

Codecov Report

Merging #80 (49b2a0f) into master (8863f21) will decrease coverage by 0.06%.
The diff coverage is 46.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #80      +/-   ##
==========================================
- Coverage   70.18%   70.11%   -0.07%     
==========================================
  Files          40       40              
  Lines        5722     5729       +7     
==========================================
+ Hits         4016     4017       +1     
- Misses       1706     1712       +6     
Impacted Files Coverage Δ
src/force_terash.F90 0.00% <0.00%> (ø)
src/tera_mpi_api.F90 95.21% <50.00%> (-3.13%) ⬇️
src/force_tera.F90 95.52% <100.00%> (ø)

@danielhollas danielhollas marked this pull request as ready for review February 4, 2022 19:30
Copy link
Contributor

@suchanj suchanj left a comment

Choose a reason for hiding this comment

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

Tested, coordinates are passed to TC just right.

@danielhollas danielhollas merged commit 79d2d54 into master Feb 10, 2022
@danielhollas danielhollas deleted the fix-tc-sh branch February 10, 2022 18:28
danielhollas added a commit that referenced this pull request Mar 12, 2022
I verified that this new test would have caught the bug that was fixed in #80.

As with the previous TC-MPI tests, the new C++ code was copied from TeraChem and trimmed and cleaned up, and I added some basic assertions about what is passed by ABIN. Specificically, in the SH interface, MO coefficients, CI vectors and some other stuff (called 'blob') is passed back and forth so I am checking that the the numbers match. I am also testing the restart capability here. In this interface, there's an extra file wfn.bin which stored the MOs and CI vectors per above.

While the whole interface is tested, I am not actually running non-adiabatic dynamics since that would require implementing some kind of a model for NAC vectors. For this test, we're simply running ground state MD, forces and energies are taken from the in-built water force field, as in previous tests.

TODO: we need to test a proper surface hopping run, maybe by implementing on of the analytical models for NA dynamics, e.g. one of the 1D Tully models, or vibronic coupling model.

I have also added some unit tests, mostly to test various error conditions. I checked on Codecov that most of the code in force_terash.F90 is now tested. There are some lines specific for Landau-Zener, so an additional test will be needed for that in the future.
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.

Terachem-MPI for Surface Hopping interface broken
2 participants