-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add test for global Nosé-Hoover thermostat + refactor #96
Conversation
a0d324c
to
c925420
Compare
Codecov Report
@@ Coverage Diff @@
## master #96 +/- ##
==========================================
+ Coverage 84.74% 85.55% +0.80%
==========================================
Files 41 41
Lines 5783 5780 -3
==========================================
+ Hits 4901 4945 +44
+ Misses 882 835 -47
|
c925420
to
6c1e177
Compare
call fatal_error(__FILE__, __LINE__, & | ||
'Invalid NHC thermostat parameter') | ||
end if | ||
end subroutine check_nhc_parameters | ||
|
||
subroutine nhc_init() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This init function was quite messy so I've broken in down to several pieces in individual functions. I also moved keyword sanity checks related to NHC here from init.F90.
end do | ||
if (tau0 > 0) Qm(1) = ams ! see tuckermann,stat.mech. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I made an actual functional change for PIMD with staging transformation. Previously, if tau0
was not set in the input file, the NHC mass for the staging centroid would be the same as for the other beads. Not sure whether this has real consequence, I'll do some testing later. Need to read the Tuckermann again to better understand where these formulas are coming from.
if (ams < 0 .and. tau0 < 0) then | ||
call set_yoshida_weights(nyosh) | ||
|
||
! Not sure if we should have this default value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Štěpán pointed out that the default tau0=0.001 ps was designed primarily for PIMD thermostatting. However, everyone uses it for regular MD simulations which is not ideal ... But this comes to a need for better education of our users. Maybe we should write down some pamphlet explaining global/local NHC or recommend using Langevine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a very good point, I've been worried about that for some time, but didn't know how to approach it.
I would suggest for now to remove the default value for classical MD and require it to be set explicitly in the input file, which should at least alert the users for it's importance a bit. What do you think? We could maybe keep the default value for PIMD.
Writing something up would be great, perhaps I could do a seminar in our group here and than share the slides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of default value might be the way. It's an additional input section so the user should know what he wants. I would personally set default values for both PIMD (as is) and MD (e.g. global thermostat with tau 1.0 ps), however doing it just for PIMD is better - if somebody tries to recalculate old input, it will be backwards compatible in a sense that ABIN won't change the constant on its own.
Any material would be great, also adding the task to my to-do list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b08f69e
to
1d1aede
Compare
No description provided.