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

NaI analytic potential for FSSH #178

Merged
merged 7 commits into from
Jul 3, 2024
Merged

NaI analytic potential for FSSH #178

merged 7 commits into from
Jul 3, 2024

Conversation

JanosJiri
Copy link
Contributor

Analytic potential for NaI implemented for surface hopping dynamics. The original potential is adiabatic but was adiabatized in the code. Everything even with the source articles is described in the code. 3ps of dynamics can be done in 8 seconds when one is not writing too much on the disk. Accessing the disk is the most demanding part of the simulation. The implementation was compared to the exact QD.
plot

JanosJiri added 4 commits May 3, 2024 13:17
Current implementation works for 1 particle in x coordinate which is considered to be the r=r1-r2 coordinate.
The implementation was briefly tested. More thorough testing is necessary.
Copy link

codecov bot commented May 8, 2024

Codecov Report

Attention: Patch coverage is 92.64706% with 5 lines in your changes missing coverage. Please review.

Project coverage is 92.83%. Comparing base (b5383db) to head (739f22a).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #178      +/-   ##
==========================================
- Coverage   92.84%   92.83%   -0.01%     
==========================================
  Files          46       47       +1     
  Lines        6720     6787      +67     
  Branches      754      762       +8     
==========================================
+ Hits         6239     6301      +62     
- Misses        469      474       +5     
  Partials       12       12              
Flag Coverage Δ
unittests 21.85% <0.00%> (-0.25%) ⬇️

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

Files Coverage Δ
src/forces.F90 97.56% <100.00%> (+0.01%) ⬆️
src/init.F90 90.56% <100.00%> (+0.02%) ⬆️
src/surfacehop.F90 95.61% <100.00%> (+<0.01%) ⬆️
src/potentials_sh.F90 92.06% <92.06%> (ø)

Copy link
Contributor

@danielhollas danielhollas left a comment

Choose a reason for hiding this comment

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

This looks great, amazing work @JanosJiri! 👏 Really excited for this.

I'll have a closer look at the implementation later, but it looks good overall from high level.
Thank you for a very clean code and comments.

Besides some minor stuff I noticed, it would be great if you could add at least one basic test.

Also, please run ./autoformat.py which should autoformat the code. You might need to split some of the long lines manually, since the formater isn't clever enough for that.

src/potentials_sh.F90 Outdated Show resolved Hide resolved
src/potentials_sh.F90 Outdated Show resolved Hide resolved
src/potentials_sh.F90 Show resolved Hide resolved
src/surfacehop.F90 Outdated Show resolved Hide resolved
src/surfacehop.F90 Show resolved Hide resolved
One testing trajectory was added. The test is performed on dotprod,
prob, pop, distances and PES.
@JanosJiri
Copy link
Contributor Author

Fprettify applied and one test added. I also processed all the changes requested except for one where I have a question for you. Once we resolve this, the code will be ready for merging.

tests/test Outdated Show resolved Hide resolved
@danielhollas
Copy link
Contributor

Excellent, thanks!

Fprettify applied and one test added. I also processed all the changes requested except for one where I have a question for you.

Hmm, I don't see the question anywhere. Did you post it on Github? (Github review UI is sometimes super confusing so perhaps I just missed it)

@JanosJiri
Copy link
Contributor Author

Excellent, thanks!

Fprettify applied and one test added. I also processed all the changes requested except for one where I have a question for you.

Hmm, I don't see the question anywhere. Did you post it on Github? (Github review UI is sometimes super confusing so perhaps I just missed it)

Yes, it's on Github but it probably got lost in the conversation. I was asking if you really want to name the file src/nai_potential.F90. I attach screenshot of the full comment.
Screenshot 2024-06-06 at 10 17 44

@danielhollas
Copy link
Contributor

Thanks, the comment is marked as "pending", you'll need to "Finish the review" to publish it.
I'll answer in the afternoon.

@danielhollas
Copy link
Contributor

@JanosJiri apologies for the delay while I was away. This looks really great, thanks for adding a test and extensive comments. Just one question, could you reduce the number of steps in the test? We generally try to keep the number of steps to the absolute minimum for numerical stability, to reduce the chance that the test will break with different compiler versions for example. Also, the test now takes more than 5s, which might not seem like much, but since we have a lot of them it adds up.

When you modify the input.in in the test, you can quickly regenerate the reference files with

make makeref TEST=SH_NaI

In most tests with only do one step. Maybe here we want a bit more so we can test the value of NACM? But I think you anyway see it in dotprod.dat, right?

@danielhollas danielhollas self-requested a review July 3, 2024 14:59
Copy link
Contributor

@danielhollas danielhollas left a comment

Choose a reason for hiding this comment

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

🚀

@danielhollas danielhollas merged commit 46e61e5 into master Jul 3, 2024
19 checks passed
@danielhollas danielhollas deleted the nai_potential branch July 3, 2024 15:01
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.

2 participants