Skip to content

Commit

Permalink
init coordsB and indicesB
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Feb 26, 2021
1 parent 90dffc6 commit 87101ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions prody/dynamics/adaptive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 8 additions & 5 deletions prody/dynamics/comd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down Expand Up @@ -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])

Expand Down Expand Up @@ -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__':
Expand Down

0 comments on commit 87101ce

Please sign in to comment.