Skip to content

Commit

Permalink
added getCoordsB
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Feb 26, 2021
1 parent df83906 commit 5b02777
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions prody/dynamics/adaptive.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,3 +769,12 @@ def setCoordsB(self, coords):
self._atomsB = atoms._atoms
else:
raise ValueError('coordsB must have the same shape as main coords')

def getCoordsB(self, selected=True):
"""Returns a copy of reference coordinates for selected atoms."""

if self._coordsB is None:
return None
if self._indicesB is None or not selected:
return self._coordsB.copy()
return self._coordsB[self._indicesB].copy()
9 changes: 9 additions & 0 deletions prody/dynamics/comd.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,15 @@ def setCoordsB(self, coords):
else:
raise ValueError('coordsB must have the same shape as main coords')

def getCoordsB(self, selected=True):
"""Returns a copy of reference coordinates for selected atoms."""

if self._coordsB is None:
return None
if self._indicesB is None or not selected:
return self._coordsB.copy()
return self._coordsB[self._indicesB].copy()


if __name__ == '__main__':

Expand Down

0 comments on commit 5b02777

Please sign in to comment.