-
Notifications
You must be signed in to change notification settings - Fork 51
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
AMBER dVdl convert to pandas error #272
Comments
Hi, Thanks for reporting this issue. |
I have attached one of my Amber MD output files above. I further did some more debugging on the "amber.py" code and I feel like extract section for DVDL and appending to filedatum.gradients might have some inconsistency with my amber output file. I may be wrong because this my first time debugging a complete python code. So, please let me know what you think. Thank you! |
@fr-0zt Thanks. I can reproduce the error. I wonder if you mind give a brief description of how you generate the file? Especially, how you set the frequency that amber reports the dhdl values, please. Thank you. |
@xiki-tempula Thank you for looking in to this. I am performing a 10 ns simulation, saving the energies and dvdl values every 10 ps. However, according to Amber18 (and newer) there are two TI regions specified at the beginning of the simulation. So, dvdl values are saved for both the regions simultaneously at the said frequency. I have attached the first part of the energies output using this simulation.
|
Hi, I'll have a look at it right now! Just a quick comment about the "two TI regions specified at the beginning of the simulation". It's true indeed that amber saves the two TI regions (and it did so also before amber18, as far as I remember), but if you look at the file, especially at the end of the file, where the averages over the last N time-steps are reported, DV/DL values (the only value read by alchemlyb) and their RMS fluctuations are perfectly equal between TI region 1 and 2. If you search in the AMBER mailing list you can find some better explanation on why values are reported like that, but I can't remember where precisely. PS: from your output file it seems you are printing values in the output file every 1 ps, and not 10 ps as you previously stated, as you have |
@fr-0zt a minor issue: in the script you provided, you used |
Hi I found the culprit in a "too strict" regex pattern, I addressed the issue in PR #273. Testing the updated version with your input file seems to run fine, extracting the right time and DV/DL values. |
This PR addresses issue #272. This issue exposed a nasty bug inside the regex pattern we used to extract sections in the amber output file. we are trying to match a sequence of type filed = int/float extracting the int/float corresponding to the field. Up till now, the pattern was fr' {field}\s+=\s+(\*+|{_FP_RE}|\d+)' were field was the string we want to extract the value for, and _FP_RE is defined to extract the float/int after the equal. The problem arises when the field and/or the value are not separated from the = sign by a space (as was the case in the issue). It's strange this didn't appear before! I just changed the + in \s+=\s+ to *. Thinking about it, this should not break anything else, but I can't be 100% sure and the tests should catch any "macro" problems eventually introduced with this PR.
The PR is merged to the master. |
Hello all,
I'm having trouble forming my pandas data frame using the Amber parser in alchemlyb. I'm still new to python programming and I'm not sure where I might have done wrong in the python script. I really appreciate guidance on handling this error. I have also attached the code I'm using below.
Thanks.
The text was updated successfully, but these errors were encountered: