-
Couldn't load subscription status.
- Fork 54
Description
Hi alchemlyb developers,
Thank you all for the development of this package. I was using alchemlyb to analyze some output files from the simulation performed by GROMACS. When using the function equilibrium_detection with the input parameters df and series being the whole u_nk matrix extracted from a *dhdl.xvg file (by the function extract_u_nk) and the first column of u_nk (which is u_nk[(0.0, 0.0, 0.0, 0.0)]), I got the following error:
KeyError: Index(['time'], dtype='object')
Tracing back the error, I found that this error indicated that there was no time index in the series u_nk[(0.0, 0.0, 0.0, 0.0)] . However, series.index in this case did return time as one of the names of the indices. I am not sure if this is an issue of data types. I tried turning the data type of u_nk[(0.0, 0.0, 0.0, 0.0)] from Series into DataFrame, but same error occurred. Here I reproduced the error in a jupyter notebook, in which I also added some comments and explanations of the problem(alchemlyb_issue.zip).
To my understanding, the input parameter df of the subsampling methods should be the matrix/DataFrame extracted from the xvg file, while series could be any time series/column of df. I'm not sure if this understanding is correct, but it might be worthy to add more detailed explanations of these two parameters in the documentation.
Thanks a lot!