Skip to content

Commit ad22f53

Browse files
committed
made tm_dict.txt raise warning if not found
1 parent 54a63d1 commit ad22f53

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

basicrta/util.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import seaborn as sns
1616
import MDAnalysis as mda
1717
import MDAnalysis
18+
import warnings
1819
#from scipy.optimize import linear_sum_assignment as lsa
1920
#import bz2
2021

@@ -406,9 +407,9 @@ def plot_protein(residues, t_slow, bars, prot=None, label_cutoff=3, ylim=None,
406407
contents = f.read()
407408
prots = ast.literal_eval(contents)
408409
except FileNotFoundError:
409-
print("tm_dict.txt not found")
410+
warnings.warn(r"tm_dict.txt not found, TM bars will not be drawn in
411+
$\tau$ vs resid plot")
410412
prot = None
411-
pass
412413

413414
if not os.path.exists('figs'):
414415
os.mkdir('figs')

0 commit comments

Comments
 (0)