OpenFreeEnergy/cinnabar

the value of the x/y axis from plot_DGs function does not reflect the true DGs

wenchangzhou-qtx opened this issue · 6 comments

Hey @richardjgowers,

I'm going through this example notebook (first-example.ipynb), seems function plot_DGs produces the same value range in x and y axis as plot_DDGs, but when I check the example.csv file, the DGs are from ~-7 to -11 kcal/mol, not from ~ -3 to 3 kcal/mol as shown by the generated plot, do I miss anything here to understand the generated plot by plot_DGs.

hi @wenchangzhou-qtx

Hmm, I think what's happening here is the MLE method gives DG estimates from the computed DDG values, but these are centered around 0. There's then a choice of rescaling these up to the experimental values, or as is happening here the experimental results are brought back down to the 0-centered MLE values

@richardjgowers yeah, confirmed. I switched off centralizing (True by default), now I can get reasonable plot at least from what is shown in the x and y axis. But all the data points are off the diagonal, I guess these data points are dummies right?
Screen Shot 2023-07-18 at 1 55 43 PM

In order to use this tool, do I need to prepare my own results following the exact format of example.csv?

I think there are ways to use the API in a python script that doesn't involve passing through that [ugly] csv file. You might want to check the docstring of the FEMap object for this purpose https://github.com/OpenFreeEnergy/cinnabar/blob/main/cinnabar/femap.py#L54

That said, I agree in that we probably need to update the examples we have and add one that uses the API instead of the CSV file.

@wenchangzhou-qtx we're working on a programmatic way of constructing the object (#84), it shouldn't be too long, but for now I'd recommend the file format.

Hey @richardjgowers, just check with you whether this new feature is now available, I might miss the announcement somewhere.