-
Notifications
You must be signed in to change notification settings - Fork 62
Add CSVR / V-Rescale thermostat and anisotropic C rescale barostat #326
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
base: main
Are you sure you want to change the base?
Conversation
And is working well. Temperature set is indeed 200K, script modified from https://github.com/TorchSim/torch-sim/blob/main/examples/scripts/3_Dynamics/3.11_Lennard_Jones_NPT_Langevin.py |
|
Note: change the name to follow GROMACS, I prefer this name |
|
I need to check very carefully for the number of degrees of freedom used. I think the V-rescale implementation in SimpleMD removes the 3 dof linked to the COM. |
|
Observation on some simple implementations:
If you want to experiment with C-rescale: |
|
Current implementation with an exterior isotropic pressure only. The isotropic barostat should probably be implemented as well |
|
Looks great. Left a few comments. Choosing the correct value if isothermal compressibility was also an issue in previous version of NPT in ase so we could leave that to the user for now. |

Summary
Add Canonical sampling through velocity rescaling (CSVR) or v-rescale as called on Gromacs.
Note: removed the optimization to sample from Gamma distribution which I doubt is useful on a high level framework like pytorch.
Checklist
Before a pull request can be merged, the following items must be checked:
We highly recommended installing the
prekhooks running in CI locally to speedup the development process. Simply runpip install prek && prek installto install the hooks which will check your code before each commit.