From 20e5345b3b96646fc2cc437eaf497910bd2ea8ff Mon Sep 17 00:00:00 2001 From: James Krieger Date: Mon, 16 Oct 2023 19:38:30 +0100 Subject: [PATCH 1/2] option parseIndices default False --- prody/dynamics/functions.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/prody/dynamics/functions.py b/prody/dynamics/functions.py index fc867836e..23346ab2b 100644 --- a/prody/dynamics/functions.py +++ b/prody/dynamics/functions.py @@ -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. @@ -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] @@ -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 From f81837f92a47ffe1fd814931c9af1b211fbaf448 Mon Sep 17 00:00:00 2001 From: James Krieger Date: Tue, 17 Oct 2023 19:04:29 +0100 Subject: [PATCH 2/2] fix showCumulFractVars axis range --- prody/dynamics/plotting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prody/dynamics/plotting.py b/prody/dynamics/plotting.py index e513a183f..6a1ab02b1 100644 --- a/prody/dynamics/plotting.py +++ b/prody/dynamics/plotting.py @@ -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)