From 87101ce526e1ae5bfb999d41a5b540ed2ac78228 Mon Sep 17 00:00:00 2001 From: James Krieger Date: Fri, 26 Feb 2021 17:39:19 +0000 Subject: [PATCH] init coordsB and indicesB --- prody/dynamics/adaptive.py | 3 +++ prody/dynamics/comd.py | 13 ++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/prody/dynamics/adaptive.py b/prody/dynamics/adaptive.py index 784a706a9..4fe3f49e8 100644 --- a/prody/dynamics/adaptive.py +++ b/prody/dynamics/adaptive.py @@ -496,6 +496,9 @@ class AdaptiveHybrid(Hybrid): def __init__(self, title, **kwargs): super().__init__(title=title) self._atomsB = None + self._coordsB = None + self._indicesB = None + self._defvecs = [] self._rmsds = [] self._cg_ensA = Ensemble(title=title) diff --git a/prody/dynamics/comd.py b/prody/dynamics/comd.py index 38b3d1ace..8def54d6a 100644 --- a/prody/dynamics/comd.py +++ b/prody/dynamics/comd.py @@ -215,6 +215,9 @@ class CoMD(Hybrid): def __init__(self, title, **kwargs): super().__init__(title=title) self._atomsB = None + self._coordsB = None + self._indicesB = None + self._defvecs = [] self._rmsds = [] self._traj_rmsds = [] @@ -522,15 +525,15 @@ def getAtomsB(self, selected=True): 'Returns atoms for structure B.' if self._atomsB is None: return None - if self._indices is None or not selected: + if self._indicesB is None or not selected: return self._atomsB - return self._atomsB[self._indices] + return self._atomsB[self._indicesB] def getRMSDsB(self): if self._confs is None or self._coords is None: return None - indices = self._indices + indices = self._indicesB if indices is None: indices = np.arange(self._confs.shape[1]) @@ -917,9 +920,9 @@ def getCoordsB(self, selected=True): if self._coordsB is None: return None - if self._indicesB is None or not selected: + if self._indices is None or not selected: return self._coordsB.copy() - return self._coordsB[self._indicesB].copy() + return self._coordsB[self._indices].copy() if __name__ == '__main__':