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
Systematically improve fix pimd #3625
Conversation
…lf the inverse of the normal mode frequency. Could not run correctly.
Changed the unmap function in domain.h and domain.cpp. Also removed the MPI_Barriers in fix_pimd4.cpp.
…, by changing the position of domain->unmap to post_force.
@Yi-FanLi I've had a cursory look over your submission. This looks almost like a complete re-implementation of the PIMD functionality. So my recommendation at this point would be to give the class and command a new name, and have it added as an additional fix style instead of extending/replacing the existing fix. Since you are using a langevin thermostat, it could be called fix pimd/langevin (and the class correspondingly FixPIMDLangevin, and the files fix_pimd_langevin.h,.cpp). That also lifts the burden of having to restore the Nose-Hoover thermostat unless you want to do it. The documentation for both styles could be on the same doc page with some paragraphs explaining the differences. We would then rename the original fix pimd to fix pimd/nvt (with backward compatibility to support old inputs that use fix pimd). @athomps do you agree with this? |
Yuxing said he could take a look, but hasn't had a chance yet. I think it is fine to go ahead and rework this to be a separate |
@Yi-FanLi We need to have a discussion on how you move forward with this work. @sjplimp and I have discussed it and agreed to rename the existing fix pimd to fix pimd/nvt. Since you are using a stochastic thermostat, this would then naturally become fix pimd/langevin or similar. This change also relieves you from the burden of maintaining backward compatibility with the original PIMD implementation and thus can set up keywords and options differently (it is still recommended to make this similar to other LAMMPS commands, though). I have just implemented the rename of the existing fix in pull request #3658. My suggestion for you is the following:
I have some more comments on your implementation and its programming style, but that is better addressed after we have the "big picture" setup sorted out. If you want to discuss in more details, I can either send you an invite to the LAMMPS developer slack or offer you an in-person meeting via zoom. Of course we can also continue discussing here, if you prefer. Please send an email with your contact info to my personal email in case you want to discuss via slack or zoom. I expect that if we sort out some of the basic parameters as early as possible and in direct conversation, it will save you and us time and effort. We are looking forward to have more options in LAMMPS for users that want to do PIMD simulations. |
Hi @akohlmey , thanks for your kind reply. I am very happy that you gave me so many useful suggestions. I'll rename my fix style and create a new PR as long as #3658 is merged. |
Summary
This is a draft pull request to systematically improve fix pimd.
It is intended to add the following features:
Note that this is still a draft version. I use the current version to run productive PIMD tasks for water/ice myself. It might not be compatible with the previous version which uses Nose-Hoover chain thermostat.
Also, I am still working on profiling and optimizing this code. There might be some synchronization issues. I am trying to accelerate it.
This code may need some modifications before being merged.
Related Issue(s)
Author(s)
Yifan Li
Graduate student at Princeton University
yifanl@princeton.edu
Licensing
By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).
Backward Compatibility
The Nose-Hoover chain thermostat is disabled temporarily due to the complexity of implementation in PIMD and remains for further work. CMD is also temporarily disabled for the same reason.
Implementation Notes
The PIMD integrators with the Langevin thermostat and BZP barostat are implemented mostly following the approach in i-PI. The correctness is tested in both Lennard-Jones potential and liquid water / ice systems.
Post Submission Checklist
Further Information, Files, and Links