Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix two problems with NPT: volume fluctuations (with iso, previously with aniso/tri) and energy conservation (with aniso/tri) #1259
These code changes address two different problems: incorrect volume fluctuations and energy conservation. The first problem was related to ndof used to compute targe temperature of barostat variables. The second problem was due to using slightly out-of-date temperature tensor in pressure tensor calculation
Aidan Thompson. Steven van den Brande played a key role in identifying the problems.
This change will make minor differences to output from all npt/nph simulations.
Post Submission Checklist
Please check the fields below as they are completed
Further Information, Files, and Links
This pull request is related to one made about 6 months ago. I don't know how to look it up.
This PR does seem to fix the issue where the ensemble average pressure almost never reached the iso setpoint except for unreasonably large systems. It is now exact even for surprisingly small systems.
Might also be relevant for the folks attempting to do calculate thermodynamic quantities with the fluctuation method? Posts about this came up on the mailing list many times, and never seemed to work right.
@martok, good to know. The more people that check this the better. I only looked at the scalar volume fluctuation distribution, not the vector axial strain distribution for aniso or the full tensor strain distribution for tri. If this change fixes the previous problems sampling full tensor strain distribution, it wold allow sampling of elastic constants at any T and P.