finding persistence length in a universe with one polymer

35 views
Skip to first unread message

Margaret Brooks

unread,
Jul 13, 2022, 4:17:16 PM7/13/22
to MDnalysis discussion
Hi -- I'm still pretty new to MDAnalysis but I'm using it to analyze LAMMPS simulations of a coarse-grain model of a protein. Trying to find the persistence length has not returned sensible results, but I'm not sure how to fix it on my end. In my simulation, there is only one fragment and all of its atoms are part of the backbone. A snippet of my code (just the part finding persistence length) and the results:

plen1.PNG

Oliver Beckstein

unread,
Jul 13, 2022, 6:58:17 PM7/13/22
to mdnalysis-discussion
Hi Margaret,

Welcome the MDAnalysis user list!

Looking at your output it looks as if the fit has a hard time finding a solution for your data. Ideally, you can go out to larger x but if not I’d still expect the fit to do better than what you have. Perhaps the issue is that we run a simple exponential fit with scipy curve_fit https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html without providing any initial parameters. In this case, curve_fit sets the p0 to 1. The MDAnalysis code does not have a way to provide initial parameter guesses, which might help the solver to find a better solution. 

Therefore, I suggest that you try to *manually* perform the curve fit that is described in the docs https://docs.mdanalysis.org/stable/documentation_pages/analysis/polymer.html#MDAnalysis.analysis.polymer.PersistenceLength . You can use the code from the fit_exponential_decay function https://docs.mdanalysis.org/stable/_modules/MDAnalysis/analysis/polymer.html#fit_exponential_decay with the plen.results.lb for the average bond length and the plen.results.bond_autocorrelation for the data C(n). You can then provide guesses for the initial parameters to curve_fit in the p0 kwarg (e.g., p0=[100.]). See if you can guess an exponential that fits the initial decay of your data.

It’s possible that for such a short polymer, the assumption for exponential decay in the autocorrelation function is not valid. In this case you need a different theory to extract a characteristic length scale.

Oliver

On Jul 13, 2022, at 1:16 PM, Margaret Brooks <broo...@clarkson.edu> wrote:

Hi -- I'm still pretty new to MDAnalysis but I'm using it to analyze LAMMPS simulations of a coarse-grain model of a protein. Trying to find the persistence length has not returned sensible results, but I'm not sure how to fix it on my end. In my simulation, there is only one fragment and all of its atoms are part of the backbone. A snippet of my code (just the part finding persistence length) and the results:

<plen1.PNG>


--
Oliver Beckstein (he/his/him)

GitHub: @orbeckst

MDAnalysis – a NumFOCUS fiscally sponsored project





Reply all
Reply to author
Forward
0 new messages