Skip to content

Commit

Permalink
Merge branch 'prody:master' into interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
karolamik13 authored Oct 17, 2023
2 parents a99754e + 3fbf6b8 commit 2b541e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions prody/dynamics/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def parseModes(normalmodes, eigenvalues=None, nm_delimiter=None,
return nma


def parseScipionModes(metadata_file, title=None, pdb=None):
def parseScipionModes(metadata_file, title=None, pdb=None, parseIndices=False):
"""Returns :class:`.NMA` containing eigenvectors and eigenvalues
parsed from a ContinuousFlex FlexProtNMA Run directory.
Expand All @@ -324,6 +324,13 @@ def parseScipionModes(metadata_file, title=None, pdb=None):
:arg title: title for :class:`.NMA` object
:type title: str
:arg pdb: pdb file to help define dof
:type pdb: str
:arg parseIndices: whether to parse indices and output a ModeSet
default *False*
:type parseIndices: bool
"""
run_path = os.path.split(metadata_file)[0]
top_dirs = os.path.split(run_path)[0][:-4]
Expand Down Expand Up @@ -401,7 +408,10 @@ def parseScipionModes(metadata_file, title=None, pdb=None):

try:
indices.append(int(row1['_order_'])-1)
found_indices = True
if parseIndices:
found_indices = True
else:
found_indices = False
except KeyError:
found_indices = False

Expand Down
2 changes: 1 addition & 1 deletion prody/dynamics/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def showCumulFractVars(modes, *args, **kwargs):
fracts = calcFractVariance(modes).cumsum()
show = plt.plot(indices, fracts, *args, **kwargs)
axis = list(plt.axis())
axis[0] = 0.5
axis[0] = -0.5
axis[2] = 0
axis[3] = 1
plt.axis(axis)
Expand Down

0 comments on commit 2b541e8

Please sign in to comment.