Fix 1417 again#1419
Conversation
Timestep was passed correctly with code for dealing with rounding error when converting float to double. When updating unit, however, the timestep is reset using the data that was pssed from the MD code. This has now been changed so you use the value of the timestep that was set in PLUMED.
|
Spoke too soon. Let me investigate. |
|
OK, @GiovanniBussi, I hope this should be a better fix. The only thing is that I now also do the same thing that is done with the timestep when you transfer the value of k_B T. It is probably less critical in that case, but making that change is hopefully harmless. Not sure why codecheck is failing. It looks like it is not able to download something or other, and that it is not because of a change I have made. |
|
Yes I agree this solution is better (and cleaner) |
|
Do you understand what has gone wrong with code check? |
There has been a glitch in the ftp download of autoconf, it seems to be working now. Maybe you can wait for this test to run |
|
OK will do. If this all passes then I will merge. OK? |
|
Yes thanks! |
Description
@GiovanniBussi I think this should fix isssue #1417. I took your original fix kept the first two commits so kept your test. I removed the third commit that had the changes to the code, as they were not fixing the problem. I thus closed your PR and replaced it with this one.
The way the code was working (and why it was not doing what was expected) was as follows:
I have changed it so in point 3, you multiply the quantity stored in the PLMD::Value by the conversion factor, so it should work now. Note that this resetting of the units is performed only if you pass a quantity that is fixed throughout the simulation and set before the MD loop starts.
Target release
I would like my code to appear in release 2.10
Type of contribution
Copyright
COPYRIGHTfile with the correct license information. Code should be released under an open source license. I also used the commandcd src && ./header.sh mymodulenamein order to make sure the headers of the module are correct.Tests