From 92d5541ec2fcc986a43ff765c22658db08f2fc77 Mon Sep 17 00:00:00 2001 From: Sampurna Mukherjee <31826722+SampurnaM@users.noreply.github.com> Date: Fri, 29 Mar 2024 00:38:31 +0530 Subject: [PATCH] Update pca.py --- package/MDAnalysis/analysis/pca.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/MDAnalysis/analysis/pca.py b/package/MDAnalysis/analysis/pca.py index 699971573f7..280f7c2a8db 100644 --- a/package/MDAnalysis/analysis/pca.py +++ b/package/MDAnalysis/analysis/pca.py @@ -573,7 +573,7 @@ def project_single_frame(self, components=None, group=None, anchor=None): for res in group.residues: # n_common is the number of pca atoms in a residue n_common = pca_res_counts[np.where( - pca_res_indices == res.resindex)][0] + pca_res_indices == res.resindex)][0] non_pca_atoms = np.append(non_pca_atoms, res.atoms.n_atoms - n_common) # index_extrapolate records the anchor number for each non-PCA atom