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
added new style of thermostat the logistic thermostat #1026
Conversation
@samuelcajahuaringa thanks for your pull request submission. we are currently in the process of preparing a stable release, so we will be looking at your contribution after that. |
thanks, Axel Kohlmeyer and LAMMPS developers. I will take this time to review the code. |
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.
My main concern now is the complexity of the code changes that are added to fix_nh.cpp. Anything that can be done to reduce and isolate the number of places where Logistic code is added to the main functions would be helpful in reducing the overall complexity of fix_nh.cpp. I understand that some of this is unavoidable, so I leave it to discretion of @samuelcajahuaringa
@samuelcajahuaringa i am looking at merging this change right now, but it is missing an important pre-requisite: there is no addition to the documentation explaining the new flag. i am also wondering if "logistic" is a good name for this flag. it is a word that has different meanings in different languages, so it it might confuse people. |
Add additional deterministic thermostat style in this fix nvt/npt the logistic thermostat, proved ergodic in the most difficult case
@athomps i've rebased this change to the latest master, added docs, parameter checks and refactored the code. this looks fairly well encapsulated and it was trivial to port it to KOKKOS. no port to other derived NH classes was needed. i think this is now good enough to be included from a formal point of view. i cannot judge the science, though. |
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.
- See comment in fix_nh.cpp
- Has this been tested to make sure default behaviors (many cases of nvt/nph/npt with logistic no) is unaffected.
- The keyword name logistic is good, there will be no confusion
- How well does conserve the conserved quantity versus timestep size?
done
yes, it passes our extended regression test
ok.
will need to run some tests for that. |
@athomps here is some test about energy conservation comparing |
The logistic thermostat shows 10x worse energy conservation that the Nose-Hoover equivalent (tchain=1) on two different metrics: long time energy drift and short time fluctuations. Either this is a known feature of the logistic thermostat (from a brief review of the cited Tapias2016 paper, this is not clear) or something is wrong with the implementation. @samuelcajahuaringa did you do your own testing on this? The short term fluctuations should be substantially smaller for 10fs versus 20x, but they are about the same. This is almost certainly due to some kind of error in the code, probably a missing term in E_conserved. |
@samuelcajahuaringa we've discussed the state of this pull request among the LAMMPS developers and have concluded, that it needs more work. There is little value to having improved sampling, when it cannot provide energy conservation to be at least on par with the Nose-Hoover variant with |
A new deterministic thermostat style is added in this fix nvt/npt the "logistic thermostat".
Purpose
A new style of the deterministic thermostat is added the logistic thermostat proved ergodic in the most difficult case, with the use of the flag logistic the user can be chosen between the Nosé-Hoover thermostat or the logistic thermostat to perform simulation in the nvt or the npt ensemble.
Author(s)
Samuel Cajahuaringa (Unicamp/Brazil)
Backward Compatibility
This style of the thermostat is added with minor changes in this fix, reusing all functionalities of the fix_nh.cpp, like compute the corresponding conservative energy associated with this dynamic, is possible restart the corresponding extended variables to perform a continuous simulation.
Implementation Notes
The functions logistic_temp_integrate() and losgistic_press_integrate() are the logistic thermostats apply to the particles and barostat, respectively. Implementing in the line 2466 to the line 2593.
TODO list for @akohlmey :
logistic yes/no
FixNH
FixNH
.Post Submission Checklist
Please check the fields below as they are completed_
Further Information, Files, and Links
D. Tapias, D. P. Sanders, and A. Bravetti, Geometric integrator for simulations in the canonical ensemble, J. Chem. Phys. 145, 084113 (2016).
D. Tapias, A. Bravetti, and D. P. Sanders, Ergodicity of One-dimensional Systems Coupled
to the Logistic Thermostat, CMST 23, 11 (2017).