Skip to content

Commit

Permalink
add return eigvals to calcPrincAxes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Jul 28, 2024
1 parent ed88515 commit cabeb82
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions prody/measure/measure.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,10 +824,13 @@ def calcInertiaTensor(coords):
return dot(coords.transpose(), coords)


def calcPrincAxes(coords, turbo=True):
def calcPrincAxes(coords, turbo=True, return_vals=False):
"""Calculate principal axes from coords"""
M = calcInertiaTensor(coords)
_, vectors, _ = solveEig(M, 3, zeros=True, turbo=turbo, reverse=True)
eigvals, vectors, _ = solveEig(M, 3, zeros=True, turbo=turbo, reverse=True)

if return_vals:
return eigvals, vectors.transpose()
return vectors.transpose()


Expand Down

0 comments on commit cabeb82

Please sign in to comment.