Skip to content

NaI analytic potential for FSSH#178

Merged
danielhollas merged 7 commits intomasterfrom
nai_potential
Jul 3, 2024
Merged

NaI analytic potential for FSSH#178
danielhollas merged 7 commits intomasterfrom
nai_potential

Conversation

@JanosJiri
Copy link
Copy Markdown
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.
@codecov
Copy link
Copy Markdown

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
Copy Markdown
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.

Comment thread src/potentials_sh.F90 Outdated
Comment thread src/potentials_sh.F90 Outdated
Comment thread src/potentials_sh.F90
Comment thread src/surfacehop.F90 Outdated
Comment thread src/surfacehop.F90
One testing trajectory was added. The test is performed on dotprod,
prob, pop, distances and PES.
@JanosJiri
Copy link
Copy Markdown
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.

Comment thread tests/test Outdated
@danielhollas
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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