Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/polymer.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def fit(self):

def _conclude(self):
norm = np.linspace(self.chainlength - 1, 1, self.chainlength - 1)
norm *= len(self._atomgroups) * self._trajectory.n_frames
norm *= len(self._atomgroups) * self.n_frames
self.results.bond_autocorrelation = (
self.results.raw_bond_autocorr / norm
)
Expand Down
4 changes: 4 additions & 0 deletions testsuite/MDAnalysisTests/analysis/test_persistencelength.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def test_ag_ValueError(self, u):
def test_run(self, p_run):
assert len(p_run.results.bond_autocorrelation) == 280

def test_run_partial(self, p):
p.run(start=0, stop=2)
assert_almost_equal(p.results.bond_autocorrelation[0], 1.0, 3)

def test_lb(self, p_run):
assert_almost_equal(p_run.results.lb, 1.485, 3)

Expand Down
Loading