I'm trying to find the persistence length of a polymer from a LAMMPS simulation using the polymer analysis module in MDAnalysis. However, the persistence length seems to only return 1.0 no matter which data set I give it, and the graph of the curve fitted to the data is very clearly not exactly fitted. I'm not sure if there's an issue in the data I'm feeding it, how I'm calling the function, or the way I've constructed the universe. But here's my code and a picture of the output.
Python
chain = u.atoms.fragments
chainSorted = [polymer.sort_backbone(c) for c in chain]
plen = polymer.PersistenceLength(chainSorted).run()
print("persistence length: " + str(plen.results.lp))
print("average bond length: " + str(plen.results.lb))
print("bond autocorrelation: " + str(plen.results.bond_autocorrelation))
plen.plot()
results here, both numerical and the graph of the results and 'fitted' curve