From 211cbcf6a64ed932641acb869ea642ccd6a42fca Mon Sep 17 00:00:00 2001 From: Egor Marin Date: Fri, 12 Jan 2024 15:17:54 +0100 Subject: [PATCH] Fix bug in PCA trajectory iteration -- avoid explicit usage of self.start --- package/MDAnalysis/analysis/pca.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/MDAnalysis/analysis/pca.py b/package/MDAnalysis/analysis/pca.py index cad6946b2dc..fef2ac9a79a 100644 --- a/package/MDAnalysis/analysis/pca.py +++ b/package/MDAnalysis/analysis/pca.py @@ -247,7 +247,8 @@ def __init__(self, universe, select='all', align=False, mean=None, def _prepare(self): # access start index - self._u.trajectory[self.start] + # self._u.trajectory[self.start] + self._sliced_trajectory[0] # reference will be start index self._reference = self._u.select_atoms(self._select) self._atoms = self._u.select_atoms(self._select)